Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/iconsets/Classic/de/bold.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/iconsets/Classic/de/bold.gif,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/iconsets/Classic/de/italic.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/iconsets/Classic/de/italic.gif,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/iconsets/Classic/de/underline.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/iconsets/Classic/de/underline.gif,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/iconsets/Classic/fr/bold.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/iconsets/Classic/fr/bold.gif,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/iconsets/Classic/fr/strikethrough.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/iconsets/Classic/fr/strikethrough.gif,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/iconsets/Classic/fr/underline.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/iconsets/Classic/fr/underline.gif,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/iconsets/Crystal/LICENSE =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/iconsets/Crystal/LICENSE,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/iconsets/Crystal/LICENSE 16 Jan 2009 09:05:46 -0000 1.1 @@ -0,0 +1,121 @@ +License + +The Crystal Project are released under LGPL. + +GNU General Public License. + + 0. + + This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. + + Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. + 1. + + You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. + + You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. + 2. + + You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: + 1. The modified work must itself be a software library. + 2. You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. + 3. You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. + 4. If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. + + (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) + + These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. + + Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. + + In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. + 3. + + You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. + + Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of the Library into a program that is not a library. + 4. + + You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. + 5. + + A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. + However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. + 6. + + As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: + 1. Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) . + 2. Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. + 3. Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. + 4. If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. + 5. Verify that the user has already received a copy of these materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. + + It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. + 7. + + You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: + 1. + + Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. + 2. + + Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. + 8. + + You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. + 9. + + You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. + 10. + + Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. + 11. + + If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), 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 distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. + + If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. + + It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. + + This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. + 12. + + If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. + 13. + + The Free Software Foundation may publish revised and/or new versions of the Lesser 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 Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. + 14. + + If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. + +No Warranty + + 15. + + Because the library is licensed free of charge, there is no warranty for the library, to the extent permitted by applicable law. Except when otherwise stated in writing the copyright holders and/or other parties provide the library "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 library is with you. Should the library prove defective, you assume the cost of all necessary servicing, repair or correction. + 16. + + In no event unless required by applicable law or agreed to in writing will any copyright holder, or any other party who may modify and/or redistribute the library 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 library (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 library to operate with any other software), even if such holder or other party has been advised of the possibility of such damages. + Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/iconsets/Crystal/README =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/iconsets/Crystal/README,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/iconsets/Crystal/README 16 Jan 2009 09:05:46 -0000 1.1 @@ -0,0 +1,3 @@ +These icons are from everaldo.com, in particular from the Open Office Crystal Icons set + +The Crystal Project are released under LGPL. \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/iconsets/Crystal/ed_buttons_main.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/iconsets/Crystal/ed_buttons_main.png,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/iconsets/Crystal/iconset.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/iconsets/Crystal/iconset.xml,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/iconsets/Crystal/iconset.xml 16 Jan 2009 09:05:46 -0000 1.1 @@ -0,0 +1,234 @@ + + + + + + + iconsets/Crystal/ed_buttons_main.png + 3 + 2 + + + + + + iconsets/Crystal/ed_buttons_main.png + 2 + 2 + + + + + iconsets/Crystal/ed_buttons_main.png + 2 + 0 + + + + + iconsets/Crystal/ed_buttons_main.png + 3 + 0 + + + + + iconsets/Crystal/ed_buttons_main.png + 3 + 1 + + + + + iconsets/Crystal/ed_buttons_main.png + 2 + 1 + + + + + iconsets/Crystal/ed_buttons_main.png + 4 + 2 + + + + + iconsets/Crystal/ed_buttons_main.png + 5 + 2 + + + + + iconsets/Crystal/ed_buttons_main.png + 5 + 0 + + + + + iconsets/Crystal/ed_buttons_main.png + 4 + 0 + + + + + iconsets/Crystal/ed_buttons_main.png + 4 + 1 + + + + + iconsets/Crystal/ed_buttons_main.png + 3 + 3 + + + + + iconsets/Crystal/ed_buttons_main.png + 2 + 3 + + + + + iconsets/Crystal/ed_buttons_main.png + 0 + 2 + + + + + iconsets/Crystal/ed_buttons_main.png + 1 + 2 + + + + + iconsets/Crystal/ed_buttons_main.png + 6 + 3 + + + + + iconsets/Crystal/ed_buttons_main.png + 0 + 3 + + + + + iconsets/Crystal/ed_buttons_main.png + 1 + 3 + + + + + iconsets/Crystal/ed_buttons_main.png + 0 + 0 + + + + + iconsets/Crystal/ed_buttons_main.png + 0 + 1 + + + + + iconsets/Crystal/ed_buttons_main.png + 1 + 1 + + + + + iconsets/Crystal/ed_buttons_main.png + 1 + 0 + + + + + iconsets/Crystal/ed_buttons_main.png + 6 + 1 + + + + + iconsets/Crystal/ed_buttons_main.png + 0 + 4 + + + + + iconsets/Crystal/ed_buttons_main.png + 1 + 4 + + + + + iconsets/Crystal/ed_buttons_main.png + 8 + 1 + + + + + iconsets/Crystal/ed_buttons_main.png + 9 + 1 + + + + + iconsets/Crystal/ed_buttons_main.png + 4 + 4 + + + + + iconsets/Crystal/ed_buttons_main.png + 8 + 2 + + + + + iconsets/Crystal/ed_buttons_main.png + 9 + 2 + + + + + iconsets/Crystal/ed_buttons_main.png + 8 + 0 + + + + + iconsets/Crystal/ed_buttons_main.png + 9 + 0 + + + + + \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/iconsets/Tango/LICENSE =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/iconsets/Tango/LICENSE,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/iconsets/Tango/LICENSE 16 Jan 2009 09:05:46 -0000 1.1 @@ -0,0 +1,67 @@ +Creative Commons Attribution-ShareAlike 2.5 License Agreement + +CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE. + +License + +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. + +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. + +1. Definitions + + 1. "Collective Work" means a work, such as a periodical issue, anthology or encyclopedia, in which the Work in its entirety in unmodified form, along with a number of other contributions, constituting separate and independent works in themselves, are assembled into a collective whole. A work that constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the purposes of this License. + 2. "Derivative Work" means a work based upon the Work or upon the Work and other pre-existing works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which the Work may be recast, transformed, or adapted, except that a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this License. For the avoidance of doubt, where the Work is a musical composition or sound recording, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered a Derivative Work for the purpose of this License. + 3. "Licensor" means the individual or entity that offers the Work under the terms of this License. + 4. "Original Author" means the individual or entity who created the Work. + 5. "Work" means the copyrightable work of authorship offered under the terms of this License. + 6. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. + 7. "License Elements" means the following high-level license attributes as selected by Licensor and indicated in the title of this License: Attribution, ShareAlike. + +2. Fair Use Rights. Nothing in this license is intended to reduce, limit, or restrict any rights arising from fair use, first sale or other limitations on the exclusive rights of the copyright owner under copyright law or other applicable laws. + +3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: + + 1. to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce the Work as incorporated in the Collective Works; + 2. to create and reproduce Derivative Works; + 3. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission the Work including as incorporated in Collective Works; + 4. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission Derivative Works. + 5. + + For the avoidance of doubt, where the work is a musical composition: + 1. Performance Royalties Under Blanket Licenses. Licensor waives the exclusive right to collect, whether individually or via a performance rights society (e.g. ASCAP, BMI, SESAC), royalties for the public performance or public digital performance (e.g. webcast) of the Work. + 2. Mechanical Rights and Statutory Royalties. Licensor waives the exclusive right to collect, whether individually or via a music rights society or designated agent (e.g. Harry Fox Agency), royalties for any phonorecord You create from the Work ("cover version") and distribute, subject to the compulsory license created by 17 USC Section 115 of the US Copyright Act (or the equivalent in other jurisdictions). + 6. Webcasting Rights and Statutory Royalties. For the avoidance of doubt, where the Work is a sound recording, Licensor waives the exclusive right to collect, whether individually or via a performance-rights society (e.g. SoundExchange), royalties for the public digital performance (e.g. webcast) of the Work, subject to the compulsory license created by 17 USC Section 114 of the US Copyright Act (or the equivalent in other jurisdictions). + +The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. All rights not expressly granted by Licensor are hereby reserved. + +4. Restrictions.The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: + + 1. You may distribute, publicly display, publicly perform, or publicly digitally perform the Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of the Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Work that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Work itself to be made subject to the terms of this License. If You create a Collective Work, upon notice from any Licensor You must, to the extent practicable, remove from the Collective Work any credit as required by clause 4(c), as requested. If You create a Derivative Work, upon notice from any Licensor You must, to the extent practicable, remove from the Derivative Work any credit as required by clause 4(c), as requested. + 2. You may distribute, publicly display, publicly perform, or publicly digitally perform a Derivative Work only under the terms of this License, a later version of this License with the same License Elements as this License, or a Creative Commons iCommons license that contains the same License Elements as this License (e.g. Attribution-ShareAlike 2.5 Japan). You must include a copy of, or the Uniform Resource Identifier for, this License or other license specified in the previous sentence with every copy or phonorecord of each Derivative Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Derivative Works that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder, and You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Derivative Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Derivative Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Derivative Work itself to be made subject to the terms of this License. + 3. If you distribute, publicly display, publicly perform, or publicly digitally perform the Work or any Derivative Works or Collective Works, You must keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or (ii) if the Original Author and/or Licensor designate another party or parties (e.g. a sponsor institute, publishing entity, journal) for attribution in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; the title of the Work if supplied; to the extent reasonably practicable, the Uniform Resource Identifier, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and in the case of a Derivative Work, a credit identifying the use of the Work in the Derivative Work (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). Such credit may be implemented in any reasonable manner; provided, however, that in the case of a Derivative Work or Collective Work, at a minimum such credit will appear where any other comparable authorship credit appears and in a manner at least as prominent as such other comparable authorship credit. + +5. Representations, Warranties and Disclaimer + +UNLESS OTHERWISE AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE MATERIALS, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. + +6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. Termination + + 1. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Derivative Works or Collective Works from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. + 2. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. + +8. Miscellaneous + + 1. Each time You distribute or publicly digitally perform the Work or a Collective Work, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. + 2. Each time You distribute or publicly digitally perform a Derivative Work, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License. + 3. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. + 4. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. + 5. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. + +Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor. + +Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, neither party will use the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. + +Creative Commons may be contacted at http://creativecommons.org/. Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/iconsets/Tango/README =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/iconsets/Tango/README,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/iconsets/Tango/README 16 Jan 2009 09:05:46 -0000 1.1 @@ -0,0 +1,3 @@ +These icons are from the Tango Desktop Project. The icons are realease under the Creative Commons Share-Alike license. From http://tango.freedesktop.org: + +The Tango Desktop Project exists to help create a consistent graphical user interface experience for free and Open Source software. Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/iconsets/Tango/ed_buttons_main.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/iconsets/Tango/ed_buttons_main.png,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/iconsets/Tango/iconset.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/iconsets/Tango/iconset.xml,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/iconsets/Tango/iconset.xml 16 Jan 2009 09:05:46 -0000 1.1 @@ -0,0 +1,233 @@ + + + + + + + iconsets/Tango/ed_buttons_main.png + 3 + 2 + + + + + + iconsets/Tango/ed_buttons_main.png + 2 + 2 + + + + + iconsets/Tango/ed_buttons_main.png + 2 + 0 + + + + + iconsets/Tango/ed_buttons_main.png + 3 + 0 + + + + + iconsets/Tango/ed_buttons_main.png + 3 + 1 + + + + + iconsets/Tango/ed_buttons_main.png + 2 + 1 + + + + + iconsets/Tango/ed_buttons_main.png + 4 + 2 + + + + + iconsets/Tango/ed_buttons_main.png + 5 + 2 + + + + + iconsets/Tango/ed_buttons_main.png + 5 + 0 + + + + + iconsets/Tango/ed_buttons_main.png + 4 + 0 + + + + + iconsets/Tango/ed_buttons_main.png + 4 + 1 + + + + + iconsets/Tango/ed_buttons_main.png + 3 + 3 + + + + + iconsets/Tango/ed_buttons_main.png + 2 + 3 + + + + + iconsets/Tango/ed_buttons_main.png + 0 + 2 + + + + + iconsets/Tango/ed_buttons_main.png + 1 + 2 + + + + + iconsets/Tango/ed_buttons_main.png + 6 + 3 + + + + + iconsets/Tango/ed_buttons_main.png + 0 + 3 + + + + + iconsets/Tango/ed_buttons_main.png + 1 + 3 + + + + + iconsets/Tango/ed_buttons_main.png + 0 + 0 + + + + + iconsets/Tango/ed_buttons_main.png + 0 + 1 + + + + + iconsets/Tango/ed_buttons_main.png + 1 + 1 + + + + + iconsets/Tango/ed_buttons_main.png + 1 + 0 + + + + + iconsets/Tango/ed_buttons_main.png + 6 + 1 + + + + + iconsets/Tango/ed_buttons_main.png + 0 + 4 + + + + + iconsets/Tango/ed_buttons_main.png + 1 + 4 + + + + + iconsets/Tango/ed_buttons_main.png + 8 + 1 + + + + + iconsets/Tango/ed_buttons_main.png + 9 + 1 + + + + + iconsets/Tango/ed_buttons_main.png + 4 + 4 + + + + + iconsets/Tango/ed_buttons_main.png + 8 + 2 + + + + + iconsets/Tango/ed_buttons_main.png + 9 + 2 + + + + + iconsets/Tango/ed_buttons_main.png + 8 + 0 + + + + + iconsets/Tango/ed_buttons_main.png + 9 + 0 + + + + Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/ed_buttons_main.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/ed_buttons_main.png,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/xinha-small-icon.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/xinha-small-icon.gif,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/COPYING =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/COPYING,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/COPYING 16 Jan 2009 09:05:46 -0000 1.1 @@ -0,0 +1,67 @@ +Creative Commons Attribution-ShareAlike 2.5 License Agreement + +CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE. + +License + +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. + +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. + +1. Definitions + + 1. "Collective Work" means a work, such as a periodical issue, anthology or encyclopedia, in which the Work in its entirety in unmodified form, along with a number of other contributions, constituting separate and independent works in themselves, are assembled into a collective whole. A work that constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the purposes of this License. + 2. "Derivative Work" means a work based upon the Work or upon the Work and other pre-existing works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which the Work may be recast, transformed, or adapted, except that a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this License. For the avoidance of doubt, where the Work is a musical composition or sound recording, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered a Derivative Work for the purpose of this License. + 3. "Licensor" means the individual or entity that offers the Work under the terms of this License. + 4. "Original Author" means the individual or entity who created the Work. + 5. "Work" means the copyrightable work of authorship offered under the terms of this License. + 6. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. + 7. "License Elements" means the following high-level license attributes as selected by Licensor and indicated in the title of this License: Attribution, ShareAlike. + +2. Fair Use Rights. Nothing in this license is intended to reduce, limit, or restrict any rights arising from fair use, first sale or other limitations on the exclusive rights of the copyright owner under copyright law or other applicable laws. + +3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: + + 1. to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce the Work as incorporated in the Collective Works; + 2. to create and reproduce Derivative Works; + 3. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission the Work including as incorporated in Collective Works; + 4. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission Derivative Works. + 5. + + For the avoidance of doubt, where the work is a musical composition: + 1. Performance Royalties Under Blanket Licenses. Licensor waives the exclusive right to collect, whether individually or via a performance rights society (e.g. ASCAP, BMI, SESAC), royalties for the public performance or public digital performance (e.g. webcast) of the Work. + 2. Mechanical Rights and Statutory Royalties. Licensor waives the exclusive right to collect, whether individually or via a music rights society or designated agent (e.g. Harry Fox Agency), royalties for any phonorecord You create from the Work ("cover version") and distribute, subject to the compulsory license created by 17 USC Section 115 of the US Copyright Act (or the equivalent in other jurisdictions). + 6. Webcasting Rights and Statutory Royalties. For the avoidance of doubt, where the Work is a sound recording, Licensor waives the exclusive right to collect, whether individually or via a performance-rights society (e.g. SoundExchange), royalties for the public digital performance (e.g. webcast) of the Work, subject to the compulsory license created by 17 USC Section 114 of the US Copyright Act (or the equivalent in other jurisdictions). + +The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. All rights not expressly granted by Licensor are hereby reserved. + +4. Restrictions.The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: + + 1. You may distribute, publicly display, publicly perform, or publicly digitally perform the Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of the Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Work that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Work itself to be made subject to the terms of this License. If You create a Collective Work, upon notice from any Licensor You must, to the extent practicable, remove from the Collective Work any credit as required by clause 4(c), as requested. If You create a Derivative Work, upon notice from any Licensor You must, to the extent practicable, remove from the Derivative Work any credit as required by clause 4(c), as requested. + 2. You may distribute, publicly display, publicly perform, or publicly digitally perform a Derivative Work only under the terms of this License, a later version of this License with the same License Elements as this License, or a Creative Commons iCommons license that contains the same License Elements as this License (e.g. Attribution-ShareAlike 2.5 Japan). You must include a copy of, or the Uniform Resource Identifier for, this License or other license specified in the previous sentence with every copy or phonorecord of each Derivative Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Derivative Works that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder, and You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Derivative Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Derivative Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Derivative Work itself to be made subject to the terms of this License. + 3. If you distribute, publicly display, publicly perform, or publicly digitally perform the Work or any Derivative Works or Collective Works, You must keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or (ii) if the Original Author and/or Licensor designate another party or parties (e.g. a sponsor institute, publishing entity, journal) for attribution in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; the title of the Work if supplied; to the extent reasonably practicable, the Uniform Resource Identifier, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and in the case of a Derivative Work, a credit identifying the use of the Work in the Derivative Work (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). Such credit may be implemented in any reasonable manner; provided, however, that in the case of a Derivative Work or Collective Work, at a minimum such credit will appear where any other comparable authorship credit appears and in a manner at least as prominent as such other comparable authorship credit. + +5. Representations, Warranties and Disclaimer + +UNLESS OTHERWISE AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE MATERIALS, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. + +6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. Termination + + 1. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Derivative Works or Collective Works from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. + 2. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. + +8. Miscellaneous + + 1. Each time You distribute or publicly digitally perform the Work or a Collective Work, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. + 2. Each time You distribute or publicly digitally perform a Derivative Work, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License. + 3. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. + 4. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. + 5. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. + +Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor. + +Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, neither party will use the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. + +Creative Commons may be contacted at http://creativecommons.org/. Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/document-new.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/document-new.png,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/document-open.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/document-open.png,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/document-print.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/document-print.png,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/document-save.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/document-save.png,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/edit-copy.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/edit-copy.png,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/edit-redo.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/edit-redo.png,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/edit-select-all.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/edit-select-all.png,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/edit-undo.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/edit-undo.png,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/folder-new.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/folder-new.png,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/format-direction-left-to-right.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/format-direction-left-to-right.png,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/format-direction-right-to-left.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/format-direction-right-to-left.png,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/format-indent-less.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/format-indent-less.png,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/format-indent-more.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/format-indent-more.png,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/format-justify-center.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/format-justify-center.png,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/format-justify-fill.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/format-justify-fill.png,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/format-justify-left.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/format-justify-left.png,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/format-justify-right.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/format-justify-right.png,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/format-text-background-color.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/format-text-background-color.png,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/format-text-bold.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/format-text-bold.png,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/format-text-color.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/format-text-color.png,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/format-text-italic.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/format-text-italic.png,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/format-text-strikethrough.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/format-text-strikethrough.png,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/format-text-subscript.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/format-text-subscript.png,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/format-text-superscript.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/format-text-superscript.png,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/format-text-underline.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/format-text-underline.png,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/go-up.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/go-up.png,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/insert-link.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/insert-link.png,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/insert-table.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/insert-table.png,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/toggle-borders.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/toggle-borders.png,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/view-fullscreen.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/view-fullscreen.png,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/view-restore.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/actions/view-restore.png,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/apps/accessories-character-map.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/apps/accessories-character-map.png,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/apps/help-browser.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/apps/help-browser.png,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/mimetypes/image-x-generic.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/mimetypes/image-x-generic.png,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/places/user-trash.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/16x16/places/user-trash.png,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/32x32/apps/internet-web-browser.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/32x32/apps/internet-web-browser.png,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/32x32/mimetypes/text-html.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/32x32/mimetypes/text-html.png,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/32x32/mimetypes/text-x-generic.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/32x32/mimetypes/text-x-generic.png,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/32x32/mimetypes/x-office-document.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/32x32/mimetypes/x-office-document.png,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/32x32/places/folder.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/32x32/places/folder.png,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/32x32/places/network-server.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/tango/32x32/places/network-server.png,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/lang/de.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/lang/de.js,v diff -u -N -r1.6 -r1.7 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/lang/de.js 24 Nov 2007 15:35:28 -0000 1.6 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/lang/de.js 16 Jan 2009 09:05:46 -0000 1.7 @@ -132,9 +132,11 @@ "Image Preview:": "Bild Voransicht:", "You must enter the URL": "Bitte geben Sie die URL ein", +/* "button_bold": "de/bold.gif", "button_italic": "de/italic.gif", "button_underline": "de/underline.gif", +*/ // Editor Help "Keyboard shortcuts": "Tastaturkürzel", Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/lang/fr.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/lang/fr.js,v diff -u -N -r1.7 -r1.8 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/lang/fr.js 24 Nov 2007 15:35:28 -0000 1.7 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/lang/fr.js 16 Jan 2009 09:05:46 -0000 1.8 @@ -132,9 +132,11 @@ "You must enter the URL": "Vous devez entrer l'URL", // toolbar +/* "button_bold": "fr/bold.gif", "button_underline": "fr/underline.gif", "button_strikethrough": "fr/strikethrough.gif", +*/ // Editor Help "Xinha Help": "Aide Xinha", Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/AboutBox/AboutBox.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/AboutBox/AboutBox.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/AboutBox/AboutBox.js 16 Jan 2009 09:05:46 -0000 1.1 @@ -0,0 +1,2 @@ +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +(function(){Xinha.plugins.AboutBox=a;function a(b){this.editor=b}a._pluginInfo={name:"AboutBox",developer:"The Xinha Core Developer Team"};a.prototype._lc=function(b){return Xinha._lc(b,"AboutBox")};a.prototype._prepareDialog=function(){var b=this;var d=this.editor;Xinha.loadStyle("about.css","AboutBox","aboutCSS");this.dialog=new Xinha.Dialog(d,a.html,"Xinha",{width:600});this.dialog.getElementById("close").onclick=function(){b.dialog.hide()};this.dialog.getElementById("xinha_logo").src=_editor_url+"images/xinha_logo.gif";var c=this.dialog.getElementsByClassName("tab");this.currentTab=c[0];c.forEach(function(e){e.onclick=function(){if(b.currentTab){Xinha._removeClass(b.currentTab,"tab-current");b.dialog.getElementById(b.currentTab.rel).style.display="none"}Xinha._addClass(e,"tab-current");e.blur();b.currentTab=e;b.dialog.getElementById(e.rel).style.display="block"}});this.fillPlugins();this.fillVersion();this.dialog.onresize=function(){this.getElementById("content").style.height=parseInt(this.height,10)-this.getElementById("h1").offsetHeight-this.getElementById("buttons").offsetHeight-100+"px"}};a.prototype.fillPlugins=function(){var k=this.editor;var d=this.dialog.getElementById("plugins_table");var g,l,b;var c=0;for(var f in k.plugins){var h=k.plugins[f];g=document.createElement("tr");if(c%2){g.style.backgroundColor="#e5e5e5"}d.appendChild(g);l=document.createElement("td");l.innerHTML=h.name;if(h.version){l.innerHTML+=" v"+h.version}g.appendChild(l);l=document.createElement("td");if(h.developer){if(h.developer_url){l.innerHTML=''+h.developer+""}else{l.innerHTML=h.developer}}g.appendChild(l);l=document.createElement("td");if(h.sponsor){if(h.sponsor_url){l.innerHTML=''+h.sponsor+""}else{l.innerHTML=h.sponsor}}g.appendChild(l);l=document.createElement("td");if(h.license){l.innerHTML=h.license}else{l.innerHTML="htmlArea"}g.appendChild(l);c++}};a.prototype.fillVersion=function(){var b=Xinha.version;this.dialog.getElementById("version").innerHTML="
\nRelease:         "+b.Release+" ("+b.Date+")\nHead:            "+b.Head+"\nRevision:        "+b.Revision+"\nLast Changed By: "+b.RevisionBy+"\n
"};a.prototype.show=function(){var c=this;if(!a.html){if(a.loading){return}a.loading=true;Xinha._getback(Xinha.getPluginDir("AboutBox")+"/dialog.html",function(d){a.html=d;c.show()});return}if(!this.dialog){this._prepareDialog()}var b={inputArea:""};this.dialog.show(b)}})(); \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/AboutBox/about.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/AboutBox/about.css,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/AboutBox/about.css 16 Jan 2009 09:05:46 -0000 1.1 @@ -0,0 +1,51 @@ +.dialog .about.buttons a.tab { + color: #000; + cursor: pointer; + margin-left: -5px; + float: left; position: relative; + border: 1px solid #555; + top: -3px; left: -2px; + padding: 2px 10px 3px 10px; + border-top: none; background-color: #CCC; + -moz-border-radius: 0px 0px 4px 4px; + -webkit-border-radius: 4px; + -webkit-border-top-left-radius:0; + -webkit-border-top-right-radius:0; + + z-index: 0; + text-decoration:none; +} +.dialog .about.buttons a.tab-current +{ + top: -4px; + background-color: #f5f6f6; + padding: 3px 10px 4px 10px; + z-index: 10; +} + +.dialog .about.buttons { + background-color:white; + padding:3px 3px 0 10px; +} + +.dialog .about.content .tab-content { + padding-bottom:15px; + width:95%; +} +.dialog .about.content { + height:300px; + overflow:auto; + background-color:#f5f6f6; +} +.dialog .about.content table.plugins{ + width:95%; + border: 1px solid black; + margin: 1em; +} +.dialog .about.content table.plugins th{ + font-weight: bold; + background-color: #CCC; +} +.dialog .about.content table.plugins td{ + padding:3px; +} \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/AboutBox/dialog.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/AboutBox/dialog.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/AboutBox/dialog.html 16 Jan 2009 09:05:46 -0000 1.1 @@ -0,0 +1,95 @@ +

+ About this editor +

+Xinha +
+
+

+ A free WYSIWYG editor replacement for + + <textarea> + + fields. +

+

+ Visit the Xinha Website + for more information. +

+

+ Use of Xinha is granted by the terms of the htmlArea License (based on BSD license) +

+
    Copyright (c) 2005-2009 Xinha Developer Team and contributors
+

+ Xinha was originally based on work by Mihai Bazon which is: +

+
+    Copyright (c) 2003-2004 dynarch.com.
+    Copyright (c) 2002-2003 interactivetools.com, inc.
+    This copyright notice MUST stay intact for use.
+  
+
+ + + + +
+
+ +
+ About + Thanks + License + Plugins + Version +
+
\ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/ColorPicker/ColorPicker.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/ColorPicker/ColorPicker.js,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/ColorPicker/ColorPicker.js 13 May 2008 18:53:45 -0000 1.5 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/ColorPicker/ColorPicker.js 16 Jan 2009 09:05:46 -0000 1.6 @@ -1,624 +1,2 @@ -/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */ -/* This file is part of version 0.95 released Mon, 12 May 2008 17:33:15 +0200 */ -/* The URL of the most recent version of this file is http://svn.xinha.webfactional.com/trunk/modules/ColorPicker/ColorPicker.js */ -ColorPicker._pluginInfo={name:"colorPicker",version:"$LastChangedRevision:998 $".replace(/^[^:]*:\s*(.*)\s*\$$/,"$1"),developer:"James Sleeman",developer_url:"http://www.gogo.co.nz/",c_owner:"Gogo Internet Services",license:"htmlArea",sponsor:"Gogo Internet Services",sponsor_url:"http://www.gogo.co.nz/"}; -function ColorPicker(){ -} -try{ -if(window.opener&&window.opener.Xinha){ -var openerColorPicker=window.opener.Xinha.colorPicker; -Xinha._addEvent(window,"unload",function(){ -Xinha.colorPicker=openerColorPicker; -}); -} -} -catch(e){ -} -Xinha.colorPicker=function(_1){ -if(Xinha.colorPicker.savedColors.length===0){ -Xinha.colorPicker.loadColors(); -} -this.is_ie_6=(Xinha.is_ie&&Xinha.ie_version<7); -var _2=this; -var _3=false; -var _4=false; -var _5=0; -var _6=0; -this.callback=_1.callback?_1.callback:function(_7){ -alert("You picked "+_7); -}; -this.websafe=_1.websafe?_1.websafe:false; -this.savecolors=_1.savecolors?_1.savecolors:20; -this.cellsize=parseInt(_1.cellsize?_1.cellsize:"10px",10); -this.side=_1.granularity?_1.granularity:18; -var _8=this.side+1; -var _9=this.side-1; -this.value=1; -this.saved_cells=null; -this.table=document.createElement("table"); -this.table.className="dialog"; -this.table.cellSpacing=this.table.cellPadding=0; -this.table.onmouseup=function(){ -_3=false; -_4=false; -}; -this.tbody=document.createElement("tbody"); -this.table.appendChild(this.tbody); -this.table.style.border="1px solid WindowFrame"; -this.table.style.zIndex="1050"; -var tr=document.createElement("tr"); -var td=document.createElement("td"); -td.colSpan=this.side; -td.className="title"; -td.style.fontFamily="small-caption,caption,sans-serif"; -td.style.fontSize="x-small"; -td.unselectable="on"; -td.style.MozUserSelect="none"; -td.style.cursor="default"; -td.appendChild(document.createTextNode(Xinha._lc("Click a color..."))); -td.style.borderBottom="1px solid WindowFrame"; -tr.appendChild(td); -td=null; -var td=document.createElement("td"); -td.className="title"; -td.colSpan=2; -td.style.fontFamily="Tahoma,Verdana,sans-serif"; -td.style.borderBottom="1px solid WindowFrame"; -td.style.paddingRight="0"; -tr.appendChild(td); -var _c=document.createElement("div"); -_c.title=Xinha._lc("Close"); -_c.className="buttonColor"; -_c.style.height="11px"; -_c.style.width="11px"; -_c.style.cursor="pointer"; -_c.onclick=function(){ -_2.close(); -}; -_c.appendChild(document.createTextNode("\xd7")); -_c.align="center"; -_c.style.verticalAlign="top"; -_c.style.position="relative"; -_c.style.cssFloat="right"; -_c.style.styleFloat="right"; -_c.style.padding="0"; -_c.style.margin="2px"; -_c.style.backgroundColor="transparent"; -_c.style.fontSize="11px"; -if(!Xinha.is_ie){ -_c.style.lineHeight="9px"; -} -_c.style.letterSpacing="0"; -td.appendChild(_c); -this.tbody.appendChild(tr); -_c=tr=td=null; -this.constrain_cb=document.createElement("input"); -this.constrain_cb.type="checkbox"; -this.chosenColor=document.createElement("input"); -this.chosenColor.type="text"; -this.chosenColor.maxLength=7; -this.chosenColor.style.width="50px"; -this.chosenColor.style.fontSize="11px"; -this.chosenColor.onchange=function(){ -if(/#[0-9a-f]{6,6}/i.test(this.value)){ -_2.backSample.style.backgroundColor=this.value; -_2.foreSample.style.color=this.value; -} -}; -this.backSample=document.createElement("div"); -this.backSample.appendChild(document.createTextNode("\xa0")); -this.backSample.style.fontWeight="bold"; -this.backSample.style.fontFamily="small-caption,caption,sans-serif"; -this.backSample.fontSize="x-small"; -this.foreSample=document.createElement("div"); -this.foreSample.appendChild(document.createTextNode(Xinha._lc("Sample"))); -this.foreSample.style.fontWeight="bold"; -this.foreSample.style.fontFamily="small-caption,caption,sans-serif"; -this.foreSample.fontSize="x-small"; -function toHex(_d){ -var h=_d.toString(16); -if(h.length<2){ -h="0"+h; -} -return h; -} -function tupleToColor(_f){ -return "#"+toHex(_f.red)+toHex(_f.green)+toHex(_f.blue); -} -function nearestPowerOf(num,_11){ -return Math.round(Math.round(num/_11)*_11); -} -function doubleHexDec(dec){ -return parseInt(dec.toString(16)+dec.toString(16),16); -} -function rgbToWebsafe(_13){ -_13.red=doubleHexDec(nearestPowerOf(parseInt(toHex(_13.red).charAt(0),16),3)); -_13.blue=doubleHexDec(nearestPowerOf(parseInt(toHex(_13.blue).charAt(0),16),3)); -_13.green=doubleHexDec(nearestPowerOf(parseInt(toHex(_13.green).charAt(0),16),3)); -return _13; -} -function hsvToRGB(h,s,v){ -var _17; -if(s===0){ -_17={red:v,green:v,blue:v}; -}else{ -h/=60; -var i=Math.floor(h); -var f=h-i; -var p=v*(1-s); -var q=v*(1-s*f); -var t=v*(1-s*(1-f)); -switch(i){ -case 0: -_17={red:v,green:t,blue:p}; -break; -case 1: -_17={red:q,green:v,blue:p}; -break; -case 2: -_17={red:p,green:v,blue:t}; -break; -case 3: -_17={red:p,green:q,blue:v}; -break; -case 4: -_17={red:t,green:p,blue:v}; -break; -default: -_17={red:v,green:p,blue:q}; -break; -} -} -_17.red=Math.ceil(_17.red*255); -_17.green=Math.ceil(_17.green*255); -_17.blue=Math.ceil(_17.blue*255); -return _17; -} -var _1d=this; -function closeOnBodyClick(ev){ -ev=ev?ev:window.event; -el=ev.target?ev.target:ev.srcElement; -do{ -if(el==_1d.table){ -return; -} -}while(el=el.parentNode); -_1d.close(); -} -this.open=function(_1f,_20,_21){ -this.table.style.display=""; -this.pick_color(); -if(_21&&/#[0-9a-f]{6,6}/i.test(_21)){ -this.chosenColor.value=_21; -this.backSample.style.backgroundColor=_21; -this.foreSample.style.color=_21; -} -Xinha._addEvent(document.body,"mousedown",closeOnBodyClick); -this.table.style.position="absolute"; -var e=_20; -var top=0; -var _24=0; -do{ -if(e.style.position=="fixed"){ -this.table.style.position="fixed"; -} -top+=e.offsetTop; -_24+=e.offsetLeft; -e=e.offsetParent; -}while(e); -var x,y; -if(/top/.test(_1f)||(top+this.table.offsetHeight>document.body.offsetHeight)){ -if(top-this.table.offsetHeight>0){ -this.table.style.top=(top-this.table.offsetHeight)+"px"; -}else{ -this.table.style.top=0; -} -}else{ -this.table.style.top=(top+_20.offsetHeight)+"px"; -} -if(/left/.test(_1f)||(_24+this.table.offsetWidth>document.body.offsetWidth)){ -if(_24-(this.table.offsetWidth-_20.offsetWidth)>0){ -this.table.style.left=(_24-(this.table.offsetWidth-_20.offsetWidth))+"px"; -}else{ -this.table.style.left=0; -} -}else{ -this.table.style.left=_24+"px"; -} -if(this.is_ie_6){ -this.iframe.style.top=this.table.style.top; -this.iframe.style.left=this.table.style.left; -} -}; -function pickCell(_26){ -_2.chosenColor.value=_26.colorCode; -_2.backSample.style.backgroundColor=_26.colorCode; -_2.foreSample.style.color=_26.colorCode; -if((_26.hue>=195&&_26.saturation>0.5)||(_26.hue===0&&_26.saturation===0&&_26.value<0.5)||(_26.hue!==0&&_2.value<0.75)){ -_26.style.borderColor="#fff"; -}else{ -_26.style.borderColor="#000"; -} -_5=_26.thisrow; -_6=_26.thiscol; -} -function pickValue(_27){ -if(_2.value<0.5){ -_27.style.borderColor="#fff"; -}else{ -_27.style.borderColor="#000"; -} -_9=_27.thisrow; -_8=_27.thiscol; -_2.chosenColor.value=_2.saved_cells[_5][_6].colorCode; -_2.backSample.style.backgroundColor=_2.saved_cells[_5][_6].colorCode; -_2.foreSample.style.color=_2.saved_cells[_5][_6].colorCode; -} -function unpickCell(row,col){ -_2.saved_cells[row][col].style.borderColor=_2.saved_cells[row][col].colorCode; -} -this.pick_color=function(){ -var _2a,cols; -var _2b=this; -var _2c=359/(this.side); -var _2d=1/(this.side-1); -var _2e=1/(this.side-1); -var _2f=this.constrain_cb.checked; -if(this.saved_cells===null){ -this.saved_cells=[]; -for(var row=0;row=195&&_41.saturation>0.5)||(_41.hue===0&&_41.saturation===0&&_41.value<0.5)||(_41.hue!==0&&_2b.value<0.75)){ -_41.style.borderColor="#fff"; -}else{ -_41.style.borderColor="#000"; -} -} -}; -this.close=function(){ -Xinha._removeEvent(document.body,"mousedown",closeOnBodyClick); -this.table.style.display="none"; -if(this.is_ie_6){ -if(this.iframe){ -this.iframe.style.display="none"; -} -} -}; -}; -Xinha.colorPicker.savedColors=[]; -Xinha.colorPicker.remember=function(_42,_43){ -for(var i=Xinha.colorPicker.savedColors.length;i--;){ -if(Xinha.colorPicker.savedColors[i]==_42){ -return false; -} -} -Xinha.colorPicker.savedColors.splice(0,0,_42); -Xinha.colorPicker.savedColors=Xinha.colorPicker.savedColors.slice(0,_43); -var _45=new Date(); -_45.setMonth(_45.getMonth()+1); -document.cookie="XinhaColorPicker="+escape(Xinha.colorPicker.savedColors.join("-"))+";expires="+_45.toGMTString(); -return true; -}; -Xinha.colorPicker.loadColors=function(){ -var _46=document.cookie.indexOf("XinhaColorPicker"); -if(_46!=-1){ -var _47=(document.cookie.indexOf("=",_46)+1); -var end=document.cookie.indexOf(";",_46); -if(end==-1){ -end=document.cookie.length; -} -Xinha.colorPicker.savedColors=unescape(document.cookie.substring(_47,end)).split("-"); -} -}; -Xinha.colorPicker.InputBinding=function(_49,_4a){ -var doc=_49.ownerDocument; -var _4c=doc.createElement("span"); -_4c.className="buttonColor"; -var _4d=this.chooser=doc.createElement("span"); -_4d.className="chooser"; -if(_49.value){ -_4d.style.backgroundColor=_49.value; -} -_4d.onmouseover=function(){ -_4d.className="chooser buttonColor-hilite"; -}; -_4d.onmouseout=function(){ -_4d.className="chooser"; -}; -_4d.appendChild(doc.createTextNode("\xa0")); -_4c.appendChild(_4d); -var _4e=doc.createElement("span"); -_4e.className="nocolor"; -_4e.onmouseover=function(){ -_4e.className="nocolor buttonColor-hilite"; -_4e.style.color="#f00"; -}; -_4e.onmouseout=function(){ -_4e.className="nocolor"; -_4e.style.color="#000"; -}; -_4e.onclick=function(){ -_49.value=""; -_4d.style.backgroundColor=""; -}; -_4e.appendChild(doc.createTextNode("\xd7")); -_4c.appendChild(_4e); -_49.parentNode.insertBefore(_4c,_49.nextSibling); -Xinha._addEvent(_49,"change",function(){ -_4d.style.backgroundColor=this.value; -}); -_4a=(_4a)?Xinha.cloneObject(_4a):{cellsize:"5px"}; -_4a.callback=(_4a.callback)?_4a.callback:function(_4f){ -_4d.style.backgroundColor=_4f; -_49.value=_4f; -}; -_4d.onclick=function(){ -var _50=new Xinha.colorPicker(_4a); -_50.open("",_4d,_49.value); -}; -Xinha.freeLater(this,"chooser"); -}; -Xinha.colorPicker.InputBinding.prototype.setColor=function(_51){ -this.chooser.style.backgroundColor=_51; -}; - +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +ColorPicker._pluginInfo={name:"colorPicker",version:"$LastChangedRevision: 1084 $".replace(/^[^:]*:\s*(.*)\s*\$$/,"$1"),developer:"James Sleeman",developer_url:"http://www.gogo.co.nz/",c_owner:"Gogo Internet Services",license:"htmlArea",sponsor:"Gogo Internet Services",sponsor_url:"http://www.gogo.co.nz/"};function ColorPicker(){}try{if(window.opener&&window.opener.Xinha){var openerColorPicker=window.opener.Xinha.colorPicker;Xinha._addEvent(window,"unload",function(){Xinha.colorPicker=openerColorPicker})}}catch(e){}Xinha.colorPicker=function(t){if(Xinha.colorPicker.savedColors.length===0){Xinha.colorPicker.loadColors()}this.is_ie_6=(Xinha.is_ie&&Xinha.ie_version<7);var i=this;var c=false;var d=false;var w=0;var u=0;this.callback=t.callback?t.callback:function(x){alert("You picked "+x)};this.websafe=t.websafe?t.websafe:false;this.savecolors=t.savecolors?t.savecolors:20;this.cellsize=parseInt(t.cellsize?t.cellsize:"10px",10);this.side=t.granularity?t.granularity:18;var h=this.side+1;var k=this.side-1;this.value=1;this.saved_cells=null;this.table=document.createElement("table");this.table.className="dialog";this.table.cellSpacing=this.table.cellPadding=0;this.table.onmouseup=function(){c=false;d=false};this.tbody=document.createElement("tbody");this.table.appendChild(this.tbody);this.table.style.border="1px solid WindowFrame";this.table.style.zIndex="1050";var b=document.createElement("tr");var g=document.createElement("td");g.colSpan=this.side;g.className="title";g.style.fontFamily="small-caption,caption,sans-serif";g.style.fontSize="x-small";g.unselectable="on";g.style.MozUserSelect="none";g.style.cursor="default";g.appendChild(document.createTextNode(Xinha._lc("Click a color...")));g.style.borderBottom="1px solid WindowFrame";b.appendChild(g);g=null;var g=document.createElement("td");g.className="title";g.colSpan=2;g.style.fontFamily="Tahoma,Verdana,sans-serif";g.style.borderBottom="1px solid WindowFrame";g.style.paddingRight="0";b.appendChild(g);var m=document.createElement("div");m.title=Xinha._lc("Close");m.className="buttonColor";m.style.height="11px";m.style.width="11px";m.style.cursor="pointer";m.onclick=function(){i.close()};m.appendChild(document.createTextNode("\u00D7"));m.align="center";m.style.verticalAlign="top";m.style.position="relative";m.style.cssFloat="right";m.style.styleFloat="right";m.style.padding="0";m.style.margin="2px";m.style.backgroundColor="transparent";m.style.fontSize="11px";if(!Xinha.is_ie){m.style.lineHeight="9px"}m.style.letterSpacing="0";g.appendChild(m);this.tbody.appendChild(b);m=b=g=null;this.constrain_cb=document.createElement("input");this.constrain_cb.type="checkbox";this.chosenColor=document.createElement("input");this.chosenColor.type="text";this.chosenColor.maxLength=7;this.chosenColor.style.width="50px";this.chosenColor.style.fontSize="11px";this.chosenColor.onchange=function(){if(/#[0-9a-f]{6,6}/i.test(this.value)){i.backSample.style.backgroundColor=this.value;i.foreSample.style.color=this.value}};this.backSample=document.createElement("div");this.backSample.appendChild(document.createTextNode("\u00A0"));this.backSample.style.fontWeight="bold";this.backSample.style.fontFamily="small-caption,caption,sans-serif";this.backSample.fontSize="x-small";this.foreSample=document.createElement("div");this.foreSample.appendChild(document.createTextNode(Xinha._lc("Sample")));this.foreSample.style.fontWeight="bold";this.foreSample.style.fontFamily="small-caption,caption,sans-serif";this.foreSample.fontSize="x-small";function q(y){var x=y.toString(16);if(x.length<2){x="0"+x}return x}function p(x){return"#"+q(x.red)+q(x.green)+q(x.blue)}function v(x,y){return Math.round(Math.round(x/y)*y)}function f(x){return parseInt(x.toString(16)+x.toString(16),16)}function s(x){x.red=f(v(parseInt(q(x.red).charAt(0),16),3));x.blue=f(v(parseInt(q(x.blue).charAt(0),16),3));x.green=f(v(parseInt(q(x.green).charAt(0),16),3));return x}function l(B,F,D){var x;if(F===0){x={red:D,green:D,blue:D}}else{B/=60;var A=Math.floor(B);var C=B-A;var z=D*(1-F);var y=D*(1-F*C);var E=D*(1-F*(1-C));switch(A){case 0:x={red:D,green:E,blue:z};break;case 1:x={red:y,green:D,blue:z};break;case 2:x={red:z,green:D,blue:E};break;case 3:x={red:z,green:y,blue:D};break;case 4:x={red:E,green:z,blue:D};break;default:x={red:D,green:z,blue:y};break}}x.red=Math.ceil(x.red*255);x.green=Math.ceil(x.green*255);x.blue=Math.ceil(x.blue*255);return x}var o=this;function a(x){x=x?x:window.event;el=x.target?x.target:x.srcElement;do{if(el==o.table){return}}while(el=el.parentNode);o.close()}this.open=function(G,A,B){this.table.style.display="";this.pick_color();if(B&&/#[0-9a-f]{6,6}/i.test(B)){this.chosenColor.value=B;this.backSample.style.backgroundColor=B;this.foreSample.style.color=B}Xinha._addEvent(document.body,"mousedown",a);this.table.style.position="absolute";var E=A;var D=0;var C=0;do{if(E.style.position=="fixed"){this.table.style.position="fixed"}D+=E.offsetTop-E.scrollTop;C+=E.offsetLeft-E.scrollLeft;E=E.offsetParent}while(E);var z,F;if(/top/.test(G)||(D+this.table.offsetHeight>document.body.offsetHeight)){if(D-this.table.offsetHeight>0){this.table.style.top=(D-this.table.offsetHeight)+"px"}else{this.table.style.top=0}}else{this.table.style.top=(D+A.offsetHeight)+"px"}if(/left/.test(G)||(C+this.table.offsetWidth>document.body.offsetWidth)){if(C-(this.table.offsetWidth-A.offsetWidth)>0){this.table.style.left=(C-(this.table.offsetWidth-A.offsetWidth))+"px"}else{this.table.style.left=0}}else{this.table.style.left=C+"px"}if(this.is_ie_6){this.iframe.style.top=this.table.style.top;this.iframe.style.left=this.table.style.left}};function n(x){i.chosenColor.value=x.colorCode;i.backSample.style.backgroundColor=x.colorCode;i.foreSample.style.color=x.colorCode;if((x.hue>=195&&x.saturation>0.5)||(x.hue===0&&x.saturation===0&&x.value<0.5)||(x.hue!==0&&i.value<0.75)){x.style.borderColor="#fff"}else{x.style.borderColor="#000"}w=x.thisrow;u=x.thiscol}function j(x){if(i.value<0.5){x.style.borderColor="#fff"}else{x.style.borderColor="#000"}k=x.thisrow;h=x.thiscol;i.chosenColor.value=i.saved_cells[w][u].colorCode;i.backSample.style.backgroundColor=i.saved_cells[w][u].colorCode;i.foreSample.style.color=i.saved_cells[w][u].colorCode}function r(y,x){i.saved_cells[y][x].style.borderColor=i.saved_cells[y][x].colorCode}this.pick_color=function(){var K,L;var J=this;var R=359/(this.side);var B=1/(this.side-1);var I=1/(this.side-1);var Q=this.constrain_cb.checked;if(this.saved_cells===null){this.saved_cells=[];for(var C=0;C=195&&D.saturation>0.5)||(D.hue===0&&D.saturation===0&&D.value<0.5)||(D.hue!==0&&J.value<0.75)){D.style.borderColor="#fff"}else{D.style.borderColor="#000"}}};this.close=function(){Xinha._removeEvent(document.body,"mousedown",a);this.table.style.display="none";if(this.is_ie_6){if(this.iframe){this.iframe.style.display="none"}}}};Xinha.colorPicker.savedColors=[];Xinha.colorPicker.remember=function(a,c){for(var b=Xinha.colorPicker.savedColors.length;b--;){if(Xinha.colorPicker.savedColors[b]==a){return false}}Xinha.colorPicker.savedColors.splice(0,0,a);Xinha.colorPicker.savedColors=Xinha.colorPicker.savedColors.slice(0,c);var d=new Date();d.setMonth(d.getMonth()+1);document.cookie="XinhaColorPicker="+escape(Xinha.colorPicker.savedColors.join("-"))+";expires="+d.toGMTString();return true};Xinha.colorPicker.loadColors=function(){var b=document.cookie.indexOf("XinhaColorPicker");if(b!=-1){var c=(document.cookie.indexOf("=",b)+1);var a=document.cookie.indexOf(";",b);if(a==-1){a=document.cookie.length}Xinha.colorPicker.savedColors=unescape(document.cookie.substring(c,a)).split("-")}};Xinha.colorPicker.InputBinding=function(b,c){var g=b.ownerDocument;var a=g.createElement("span");a.className="buttonColor";var d=this.chooser=g.createElement("span");d.className="chooser";if(b.value){d.style.backgroundColor=b.value}d.onmouseover=function(){d.className="chooser buttonColor-hilite"};d.onmouseout=function(){d.className="chooser"};d.appendChild(g.createTextNode("\u00a0"));a.appendChild(d);var f=g.createElement("span");f.className="nocolor";f.onmouseover=function(){f.className="nocolor buttonColor-hilite";f.style.color="#f00"};f.onmouseout=function(){f.className="nocolor";f.style.color="#000"};f.onclick=function(){b.value="";d.style.backgroundColor=""};f.appendChild(g.createTextNode("\u00d7"));a.appendChild(f);b.parentNode.insertBefore(a,b.nextSibling);Xinha._addEvent(b,"change",function(){d.style.backgroundColor=this.value});c=(c)?Xinha.cloneObject(c):{cellsize:"5px"};c.callback=(c.callback)?c.callback:function(h){d.style.backgroundColor=h;b.value=h};d.onclick=function(){var h=new Xinha.colorPicker(c);h.open("",d,b.value)};Xinha.freeLater(this,"chooser")};Xinha.colorPicker.InputBinding.prototype.setColor=function(a){this.chooser.style.backgroundColor=a}; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/CreateLink/dialog.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/CreateLink/dialog.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/CreateLink/dialog.html 16 Jan 2009 09:05:46 -0000 1.1 @@ -0,0 +1,28 @@ +

Insert/Modify Link

+ + + + + + + + + + + + + +
URL:
Title (tooltip):
Target: + +
+ +
+ + +
\ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/CreateLink/link.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/CreateLink/link.js,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/CreateLink/link.js 13 May 2008 18:53:45 -0000 1.5 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/CreateLink/link.js 16 Jan 2009 09:05:46 -0000 1.6 @@ -1,87 +1,2 @@ -/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */ -/* This file is part of version 0.95 released Mon, 12 May 2008 17:33:15 +0200 */ -/* The URL of the most recent version of this file is http://svn.xinha.webfactional.com/trunk/modules/CreateLink/link.js */ -CreateLink._pluginInfo={name:"CreateLink",origin:"Xinha Core",version:"$LastChangedRevision:990 $".replace(/^[^:]*:\s*(.*)\s*\$$/,"$1"),developer:"The Xinha Core Developer Team",developer_url:"$HeadURL:http://svn.xinha.webfactional.com/trunk/modules/CreateLink/link.js $".replace(/^[^:]*:\s*(.*)\s*\$$/,"$1"),sponsor:"",sponsor_url:"",license:"htmlArea"}; -function CreateLink(_1){ -} -Xinha.prototype._createLink=function(_2){ -var _3=this; -var _4=null; -if(typeof _2=="undefined"){ -_2=this.getParentElement(); -if(_2){ -while(_2&&!/^a$/i.test(_2.tagName)){ -_2=_2.parentNode; -} -} -} -if(!_2){ -var _5=_3.getSelection(); -var _6=_3.createRange(_5); -var _7=0; -if(Xinha.is_ie){ -if(_5.type=="Control"){ -_7=_6.length; -}else{ -_7=_6.compareEndPoints("StartToEnd",_6); -} -}else{ -_7=_6.compareBoundaryPoints(_6.START_TO_END,_6); -} -if(_7===0){ -alert(Xinha._lc("You need to select some text before creating a link")); -return; -} -_4={f_href:"",f_title:"",f_target:"",f_usetarget:_3.config.makeLinkShowsTarget}; -}else{ -_4={f_href:Xinha.is_ie?_3.stripBaseURL(_2.href):_2.getAttribute("href"),f_title:_2.title,f_target:_2.target,f_usetarget:_3.config.makeLinkShowsTarget}; -} -Dialog(_3.config.URIs.link,function(_8){ -if(!_8){ -return false; -} -var a=_2; -if(!a){ -try{ -var _a=Xinha.uniq("http://www.example.com/Link"); -_3._doc.execCommand("createlink",false,_a); -var _b=_3._doc.getElementsByTagName("a"); -for(var i=0;i<_b.length;i++){ -var _d=_b[i]; -if(_d.href==_a){ -if(!a){ -a=_d; -} -_d.href=_8.f_href; -if(_8.f_target){ -_d.target=_8.f_target; -} -if(_8.f_title){ -_d.title=_8.f_title; -} -} -} -} -catch(ex){ -} -}else{ -var _e=_8.f_href.trim(); -_3.selectNodeContents(a); -if(_e===""){ -_3._doc.execCommand("unlink",false,null); -_3.updateToolbar(); -return false; -}else{ -a.href=_e; -} -} -if(!(a&&a.tagName.toLowerCase()=="a")){ -return false; -} -a.target=_8.f_target.trim(); -a.title=_8.f_title.trim(); -_3.selectNodeContents(a); -_3.updateToolbar(); -},_4); -}; - +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +function CreateLink(c){this.editor=c;var a=c.config;var b=this;c.config.btnList.createlink[3]=function(){b.show(b._getSelectedAnchor())}}CreateLink._pluginInfo={name:"CreateLink",origin:"Xinha Core",version:"$LastChangedRevision: 1084 $".replace(/^[^:]*:\s*(.*)\s*\$$/,"$1"),developer:"The Xinha Core Developer Team",developer_url:"$HeadURL: http://svn.xinha.org/trunk/modules/CreateLink/link.js $".replace(/^[^:]*:\s*(.*)\s*\$$/,"$1"),sponsor:"",sponsor_url:"",license:"htmlArea"};CreateLink.prototype._lc=function(a){return Xinha._lc(a,"Xinha")};CreateLink.prototype.onGenerateOnce=function(){CreateLink.loadAssets()};CreateLink.loadAssets=function(){var self=CreateLink;if(self.loading){return}self.loading=true;Xinha._getback(_editor_url+"modules/CreateLink/dialog.html",function(getback){self.html=getback;self.dialogReady=true});Xinha._getback(_editor_url+"modules/CreateLink/pluginMethods.js",function(getback){eval(getback);self.methodsReady=true})};CreateLink.prototype.onUpdateToolbar=function(){if(!(CreateLink.dialogReady&&CreateLink.methodsReady)){this.editor._toolbarObjects.createlink.state("enabled",false)}else{this.onUpdateToolbar=null}};CreateLink.prototype.prepareDialog=function(){var a=this;var c=this.editor;var b=this.dialog=new Xinha.Dialog(c,CreateLink.html,"Xinha",{width:400});b.getElementById("ok").onclick=function(){a.apply()};b.getElementById("cancel").onclick=function(){a.dialog.hide()};if(!c.config.makeLinkShowsTarget){b.getElementById("f_target_label").style.visibility="hidden";b.getElementById("f_target").style.visibility="hidden";b.getElementById("f_other_target").style.visibility="hidden"}b.getElementById("f_target").onchange=function(){var d=b.getElementById("f_other_target");if(this.value=="_other"){d.style.visibility="visible";d.select();d.focus()}else{d.style.visibility="hidden"}};this.dialogReady=true}; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/CreateLink/pluginMethods.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/CreateLink/pluginMethods.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/CreateLink/pluginMethods.js 16 Jan 2009 09:05:46 -0000 1.1 @@ -0,0 +1,2 @@ +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +CreateLink.prototype.show=function(c){if(!this.dialog){this.prepareDialog()}var d=this.editor;this.a=c;if(!c&&this.editor.selectionEmpty(this.editor.getSelection())){alert(this._lc("You need to select some text before creating a link"));return false}var b={f_href:"",f_title:"",f_target:"",f_other_target:""};if(c&&c.tagName.toLowerCase()=="a"){b.f_href=this.editor.fixRelativeLinks(c.getAttribute("href"));b.f_title=c.title;if(c.target){if(!/_self|_top_|_blank/.test(c.target)){b.f_target="_other";b.f_other_target=c.target}else{b.f_target=c.target;b.f_other_target=""}}}this.dialog.show(b)};CreateLink.prototype.apply=function(){var m=this.dialog.hide();var l=this.a;var h=this.editor;var k={href:"",target:"",title:""};if(m.f_href){k.href=m.f_href;k.title=m.f_title;if(m.f_target.value){if(m.f_target.value=="other"){k.target=m.f_other_target}else{k.target=m.f_target.value}}}if(m.f_target.value){if(m.f_target.value!="_other"){k.target=m.f_target.value}else{k.target=m.f_other_target}}if(l&&l.tagName.toLowerCase()=="a"){if(!k.href){if(confirm(this._lc("Are you sure you wish to remove this link?"))){var c=l.parentNode;while(l.hasChildNodes()){c.insertBefore(l.removeChild(l.childNodes[0]),l)}c.removeChild(l);h.updateToolbar();return}}else{for(var f in k){l.setAttribute(f,k[f])}if(Xinha.is_ie){if(/mailto:([^?<>]*)(\?[^<]*)?$/i.test(l.innerHTML)){l.innerHTML=RegExp.$1}}}}else{if(!k.href){return true}var g=Xinha.uniq("http://www.example.com/Link");h._doc.execCommand("createlink",false,g);var b=h._doc.getElementsByTagName("a");for(var f=0;f";w.getElementsByTagName("body")[0].appendChild(y);w.body.className="xinha_dialog_background";if(r.modal){w.body.className+=" modal"}if(r.greyout){w.body.className+=" greyout"}}}}else{n=document.createElement("div")}n.className="xinha_dialog_background";if(this.modal){n.className+=" modal"}if(this.greyout){n.className+=" greyout"}var j=1000;if(!Xinha.Dialog.initialZ){var o=g._htmlArea;while(o){if(o.style&&parseInt(o.style.zIndex,10)>j){j=parseInt(o.style.zIndex,10)}o=o.parentNode}Xinha.Dialog.initialZ=j}j=Xinha.Dialog.initialZ;var l=n.style;l.position="absolute";l.top=0;l.left=0;l.border="none";l.overflow="hidden";l.display="none";l.zIndex=(this.modal?j+25:j+1)+this.layer;document.body.appendChild(n);this.background=n;n=null;Xinha.freeLater(this,"background");var c=document.createElement("div");c.style.position=(Xinha.is_ie||!this.modal)?"absolute":"fixed";c.style.zIndex=(this.modal?j+27:j+3)+this.layer;c.style.display="none";if(!this.modal){Xinha._addEvent(c,"mousedown",function(){Xinha.Dialog.activateModeless(r)})}c.className="dialog"+(this.modal?" modal":" modeless");if(Xinha.is_chrome){c.className+=" chrome"}document.body.appendChild(c);c.style.paddingBottom="10px";c.style.width=(m&&m.width)?m.width+"px":"";if(m&&m.height){if(Xinha.ie_version<7){c.style.height=m.height+"px"}else{c.style.minHeight=m.height+"px"}}k=this.translateHtml(k,a);var h=document.createElement("div");c.appendChild(h);h.innerHTML=k;this.fixupDOM(h,a);var u=h.removeChild(h.getElementsByTagName("h1")[0]);c.insertBefore(u,h);Xinha._addEvent(u,"mousedown",function(i){r.dragStart(i)});u.style.MozUserSelect="none";u.style.WebkitUserSelect="none";u.unselectable="on";u.onselectstart=function(){return false};this.buttons=document.createElement("div");l=this.buttons.style;l.position="absolute";l.top="0";l.right="2px";c.appendChild(this.buttons);if(this.closable&&this.closeOnEscape){Xinha._addEvent(document,"keypress",function(i){if(i.keyCode==27){if(Xinha.Dialog.activeModeless==r||r.modal){r.hide();return true}}})}this.closer=null;if(this.closable){this.closer=document.createElement("div");this.closer.className="closeButton";this.closer.onmousedown=function(i){this.className="closeButton buttonClick";Xinha._stopEvent(Xinha.getEvent(i));return false};this.closer.onmouseout=function(i){this.className="closeButton";Xinha._stopEvent(Xinha.getEvent(i));return false};this.closer.onmouseup=function(){this.className="closeButton";r.hide();return false};this.buttons.appendChild(this.closer);var v=document.createElement("span");v.className="innerX";v.style.position="relative";v.style.top="-3px";v.appendChild(document.createTextNode("\u00D7"));this.closer.appendChild(v);v=null}this.icon=document.createElement("img");var t=this.icon;t.className="icon";t.src=g.config.iconList.dialogCaption;t.style.position="absolute";t.style.top="3px";t.style.left="2px";t.ondrag=function(){return false};u.style.paddingLeft="22px";c.appendChild(this.icon);var e=c.getElementsByTagName("*");for(var q=0;qf){n.height=f+"px";if(c.scrollHeight>k){i.main.style.overflowY="auto"}}if(this.size.top&&this.size.left){n.top=parseInt(this.size.top,10)+"px";n.left=parseInt(this.size.left,10)+"px"}else{if(this.editor.btnClickEvent&&!this.centered){var a=this.editor.btnClickEvent;if(n.position=="absolute"){n.top=a.clientY+this.scrollPos.y+"px"}else{n.top=a.clientY+"px"}if(k+c.offsetTop>f){n.top=(n.position=="absolute"?this.scrollPos.y:0)+"px"}if(n.position=="absolute"){n.left=a.clientX+this.scrollPos.x+"px"}else{n.left=a.clientX+"px"}if(e+c.offsetLeft>g){n.left=a.clientX-e+"px";if(c.offsetLeft<0){n.left=0}}this.editor.btnClickEvent=null}else{var j=(f-k)/2;var d=(g-e)/2;n.top=((j>0)?j:0)+"px";n.left=((d>0)?d:0)+"px"}}}this.width=e;this.height=k;if(!l){this.resizeBackground({width:e+"px",height:k+"px"});this.posBackground({top:n.top,left:n.left})}if(typeof m!="undefined"){this.setValues(m)}this.dialogShown=true};Xinha.Dialog.prototype.hide=function(){if(this.attached){this.editor.hidePanel(this.rootElem)}else{Xinha.Dialog.fadeOut(this.rootElem);this.hideBackground();var a=this;if(Xinha.is_ff2&&this.modal){this.editor._textArea.style.display=this._restoreTo[0];this.editor._iframe.style.visibility=this._restoreTo[1];this.editor.showPanels(this._restoreTo[2])}if(!this.editor._isFullScreen&&this.modal){window.scroll(this.scrollPos.x,this.scrollPos.y)}if(Xinha.is_ie&&!this.modal){Xinha._removeEvent(this.editor._doc,"mouseup",a.saveSelection)}if(this.modal){this.editor.suspendUpdateToolbar=false;this.editor.currentModal=null;this.editor.activateEditor()}}if(this.modal){this.editor.restoreSelection(this._lastRange)}this.dialogShown=false;this.editor.updateToolbar();this.editor.focusEditor();return this.getValues()};Xinha.Dialog.prototype.toggle=function(){if(this.rootElem.style.display=="none"){this.show()}else{this.hide()}};Xinha.Dialog.prototype.collapse=function(){if(this.collapsed){this.collapsed=false;this.show()}else{this.main.style.height=0;this.collapsed=true}};Xinha.Dialog.prototype.getElementById=function(a){return this.document.getElementById(this.id[a]?this.id[a]:a)};Xinha.Dialog.prototype.getElementsByName=function(a){var b=this.document.getElementsByName(this.id[a]?this.id[a]:a);return Xinha.collectionToArray(b)};Xinha.Dialog.prototype.getElementsByClassName=function(a){return Xinha.getElementsByClassName(this.rootElem,a)};Xinha.Dialog.prototype.dragStart=function(c){if(this.attached||this.dragging){return}if(!this.modal){this.posBackground({top:0,left:0});this.resizeBackground(Xinha.Dialog.calcFullBgSize());this.editor.suspendUpdateToolbar=true}c=Xinha.getEvent(c);var b=this;b.dragging=true;b.scrollPos=b.editor.scrollPos();var a=b.rootElem.style;b.xOffs=c.offsetX||c.layerX;b.yOffs=c.offsetY||c.layerY;b.mouseMove=function(d){b.dragIt(d)};Xinha._addEvent(document,"mousemove",b.mouseMove);if(Xinha.is_ie){Xinha._addEvent(this.background.contentWindow.document,"mousemove",b.mouseMove)}b.mouseUp=function(d){b.dragEnd(d)};Xinha._addEvent(document,"mouseup",b.mouseUp);if(Xinha.is_ie){Xinha._addEvent(this.background.contentWindow.document,"mouseup",b.mouseUp)}};Xinha.Dialog.prototype.dragIt=function(c){var b=this;if(!b.dragging){return false}var d,e,a;if(b.rootElem.style.position=="absolute"){d=(c.clientY+this.scrollPos.y)-b.yOffs+"px";e=(c.clientX+this.scrollPos.x)-b.xOffs+"px";a={top:d,left:e}}else{if(b.rootElem.style.position=="fixed"){d=c.clientY-b.yOffs+"px";e=c.clientX-b.xOffs+"px";a={top:d,left:e}}}b.posDialog(a)};Xinha.Dialog.prototype.dragEnd=function(b){var a=this;if(!this.modal){this.editor.suspendUpdateToolbar=false}if(!a.dragging){return false}a.dragging=false;Xinha._removeEvent(document,"mousemove",a.mouseMove);if(Xinha.is_ie){Xinha._removeEvent(this.background.contentWindow.document,"mousemove",a.mouseMove)}Xinha._removeEvent(document,"mouseup",a.mouseUp);if(Xinha.is_ie){Xinha._removeEvent(this.background.contentWindow.document,"mouseup",a.mouseUp)}var c=a.rootElem.style;a.size.top=c.top;a.size.left=c.left;if(!this.modal){this.sizeBgToDialog()}};Xinha.Dialog.prototype.resizeStart=function(c){var b=this;if(b.resizing){return}b.resizing=true;if(!this.modal){this.editor.suspendUpdateToolbar=true;this.posBackground({top:0,left:0});this.resizeBackground(Xinha.Dialog.calcFullBgSize())}b.scrollPos=b.editor.scrollPos();var a=b.rootElem.style;a.minHeight="";a.overflow="hidden";b.xOffs=parseInt(a.left,10);b.yOffs=parseInt(a.top,10);b.mouseMove=function(d){b.resizeIt(d)};Xinha._addEvent(document,"mousemove",b.mouseMove);if(Xinha.is_ie){Xinha._addEvent(this.background.contentWindow.document,"mousemove",b.mouseMove)}b.mouseUp=function(d){b.resizeEnd(d)};Xinha._addEvent(document,"mouseup",b.mouseUp);if(Xinha.is_ie){Xinha._addEvent(this.background.contentWindow.document,"mouseup",b.mouseUp)}};Xinha.Dialog.prototype.resizeIt=function(c){var b=this;if(!b.resizing){return false}var d,e;if(b.rootElem.style.position=="absolute"){d=c.clientY+b.scrollPos.y;e=c.clientX+b.scrollPos.x}else{d=c.clientY;e=c.clientX}e-=b.xOffs;d-=b.yOffs;var a={};a.width=((e>10)?e:10)+8+"px";a.height=((d>10)?d:10)+"px";b.sizeDialog(a);b.width=b.rootElem.offsetWidth;b.height=b.rootElem.offsetHeight;b.onresize()};Xinha.Dialog.prototype.resizeEnd=function(b){var a=this;a.resizing=false;if(!this.modal){this.editor.suspendUpdateToolbar=false}Xinha._removeEvent(document,"mousemove",a.mouseMove);if(Xinha.is_ie){Xinha._removeEvent(this.background.contentWindow.document,"mouseup",a.mouseUp)}Xinha._removeEvent(document,"mouseup",a.mouseUp);if(Xinha.is_ie){Xinha._removeEvent(this.background.contentWindow.document,"mouseup",a.mouseUp)}a.size.width=a.rootElem.offsetWidth;a.size.height=a.rootElem.offsetHeight;if(!this.modal){this.sizeBgToDialog()}};Xinha.Dialog.prototype.attachToPanel=function(c){var b=this;var a=this.rootElem;var d=this.editor;this.attached=true;this.rootElem.side=c;this.captionBar.ondblclick=function(e){b.detachFromPanel(Xinha.getEvent(e))};a.style.position="static";a.parentNode.removeChild(a);this.background.style.display="none";this.captionBar.style.paddingLeft="3px";this.resizer.style.display="none";if(this.closable){this.closer.style.display="none"}this.icon.style.display="none";if(c=="left"||c=="right"){a.style.width=d.config.panel_dimensions[c]}else{a.style.width=""}Xinha.addClasses(a,"panel");d._panels[c].panels.push(a);d._panels[c].div.appendChild(a);d.notifyOf("panel_change",{action:"add",panel:a})};Xinha.Dialog.prototype.detachFromPanel=function(){var b=this;var a=b.rootElem;var d=a.style;var c=b.editor;b.attached=false;this.background.style.display="";this.sizeBgToDialog();var e=Xinha.getElementTopLeft(a);d.position="absolute";d.top=e.top+"px";d.left=e.left+"px";b.captionBar.style.paddingLeft="22px";b.resizer.style.display="";if(b.closable){b.closer.style.display=""}b.icon.style.display="";if(b.size.width){a.style.width=b.size.width+"px"}Xinha.removeClasses(a,"panel");c.removePanel(a);document.body.appendChild(a);b.captionBar.ondblclick=function(){b.attachToPanel(a.side)}};Xinha.Dialog.calcFullBgSize=function(){var b=Xinha.pageSize();var a=Xinha.viewportSize();return{width:(b.x>a.x?b.x:a.x)+"px",height:(b.x>a.y?b.y:a.y)+"px"}};Xinha.Dialog.prototype.sizeBgToDialog=function(){var a=this.rootElem.style;var b=this.background.style;b.top=a.top;b.left=a.left;b.width=a.width;b.height=a.height};Xinha.Dialog.prototype.hideBackground=function(){Xinha.Dialog.fadeOut(this.background)};Xinha.Dialog.prototype.showBackground=function(){Xinha.Dialog.fadeIn(this.background,70)};Xinha.Dialog.prototype.posBackground=function(a){if(this.background.style.display!="none"){this.background.style.top=a.top;this.background.style.left=a.left}};Xinha.Dialog.prototype.resizeBackground=function(a){if(this.background.style.display!="none"){this.background.style.width=a.width;this.background.style.height=a.height}};Xinha.Dialog.prototype.posDialog=function(b){var a=this.rootElem.style;a.left=b.left;a.top=b.top};Xinha.Dialog.prototype.sizeDialog=function(c){var b=this.rootElem.style;b.height=c.height;b.width=c.width;var d=parseInt(c.width,10);var a=parseInt(c.height,10)-this.captionBar.offsetHeight;this.main.style.height=(a>20)?a:20+"px";this.main.style.width=(d>10)?d:10+"px"};Xinha.Dialog.prototype.setValues=function(d){for(var g in d){if(typeof g=="string"){var c=this.getElementsByName(g);if(!c){continue}for(var a=0;a=0){c=f.options[f.selectedIndex]}}break;default:switch(f.type.toLowerCase()){case"radio":if(f.checked){c=f.value}break;case"checkbox":if(c===null){if(this.getElementsByName(this.r_id[f.name]).length>1){c=[]}}if(f.checked){if(c!==null&&typeof c=="object"&&c.push){c.push(f.value)}else{c=f.value}}break;default:c=f.value;break}}d[this.r_id[f.name]]=c}return d};Xinha.Dialog.prototype.translateHtml=function(c,a){var b=this;if(typeof a=="function"){b._lc=a}else{if(a){this._lc=function(d){return Xinha._lc(d,a)}}else{this._lc=function(d){return d}}}c=c.replace(/((?:name)|(?:id))=(['"])\[([a-z0-9_]+)\]\2/ig,function(f,e,d,g){return e+"="+d+b.createId(g)+d}).replace(/(.*?)<\/l10n>/ig,function(d,e){return b._lc(e)}).replace(/\="_\((.*?)\)"/g,function(d,e){return'="'+b._lc(e)+'"'});return c};Xinha.Dialog.prototype.fixupDOM=function(j,e){var g=this;if(typeof e!="string"){e="GenericPlugin"}var a=function(l,m){switch(m){case"editor":return _editor_url;case"plugin":return Xinha.getPluginDir(e);case"images":return g.editor.imgURL("images")}};var h=Xinha.collectionToArray(j.getElementsByTagName("img"));for(var f=0;f=0){b.op-=c;Xinha.Dialog.setOpacity(b,d);b.timeOut=setTimeout(function(){Xinha.Dialog.fadeOut(b,a,c)},a)}else{Xinha.Dialog.setOpacity(b,0);b.style.display="none";b.op=0;b.timeOut=null}}; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/Dialogs/dialog.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/Dialogs/dialog.js,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/Dialogs/dialog.js 13 May 2008 18:53:45 -0000 1.4 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/Dialogs/dialog.js 16 Jan 2009 09:05:46 -0000 1.5 @@ -1,75 +1,2 @@ -/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */ -/* This file is part of version 0.95 released Mon, 12 May 2008 17:33:15 +0200 */ -/* The URL of the most recent version of this file is http://svn.xinha.webfactional.com/trunk/modules/Dialogs/dialog.js */ -function Dialog(_1,_2,_3){ -if(typeof _3=="undefined"){ -_3=window; -} -if(typeof window.showModalDialog=="function"&&!Xinha.is_webkit){ -Dialog._return=function(_4){ -if(typeof _2=="function"){ -_2(_4); -} -}; -var r=window.showModalDialog(_1,_3,"dialogheight=300;dialogwidth=400;resizable=yes"); -}else{ -Dialog._geckoOpenModal(_1,_2,_3); -} -} -Dialog._parentEvent=function(ev){ -setTimeout(function(){ -if(Dialog._modal&&!Dialog._modal.closed){ -Dialog._modal.focus(); -} -},50); -try{ -if(Dialog._modal&&!Dialog._modal.closed){ -Xinha._stopEvent(ev); -} -} -catch(e){ -} -}; -Dialog._return=null; -Dialog._modal=null; -Dialog._arguments=null; -Dialog._selection=null; -Dialog._geckoOpenModal=function(_7,_8,_9){ -var _a=window.open(_7,"hadialog","toolbar=no,menubar=no,personalbar=no,width=10,height=10,"+"scrollbars=no,resizable=yes,modal=yes,dependable=yes"); -Dialog._modal=_a; -Dialog._arguments=_9; -function capwin(w){ -Xinha._addEvent(w,"click",Dialog._parentEvent); -Xinha._addEvent(w,"mousedown",Dialog._parentEvent); -Xinha._addEvent(w,"focus",Dialog._parentEvent); -} -function relwin(w){ -Xinha._removeEvent(w,"click",Dialog._parentEvent); -Xinha._removeEvent(w,"mousedown",Dialog._parentEvent); -Xinha._removeEvent(w,"focus",Dialog._parentEvent); -} -capwin(window); -for(var i=0;i(.*?)<\/l10n>/ig, + function(fullString,translate) + { + return dialog._lc(translate) ; + } + ).replace(/="_\((.*?)\)"/g, + function(fullString, translate) + { + return '="' + dialog._lc(translate) + '"'; + } + ); + + this.rootElem.innerHTML = html; }; -}else{ -this._lc=function(_7){ -return _7; + +Xinha.PanelDialog.prototype.show = function(values) +{ + this.setValues(values); + this.editor.showPanel(this.rootElem); }; -} -} -_3=_3.replace(/\[([a-z0-9_]+)\]/ig,function(_8,id){ -if(typeof _5.id[id]=="undefined"){ -_5.id[id]=Xinha.uniq("Dialog"); -_5.r_id[_5.id[id]]=id; -} -return _5.id[id]; -}).replace(/(.*?)<\/l10n>/ig,function(_a,_b){ -return _5._lc(_b); -}).replace(/="_\((.*?)\)"/g,function(_c,_d){ -return "=\""+_5._lc(_d)+"\""; -}); -this.rootElem.innerHTML=_3; + +Xinha.PanelDialog.prototype.hide = function() +{ + this.editor.hidePanel(this.rootElem); + return this.getValues(); }; -Xinha.PanelDialog.prototype.show=function(_e){ -this.setValues(_e); -this.editor.showPanel(this.rootElem); -}; -Xinha.PanelDialog.prototype.hide=function(){ -this.editor.hidePanel(this.rootElem); -return this.getValues(); -}; -Xinha.PanelDialog.prototype.onresize=Xinha.Dialog.prototype.onresize; -Xinha.PanelDialog.prototype.toggle=Xinha.Dialog.prototype.toggle; -Xinha.PanelDialog.prototype.setValues=Xinha.Dialog.prototype.setValues; -Xinha.PanelDialog.prototype.getValues=Xinha.Dialog.prototype.getValues; -Xinha.PanelDialog.prototype.getElementById=Xinha.Dialog.prototype.getElementById; -Xinha.PanelDialog.prototype.getElementsByName=Xinha.Dialog.prototype.getElementsByName; +Xinha.PanelDialog.prototype.onresize = Xinha.Dialog.prototype.onresize; + +Xinha.PanelDialog.prototype.toggle = Xinha.Dialog.prototype.toggle; + +Xinha.PanelDialog.prototype.setValues = Xinha.Dialog.prototype.setValues; + +Xinha.PanelDialog.prototype.getValues = Xinha.Dialog.prototype.getValues; + +Xinha.PanelDialog.prototype.getElementById = Xinha.Dialog.prototype.getElementById; + +Xinha.PanelDialog.prototype.getElementsByName = Xinha.Dialog.prototype.getElementsByName; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/Dialogs/popupwin.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/Dialogs/popupwin.js,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/Dialogs/popupwin.js 13 May 2008 18:53:45 -0000 1.5 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/Dialogs/popupwin.js 16 Jan 2009 09:05:46 -0000 1.6 @@ -1,123 +1,2 @@ -/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */ -/* This file is part of version 0.95 released Mon, 12 May 2008 17:33:15 +0200 */ -/* The URL of the most recent version of this file is http://svn.xinha.webfactional.com/trunk/modules/Dialogs/popupwin.js */ -function PopupWin(_1,_2,_3,_4){ -this.editor=_1; -this.handler=_3; -var _5=window.open("","__ha_dialog","toolbar=no,menubar=no,personalbar=no,width=600,height=600,left=20,top=40,scrollbars=no,resizable=yes"); -this.window=_5; -var _6=_5.document; -this.doc=_6; -var _7=this; -var _8=document.baseURI||document.URL; -if(_8&&_8.match(/(.*)\/([^\/]+)/)){ -_8=RegExp.$1+"/"; -} -if(typeof _editor_url!="undefined"&&!(/^\//.test(_editor_url))&&!(/http:\/\//.test(_editor_url))){ -_8+=_editor_url; -}else{ -_8=_editor_url; -} -if(!(/\/$/.test(_8))){ -_8+="/"; -} -this.baseURL=_8; -_6.open(); -var _9=""+_2+"\n"; -_9+="\n"; -if(_editor_skin!=""){ -_9+="\n"; -} -_9+="\n"; -_9+=""; -_6.write(_9); -_6.close(); -function init2(){ -var _a=_6.body; -if(!_a){ -setTimeout(init2,25); -return false; -} -_5.title=_2; -_6.documentElement.style.padding="0px"; -_6.documentElement.style.margin="0px"; -var _b=_6.createElement("div"); -_b.className="content"; -_7.content=_b; -_a.appendChild(_b); -_7.element=_a; -_4(_7); -_5.focus(); -} -init2(); -} -PopupWin.prototype.callHandler=function(){ -var _c=["input","textarea","select"]; -var _d={}; -for(var ti=_c.length;--ti>=0;){ -var _f=_c[ti]; -var els=this.content.getElementsByTagName(_f); -for(var j=0;j\n";c+='\n";if(_editor_skin!=""){c+='\n"}c+="\n";c+='';h.write(c);h.close();function b(){var k=h.body;if(!k){setTimeout(b,25);return false}f.title=g;h.documentElement.style.padding="0px";h.documentElement.style.margin="0px";var l=h.createElement("div");l.className="content";j.content=l;k.appendChild(l);j.element=k;e(j);f.focus()}b()}PopupWin.prototype.callHandler=function(){var c=["input","textarea","select"];var h={};for(var f=c.length;--f>=0;){var a=c[f];var d=this.content.getElementsByTagName(a);for(var b=0;b3&&s.anchorNode.data.indexOf(".")>=0){ -var _b=s.anchorNode.data.substring(0,s.anchorOffset).search(/\S{4,}$/); -if(_b==-1){ -break; -} -if(_3._getFirstAncestor(s,"a")){ -break; -} -var _c=s.anchorNode.data.substring(0,s.anchorOffset).replace(/^.*?(\S*)$/,"$1"); -var _d=_c.match(Xinha.RE_email); -if(_d){ -var _e=s.anchorNode; -var _f=_e.splitText(s.anchorOffset); -var _10=_e.splitText(_b); -_5(_10,"a").href="mailto:"+_d[0]; -break; -} -RE_date=/([0-9]+\.)+/; -RE_ip=/(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)/; -var _11=_c.match(Xinha.RE_url); -if(_11){ -if(RE_date.test(_c)){ -break; -} -var _12=s.anchorNode; -var _13=_12.splitText(s.anchorOffset); -var _14=_12.splitText(_b); -_5(_14,"a").href=(_11[1]?_11[1]:"http://")+_11[2]; -break; -} -} -break; -} -switch(ev.keyCode){ -case 27: -if(_3._unLink){ -_3._unLink(); -Xinha._stopEvent(ev); -} -break; -break; -case 8: -case 46: -if(!ev.shiftKey&&this.handleBackspace()){ -Xinha._stopEvent(ev); -} -default: -_3._unlinkOnUndo=false; -if(s.anchorNode&&s.anchorNode.nodeType==3){ -var a=_3._getFirstAncestor(s,"a"); -if(!a){ -break; -} -if(!a._updateAnchTimeout){ -if(s.anchorNode.data.match(Xinha.RE_email)&&a.href.match("mailto:"+s.anchorNode.data.trim())){ -var _16=s.anchorNode; -var _17=function(){ -a.href="mailto:"+_16.data.trim(); -a._updateAnchTimeout=setTimeout(_17,250); -}; -a._updateAnchTimeout=setTimeout(_17,1000); -break; -} -var m=s.anchorNode.data.match(Xinha.RE_url); -if(m&&a.href.match(new RegExp("http(s)?://"+Xinha.escapeStringForRegExp(s.anchorNode.data.trim())))){ -var _19=s.anchorNode; -var _1a=function(){ -m=_19.data.match(Xinha.RE_url); -if(m){ -a.href=(m[1]?m[1]:"http://")+m[2]; -} -a._updateAnchTimeout=setTimeout(_1a,250); -}; -a._updateAnchTimeout=setTimeout(_1a,1000); -} -} -} -break; -} -return false; -}; -Gecko.prototype.handleBackspace=function(){ -var _1b=this.editor; -setTimeout(function(){ -var sel=_1b.getSelection(); -var _1d=_1b.createRange(sel); -var SC=_1d.startContainer; -var SO=_1d.startOffset; -var EC=_1d.endContainer; -var EO=_1d.endOffset; -var _22=SC.nextSibling; -if(SC.nodeType==3){ -SC=SC.parentNode; -} -if(!(/\S/.test(SC.tagName))){ -var p=document.createElement("p"); -while(SC.firstChild){ -p.appendChild(SC.firstChild); -} -SC.parentNode.insertBefore(p,SC); -Xinha.removeFromParent(SC); -var r=_1d.cloneRange(); -r.setStartBefore(_22); -r.setEndAfter(_22); -r.extractContents(); -sel.removeAllRanges(); -sel.addRange(r); -} -},10); -}; -Gecko.prototype.inwardHtml=function(_25){ -_25=_25.replace(/<(\/?)strong(\s|>|\/)/ig,"<$1b$2"); -_25=_25.replace(/<(\/?)em(\s|>|\/)/ig,"<$1i$2"); -_25=_25.replace(/<(\/?)del(\s|>|\/)/ig,"<$1strike$2"); -return _25; -}; -Gecko.prototype.outwardHtml=function(_26){ -_26=_26.replace(/[\s]*<\/script>/ig,""); -return _26; -}; -Gecko.prototype.onExecCommand=function(_27,UI,_29){ -try{ -this.editor._doc.execCommand("useCSS",false,true); -this.editor._doc.execCommand("styleWithCSS",false,false); -} -catch(ex){ -} -switch(_27){ -case "paste": -alert(Xinha._lc("The Paste button does not work in Mozilla based web browsers (technical security reasons). Press CTRL-V on your keyboard to paste directly.")); -return true; -break; -case "removeformat": -var _2a=this.editor; -var sel=_2a.getSelection(); -var _2c=_2a.saveSelection(sel); -var _2d=_2a.createRange(sel); -var els=_2a._doc.body.getElementsByTagName("*"); -var _2f=(_2d.startContainer.nodeType==1)?_2d.startContainer:_2d.startContainer.parentNode; -var i,el; -if(sel.isCollapsed){ -_2d.selectNodeContents(_2a._doc.body); -} -for(i=0;isel.anchorOffset&&sel.anchorNode.childNodes[sel.anchorOffset].nodeType==1){ -return sel.anchorNode.childNodes[sel.anchorOffset]; -}else{ -if(sel.anchorNode.nodeType==1){ -return sel.anchorNode; -}else{ -return null; -} -} -} -return null; -}; -Xinha.prototype.selectionEmpty=function(sel){ -if(!sel){ -return true; -} -if(typeof sel.isCollapsed!="undefined"){ -return sel.isCollapsed; -} -return true; -}; -Xinha.prototype.saveSelection=function(){ -return this.createRange(this.getSelection()).cloneRange(); -}; -Xinha.prototype.restoreSelection=function(_3f){ -var sel=this.getSelection(); -sel.removeAllRanges(); -sel.addRange(_3f); -}; -Xinha.prototype.selectNodeContents=function(_41,pos){ -this.focusEditor(); -this.forceRedraw(); -var _43; -var _44=typeof pos=="undefined"?true:false; -var sel=this.getSelection(); -_43=this._doc.createRange(); -if(!_41){ -sel.removeAllRanges(); -return; -} -if(_44&&_41.tagName&&_41.tagName.toLowerCase().match(/table|img|input|textarea|select/)){ -_43.selectNode(_41); -}else{ -_43.selectNodeContents(_41); -} -sel.removeAllRanges(); -sel.addRange(_43); -}; -Xinha.prototype.insertHTML=function(_46){ -var sel=this.getSelection(); -var _48=this.createRange(sel); -this.focusEditor(); -var _49=this._doc.createDocumentFragment(); -var div=this._doc.createElement("div"); -div.innerHTML=_46; -while(div.firstChild){ -_49.appendChild(div.firstChild); -} -var _4b=this.insertNodeAtSelection(_49); -}; -Xinha.prototype.getSelectedHTML=function(){ -var sel=this.getSelection(); -if(sel.isCollapsed){ -return ""; -} -var _4d=this.createRange(sel); -return Xinha.getHTML(_4d.cloneContents(),false,this); -}; -Xinha.prototype.getSelection=function(){ -return this._iframe.contentWindow.getSelection(); -}; -Xinha.prototype.createRange=function(sel){ -this.activateEditor(); -if(typeof sel!="undefined"){ -try{ -return sel.getRangeAt(0); -} -catch(ex){ -return this._doc.createRange(); -} -}else{ -return this._doc.createRange(); -} -}; -Xinha.prototype.isKeyEvent=function(_4f){ -return _4f.type=="keypress"; -}; -Xinha.prototype.getKey=function(_50){ -return String.fromCharCode(_50.charCode); -}; -Xinha.getOuterHTML=function(_51){ -return (new XMLSerializer()).serializeToString(_51); -}; -Xinha.prototype.cc=String.fromCharCode(8286); -Xinha.prototype.setCC=function(_52){ -var cc=this.cc; -try{ -if(_52=="textarea"){ -var ta=this._textArea; -var _55=ta.selectionStart; -var _56=ta.value.substring(0,_55); -var _57=ta.value.substring(_55,ta.value.length); -if(_57.match(/^[^<]*>/)){ -var _58=_57.indexOf(">")+1; -ta.value=_56+_57.substring(0,_58)+cc+_57.substring(_58,_57.length); -}else{ -ta.value=_56+cc+_57; -} -ta.value=ta.value.replace(new RegExp("(&[^"+cc+"]*?)("+cc+")([^"+cc+"]*?;)"),"$1$3$2"); -ta.value=ta.value.replace(new RegExp("(]*>[^"+cc+"]*?)("+cc+")([^"+cc+"]*?)"),"$1$3$2"); -ta.value=ta.value.replace(new RegExp("^([^"+cc+"]*)("+cc+")([^"+cc+"]*]*>)(.*?)"),"$1$3$2$4"); -}else{ -var sel=this.getSelection(); -sel.getRangeAt(0).insertNode(this._doc.createTextNode(cc)); -} -} -catch(e){ -} -}; -Xinha.prototype.findCC=function(_5a){ -if(_5a=="textarea"){ -var ta=this._textArea; -var pos=ta.value.indexOf(this.cc); -if(pos==-1){ -return; -} -var end=pos+this.cc.length; -var _5e=ta.value.substring(0,pos); -var _5f=ta.value.substring(end,ta.value.length); -ta.value=_5e; -ta.scrollTop=ta.scrollHeight; -var _60=ta.scrollTop; -ta.value+=_5f; -ta.setSelectionRange(pos,pos); -ta.focus(); -ta.scrollTop=_60; -}else{ -try{ -var doc=this._doc; -doc.body.innerHTML=doc.body.innerHTML.replace(new RegExp(this.cc),""); -var _62=doc.getElementById("XinhaEditingPostion"); -this.selectNodeContents(_62); -_62.scrollIntoView(true); -_62.parentNode.removeChild(_62); -this._iframe.contentWindow.focus(); -} -catch(e){ -} -} -}; -Xinha.prototype._standardToggleBorders=Xinha.prototype._toggleBorders; -Xinha.prototype._toggleBorders=function(){ -var _63=this._standardToggleBorders(); -var _64=this._doc.getElementsByTagName("TABLE"); -for(var i=0;i<_64.length;i++){ -_64[i].style.display="none"; -_64[i].style.display="table"; -} -return _63; -}; -Xinha.getDoctype=function(doc){ -var d=""; -if(doc.doctype){ -d+=""; -} -return d; -}; - +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +Gecko._pluginInfo={name:"Gecko",origin:"Xinha Core",version:"$LastChangedRevision: 1084 $".replace(/^[^:]*:\s*(.*)\s*\$$/,"$1"),developer:"The Xinha Core Developer Team",developer_url:"$HeadURL: http://svn.xinha.org/trunk/modules/Gecko/Gecko.js $".replace(/^[^:]*:\s*(.*)\s*\$$/,"$1"),sponsor:"",sponsor_url:"",license:"htmlArea"};function Gecko(a){this.editor=a;a.Gecko=this}Gecko.prototype.onKeyPress=function(u){var d=this.editor;var j=d.getSelection();if(d.isShortCut(u)){switch(d.getKey(u).toLowerCase()){case"z":if(d._unLink&&d._unlinkOnUndo){Xinha._stopEvent(u);d._unLink();d.updateToolbar();return true}break;case"a":sel=d.getSelection();sel.removeAllRanges();range=d.createRange();range.selectNodeContents(d._doc.body);sel.addRange(range);Xinha._stopEvent(u);return true;break;case"v":if(!d.config.htmlareaPaste){return true}break}}switch(d.getKey(u)){case" ":var g=function(y,m){var x=y.nextSibling;if(typeof m=="string"){m=d._doc.createElement(m)}var s=y.parentNode.insertBefore(m,x);Xinha.removeFromParent(y);s.appendChild(y);x.data=" "+x.data;j.collapse(x,1);d._unLink=function(){var a=s.firstChild;s.removeChild(a);s.parentNode.insertBefore(a,s);Xinha.removeFromParent(s);d._unLink=null;d._unlinkOnUndo=false};d._unlinkOnUndo=true;return s};if(d.config.convertUrlsToLinks&&j&&j.isCollapsed&&j.anchorNode.nodeType==3&&j.anchorNode.data.length>3&&j.anchorNode.data.indexOf(".")>=0){var t=j.anchorNode.data.substring(0,j.anchorOffset).search(/\S{4,}$/);if(t==-1){break}if(d._getFirstAncestor(j,"a")){break}var h=j.anchorNode.data.substring(0,j.anchorOffset).replace(/^.*?(\S*)$/,"$1");var e=h.match(Xinha.RE_email);if(e){var v=j.anchorNode;var f=v.splitText(j.anchorOffset);var k=v.splitText(t);g(k,"a").href="mailto:"+e[0];break}RE_date=/([0-9]+\.)+/;RE_ip=/(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)/;var p=h.match(Xinha.RE_url);if(p){if(RE_date.test(h)){break}var i=j.anchorNode;var b=i.splitText(j.anchorOffset);var q=i.splitText(t);g(q,"a").href=(p[1]?p[1]:"http://")+p[2];break}}break}switch(u.keyCode){case 27:if(d._unLink){d._unLink();Xinha._stopEvent(u)}break;break;case 8:case 46:if(!u.shiftKey&&this.handleBackspace()){Xinha._stopEvent(u)}default:d._unlinkOnUndo=false;if(j.anchorNode&&j.anchorNode.nodeType==3){var w=d._getFirstAncestor(j,"a");if(!w){break}if(!w._updateAnchTimeout){if(j.anchorNode.data.match(Xinha.RE_email)&&w.href.match("mailto:"+j.anchorNode.data.trim())){var l=j.anchorNode;var c=function(){w.href="mailto:"+l.data.trim();w._updateAnchTimeout=setTimeout(c,250)};w._updateAnchTimeout=setTimeout(c,1000);break}var n=j.anchorNode.data.match(Xinha.RE_url);if(n&&w.href.match(new RegExp("http(s)?://"+Xinha.escapeStringForRegExp(j.anchorNode.data.trim())))){var o=j.anchorNode;var r=function(){n=o.data.match(Xinha.RE_url);if(n){w.href=(n[1]?n[1]:"http://")+n[2]}w._updateAnchTimeout=setTimeout(r,250)};w._updateAnchTimeout=setTimeout(r,1000)}}}break}return false};Gecko.prototype.handleBackspace=function(){var a=this.editor;setTimeout(function(){var e=a.getSelection();var g=a.createRange(e);var f=g.startContainer;var i=g.startOffset;var c=g.endContainer;var h=g.endOffset;var j=f.nextSibling;if(f.nodeType==3){f=f.parentNode}if(!(/\S/.test(f.tagName))){var d=document.createElement("p");while(f.firstChild){d.appendChild(f.firstChild)}f.parentNode.insertBefore(d,f);Xinha.removeFromParent(f);var b=g.cloneRange();b.setStartBefore(j);b.setEndAfter(j);b.extractContents();e.removeAllRanges();e.addRange(b)}},10)};Gecko.prototype.inwardHtml=function(a){a=a.replace(/<(\/?)strong(\s|>|\/)/ig,"<$1b$2");a=a.replace(/<(\/?)em(\s|>|\/)/ig,"<$1i$2");a=a.replace(/<(\/?)del(\s|>|\/)/ig,"<$1strike$2");return a};Gecko.prototype.outwardHtml=function(a){a=a.replace(/[\s]*<\/script>/ig,"");return a};Gecko.prototype.onExecCommand=function(f,e,d){try{this.editor._doc.execCommand("useCSS",false,true);this.editor._doc.execCommand("styleWithCSS",false,false)}catch(l){}switch(f){case"paste":alert(Xinha._lc("The Paste button does not work in Mozilla based web browsers (technical security reasons). Press CTRL-V on your keyboard to paste directly."));return true;break;case"removeformat":var k=this.editor;var c=k.getSelection();var m=k.saveSelection(c);var j=k.createRange(c);var g=k._doc.body.getElementsByTagName("*");var a=(j.startContainer.nodeType==1)?j.startContainer:j.startContainer.parentNode;var h,b;if(c.isCollapsed){j.selectNodeContents(k._doc.body)}for(h=0;ha.anchorOffset&&a.anchorNode.childNodes[a.anchorOffset].nodeType==1){return a.anchorNode.childNodes[a.anchorOffset]}else{if(a.anchorNode.nodeType==1){return a.anchorNode}else{return null}}}return null};Xinha.prototype.selectionEmpty=function(a){if(!a){return true}if(typeof a.isCollapsed!="undefined"){return a.isCollapsed}return true};Xinha.prototype.saveSelection=function(){return this.createRange(this.getSelection()).cloneRange()};Xinha.prototype.restoreSelection=function(a){try{var b=this.getSelection();b.removeAllRanges();b.addRange(a)}catch(c){}};Xinha.prototype.selectNodeContents=function(b,d){this.focusEditor();this.forceRedraw();var a;var e=typeof d=="undefined"?true:false;var c=this.getSelection();a=this._doc.createRange();if(!b){c.removeAllRanges();return}if(e&&b.tagName&&b.tagName.toLowerCase().match(/table|img|input|textarea|select/)){a.selectNode(b)}else{a.selectNodeContents(b)}c.removeAllRanges();c.addRange(a);if(typeof d!="undefined"){if(d){c.collapse(a.startContainer,a.startOffset)}else{c.collapse(a.endContainer,a.endOffset)}}};Xinha.prototype.insertHTML=function(c){var e=this.getSelection();var a=this.createRange(e);this.focusEditor();var b=this._doc.createDocumentFragment();var f=this._doc.createElement("div");f.innerHTML=c;while(f.firstChild){b.appendChild(f.firstChild)}var d=this.insertNodeAtSelection(b)};Xinha.prototype.getSelectedHTML=function(){var b=this.getSelection();if(b.isCollapsed){return""}var a=this.createRange(b);return Xinha.getHTML(a.cloneContents(),false,this)};Xinha.prototype.getSelection=function(){return this._iframe.contentWindow.getSelection()};Xinha.prototype.createRange=function(b){this.activateEditor();if(typeof b!="undefined"){try{return b.getRangeAt(0)}catch(a){return this._doc.createRange()}}else{return this._doc.createRange()}};Xinha.prototype.isKeyEvent=function(a){return a.type=="keypress"};Xinha.prototype.getKey=function(a){return String.fromCharCode(a.charCode)};Xinha.getOuterHTML=function(a){return(new XMLSerializer()).serializeToString(a)};Xinha.cc=String.fromCharCode(8286);Xinha.prototype.setCC=function(h){var c=Xinha.cc;try{if(h=="textarea"){var d=this._textArea;var f=d.selectionStart;var j=d.value.substring(0,f);var a=d.value.substring(f,d.value.length);if(a.match(/^[^<]*>/)){var i=a.indexOf(">")+1;d.value=j+a.substring(0,i)+c+a.substring(i,a.length)}else{d.value=j+c+a}d.value=d.value.replace(new RegExp("(&[^"+c+"]*?)("+c+")([^"+c+"]*?;)"),"$1$3$2");d.value=d.value.replace(new RegExp("(]*>[^"+c+"]*?)("+c+")([^"+c+"]*?<\/script>)"),"$1$3$2");d.value=d.value.replace(new RegExp("^([^"+c+"]*)("+c+")([^"+c+"]*]*>)(.*?)"),"$1$3$2$4")}else{var b=this.getSelection();b.getRangeAt(0).insertNode(this._doc.createTextNode(c))}}catch(g){}};Xinha.prototype.findCC=function(h){if(h=="textarea"){var d=this._textArea;var i=d.value.indexOf(Xinha.cc);if(i==-1){return}var c=i+Xinha.cc.length;var j=d.value.substring(0,i);var a=d.value.substring(c,d.value.length);d.value=j;d.scrollTop=d.scrollHeight;var b=d.scrollTop;d.value+=a;d.setSelectionRange(i,i);d.focus();d.scrollTop=b}else{try{var k=this._doc;k.body.innerHTML=k.body.innerHTML.replace(new RegExp(Xinha.cc),'');var g=k.getElementById("XinhaEditingPostion");this.selectNodeContents(g);this.scrollToElement(g);g.parentNode.removeChild(g);this._iframe.contentWindow.focus()}catch(f){}}};Xinha.prototype._standardToggleBorders=Xinha.prototype._toggleBorders;Xinha.prototype._toggleBorders=function(){var a=this._standardToggleBorders();var c=this._doc.getElementsByTagName("TABLE");for(var b=0;b"; -break; -case 5: -_9+="&"+_5.nodeValue+";"; -break; -case 7: -_9+=(Xinha.is_ie?("\n"+_8):"")+"<"+"?"+_5.target+" "+_5.data+" ?>"; -break; -case 1: -case 11: -case 9: -var _a; -var i; -var _c=(_5.nodeType==1)?_5.tagName.toLowerCase():""; -if((_c=="script"||_c=="noscript")&&_7.config.stripScripts){ -break; -} -if(_6){ -_6=!(_7.config.htmlRemoveTags&&_7.config.htmlRemoveTags.test(_c)); -} -if(Xinha.is_ie&&_c=="head"){ -if(_6){ -_9+=(Xinha.is_ie?("\n"+_8):"")+""; -} -var _d=RegExp.multiline; -RegExp.multiline=true; -var _e=_5.innerHTML.replace(Xinha.RE_tagName,function(_f,p1,p2){ -return p1+p2.toLowerCase(); -}).replace(/\s*=\s*(([^'"][^>\s]*)([>\s])|"([^"]+)"|'([^']+)')/g,"=\"$2$4$5\"$3").replace(/<(link|meta)((\s*\S*="[^"]*")*)>/g,"<$1$2 />"); -RegExp.multiline=_d; -_9+=_e+"\n"; -if(_6){ -_9+=(Xinha.is_ie?("\n"+_8):"")+""; -} -break; -}else{ -if(_6){ -_a=(!(_5.hasChildNodes()||Xinha.needsClosingTag(_5))); -_9+=((Xinha.isBlockElement(_5))?("\n"+_8):"")+"<"+_5.tagName.toLowerCase(); -var _12=_5.attributes; -for(i=0;i<_12.length;++i){ -var a=_12.item(i); -if(typeof a.nodeValue=="object"){ -continue; -} -if(_5.tagName.toLowerCase()=="input"&&_5.type.toLowerCase()=="checkbox"&&a.nodeName.toLowerCase()=="value"&&a.nodeValue.toLowerCase()=="on"){ -continue; -} -if(!a.specified&&!(_5.tagName.toLowerCase().match(/input|option/)&&a.nodeName=="value")&&!(_5.tagName.toLowerCase().match(/area/)&&a.nodeName.match(/shape|coords/i))){ -continue; -} -var _14=a.nodeName.toLowerCase(); -if(/_moz_editor_bogus_node/.test(_14)||(_14=="class"&&a.nodeValue=="webkit-block-placeholder")){ -_9=""; -break; -} -if(/(_moz)|(contenteditable)|(_msh)/.test(_14)){ -continue; -} -var _15; -if(Xinha.emptyAttributes.indexOf(" "+_14+" ")!=-1){ -_15=_14; -}else{ -if(_14!="style"){ -if(typeof _5[a.nodeName]!="undefined"&&_14!="href"&&_14!="src"&&!(/^on/.test(_14))){ -_15=_5[a.nodeName]; -}else{ -_15=a.nodeValue; -if(_14=="class"){ -_15=_15.replace(/Apple-style-span/,""); -if(!_15){ -continue; -} -} -if(Xinha.is_ie&&(_14=="href"||_14=="src")){ -_15=_7.stripBaseURL(_15); -} -if(_7.config.only7BitPrintablesInURLs&&(_14=="href"||_14=="src")){ -_15=_15.replace(/([^!-~]+)/g,function(_16){ -return escape(_16); -}); -} -} -}else{ -if(!Xinha.is_ie){ -_15=_5.style.cssText.replace(/rgb\(.*?\)/ig,function(rgb){ -return Xinha._colorToRgb(rgb); -}); -} -} -} -if(/^(_moz)?$/.test(_15)){ -continue; -} -_9+=" "+_14+"=\""+Xinha.htmlEncode(_15)+"\""; -} -if(Xinha.is_ie&&_5.style.cssText){ -_9+=" style=\""+_5.style.cssText.toLowerCase()+"\""; -} -if(Xinha.is_ie&&_5.tagName.toLowerCase()=="option"&&_5.selected){ -_9+=" selected=\"selected\""; -} -if(_9!==""){ -if(_a&&_c=="p"){ -_9+="> 

"; -}else{ -if(_a){ -_9+=" />"; -}else{ -_9+=">"; -} -} -} -} -} -var _18=false; -if(_c=="script"||_c=="noscript"){ -if(!_7.config.stripScripts){ -if(Xinha.is_ie){ -var _19="\n"+_5.innerHTML.replace(/^[\n\r]*/,"").replace(/\s+$/,"")+"\n"+_8; -}else{ -var _19=(_5.hasChildNodes())?_5.firstChild.nodeValue:""; -} -_9+=_19+""+((Xinha.is_ie)?"\n":""); -} -}else{ -if(_c=="pre"){ -_9+=((Xinha.is_ie)?"\n":"")+_5.innerHTML.replace(/
/g,"\n")+""; -}else{ -for(i=_5.firstChild;i;i=i.nextSibling){ -if(!_18&&i.nodeType==1&&Xinha.isBlockElement(i)){ -_18=true; -} -_9+=Xinha.getHTMLWrapper(i,true,_7,_8+" "); -} -if(_6&&!_a){ -_9+=(((Xinha.isBlockElement(_5)&&_18)||_c=="head"||_c=="html")?("\n"+_8):"")+""; -} -} -} -break; -case 3: -if(/^script|noscript|style$/i.test(_5.parentNode.tagName)){ -_9=_5.data; -}else{ -if(_5.data.trim()==""){ -if(_5.data){ -_9=" "; -}else{ -_9=""; -} -}else{ -_9=Xinha.htmlEncode(_5.data); -} -} -break; -case 8: -_9=""; -break; -} -return _9; -}; - +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +function GetHtmlImplementation(a){this.editor=a}GetHtmlImplementation._pluginInfo={name:"GetHtmlImplementation DOMwalk",origin:"Xinha Core",version:"$LastChangedRevision: 1084 $".replace(/^[^:]*:\s*(.*)\s*\$$/,"$1"),developer:"The Xinha Core Developer Team",developer_url:"$HeadURL: http://svn.xinha.org/trunk/modules/GetHtml/DOMwalk.js $".replace(/^[^:]*:\s*(.*)\s*\$$/,"$1"),sponsor:"",sponsor_url:"",license:"htmlArea"};Xinha.getHTML=function(a,c,b){return Xinha.getHTMLWrapper(a,c,b)};Xinha.emptyAttributes=" checked disabled ismap readonly nowrap compact declare selected defer multiple noresize noshade ";Xinha.getHTMLWrapper=function(m,c,j,d){var h="";if(!d){d=""}switch(m.nodeType){case 10:case 6:case 12:break;case 2:break;case 4:h+=(Xinha.is_ie?("\n"+d):"")+"";break;case 5:h+="&"+m.nodeValue+";";break;case 7:h+=(Xinha.is_ie?("\n"+d):"")+"";break;case 1:case 11:case 9:var k;var g;var p=(m.nodeType==1)?m.tagName.toLowerCase():"";if((p=="script"||p=="noscript")&&j.config.stripScripts){break}if(c){c=!(j.config.htmlRemoveTags&&j.config.htmlRemoveTags.test(p))}if(Xinha.is_ie&&p=="head"){if(c){h+=(Xinha.is_ie?("\n"+d):"")+""}var r=RegExp.multiline;RegExp.multiline=true;var f=m.innerHTML.replace(Xinha.RE_tagName,function(s,i,a){return i+a.toLowerCase()}).replace(/\s*=\s*(([^'"][^>\s]*)([>\s])|"([^"]+)"|'([^']+)')/g,'="$2$4$5"$3').replace(/<(link|meta)((\s*\S*="[^"]*")*)>/g,"<$1$2 />");RegExp.multiline=r;h+=f+"\n";if(c){h+=(Xinha.is_ie?("\n"+d):"")+""}break}else{if(c){k=(!(m.hasChildNodes()||Xinha.needsClosingTag(m)));h+=((Xinha.isBlockElement(m))?("\n"+d):"")+"<"+m.tagName.toLowerCase();var q=m.attributes;for(g=0;g 

"}else{if(k){h+=" />"}else{h+=">"}}}}}var e=false;if(p=="script"||p=="noscript"){if(!j.config.stripScripts){if(Xinha.is_ie){var l="\n"+m.innerHTML.replace(/^[\n\r]*/,"").replace(/\s+$/,"")+"\n"+d}else{var l=(m.hasChildNodes())?m.firstChild.nodeValue:""}h+=l+""+((Xinha.is_ie)?"\n":"")}}else{if(p=="pre"){h+=((Xinha.is_ie)?"\n":"")+m.innerHTML.replace(/
/g,"\n")+""}else{for(g=m.firstChild;g;g=g.nextSibling){if(!e&&g.nodeType==1&&Xinha.isBlockElement(g)){e=true}h+=Xinha.getHTMLWrapper(g,true,j,d+" ")}if(c&&!k){h+=(((Xinha.isBlockElement(m)&&e)||p=="head"||p=="html")?("\n"+d):"")+""}}}break;case 3:if(/^script|noscript|style$/i.test(m.parentNode.tagName)){h=m.data}else{if(m.data.trim()==""){if(m.data){h=" "}else{h=""}}else{h=Xinha.htmlEncode(m.data)}}break;case 8:h="";break}return h}; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/GetHtml/TransformInnerHTML.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/GetHtml/TransformInnerHTML.js,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/GetHtml/TransformInnerHTML.js 13 May 2008 18:53:46 -0000 1.4 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/GetHtml/TransformInnerHTML.js 16 Jan 2009 09:05:47 -0000 1.5 @@ -1,151 +1,2 @@ -/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */ -/* This file is part of version 0.95 released Mon, 12 May 2008 17:33:15 +0200 */ -/* The URL of the most recent version of this file is http://svn.xinha.webfactional.com/trunk/modules/GetHtml/TransformInnerHTML.js */ -function GetHtmlImplementation(_1){ -this.editor=_1; -} -GetHtmlImplementation._pluginInfo={name:"GetHtmlImplementation TransformInnerHTML",version:"1.0",developer:"Nelson Bright",developer_url:"http://www.brightworkweb.com/",sponsor:"",sponsor_url:"",license:"htmlArea"}; -Xinha.RegExpCache=[/<\s*\/?([^\s\/>]+)[\s*\/>]/gi,/(\s+)_moz[^=>]*=[^\s>]*/gi,/\s*=\s*(([^'"][^>\s]*)([>\s])|"([^"]+)"|'([^']+)')/g,/\/>/g,/<(br|hr|img|input|link|meta|param|embed|area)((\s*\S*="[^"]*")*)>/g,/(<\w+\s+(\w*="[^"]*"\s+)*)(checked|compact|declare|defer|disabled|ismap|multiple|no(href|resize|shade|wrap)|readonly|selected)([\s>])/gi,/(="[^']*)'([^'"]*")/,/&(?=(?!(#[0-9]{2,5};|[a-zA-Z0-9]{2,6};|#x[0-9a-fA-F]{2,4};))[^<]*>)/g,/<\s+/g,/\s+(\/)?>/g,/\s{2,}/g,/\s+([^=\s]+)((="[^"]+")|([\s>]))/g,/\s+contenteditable(=[^>\s\/]*)?/gi,/((href|src)=")([^\s]*)"/g,/<\/?(div|p|h[1-6]|table|tr|td|th|ul|ol|li|blockquote|object|br|hr|img|embed|param|pre|script|html|head|body|meta|link|title|area|input|form|textarea|select|option)[^>]*>/g,/<\/(div|p|h[1-6]|table|tr|ul|ol|blockquote|object|html|head|body|script|form|select)( [^>]*)?>/g,/<(div|p|h[1-6]|table|tr|ul|ol|blockquote|object|html|head|body|script|form|select)( [^>]*)?>/g,/<(td|th|li|option|br|hr|embed|param|pre|meta|link|title|area|input|textarea)[^>]*>/g,/(^|<\/(pre|script)>)(\s|[^\s])*?(<(pre|script)[^>]*>|$)/g,/(]*>)([\s\S])*?(<\/pre>)/g,/(^|)([\s\S]*?)(?=|$)/g,/\S*=""/g,/|<\?[\s\S]*?\?>|<\/?\w[^>]*>/g,/(^|<\/script>)[\s\S]*?(]*>|$)/g]; -if(typeof RegExp.prototype.compile=="function"){ -for(var i=0;i").replace(c[9],"$1>").replace(c[5],"$1$3=\"$3\"$5").replace(c[4],"<$1$2 />").replace(c[6],"$1$2").replace(c[7],"&").replace(c[8],"<").replace(c[10]," "); -if(Xinha.is_ie&&c[13].test(_2)){ -_2=_2.replace(c[13],"$1"+this.stripBaseURL(RegExp.$3)+"\""); -} -if(this.config.only7BitPrintablesInURLs){ -if(Xinha.is_ie){ -c[13].test(_2); -} -if(c[13].test(_2)){ -try{ -_2=_2.replace(c[13],"$1"+decodeURIComponent(RegExp.$3).replace(/([^!-~]+)/g,function(_8){ -return escape(_8); -})+"\""); -} -catch(e){ -_2=_2.replace(c[13],"$1"+RegExp.$3.replace(/([^!-~]+)/g,function(_9){ -return escape(_9); -})+"\""); -} -} -} -return _2; -}; -Xinha.indent=function(s,_b){ -Xinha.__nindent=0; -Xinha.__sindent=""; -Xinha.__sindentChar=(typeof _b=="undefined")?" ":_b; -var c=Xinha.RegExpCache; -if(Xinha.is_gecko){ -s=s.replace(c[19],function(_d){ -return _d.replace(/
/g,"\n"); -}); -} -s=s.replace(c[18],function(_e){ -_e=_e.replace(c[20],function(st,$1,$2){ -string=$2.replace(/[\n\r]/gi," ").replace(/\s+/gi," ").replace(c[14],function(str){ -if(str.match(c[16])){ -var s="\n"+Xinha.__sindent+str; -Xinha.__sindent+=Xinha.__sindentChar; -++Xinha.__nindent; -return s; -}else{ -if(str.match(c[15])){ ---Xinha.__nindent; -Xinha.__sindent=""; -for(var i=Xinha.__nindent;i>0;--i){ -Xinha.__sindent+=Xinha.__sindentChar; -} -return "\n"+Xinha.__sindent+str; -}else{ -if(str.match(c[17])){ -return "\n"+Xinha.__sindent+str; -} -} -} -return str; -}); -return $1+string; -}); -return _e; -}); -s=s.replace(/^\s*/,"").replace(/ +\n/g,"\n").replace(/[\r\n]+(\s+)<\/script>/g,"\n$1"); -return s; -}; -Xinha.getHTML=function(_15,_16,_17){ -var _18=""; -var c=Xinha.RegExpCache; -if(_15.nodeType==11){ -var div=document.createElement("div"); -var _1b=_15.insertBefore(div,_15.firstChild); -for(j=_1b.nextSibling;j;j=j.nextSibling){ -_1b.appendChild(j.cloneNode(true)); -} -_18+=_1b.innerHTML.replace(c[23],function(_1c){ -_1c=_1c.replace(c[22],function(tag){ -if(/^<[!\?]/.test(tag)){ -return tag; -}else{ -return _17.cleanHTML(tag); -} -}); -return _1c; -}); -}else{ -var _1e=(_15.nodeType==1)?_15.tagName.toLowerCase():""; -if(_16){ -_18+="<"+_1e; -var _1f=_15.attributes; -for(i=0;i<_1f.length;++i){ -var a=_1f.item(i); -if(!a.specified){ -continue; -} -var _21=a.nodeName.toLowerCase(); -var _22=a.nodeValue; -_18+=" "+_21+"=\""+_22+"\""; -} -_18+=">"; -} -if(_1e=="html"){ -innerhtml=_17._doc.documentElement.innerHTML; -}else{ -innerhtml=_15.innerHTML; -} -_18+=innerhtml.replace(c[23],function(_23){ -_23=_23.replace(c[22],function(tag){ -if(/^<[!\?]/.test(tag)){ -return tag; -}else{ -if(!(_17.config.htmlRemoveTags&&_17.config.htmlRemoveTags.test(tag.replace(/<([^\s>\/]+)/,"$1")))){ -return _17.cleanHTML(tag); -}else{ -return ""; -} -} -}); -return _23; -}); -if(Xinha.is_ie){ -_18=_18.replace(/]*)?>/g,"").replace(/(<(ul|ol)[^>]*>)[\s\n]*<\/li>/g,"$1").replace(/<\/li>([\s\n]*<\/li>)+/g,""); -} -if(Xinha.is_gecko){ -_18=_18.replace(/
\n$/,""); -} -if(_16){ -_18+=""; -} -_18=Xinha.indent(_18); -} -return _18; -}; - +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +function GetHtmlImplementation(a){this.editor=a}GetHtmlImplementation._pluginInfo={name:"GetHtmlImplementation TransformInnerHTML",version:"1.0",developer:"Nelson Bright",developer_url:"http://www.brightworkweb.com/",sponsor:"",sponsor_url:"",license:"htmlArea"};Xinha.RegExpCache=[/<\s*\/?([^\s\/>]+)[\s*\/>]/gi,/(\s+)_moz[^=>]*=[^\s>]*/gi,/\s*=\s*(([^'"][^>\s]*)([>\s])|"([^"]+)"|'([^']+)')/g,/\/>/g,/<(br|hr|img|input|link|meta|param|embed|area)((\s*\S*="[^"]*")*)>/g,/(<\w+\s+(\w*="[^"]*"\s+)*)(checked|compact|declare|defer|disabled|ismap|multiple|no(href|resize|shade|wrap)|readonly|selected)([\s>])/gi,/(="[^']*)'([^'"]*")/,/&(?=(?!(#[0-9]{2,5};|[a-zA-Z0-9]{2,6};|#x[0-9a-fA-F]{2,4};))[^<]*>)/g,/<\s+/g,/\s+(\/)?>/g,/\s{2,}/g,/\s+([^=\s]+)((="[^"]+")|([\s>]))/g,/\s+contenteditable(=[^>\s\/]*)?/gi,/((href|src)=")([^\s]*)"/g,/<\/?(div|p|h[1-6]|table|tr|td|th|ul|ol|li|dl|dt|dd|blockquote|object|br|hr|img|embed|param|pre|script|html|head|body|meta|link|title|area|input|form|textarea|select|option)[^>]*>/g,/<\/(div|p|h[1-6]|table|tr|ul|ol|dl|blockquote|object|html|head|body|script|form|select)( [^>]*)?>/g,/<(div|p|h[1-6]|table|tr|ul|ol|dl|blockquote|object|html|head|body|script|form|select)( [^>]*)?>/g,/<(td|th|li|dt|dd|option|br|hr|embed|param|pre|meta|link|title|area|input|textarea)[^>]*>/g,/(^|<\/(pre|script)>)(\s|[^\s])*?(<(pre|script)[^>]*>|$)/g,/(]*>)([\s\S])*?(<\/pre>)/g,/(^|)([\s\S]*?)(?=|$)/g,/\S*=""/g,/|<\?[\s\S]*?\?>|<\/?\w[^>]*>/g,/(^|<\/script>)[\s\S]*?(]*>|$)/g];if(typeof RegExp.prototype.compile=="function"){for(var i=0;i").replace(d[9],"$1>").replace(d[5],'$1$3="$3"$5').replace(d[4],"<$1$2 />").replace(d[6],"$1$2").replace(d[7],"&").replace(d[8],"<").replace(d[10]," ");if(Xinha.is_ie&&d[13].test(b)){b=b.replace(d[13],"$1"+Xinha._escapeDollars(stripBaseURL(RegExp.$3))+'"')}if(this.config.only7BitPrintablesInURLs){if(Xinha.is_ie){d[13].test(b)}if(d[13].test(b)){try{b=b.replace(d[13],"$1"+Xinha._escapeDollars(decodeURIComponent(RegExp.$3).replace(/([^!-~]+)/g,function(c){return escape(c)}))+'"')}catch(a){b=b.replace(d[13],Xinha._escapeDollars("$1"+RegExp.$3.replace(/([^!-~]+)/g,function(c){return escape(c)})+'"'))}}}return b};Xinha.indent=function(a,b){Xinha.__nindent=0;Xinha.__sindent="";Xinha.__sindentChar=(typeof b=="undefined")?" ":b;var d=Xinha.RegExpCache;if(Xinha.is_gecko){a=a.replace(d[19],function(c){return c.replace(/
/g,"\n")})}a=a.replace(d[18],function(c){c=c.replace(d[20],function(f,e,g){string=g.replace(/[\n\r]/gi," ").replace(/\s+/gi," ").replace(d[14],function(l){if(l.match(d[16])){var k="\n"+Xinha.__sindent+l;Xinha.__sindent+=Xinha.__sindentChar;++Xinha.__nindent;return k}else{if(l.match(d[15])){--Xinha.__nindent;Xinha.__sindent="";for(var h=Xinha.__nindent;h>0;--h){Xinha.__sindent+=Xinha.__sindentChar}return"\n"+Xinha.__sindent+l}else{if(l.match(d[17])){return"\n"+Xinha.__sindent+l}}}return l});return e+string});return c});a=a.replace(/^\s*/,"").replace(/ +\n/g,"\n").replace(/[\r\n]+(\s+)<\/script>/g,"\n$1<\/script>");return a};Xinha.getHTML=function(k,e,g){var f="";var h=Xinha.RegExpCache;if(k.nodeType==11){var d=document.createElement("div");var p=k.insertBefore(d,k.firstChild);for(j=p.nextSibling;j;j=j.nextSibling){p.appendChild(j.cloneNode(true))}f+=p.innerHTML.replace(h[23],function(a){a=a.replace(h[22],function(c){if(/^<[!\?]/.test(c)){return c}else{return g.cleanHTML(c)}});return a})}else{var n=(k.nodeType==1)?k.tagName.toLowerCase():"";if(e){f+="<"+n;var o=k.attributes;for(i=0;i\/]+)/,"$1")))){return g.cleanHTML(c)}else{return""}}});return a});if(Xinha.is_ie){f=f.replace(/<(li|dd|dt)( [^>]*)?>/g,"<$1$2>").replace(/(<[uod]l[^>]*>[\s\S]*?)<\/(li|dd|dt)>/g,"$1").replace(/\s*<\/(li|dd|dt)>(\s*<\/(li|dd|dt)>)+/g,"").replace(/(][\s\S]*?)(<\/d[dt]>)+/g,"$1")}if(Xinha.is_gecko){f=f.replace(/
\n$/,"")}f=f.replace(/\s*(<\/(li|dd|dt)>)/g,"$1");if(e){f+=""}f=Xinha.indent(f)}return f};Xinha._escapeDollars=function(a){return a.replace(/\$/g,"$$$$")}; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/InlineStyler/InlineStyler.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/InlineStyler/InlineStyler.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/InlineStyler/InlineStyler.js 16 Jan 2009 09:05:47 -0000 1.1 @@ -0,0 +1,2 @@ +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +Xinha.InlineStyler=function(b,c,a,d){this.element=b;this.editor=c;this.dialog=a;this.doc=d?d:document;this.inputs={styles:{},aux:{}};this.styles={};this.auxData={}};Xinha.InlineStyler.getLength=function(b){var a=parseInt(b);if(isNaN(a)){a=""}return a};Xinha.InlineStyler.prototype.applyStyle=function(f){var b=this.element;var d=b.style;for(var a in f){if(typeof f[a]=="function"){continue}if(f[a]!=null){var e=f[a].value||f[a]}switch(a){case"backgroundImage":if(/\S/.test(e)){d.backgroundImage="url("+e+")"}else{d.backgroundImage="none"}break;case"borderCollapse":d.borderCollapse=f[a]=="on"?"collapse":"separate";break;case"width":if(/\S/.test(e)){d.width=e+this.inputs.aux.widthUnit.value}else{d.width=""}break;case"height":if(/\S/.test(e)){d.height=e+this.inputs.aux.heightUnit.value}else{d.height=""}break;case"textAlign":if(e=="char"){var c=this.inputs.aux.textAlignChar.value;if(c=='"'){c='\\"'}d.textAlign='"'+c+'"'}else{if(e=="-"){d.textAlign=""}else{d.textAlign=e}}break;case"verticalAlign":b.vAlign="";if(e=="-"){d.verticalAlign=""}else{d.verticalAlign=e}break;case"float":if(Xinha.is_ie){d.styleFloat=e}else{d.cssFloat=e}break;case"borderWidth":d[a]=e+"px";break;default:d[a]=e;break}}};Xinha.InlineStyler.prototype.createStyleLayoutFieldset=function(){var m=this;var f=this.editor;var u=this.doc;var d=this.element;var l=u.createElement("fieldset");var c=u.createElement("legend");l.appendChild(c);c.innerHTML=Xinha._lc("Layout","TableOperations");var q=u.createElement("table");l.appendChild(q);q.style.width="100%";var a=u.createElement("tbody");q.appendChild(a);var r=d.tagName.toLowerCase();var b,h,j,n,k,e,o;if(r!="td"&&r!="tr"&&r!="th"){b=u.createElement("tr");a.appendChild(b);h=u.createElement("td");h.className="label";b.appendChild(h);h.innerHTML=Xinha._lc("Float","TableOperations")+":";h=u.createElement("td");b.appendChild(h);n=u.createElement("select");n.name=this.dialog.createId("float");h.appendChild(n);this.inputs.styles["float"]=n;e=["None","Left","Right"];for(var o=0;oInsert Image + +
+ + + + + + + + + + + + + +
Image URL: + +
Alternate text:
+ +
+ +
+Layout + +
+ +
Alignment:
+ + +
+ +
Border thickness:
+ + +
+ +
+ +
+Spacing + +
+ +
Horizontal:
+ + +
+ +
Vertical:
+ + +
+ +
+
+
+Image Preview:
+ +
+ +
+ + +
\ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/InsertImage/insert_image.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/InsertImage/insert_image.js,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/InsertImage/insert_image.js 13 May 2008 18:53:46 -0000 1.5 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/InsertImage/insert_image.js 16 Jan 2009 09:05:47 -0000 1.6 @@ -1,119 +1,2 @@ -/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */ -/* This file is part of version 0.95 released Mon, 12 May 2008 17:33:15 +0200 */ -/* The URL of the most recent version of this file is http://svn.xinha.webfactional.com/trunk/modules/InsertImage/insert_image.js */ -InsertImage._pluginInfo={name:"InsertImage",origin:"Xinha Core",version:"$LastChangedRevision:992 $".replace(/^[^:]*:\s*(.*)\s*\$$/,"$1"),developer:"The Xinha Core Developer Team",developer_url:"$HeadURL:http://svn.xinha.webfactional.com/trunk/modules/InsertImage/insert_image.js $".replace(/^[^:]*:\s*(.*)\s*\$$/,"$1"),sponsor:"",sponsor_url:"",license:"htmlArea"}; -function InsertImage(_1){ -} -Xinha.prototype._insertImage=function(_2){ -var _3=this; -var _4; -if(typeof _2=="undefined"){ -_2=this.getParentElement(); -if(_2&&_2.tagName.toLowerCase()!="img"){ -_2=null; -} -} -var _5; -if(typeof _3.config.baseHref!="undefined"&&_3.config.baseHref!==null){ -_5=_3.config.baseHref; -}else{ -var _6=window.location.toString().split("/"); -_6.pop(); -_5=_6.join("/"); -} -if(_2){ -function getSpecifiedAttribute(_7,_8){ -var a=_7.attributes; -for(var i=0;i0)?d:0)+"px";this.getElementById("ipreview").style.width=this.width-2+"px"};this.dialogReady=true}; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/InsertImage/pluginMethods.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/InsertImage/pluginMethods.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/InsertImage/pluginMethods.js 16 Jan 2009 09:05:47 -0000 1.1 @@ -0,0 +1,2 @@ +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +InsertImage.prototype.show=function(c){if(!this.dialog){this.prepareDialog()}var b=this.editor;if(typeof c=="undefined"){c=b.getParentElement();if(c&&c.tagName.toLowerCase()!="img"){c=null}}if(c){function a(f,g){var d=f.attributes;for(var e=0;eInsert Table +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ Caption: + + +
Rows:Width:
Cols:
+ +
+ +
+Layout + +
+ +
Alignment:
+ + +
+ +
Border
+ Pixels + + +
Collapse borders: + + +
+ +
+ +
+Spacing + +
+ +
Cell spacing:
+ + +
+ +
Cell padding:
+ + + +
+
+ + +
+
Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/InsertTable/insert_table.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/InsertTable/insert_table.js,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/InsertTable/insert_table.js 13 May 2008 18:53:46 -0000 1.4 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/InsertTable/insert_table.js 16 Jan 2009 09:05:47 -0000 1.5 @@ -1,66 +1,2 @@ -/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */ -/* This file is part of version 0.95 released Mon, 12 May 2008 17:33:15 +0200 */ -/* The URL of the most recent version of this file is http://svn.xinha.webfactional.com/trunk/modules/InsertTable/insert_table.js */ -InsertTable._pluginInfo={name:"InsertTable",origin:"Xinha Core",version:"$LastChangedRevision: 688 $".replace(/^[^:]*:\s*(.*)\s*\$$/,"$1"),developer:"The Xinha Core Developer Team",developer_url:"$HeadURL: http://svn.xinha.python-hosting.com/trunk/modules/InsertTable/insert_table.js $".replace(/^[^:]*:\s*(.*)\s*\$$/,"$1"),sponsor:"",sponsor_url:"",license:"htmlArea"}; -function InsertTable(_1){ -} -Xinha.prototype._insertTable=function(){ -var _2=this.getSelection(); -var _3=this.createRange(_2); -var _4=this; -Dialog(_4.config.URIs.insert_table,function(_5){ -if(!_5){ -return false; -} -var _6=_4._doc; -var _7=_6.createElement("table"); -for(var _8 in _5){ -var _9=_5[_8]; -if(!_9){ -continue; -} -switch(_8){ -case "f_width": -_7.style.width=_9+_5.f_unit; -break; -case "f_align": -_7.align=_9; -break; -case "f_border": -_7.border=parseInt(_9,10); -break; -case "f_spacing": -_7.cellSpacing=parseInt(_9,10); -break; -case "f_padding": -_7.cellPadding=parseInt(_9,10); -break; -} -} -var _a=0; -if(_5.f_fixed){ -_a=Math.floor(100/parseInt(_5.f_cols,10)); -} -var _b=_6.createElement("tbody"); -_7.appendChild(_b); -for(var i=0;i<_5.f_rows;++i){ -var tr=_6.createElement("tr"); -_b.appendChild(tr); -for(var j=0;j<_5.f_cols;++j){ -var td=_6.createElement("td"); -if(_a){ -td.style.width=_a+"%"; -} -tr.appendChild(td); -td.appendChild(_6.createTextNode("\xa0")); -} -} -if(Xinha.is_ie){ -_3.pasteHTML(_7.outerHTML); -}else{ -_4.insertNodeAtSelection(_7); -} -return true; -},null); -}; - +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +InsertTable._pluginInfo={name:"InsertTable",origin:"Xinha Core",version:"$LastChangedRevision: 1085 $".replace(/^[^:]*:\s*(.*)\s*\$$/,"$1"),developer:"The Xinha Core Developer Team",developer_url:"$HeadURL: http://svn.xinha.org/trunk/modules/InsertTable/insert_table.js $".replace(/^[^:]*:\s*(.*)\s*\$$/,"$1"),sponsor:"",sponsor_url:"",license:"htmlArea"};function InsertTable(c){this.editor=c;var a=c.config;var b=this;c.config.btnList.inserttable[3]=function(){b.show()}}InsertTable.prototype._lc=function(a){return Xinha._lc(a,"Xinha")};InsertTable.prototype.onGenerateOnce=function(){InsertTable.loadAssets()};InsertTable.loadAssets=function(){var self=InsertTable;if(self.loading){return}self.loading=true;Xinha._getback(_editor_url+"modules/InsertTable/dialog.html",function(getback){self.html=getback;self.dialogReady=true});Xinha._getback(_editor_url+"modules/InsertTable/pluginMethods.js",function(getback){eval(getback);self.methodsReady=true})};InsertTable.prototype.onUpdateToolbar=function(){if(!(InsertTable.dialogReady&&InsertTable.methodsReady)){this.editor._toolbarObjects.inserttable.state("enabled",false)}else{this.onUpdateToolbar=null}};InsertTable.prototype.prepareDialog=function(){var a=this;var c=this.editor;var b=this.dialog=new Xinha.Dialog(c,InsertTable.html,"Xinha",{width:400});b.getElementById("ok").onclick=function(){a.apply()};b.getElementById("cancel").onclick=function(){a.dialog.hide()};this.borderColorPicker=new Xinha.colorPicker.InputBinding(b.getElementById("border_color"));this.dialog.onresize=function(){this.getElementById("layout_fieldset").style.width=(this.width/2)+50+"px";this.getElementById("spacing_fieldset").style.width=(this.width/2)-120+"px"};this.dialogReady=true}; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/InsertTable/pluginMethods.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/InsertTable/pluginMethods.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/InsertTable/pluginMethods.js 16 Jan 2009 09:05:47 -0000 1.1 @@ -0,0 +1,2 @@ +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +InsertTable.prototype.show=function(c){if(!this.dialog){this.prepareDialog()}var b=this.editor;var a={caption:"",rows:"2",cols:"4",width:"100",unit:"%",fixed:"",align:"",border:"1",border_style:"dotted",border_color:"#000000",border_collapse:"on",spacing:"",padding:"5"};this.borderColorPicker.setColor("#000000");this.dialog.show(a);this.dialog.onresize()};InsertTable.prototype.apply=function(){var g=this.editor;var l=g._doc;var a=this.dialog.getValues();if(!a.rows||!a.cols){if(!a.rows){this.dialog.getElementById("rows_alert").style.display=""}if(!a.cols){this.dialog.getElementById("columns_alert").style.display=""}return}this.dialog.hide();var n=l.createElement("table");for(var k in a){var m=a[k];if(!m){continue}switch(k){case"width":n.style.width=m+a.unit.value;break;case"align":n.align=m.value;break;case"border":n.style.border=m+"px "+a.border_style.value+" "+a.border_color;break;case"border_collapse":n.style.borderCollapse=(m=="on")?"collapse":"";break;case"spacing":n.cellSpacing=parseInt(m,10);break;case"padding":n.cellPadding=parseInt(m,10);break}}if(a.caption){var o=n.createCaption();o.appendChild(l.createTextNode(a.caption))}var f=0;if(a.fixed){f=Math.floor(100/parseInt(a.cols,10))}var e=l.createElement("tbody");n.appendChild(e);for(var d=0;d"); -Xinha._stopEvent(ev); -return true; -break; -case "1": -case "2": -case "3": -case "4": -case "5": -case "6": -this.editor.execCommand("formatblock",false,""); -Xinha._stopEvent(ev); -return true; -break; -} -} -switch(ev.keyCode){ -case 8: -case 46: -if(this.handleBackspace()){ -Xinha._stopEvent(ev); -return true; -} -break; -} -return false; -}; -InternetExplorer.prototype.handleBackspace=function(){ -var _3=this.editor; -var _4=_3.getSelection(); -if(_4.type=="Control"){ -var _5=_3.activeElement(_4); -Xinha.removeFromParent(_5); -return true; -} -var _6=_3.createRange(_4); -var r2=_6.duplicate(); -r2.moveStart("character",-1); -var a=r2.parentElement(); -if(a!=_6.parentElement()&&(/^a$/i.test(a.tagName))){ -r2.collapse(true); -r2.moveEnd("character",1); -r2.pasteHTML(""); -r2.select(); -return true; -} -}; -InternetExplorer.prototype.inwardHtml=function(_9){ -_9=_9.replace(/<(\/?)del(\s|>|\/)/ig,"<$1strike$2"); -_9=_9.replace(/("; -}else{ -if(_f.config.browserQuirksMode===true){ -var _12=""; -}else{ -var _12=Xinha.getDoctype(document); -} -} -if(!_f.config.fullPage){ -_11+=_12+"\n"; -_11+="\n"; -_11+="\n"; -_11+="\n"; -if(typeof _f.config.baseHref!="undefined"&&_f.config.baseHref!==null){ -_11+="\n"; -} -if(typeof _f.config.pageStyleSheets!=="undefined"){ -for(var i=0;i<_f.config.pageStyleSheets.length;i++){ -if(_f.config.pageStyleSheets[i].length>0){ -_11+=""; -} -} -} -if(_f.config.pageStyle){ -_11+=""; -} -_11+="\n"; -_11+="\n"; -_11+=_f.getEditorContent(); -_11+="\n"; -_11+=""; -}else{ -_11=_f.getEditorContent(); -if(_11.match(Xinha.RE_doctype)){ -_f.setDoctype(RegExp.$1); -} -} -_e.write(_11); -_e.close(); -_e.execCommand(_b,UI,_d); -document.body.removeChild(_10); -return true; -break; -case "removeformat": -var _f=this.editor; -var sel=_f.getSelection(); -var _15=_f.saveSelection(sel); -var i,el,els; -function clean(el){ -if(el.nodeType!=1){ -return; -} -el.removeAttribute("style"); -for(var j=0;j=1){ -return _2a.item(0).outerHTML; -} -} -return ""; -}; -Xinha.prototype.getSelection=function(){ -return this._doc.selection; -}; -Xinha.prototype.createRange=function(sel){ -if(!sel){ -sel=this.getSelection(); -} -return sel.createRange(); -}; -Xinha.prototype.isKeyEvent=function(_2c){ -return _2c.type=="keydown"; -}; -Xinha.prototype.getKey=function(_2d){ -return String.fromCharCode(_2d.keyCode); -}; -Xinha.getOuterHTML=function(_2e){ -return _2e.outerHTML; -}; -Xinha.prototype.cc=String.fromCharCode(8201); -Xinha.prototype.setCC=function(_2f){ -var cc=this.cc; -if(_2f=="textarea"){ -var ta=this._textArea; -var pos=document.selection.createRange(); -pos.collapse(); -pos.text=cc; -var _33=ta.value.indexOf(cc); -var _34=ta.value.substring(0,_33); -var _35=ta.value.substring(_33+cc.length,ta.value.length); -if(_35.match(/^[^<]*>/)){ -var _36=_35.indexOf(">")+1; -ta.value=_34+_35.substring(0,_36)+cc+_35.substring(_36,_35.length); -}else{ -ta.value=_34+cc+_35; -} -ta.value=ta.value.replace(new RegExp("(&[^"+cc+"]*?)("+cc+")([^"+cc+"]*?;)"),"$1$3$2"); -ta.value=ta.value.replace(new RegExp("(]*>[^"+cc+"]*?)("+cc+")([^"+cc+"]*?)"),"$1$3$2"); -ta.value=ta.value.replace(new RegExp("^([^"+cc+"]*)("+cc+")([^"+cc+"]*]*>)(.*?)"),"$1$3$2$4"); -}else{ -var sel=this.getSelection(); -var r=sel.createRange(); -if(sel.type=="Control"){ -var _39=r.item(0); -_39.outerHTML+=cc; -}else{ -r.collapse(); -r.text=cc; -} -} -}; -Xinha.prototype.findCC=function(_3a){ -var _3b=(_3a=="textarea")?this._textArea:this._doc.body; -range=_3b.createTextRange(); -if(range.findText(escape(this.cc))){ -range.select(); -range.text=""; -} -if(range.findText(this.cc)){ -range.select(); -range.text=""; -} -if(_3a=="textarea"){ -this._textArea.focus(); -} -}; -Xinha.getDoctype=function(doc){ -return (doc.compatMode=="CSS1Compat"&&Xinha.ie_version<8)?"":""; -}; - +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +InternetExplorer._pluginInfo={name:"Internet Explorer",origin:"Xinha Core",version:"$LastChangedRevision: 1148 $".replace(/^[^:]*:\s*(.*)\s*\$$/,"$1"),developer:"The Xinha Core Developer Team",developer_url:"$HeadURL: http://svn.xinha.org/trunk/modules/InternetExplorer/InternetExplorer.js $".replace(/^[^:]*:\s*(.*)\s*\$$/,"$1"),sponsor:"",sponsor_url:"",license:"htmlArea"};function InternetExplorer(a){this.editor=a;a.InternetExplorer=this}InternetExplorer.prototype.onKeyPress=function(a){if(this.editor.isShortCut(a)){switch(this.editor.getKey(a).toLowerCase()){case"n":this.editor.execCommand("formatblock",false,"

");Xinha._stopEvent(a);return true;break;case"1":case"2":case"3":case"4":case"5":case"6":this.editor.execCommand("formatblock",false,"");Xinha._stopEvent(a);return true;break}}switch(a.keyCode){case 8:case 46:if(this.handleBackspace()){Xinha._stopEvent(a);return true}break}return false};InternetExplorer.prototype.handleBackspace=function(){var e=this.editor;var f=e.getSelection();if(f.type=="Control"){var g=e.activeElement(f);Xinha.removeFromParent(g);return true}var d=e.createRange(f);var c=d.duplicate();c.moveStart("character",-1);var b=c.parentElement();if(b!=d.parentElement()&&(/^a$/i.test(b.tagName))){c.collapse(true);c.moveEnd("character",1);c.pasteHTML("");c.select();return true}};InternetExplorer.prototype.inwardHtml=function(a){a=a.replace(/<(\/?)del(\s|>|\/)/ig,"<$1strike$2");a=a.replace(/(]+id="__InsertSpan_Workaround_[a-z]+".*?>([\s\S]*?)<\/span>/i,"$1");return a};InternetExplorer.prototype.outwardHtml=function(a){a=a.replace(/ (\s*)(]+id="__InsertSpan_Workaround_[a-z]+".*?>([\s\S]*?)<\/span>/i,"$1");return a};InternetExplorer.prototype.onExecCommand=function(f,d,c){switch(f){case"saveas":var o=null;var l=this.editor;var h=document.createElement("iframe");h.src="about:blank";h.style.display="none";document.body.appendChild(h);try{if(h.contentDocument){o=h.contentDocument}else{o=h.contentWindow.document}}catch(n){}o.open("text/html","replace");var k="";if(l.config.browserQuirksMode===false){var e=''}else{if(l.config.browserQuirksMode===true){var e=""}else{var e=Xinha.getDoctype(document)}}if(!l.config.fullPage){k+=e+"\n";k+="\n";k+="\n";k+='\n';if(typeof l.config.baseHref!="undefined"&&l.config.baseHref!==null){k+='\n'}if(typeof l.config.pageStyleSheets!=="undefined"){for(var j=0;j0){k+=''}}}if(l.config.pageStyle){k+='"}k+="\n";k+="\n";k+=l.getEditorContent();k+="\n";k+=""}else{k=l.getEditorContent();if(k.match(Xinha.RE_doctype)){l.setDoctype(RegExp.$1)}}o.write(k);o.close();o.execCommand(f,d,c);document.body.removeChild(h);return true;break;case"removeformat":var l=this.editor;var b=l.getSelection();var p=l.saveSelection(b);var j,a,g;function m(q){if(q.nodeType!=1){return}q.removeAttribute("style");for(var i=0;i');var h=g.getElementById(j);k.moveToElementText(h);k.select();break;case"JustificationHack":var a=String.fromCharCode(1);k.pasteHTML(a);k.findText(a,-1);k.select();k.execCommand("JustifyNone");k.pasteHTML("");break;case"VisibleCue":default:var a=String.fromCharCode(1);k.pasteHTML(a);k.findText(a,-1);k.select()}}};Xinha.prototype.selectNodeContents=function(d,e){this.focusEditor();this.forceRedraw();var a;var f=typeof e=="undefined"?true:false;if(f&&d.tagName&&d.tagName.toLowerCase().match(/table|img|input|select|textarea/)){a=this._doc.body.createControlRange();a.add(d)}else{a=this._doc.body.createTextRange();if(3==d.nodeType){if(d.parentNode){a.moveToElementText(d.parentNode)}else{a.moveToElementText(this._doc.body)}var g=this._doc.body.createTextRange();var b=0;var c=d.previousSibling;for(;c&&(1!=c.nodeType);c=c.previousSibling){if(3==c.nodeType){b+=c.nodeValue.length-c.nodeValue.split("\r").length-1}}if(c&&(1==c.nodeType)){g.moveToElementText(c);a.setEndPoint("StartToEnd",g)}if(b){a.moveStart("character",b)}b=0;c=d.nextSibling;for(;c&&(1!=c.nodeType);c=c.nextSibling){if(3==c.nodeType){b+=c.nodeValue.length-c.nodeValue.split("\r").length-1;if(!c.nextSibling){b+=1}}}if(c&&(1==c.nodeType)){g.moveToElementText(c);a.setEndPoint("EndToStart",g)}if(b){a.moveEnd("character",-b)}if(!d.nextSibling){a.moveEnd("character",-1)}}else{a.moveToElementText(d)}}if(typeof e!="undefined"){a.collapse(e);if(!e){a.moveStart("character",-1);a.moveEnd("character",-1)}}a.select()};Xinha.prototype.insertHTML=function(b){this.focusEditor();var c=this.getSelection();var a=this.createRange(c);a.pasteHTML(b)};Xinha.prototype.getSelectedHTML=function(){var b=this.getSelection();if(this.selectionEmpty(b)){return""}var a=this.createRange(b);if(a.htmlText){return a.htmlText}else{if(a.length>=1){return a.item(0).outerHTML}}return""};Xinha.prototype.getSelection=function(){return this._doc.selection};Xinha.prototype.createRange=function(a){if(!a){a=this.getSelection()}return a.createRange()};Xinha.prototype.isKeyEvent=function(a){return a.type=="keydown"};Xinha.prototype.getKey=function(a){return String.fromCharCode(a.keyCode)};Xinha.getOuterHTML=function(a){return a.outerHTML};Xinha.cc=String.fromCharCode(8201);Xinha.prototype.setCC=function(h){var d=Xinha.cc;if(h=="textarea"){var f=this._textArea;var j=document.selection.createRange();j.collapse();j.text=d;var g=f.value.indexOf(d);var k=f.value.substring(0,g);var b=f.value.substring(g+d.length,f.value.length);if(b.match(/^[^<]*>/)){var i=b.indexOf(">")+1;f.value=k+b.substring(0,i)+d+b.substring(i,b.length)}else{f.value=k+d+b}f.value=f.value.replace(new RegExp("(&[^"+d+"]*?)("+d+")([^"+d+"]*?;)"),"$1$3$2");f.value=f.value.replace(new RegExp("(]*>[^"+d+"]*?)("+d+")([^"+d+"]*?<\/script>)"),"$1$3$2");f.value=f.value.replace(new RegExp("^([^"+d+"]*)("+d+")([^"+d+"]*]*>)(.*?)"),"$1$3$2$4")}else{var c=this.getSelection();var a=c.createRange();if(c.type=="Control"){var e=a.item(0);e.outerHTML+=d}else{a.collapse();a.text=d}}};Xinha.prototype.findCC=function(b){var a=(b=="textarea")?this._textArea:this._doc.body;range=a.createTextRange();if(range.findText(escape(Xinha.cc))){range.select();range.text="";range.select()}if(range.findText(Xinha.cc)){range.select();range.text="";range.select()}if(b=="textarea"){this._textArea.focus()}};Xinha.getDoctype=function(a){return(a.compatMode=="CSS1Compat"&&Xinha.ie_version<8)?'':""}; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/Opera/Opera.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/Opera/Opera.js,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/Opera/Opera.js 13 May 2008 18:53:46 -0000 1.1 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/Opera/Opera.js 16 Jan 2009 09:05:47 -0000 1.2 @@ -1,464 +1,2 @@ -/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */ -/* This file is part of version 0.95 released Mon, 12 May 2008 17:33:15 +0200 */ -/* The URL of the most recent version of this file is http://svn.xinha.webfactional.com/trunk/modules/Opera/Opera.js */ -Opera._pluginInfo={name:"Opera",origin:"Xinha Core",version:"$LastChangedRevision:970 $".replace(/^[^:]*:\s*(.*)\s*\$$/,"$1"),developer:"The Xinha Core Developer Team",developer_url:"$HeadURL:http://svn.xinha.webfactional.com/trunk/modules/Opera/Opera.js $".replace(/^[^:]*:\s*(.*)\s*\$$/,"$1"),sponsor:"Gogo Internet Services Limited",sponsor_url:"http://www.gogo.co.nz/",license:"htmlArea"}; -function Opera(_1){ -this.editor=_1; -_1.Opera=this; -} -Opera.prototype.onKeyPress=function(ev){ -var _3=this.editor; -var s=_3.getSelection(); -if(_3.isShortCut(ev)){ -switch(_3.getKey(ev).toLowerCase()){ -case "z": -if(_3._unLink&&_3._unlinkOnUndo){ -Xinha._stopEvent(ev); -_3._unLink(); -_3.updateToolbar(); -return true; -} -break; -case "a": -sel=_3.getSelection(); -sel.removeAllRanges(); -range=_3.createRange(); -range.selectNodeContents(_3._doc.body); -sel.addRange(range); -Xinha._stopEvent(ev); -return true; -break; -case "v": -if(!_3.config.htmlareaPaste){ -return true; -} -break; -} -} -switch(_3.getKey(ev)){ -case " ": -var _5=function(_6,_7){ -var _8=_6.nextSibling; -if(typeof _7=="string"){ -_7=_3._doc.createElement(_7); -} -var a=_6.parentNode.insertBefore(_7,_8); -Xinha.removeFromParent(_6); -a.appendChild(_6); -_8.data=" "+_8.data; -s.collapse(_8,1); -_3._unLink=function(){ -var t=a.firstChild; -a.removeChild(t); -a.parentNode.insertBefore(t,a); -Xinha.removeFromParent(a); -_3._unLink=null; -_3._unlinkOnUndo=false; -}; -_3._unlinkOnUndo=true; -return a; -}; -if(_3.config.convertUrlsToLinks&&s&&s.isCollapsed&&s.anchorNode.nodeType==3&&s.anchorNode.data.length>3&&s.anchorNode.data.indexOf(".")>=0){ -var _b=s.anchorNode.data.substring(0,s.anchorOffset).search(/\S{4,}$/); -if(_b==-1){ -break; -} -if(_3._getFirstAncestor(s,"a")){ -break; -} -var _c=s.anchorNode.data.substring(0,s.anchorOffset).replace(/^.*?(\S*)$/,"$1"); -var _d=_c.match(Xinha.RE_email); -if(_d){ -var _e=s.anchorNode; -var _f=_e.splitText(s.anchorOffset); -var _10=_e.splitText(_b); -_5(_10,"a").href="mailto:"+_d[0]; -break; -} -RE_date=/([0-9]+\.)+/; -RE_ip=/(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)/; -var _11=_c.match(Xinha.RE_url); -if(_11){ -if(RE_date.test(_c)){ -break; -} -var _12=s.anchorNode; -var _13=_12.splitText(s.anchorOffset); -var _14=_12.splitText(_b); -_5(_14,"a").href=(_11[1]?_11[1]:"http://")+_11[2]; -break; -} -} -break; -} -switch(ev.keyCode){ -case 27: -if(_3._unLink){ -_3._unLink(); -Xinha._stopEvent(ev); -} -break; -break; -case 8: -case 46: -if(!ev.shiftKey&&this.handleBackspace()){ -Xinha._stopEvent(ev); -} -default: -_3._unlinkOnUndo=false; -if(s.anchorNode&&s.anchorNode.nodeType==3){ -var a=_3._getFirstAncestor(s,"a"); -if(!a){ -break; -} -if(!a._updateAnchTimeout){ -if(s.anchorNode.data.match(Xinha.RE_email)&&a.href.match("mailto:"+s.anchorNode.data.trim())){ -var _16=s.anchorNode; -var _17=function(){ -a.href="mailto:"+_16.data.trim(); -a._updateAnchTimeout=setTimeout(_17,250); -}; -a._updateAnchTimeout=setTimeout(_17,1000); -break; -} -var m=s.anchorNode.data.match(Xinha.RE_url); -if(m&&a.href.match(new RegExp("http(s)?://"+Xinha.escapeStringForRegExp(s.anchorNode.data.trim())))){ -var _19=s.anchorNode; -var _1a=function(){ -m=_19.data.match(Xinha.RE_url); -if(m){ -a.href=(m[1]?m[1]:"http://")+m[2]; -} -a._updateAnchTimeout=setTimeout(_1a,250); -}; -a._updateAnchTimeout=setTimeout(_1a,1000); -} -} -} -break; -} -return false; -}; -Opera.prototype.handleBackspace=function(){ -var _1b=this.editor; -setTimeout(function(){ -var sel=_1b.getSelection(); -var _1d=_1b.createRange(sel); -var SC=_1d.startContainer; -var SO=_1d.startOffset; -var EC=_1d.endContainer; -var EO=_1d.endOffset; -var _22=SC.nextSibling; -if(SC.nodeType==3){ -SC=SC.parentNode; -} -if(!(/\S/.test(SC.tagName))){ -var p=document.createElement("p"); -while(SC.firstChild){ -p.appendChild(SC.firstChild); -} -SC.parentNode.insertBefore(p,SC); -Xinha.removeFromParent(SC); -var r=_1d.cloneRange(); -r.setStartBefore(_22); -r.setEndAfter(_22); -r.extractContents(); -sel.removeAllRanges(); -sel.addRange(r); -} -},10); -}; -Opera.prototype.inwardHtml=function(_25){ -_25=_25.replace(/<(\/?)del(\s|>|\/)/ig,"<$1strike$2"); -return _25; -}; -Opera.prototype.outwardHtml=function(_26){ -return _26; -}; -Opera.prototype.onExecCommand=function(_27,UI,_29){ -switch(_27){ -case "removeformat": -var _2a=this.editor; -var sel=_2a.getSelection(); -var _2c=_2a.saveSelection(sel); -var _2d=_2a.createRange(sel); -var els=_2a._doc.body.getElementsByTagName("*"); -var _2f=(_2d.startContainer.nodeType==1)?_2d.startContainer:_2d.startContainer.parentNode; -var i,el; -if(sel.isCollapsed){ -_2d.selectNodeContents(_2a._doc.body); -} -for(i=0;isel.anchorOffset&&sel.anchorNode.childNodes[sel.anchorOffset].nodeType==1){ -return sel.anchorNode.childNodes[sel.anchorOffset]; -}else{ -if(sel.anchorNode.nodeType==1){ -return sel.anchorNode; -}else{ -return null; -} -} -} -return null; -}; -Xinha.prototype.selectionEmpty=function(sel){ -if(!sel){ -return true; -} -if(typeof sel.isCollapsed!="undefined"){ -return sel.isCollapsed; -} -return true; -}; -Xinha.prototype.saveSelection=function(){ -return this.createRange(this.getSelection()).cloneRange(); -}; -Xinha.prototype.restoreSelection=function(_3d){ -var sel=this.getSelection(); -sel.removeAllRanges(); -sel.addRange(_3d); -}; -Xinha.prototype.selectNodeContents=function(_3f,pos){ -this.focusEditor(); -this.forceRedraw(); -var _41; -var _42=typeof pos=="undefined"?true:false; -var sel=this.getSelection(); -_41=this._doc.createRange(); -if(_42&&_3f.tagName&&_3f.tagName.toLowerCase().match(/table|img|input|textarea|select/)){ -_41.selectNode(_3f); -}else{ -_41.selectNodeContents(_3f); -} -sel.removeAllRanges(); -sel.addRange(_41); -}; -Xinha.prototype.insertHTML=function(_44){ -var sel=this.getSelection(); -var _46=this.createRange(sel); -this.focusEditor(); -var _47=this._doc.createDocumentFragment(); -var div=this._doc.createElement("div"); -div.innerHTML=_44; -while(div.firstChild){ -_47.appendChild(div.firstChild); -} -var _49=this.insertNodeAtSelection(_47); -}; -Xinha.prototype.getSelectedHTML=function(){ -var sel=this.getSelection(); -if(sel.isCollapsed){ -return ""; -} -var _4b=this.createRange(sel); -return Xinha.getHTML(_4b.cloneContents(),false,this); -}; -Xinha.prototype.getSelection=function(){ -var sel=this._iframe.contentWindow.getSelection(); -if(sel&&sel.focusNode&&sel.focusNode.tagName&&sel.focusNode.tagName=="HTML"){ -var bod=this._doc.getElementsByTagName("body")[0]; -var rng=this.createRange(); -rng.selectNodeContents(bod); -sel.removeAllRanges(); -sel.addRange(rng); -sel.collapseToEnd(); -} -return sel; -}; -Xinha.prototype.createRange=function(sel){ -this.activateEditor(); -if(typeof sel!="undefined"){ -try{ -return sel.getRangeAt(0); -} -catch(ex){ -return this._doc.createRange(); -} -}else{ -return this._doc.createRange(); -} -}; -Xinha.prototype.isKeyEvent=function(_50){ -return _50.type=="keypress"; -}; -Xinha.prototype.getKey=function(_51){ -return String.fromCharCode(_51.charCode); -}; -Xinha.getOuterHTML=function(_52){ -return (new XMLSerializer()).serializeToString(_52); -}; -Xinha.prototype.setCC=function(_53){ -var cc=String.fromCharCode(8286); -try{ -if(_53=="textarea"){ -var ta=this._textArea; -var _56=ta.selectionStart; -var _57=ta.value.substring(0,_56); -var _58=ta.value.substring(_56,ta.value.length); -if(_58.match(/^[^<]*>/)){ -var _59=_58.indexOf(">")+1; -ta.value=_57+_58.substring(0,_59)+cc+_58.substring(_59,_58.length); -}else{ -ta.value=_57+cc+_58; -} -ta.value=ta.value.replace(new RegExp("(&[^"+cc+"]*?)("+cc+")([^"+cc+"]*?;)"),"$1$3$2"); -ta.value=ta.value.replace(new RegExp("(]*>[^"+cc+"]*?)("+cc+")([^"+cc+"]*?)"),"$1$3$2"); -ta.value=ta.value.replace(new RegExp("^([^"+cc+"]*)("+cc+")([^"+cc+"]*]*>)(.*?)"),"$1$3$2$4"); -ta.value=ta.value.replace(cc,"MARK"); -}else{ -var sel=this.getSelection(); -var _5b=this._doc.createElement("span"); -_5b.id="XinhaOperaCaretMarker"; -sel.getRangeAt(0).insertNode(_5b); -} -} -catch(e){ -} -}; -Xinha.prototype.findCC=function(_5c){ -if(_5c=="textarea"){ -var ta=this._textArea; -var pos=ta.value.search(/(((\s|(MARK))*<\/span>)?)/); -if(pos==-1){ -return; -} -var cc=RegExp.$1; -var end=pos+cc.length; -var _61=ta.value.substring(0,pos); -var _62=ta.value.substring(end,ta.value.length); -ta.value=_61; -ta.scrollTop=ta.scrollHeight; -var _63=ta.scrollTop; -ta.value+=_62; -ta.setSelectionRange(pos,pos); -ta.focus(); -ta.scrollTop=_63; -}else{ -var _64=this._doc.getElementById("XinhaOperaCaretMarker"); -if(_64){ -this.focusEditor(); -var rng=this.createRange(); -rng.selectNode(_64); -var sel=this.getSelection(); -sel.addRange(rng); -sel.collapseToStart(); -this.scrollToElement(_64); -_64.parentNode.removeChild(_64); -return; -} -} -}; -Xinha.getDoctype=function(doc){ -var d=""; -if(doc.doctype){ -d+=""; -} -return d; -}; -Xinha.prototype._standardInitIframe=Xinha.prototype.initIframe; -Xinha.prototype.initIframe=function(){ -if(!this._iframeLoadDone){ -if(this._iframe.contentWindow&&this._iframe.contentWindow.xinhaReadyToRoll){ -this._iframeLoadDone=true; -this._standardInitIframe(); -}else{ -var _69=this; -setTimeout(function(){ -_69.initIframe(); -},5); -} -} -}; -Xinha._addEventOperaOrig=Xinha._addEvent; -Xinha._addEvent=function(el,_6b,_6c){ -if(el.tagName&&el.tagName.toLowerCase()=="select"&&_6b=="change"){ -return Xinha.addDom0Event(el,_6b,_6c); -} -return Xinha._addEventOperaOrig(el,_6b,_6c); -}; - +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +Opera._pluginInfo={name:"Opera",origin:"Xinha Core",version:"$LastChangedRevision: 1084 $".replace(/^[^:]*:\s*(.*)\s*\$$/,"$1"),developer:"The Xinha Core Developer Team",developer_url:"$HeadURL: http://svn.xinha.org/trunk/modules/Opera/Opera.js $".replace(/^[^:]*:\s*(.*)\s*\$$/,"$1"),sponsor:"Gogo Internet Services Limited",sponsor_url:"http://www.gogo.co.nz/",license:"htmlArea"};function Opera(a){this.editor=a;a.Opera=this}Opera.prototype.onKeyPress=function(u){var d=this.editor;var j=d.getSelection();if(d.isShortCut(u)){switch(d.getKey(u).toLowerCase()){case"z":if(d._unLink&&d._unlinkOnUndo){Xinha._stopEvent(u);d._unLink();d.updateToolbar();return true}break;case"a":sel=d.getSelection();sel.removeAllRanges();range=d.createRange();range.selectNodeContents(d._doc.body);sel.addRange(range);Xinha._stopEvent(u);return true;break;case"v":if(!d.config.htmlareaPaste){return true}break}}switch(d.getKey(u)){case" ":var g=function(y,m){var x=y.nextSibling;if(typeof m=="string"){m=d._doc.createElement(m)}var s=y.parentNode.insertBefore(m,x);Xinha.removeFromParent(y);s.appendChild(y);x.data=" "+x.data;j.collapse(x,1);d._unLink=function(){var a=s.firstChild;s.removeChild(a);s.parentNode.insertBefore(a,s);Xinha.removeFromParent(s);d._unLink=null;d._unlinkOnUndo=false};d._unlinkOnUndo=true;return s};if(d.config.convertUrlsToLinks&&j&&j.isCollapsed&&j.anchorNode.nodeType==3&&j.anchorNode.data.length>3&&j.anchorNode.data.indexOf(".")>=0){var t=j.anchorNode.data.substring(0,j.anchorOffset).search(/\S{4,}$/);if(t==-1){break}if(d._getFirstAncestor(j,"a")){break}var h=j.anchorNode.data.substring(0,j.anchorOffset).replace(/^.*?(\S*)$/,"$1");var e=h.match(Xinha.RE_email);if(e){var v=j.anchorNode;var f=v.splitText(j.anchorOffset);var k=v.splitText(t);g(k,"a").href="mailto:"+e[0];break}RE_date=/([0-9]+\.)+/;RE_ip=/(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)/;var p=h.match(Xinha.RE_url);if(p){if(RE_date.test(h)){break}var i=j.anchorNode;var b=i.splitText(j.anchorOffset);var q=i.splitText(t);g(q,"a").href=(p[1]?p[1]:"http://")+p[2];break}}break}switch(u.keyCode){case 27:if(d._unLink){d._unLink();Xinha._stopEvent(u)}break;break;case 8:case 46:if(!u.shiftKey&&this.handleBackspace()){Xinha._stopEvent(u)}default:d._unlinkOnUndo=false;if(j.anchorNode&&j.anchorNode.nodeType==3){var w=d._getFirstAncestor(j,"a");if(!w){break}if(!w._updateAnchTimeout){if(j.anchorNode.data.match(Xinha.RE_email)&&w.href.match("mailto:"+j.anchorNode.data.trim())){var l=j.anchorNode;var c=function(){w.href="mailto:"+l.data.trim();w._updateAnchTimeout=setTimeout(c,250)};w._updateAnchTimeout=setTimeout(c,1000);break}var n=j.anchorNode.data.match(Xinha.RE_url);if(n&&w.href.match(new RegExp("http(s)?://"+Xinha.escapeStringForRegExp(j.anchorNode.data.trim())))){var o=j.anchorNode;var r=function(){n=o.data.match(Xinha.RE_url);if(n){w.href=(n[1]?n[1]:"http://")+n[2]}w._updateAnchTimeout=setTimeout(r,250)};w._updateAnchTimeout=setTimeout(r,1000)}}}break}return false};Opera.prototype.handleBackspace=function(){var a=this.editor;setTimeout(function(){var e=a.getSelection();var g=a.createRange(e);var f=g.startContainer;var i=g.startOffset;var c=g.endContainer;var h=g.endOffset;var j=f.nextSibling;if(f.nodeType==3){f=f.parentNode}if(!(/\S/.test(f.tagName))){var d=document.createElement("p");while(f.firstChild){d.appendChild(f.firstChild)}f.parentNode.insertBefore(d,f);Xinha.removeFromParent(f);var b=g.cloneRange();b.setStartBefore(j);b.setEndAfter(j);b.extractContents();e.removeAllRanges();e.addRange(b)}},10)};Opera.prototype.inwardHtml=function(a){a=a.replace(/<(\/?)del(\s|>|\/)/ig,"<$1strike$2");return a};Opera.prototype.outwardHtml=function(a){return a};Opera.prototype.onExecCommand=function(f,e,d){switch(f){case"removeformat":var k=this.editor;var c=k.getSelection();var l=k.saveSelection(c);var j=k.createRange(c);var g=k._doc.body.getElementsByTagName("*");var a=(j.startContainer.nodeType==1)?j.startContainer:j.startContainer.parentNode;var h,b;if(c.isCollapsed){j.selectNodeContents(k._doc.body)}for(h=0;ha.anchorOffset&&a.anchorNode.childNodes[a.anchorOffset].nodeType==1){return a.anchorNode.childNodes[a.anchorOffset]}else{if(a.anchorNode.nodeType==1){return a.anchorNode}else{return null}}}return null};Xinha.prototype.selectionEmpty=function(a){if(!a){return true}if(typeof a.isCollapsed!="undefined"){return a.isCollapsed}return true};Xinha.prototype.saveSelection=function(){return this.createRange(this.getSelection()).cloneRange()};Xinha.prototype.restoreSelection=function(a){var b=this.getSelection();b.removeAllRanges();b.addRange(a)};Xinha.prototype.selectNodeContents=function(b,d){this.focusEditor();this.forceRedraw();var a;var e=typeof d=="undefined"?true:false;var c=this.getSelection();a=this._doc.createRange();if(e&&b.tagName&&b.tagName.toLowerCase().match(/table|img|input|textarea|select/)){a.selectNode(b)}else{a.selectNodeContents(b)}c.removeAllRanges();c.addRange(a);if(typeof d!="undefined"){if(d){c.collapse(a.startContainer,a.startOffset)}else{c.collapse(a.endContainer,a.endOffset)}}};Xinha.prototype.insertHTML=function(c){var e=this.getSelection();var a=this.createRange(e);this.focusEditor();var b=this._doc.createDocumentFragment();var f=this._doc.createElement("div");f.innerHTML=c;while(f.firstChild){b.appendChild(f.firstChild)}var d=this.insertNodeAtSelection(b)};Xinha.prototype.getSelectedHTML=function(){var b=this.getSelection();if(b.isCollapsed){return""}var a=this.createRange(b);return Xinha.getHTML(a.cloneContents(),false,this)};Xinha.prototype.getSelection=function(){var c=this._iframe.contentWindow.getSelection();if(c&&c.focusNode&&c.focusNode.tagName&&c.focusNode.tagName=="HTML"){var b=this._doc.getElementsByTagName("body")[0];var a=this.createRange();a.selectNodeContents(b);c.removeAllRanges();c.addRange(a);c.collapseToEnd()}return c};Xinha.prototype.createRange=function(b){this.activateEditor();if(typeof b!="undefined"){try{return b.getRangeAt(0)}catch(a){return this._doc.createRange()}}else{return this._doc.createRange()}};Xinha.prototype.isKeyEvent=function(a){return a.type=="keypress"};Xinha.prototype.getKey=function(a){return String.fromCharCode(a.charCode)};Xinha.getOuterHTML=function(a){return(new XMLSerializer()).serializeToString(a)};Xinha.cc=String.fromCharCode(8286);Xinha.prototype.setCC=function(i){var c=Xinha.cc;try{if(i=="textarea"){var f=this._textArea;var g=f.selectionStart;var k=f.value.substring(0,g);var a=f.value.substring(g,f.value.length);if(a.match(/^[^<]*>/)){var j=a.indexOf(">")+1;f.value=k+a.substring(0,j)+c+a.substring(j,a.length)}else{f.value=k+c+a}f.value=f.value.replace(new RegExp("(&[^"+c+"]*?)("+c+")([^"+c+"]*?;)"),"$1$3$2");f.value=f.value.replace(new RegExp("(]*>[^"+c+"]*?)("+c+")([^"+c+"]*?<\/script>)"),"$1$3$2");f.value=f.value.replace(new RegExp("^([^"+c+"]*)("+c+")([^"+c+"]*]*>)(.*?)"),"$1$3$2$4");f.value=f.value.replace(c,'MARK')}else{var b=this.getSelection();var d=this._doc.createElement("span");d.id="XinhaOperaCaretMarker";b.getRangeAt(0).insertNode(d)}}catch(h){}};Xinha.prototype.findCC=function(i){if(i=="textarea"){var h=this._textArea;var j=h.value.search(/(((\s|(MARK))*<\/span>)?)/);if(j==-1){return}var e=RegExp.$1;var f=j+e.length;var k=h.value.substring(0,j);var b=h.value.substring(f,h.value.length);h.value=k;h.scrollTop=h.scrollHeight;var d=h.scrollTop;h.value+=b;h.setSelectionRange(j,j);h.focus();h.scrollTop=d}else{var g=this._doc.getElementById("XinhaOperaCaretMarker");if(g){this.focusEditor();var a=this.createRange();a.selectNode(g);var c=this.getSelection();c.addRange(a);c.collapseToStart();this.scrollToElement(g);g.parentNode.removeChild(g);return}}};Xinha.getDoctype=function(a){var b="";if(a.doctype){b+=""}return b};Xinha.prototype._standardInitIframe=Xinha.prototype.initIframe;Xinha.prototype.initIframe=function(){if(!this._iframeLoadDone){if(this._iframe.contentWindow&&this._iframe.contentWindow.xinhaReadyToRoll){this._iframeLoadDone=true;this._standardInitIframe()}else{var a=this;setTimeout(function(){a.initIframe()},5)}}};Xinha._addEventOperaOrig=Xinha._addEvent;Xinha._addEvent=function(a,c,b){if(a.tagName&&a.tagName.toLowerCase()=="select"&&c=="change"){return Xinha.addDom0Event(a,c,b)}return Xinha._addEventOperaOrig(a,c,b)}; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/WebKit/WebKit.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/WebKit/WebKit.js,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/WebKit/WebKit.js 13 May 2008 18:53:46 -0000 1.1 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/WebKit/WebKit.js 16 Jan 2009 09:05:47 -0000 1.2 @@ -1,478 +1,2 @@ -/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */ -/* This file is part of version 0.95 released Mon, 12 May 2008 17:33:15 +0200 */ -/* The URL of the most recent version of this file is http://svn.xinha.webfactional.com/trunk/modules/WebKit/WebKit.js */ -WebKit._pluginInfo={name:"WebKit",origin:"Xinha Core",version:"$LastChangedRevision:998 $".replace(/^[^:]*:\s*(.*)\s*\$$/,"$1"),developer:"The Xinha Core Developer Team",developer_url:"$HeadURL:http://svn.xinha.webfactional.com/trunk/modules/WebKit/WebKit.js $".replace(/^[^:]*:\s*(.*)\s*\$$/,"$1"),sponsor:"",sponsor_url:"",license:"htmlArea"}; -function WebKit(_1){ -this.editor=_1; -_1.WebKit=this; -} -WebKit.prototype.onKeyPress=function(ev){ -var _3=this.editor; -var s=_3.getSelection(); -if(_3.isShortCut(ev)){ -switch(_3.getKey(ev).toLowerCase()){ -case "z": -if(_3._unLink&&_3._unlinkOnUndo){ -Xinha._stopEvent(ev); -_3._unLink(); -_3.updateToolbar(); -return true; -} -break; -case "a": -break; -case "v": -if(!_3.config.htmlareaPaste){ -return true; -} -break; -} -} -switch(_3.getKey(ev)){ -case " ": -var _5=function(_6,_7){ -var _8=_6.nextSibling; -if(typeof _7=="string"){ -_7=_3._doc.createElement(_7); -} -var a=_6.parentNode.insertBefore(_7,_8); -Xinha.removeFromParent(_6); -a.appendChild(_6); -_8.data=" "+_8.data; -s.collapse(_8,1); -_3._unLink=function(){ -var t=a.firstChild; -a.removeChild(t); -a.parentNode.insertBefore(t,a); -Xinha.removeFromParent(a); -_3._unLink=null; -_3._unlinkOnUndo=false; -}; -_3._unlinkOnUndo=true; -return a; -}; -if(_3.config.convertUrlsToLinks&&s&&s.isCollapsed&&s.anchorNode.nodeType==3&&s.anchorNode.data.length>3&&s.anchorNode.data.indexOf(".")>=0){ -var _b=s.anchorNode.data.substring(0,s.anchorOffset).search(/\S{4,}$/); -if(_b==-1){ -break; -} -if(_3._getFirstAncestor(s,"a")){ -break; -} -var _c=s.anchorNode.data.substring(0,s.anchorOffset).replace(/^.*?(\S*)$/,"$1"); -var _d=_c.match(Xinha.RE_email); -if(_d){ -var _e=s.anchorNode; -var _f=_e.splitText(s.anchorOffset); -var _10=_e.splitText(_b); -_5(_10,"a").href="mailto:"+_d[0]; -break; -} -RE_date=/([0-9]+\.)+/; -RE_ip=/(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)/; -var _11=_c.match(Xinha.RE_url); -if(_11){ -if(RE_date.test(_c)){ -break; -} -var _12=s.anchorNode; -var _13=_12.splitText(s.anchorOffset); -var _14=_12.splitText(_b); -_5(_14,"a").href=(_11[1]?_11[1]:"http://")+_11[2]; -break; -} -} -break; -} -switch(ev.keyCode){ -case 13: -if(ev.shiftKey){ -} -break; -case 27: -if(_3._unLink){ -_3._unLink(); -Xinha._stopEvent(ev); -} -break; -case 8: -case 46: -if(!ev.shiftKey&&this.handleBackspace()){ -Xinha._stopEvent(ev); -} -break; -default: -_3._unlinkOnUndo=false; -if(s.anchorNode&&s.anchorNode.nodeType==3){ -var a=_3._getFirstAncestor(s,"a"); -if(!a){ -break; -} -if(!a._updateAnchTimeout){ -if(s.anchorNode.data.match(Xinha.RE_email)&&a.href.match("mailto:"+s.anchorNode.data.trim())){ -var _16=s.anchorNode; -var _17=function(){ -a.href="mailto:"+_16.data.trim(); -a._updateAnchTimeout=setTimeout(_17,250); -}; -a._updateAnchTimeout=setTimeout(_17,1000); -break; -} -var m=s.anchorNode.data.match(Xinha.RE_url); -if(m&&a.href.match(new RegExp("http(s)?://"+Xinha.escapeStringForRegExp(s.anchorNode.data.trim())))){ -var _19=s.anchorNode; -var _1a=function(){ -m=_19.data.match(Xinha.RE_url); -if(m){ -a.href=(m[1]?m[1]:"http://")+m[2]; -} -a._updateAnchTimeout=setTimeout(_1a,250); -}; -a._updateAnchTimeout=setTimeout(_1a,1000); -} -} -} -break; -} -return false; -}; -WebKit.prototype.handleBackspace=function(){ -var _1b=this.editor; -setTimeout(function(){ -var sel=_1b.getSelection(); -var _1d=_1b.createRange(sel); -var SC=_1d.startContainer; -var SO=_1d.startOffset; -var EC=_1d.endContainer; -var EO=_1d.endOffset; -var _22=SC.nextSibling; -if(SC.nodeType==3){ -SC=SC.parentNode; -} -if(!(/\S/.test(SC.tagName))){ -var p=document.createElement("p"); -while(SC.firstChild){ -p.appendChild(SC.firstChild); -} -SC.parentNode.insertBefore(p,SC); -Xinha.removeFromParent(SC); -var r=_1d.cloneRange(); -r.setStartBefore(_22); -r.setEndAfter(_22); -r.extractContents(); -sel.removeAllRanges(); -sel.addRange(r); -} -},10); -}; -WebKit.prototype.inwardHtml=function(_25){ -return _25; -}; -WebKit.prototype.outwardHtml=function(_26){ -return _26; -}; -WebKit.prototype.onExecCommand=function(_27,UI,_29){ -this.editor._doc.execCommand("styleWithCSS",false,false); -switch(_27){ -case "paste": -alert(Xinha._lc("The Paste button does not work in the Safari browser for security reasons. Press CTRL-V on your keyboard to paste directly.")); -return true; -break; -case "removeformat": -var _2a=this.editor; -var sel=_2a.getSelection(); -var _2c=_2a.saveSelection(sel); -var _2d=_2a.createRange(sel); -var els=_2a._doc.getElementsByTagName("*"); -els=Xinha.collectionToArray(els); -var _2f=(_2d.startContainer.nodeType==1)?_2d.startContainer:_2d.startContainer.parentNode; -var i,el,newNode,fragment,child,r2=_2a._doc.createRange(); -function clean(el){ -if(el.nodeType!=1){ -return; -} -el.removeAttribute("style"); -for(var j=0;jsel.anchorOffset&&sel.anchorNode.childNodes[sel.anchorOffset].nodeType==1){ -return sel.anchorNode.childNodes[sel.anchorOffset]; -}else{ -if(sel.anchorNode.nodeType==1){ -return sel.anchorNode; -}else{ -return null; -} -} -} -return null; -}; -Xinha.prototype.selectionEmpty=function(sel){ -if(!sel){ -return true; -} -if(typeof sel.isCollapsed!="undefined"){ -return sel.isCollapsed; -} -return true; -}; -Xinha.prototype.saveSelection=function(){ -return this.createRange(this.getSelection()).cloneRange(); -}; -Xinha.prototype.restoreSelection=function(_3f){ -var sel=this.getSelection(); -sel.removeAllRanges(); -sel.addRange(_3f); -}; -Xinha.prototype.selectNodeContents=function(_41,pos){ -this.focusEditor(); -this.forceRedraw(); -var _43; -var _44=typeof pos=="undefined"?true:false; -var sel=this.getSelection(); -_43=this._doc.createRange(); -if(_44&&_41.tagName&&_41.tagName.toLowerCase().match(/table|img|input|textarea|select/)){ -_43.selectNode(_41); -}else{ -_43.selectNodeContents(_41); -} -sel.removeAllRanges(); -sel.addRange(_43); -}; -Xinha.prototype.insertHTML=function(_46){ -var sel=this.getSelection(); -var _48=this.createRange(sel); -this.focusEditor(); -var _49=this._doc.createDocumentFragment(); -var div=this._doc.createElement("div"); -div.innerHTML=_46; -while(div.firstChild){ -_49.appendChild(div.firstChild); -} -var _4b=this.insertNodeAtSelection(_49); -}; -Xinha.prototype.getSelectedHTML=function(){ -var sel=this.getSelection(); -if(sel.isCollapsed){ -return ""; -} -var _4d=this.createRange(sel); -if(_4d){ -return Xinha.getHTML(_4d.cloneContents(),false,this); -}else{ -return ""; -} -}; -Xinha.prototype.getSelection=function(){ -return this._iframe.contentWindow.getSelection(); -}; -Xinha.prototype.createRange=function(sel){ -this.activateEditor(); -if(typeof sel!="undefined"){ -try{ -return sel.getRangeAt(0); -} -catch(ex){ -return this._doc.createRange(); -} -}else{ -return this._doc.createRange(); -} -}; -Xinha.prototype.isKeyEvent=function(_4f){ -return _4f.type=="keypress"; -}; -Xinha.prototype.getKey=function(_50){ -var key=String.fromCharCode(parseInt(_50.keyIdentifier.replace(/^U\+/,""),16)); -if(_50.shiftKey){ -return key; -}else{ -return key.toLowerCase(); -} -}; -Xinha.getOuterHTML=function(_52){ -return (new XMLSerializer()).serializeToString(_52); -}; -Xinha.prototype.cc=String.fromCharCode(8286); -Xinha.prototype.setCC=function(_53){ -var cc=this.cc; -try{ -if(_53=="textarea"){ -var ta=this._textArea; -var _56=ta.selectionStart; -var _57=ta.value.substring(0,_56); -var _58=ta.value.substring(_56,ta.value.length); -if(_58.match(/^[^<]*>/)){ -var _59=_58.indexOf(">")+1; -ta.value=_57+_58.substring(0,_59)+cc+_58.substring(_59,_58.length); -}else{ -ta.value=_57+cc+_58; -} -ta.value=ta.value.replace(new RegExp("(&[^"+cc+"]*?)("+cc+")([^"+cc+"]*?;)"),"$1$3$2"); -ta.value=ta.value.replace(new RegExp("(]*>[^"+cc+"]*?)("+cc+")([^"+cc+"]*?)"),"$1$3$2"); -ta.value=ta.value.replace(new RegExp("^([^"+cc+"]*)("+cc+")([^"+cc+"]*]*>)(.*?)"),"$1$3$2$4"); -}else{ -var sel=this.getSelection(); -sel.getRangeAt(0).insertNode(this._doc.createTextNode(cc)); -} -} -catch(e){ -} -}; -Xinha.prototype.findCC=function(_5b){ -if(_5b=="textarea"){ -var ta=this._textArea; -var pos=ta.value.indexOf(this.cc); -if(pos==-1){ -return; -} -var end=pos+this.cc.length; -var _5f=ta.value.substring(0,pos); -var _60=ta.value.substring(end,ta.value.length); -ta.value=_5f; -ta.scrollTop=ta.scrollHeight; -var _61=ta.scrollTop; -ta.value+=_60; -ta.setSelectionRange(pos,pos); -ta.focus(); -ta.scrollTop=_61; -}else{ -var _62=this; -try{ -var doc=this._doc; -doc.body.innerHTML=doc.body.innerHTML.replace(new RegExp(this.cc),""); -var _64=doc.getElementById("XinhaEditingPostion"); -this.selectNodeContents(_64); -this.scrollToElement(_64); -_64.parentNode.removeChild(_64); -this._iframe.contentWindow.focus(); -} -catch(e){ -} -} -}; -Xinha.prototype._standardToggleBorders=Xinha.prototype._toggleBorders; -Xinha.prototype._toggleBorders=function(){ -var _65=this._standardToggleBorders(); -var _66=this._doc.getElementsByTagName("TABLE"); -for(var i=0;i<_66.length;i++){ -_66[i].style.display="none"; -_66[i].style.display="table"; -} -return _65; -}; -Xinha.getDoctype=function(doc){ -var d=""; -if(doc.doctype){ -d+=""; -} -return d; -}; - +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +WebKit._pluginInfo={name:"WebKit",origin:"Xinha Core",version:"$LastChangedRevision: 1146 $".replace(/^[^:]*:\s*(.*)\s*\$$/,"$1"),developer:"The Xinha Core Developer Team",developer_url:"$HeadURL: http://svn.xinha.org/trunk/modules/WebKit/WebKit.js $".replace(/^[^:]*:\s*(.*)\s*\$$/,"$1"),sponsor:"",sponsor_url:"",license:"htmlArea"};function WebKit(a){this.editor=a;a.WebKit=this}WebKit.prototype.onKeyPress=function(u){var d=this.editor;var j=d.getSelection();if(d.isShortCut(u)){switch(d.getKey(u).toLowerCase()){case"z":if(d._unLink&&d._unlinkOnUndo){Xinha._stopEvent(u);d._unLink();d.updateToolbar();return true}break;case"a":break;case"v":if(!d.config.htmlareaPaste){return true}break}}switch(d.getKey(u)){case" ":var g=function(y,m){var x=y.nextSibling;if(typeof m=="string"){m=d._doc.createElement(m)}var s=y.parentNode.insertBefore(m,x);Xinha.removeFromParent(y);s.appendChild(y);x.data=" "+x.data;j.collapse(x,1);d._unLink=function(){var a=s.firstChild;s.removeChild(a);s.parentNode.insertBefore(a,s);Xinha.removeFromParent(s);d._unLink=null;d._unlinkOnUndo=false};d._unlinkOnUndo=true;return s};if(d.config.convertUrlsToLinks&&j&&j.isCollapsed&&j.anchorNode.nodeType==3&&j.anchorNode.data.length>3&&j.anchorNode.data.indexOf(".")>=0){var t=j.anchorNode.data.substring(0,j.anchorOffset).search(/\S{4,}$/);if(t==-1){break}if(d._getFirstAncestor(j,"a")){break}var h=j.anchorNode.data.substring(0,j.anchorOffset).replace(/^.*?(\S*)$/,"$1");var e=h.match(Xinha.RE_email);if(e){var v=j.anchorNode;var f=v.splitText(j.anchorOffset);var k=v.splitText(t);g(k,"a").href="mailto:"+e[0];break}RE_date=/([0-9]+\.)+/;RE_ip=/(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)/;var p=h.match(Xinha.RE_url);if(p){if(RE_date.test(h)){break}var i=j.anchorNode;var b=i.splitText(j.anchorOffset);var q=i.splitText(t);g(q,"a").href=(p[1]?p[1]:"http://")+p[2];break}}break}switch(u.keyCode){case 13:if(u.shiftKey){}break;case 27:if(d._unLink){d._unLink();Xinha._stopEvent(u)}break;case 8:case 46:if(!u.shiftKey&&this.handleBackspace()){Xinha._stopEvent(u)}break;default:d._unlinkOnUndo=false;if(j.anchorNode&&j.anchorNode.nodeType==3){var w=d._getFirstAncestor(j,"a");if(!w){break}if(!w._updateAnchTimeout){if(j.anchorNode.data.match(Xinha.RE_email)&&w.href.match("mailto:"+j.anchorNode.data.trim())){var l=j.anchorNode;var c=function(){w.href="mailto:"+l.data.trim();w._updateAnchTimeout=setTimeout(c,250)};w._updateAnchTimeout=setTimeout(c,1000);break}var n=j.anchorNode.data.match(Xinha.RE_url);if(n&&w.href.match(new RegExp("http(s)?://"+Xinha.escapeStringForRegExp(j.anchorNode.data.trim())))){var o=j.anchorNode;var r=function(){n=o.data.match(Xinha.RE_url);if(n){w.href=(n[1]?n[1]:"http://")+n[2]}w._updateAnchTimeout=setTimeout(r,250)};w._updateAnchTimeout=setTimeout(r,1000)}}}break}return false};WebKit.prototype.handleBackspace=function(){var a=this.editor;setTimeout(function(){var e=a.getSelection();var g=a.createRange(e);var f=g.startContainer;var i=g.startOffset;var c=g.endContainer;var h=g.endOffset;var j=f.nextSibling;if(f.nodeType==3){f=f.parentNode}if(!(/\S/.test(f.tagName))){var d=document.createElement("p");while(f.firstChild){d.appendChild(f.firstChild)}f.parentNode.insertBefore(d,f);Xinha.removeFromParent(f);var b=g.cloneRange();b.setStartBefore(j);b.setEndAfter(j);b.extractContents();e.removeAllRanges();e.addRange(b)}},10)};WebKit.prototype.inwardHtml=function(a){return a};WebKit.prototype.outwardHtml=function(a){return a};WebKit.prototype.onExecCommand=function(h,g,f){this.editor._doc.execCommand("styleWithCSS",false,false);switch(h){case"paste":alert(Xinha._lc("The Paste button does not work in the Safari browser for security reasons. Press CTRL-V on your keyboard to paste directly."));return true;break;case"removeformat":var m=this.editor;var e=m.getSelection();var q=m.saveSelection(e);var l=m.createRange(e);var j=m._doc.getElementsByTagName("*");j=Xinha.collectionToArray(j);var a=(l.startContainer.nodeType==1)?l.startContainer:l.startContainer.parentNode;var k,d,p,n,c,b=m._doc.createRange();function o(r){if(r.nodeType!=1){return}r.removeAttribute("style");for(var i=0;ia.anchorOffset&&a.anchorNode.childNodes[a.anchorOffset].nodeType==1){return a.anchorNode.childNodes[a.anchorOffset]}else{if(a.anchorNode.nodeType==1){return a.anchorNode}else{return null}}}return null};Xinha.prototype.selectionEmpty=function(a){if(!a){return true}if(typeof a.isCollapsed!="undefined"){return a.isCollapsed}return true};Xinha.prototype.saveSelection=function(){return this.createRange(this.getSelection()).cloneRange()};Xinha.prototype.restoreSelection=function(a){var b=this.getSelection();b.removeAllRanges();b.addRange(a)};Xinha.prototype.selectNodeContents=function(b,d){this.focusEditor();this.forceRedraw();var a;var e=typeof d=="undefined"?true:false;var c=this.getSelection();a=this._doc.createRange();if(e&&b.tagName&&b.tagName.toLowerCase().match(/table|img|input|textarea|select/)){a.selectNode(b)}else{a.selectNodeContents(b)}c.removeAllRanges();c.addRange(a);if(typeof d!="undefined"){if(d){c.collapse(a.startContainer,a.startOffset)}else{c.collapse(a.endContainer,a.endOffset)}}};Xinha.prototype.insertHTML=function(c){var e=this.getSelection();var a=this.createRange(e);this.focusEditor();var b=this._doc.createDocumentFragment();var f=this._doc.createElement("div");f.innerHTML=c;while(f.firstChild){b.appendChild(f.firstChild)}var d=this.insertNodeAtSelection(b)};Xinha.prototype.getSelectedHTML=function(){var b=this.getSelection();if(b.isCollapsed){return""}var a=this.createRange(b);if(a){return Xinha.getHTML(a.cloneContents(),false,this)}else{return""}};Xinha.prototype.getSelection=function(){return this._iframe.contentWindow.getSelection()};Xinha.prototype.createRange=function(b){this.activateEditor();if(typeof b!="undefined"){try{return b.getRangeAt(0)}catch(a){return this._doc.createRange()}}else{return this._doc.createRange()}};Xinha.prototype.isKeyEvent=function(a){return a.type=="keydown"};Xinha.prototype.getKey=function(b){var a=String.fromCharCode(parseInt(b.keyIdentifier.replace(/^U\+/,""),16));if(b.shiftKey){return a}else{return a.toLowerCase()}};Xinha.getOuterHTML=function(a){return(new XMLSerializer()).serializeToString(a)};Xinha.cc=String.fromCharCode(8286);Xinha.prototype.setCC=function(h){var c=Xinha.cc;try{if(h=="textarea"){var d=this._textArea;var f=d.selectionStart;var j=d.value.substring(0,f);var a=d.value.substring(f,d.value.length);if(a.match(/^[^<]*>/)){var i=a.indexOf(">")+1;d.value=j+a.substring(0,i)+c+a.substring(i,a.length)}else{d.value=j+c+a}d.value=d.value.replace(new RegExp("(&[^"+c+";]*?)("+c+")([^"+c+"]*?;)"),"$1$3$2");d.value=d.value.replace(new RegExp("(]*>[^"+c+"]*?)("+c+")([^"+c+"]*?<\/script>)"),"$1$3$2");d.value=d.value.replace(new RegExp("^([^"+c+"]*)("+c+")([^"+c+"]*]*>)(.*?)"),"$1$3$2$4")}else{var b=this.getSelection();b.getRangeAt(0).insertNode(this._doc.createTextNode(c))}}catch(g){}};Xinha.prototype.findCC=function(i){var c=Xinha.cc;if(i=="textarea"){var f=this._textArea;var j=f.value.indexOf(c);if(j==-1){return}var d=j+c.length;var k=f.value.substring(0,j);var a=f.value.substring(d,f.value.length);f.value=k;f.scrollTop=f.scrollHeight;var b=f.scrollTop;f.value+=a;f.setSelectionRange(j,j);f.focus();f.scrollTop=b}else{var m=this;try{var l=this._doc;l.body.innerHTML=l.body.innerHTML.replace(new RegExp(c),'');var h=l.getElementById("XinhaEditingPostion");this.selectNodeContents(h);this.scrollToElement(h);h.parentNode.removeChild(h);this._iframe.contentWindow.focus()}catch(g){}}};Xinha.prototype._standardToggleBorders=Xinha.prototype._toggleBorders;Xinha.prototype._toggleBorders=function(){var a=this._standardToggleBorders();var c=this._doc.getElementsByTagName("TABLE");for(var b=0;bAbbreviation + +

+
+ Expansion: + +
+

+ +

+ + + +
+
+ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/CSS/CSS.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/CSS/CSS.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/CSS/CSS.js 16 Jan 2009 09:05:47 -0000 1.1 @@ -0,0 +1,2 @@ +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +Xinha.Config.prototype.cssPluginConfig={combos:[{label:"Syntax",options:{None:"",Code:"code",String:"string",Comment:"comment","Variable name":"variable-name",Type:"type",Reference:"reference",Preprocessor:"preprocessor",Keyword:"keyword","Function name":"function-name","Html tag":"html-tag","Html italic":"html-helper-italic",Warning:"warning","Html bold":"html-helper-bold"},context:"pre"},{label:"Info",options:{None:"",Quote:"quote",Highlight:"highlight",Deprecated:"deprecated"}}]};function CSS(f,d){this.editor=f;var g=f.config;var j=this;var c;if(d&&d.length){c=d[0]}else{c=f.config.cssPluginConfig}var k=c.combos;for(var e=0;e","")}};CSS.prototype.updateValue=function(f,h){var a=f._toolbarObjects[h.id].element;var e=f.getParentElement();if(typeof e.className!="undefined"&&/\S/.test(e.className)){var b=a.options;var g=e.className;for(var c=b.length;--c>=0;){var d=b[c];if(g==d.value){a.selectedIndex=c;return}}}a.selectedIndex=0}; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/CSS/css.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/CSS/Attic/css.js,v diff -u -N -r1.7 -r1.8 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/CSS/css.js 13 May 2008 18:53:47 -0000 1.7 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/CSS/css.js 16 Jan 2009 09:05:47 -0000 1.8 @@ -1,77 +1,2 @@ -/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */ -/* This file is part of version 0.95 released Mon, 12 May 2008 17:33:15 +0200 */ -/* The URL of the most recent version of this file is http://svn.xinha.webfactional.com/trunk/plugins/CSS/css.js */ -Xinha.Config.prototype.cssPluginConfig={combos:[{label:"Syntax",options:{"None":"","Code":"code","String":"string","Comment":"comment","Variable name":"variable-name","Type":"type","Reference":"reference","Preprocessor":"preprocessor","Keyword":"keyword","Function name":"function-name","Html tag":"html-tag","Html italic":"html-helper-italic","Warning":"warning","Html bold":"html-helper-bold"},context:"pre"},{label:"Info",options:{"None":"","Quote":"quote","Highlight":"highlight","Deprecated":"deprecated"}}]}; -function CSS(_1,_2){ -this.editor=_1; -var _3=_1.config; -var _4=this; -var _5; -if(_2&&_2.length){ -_5=_2[0]; -}else{ -_5=_1.config.cssPluginConfig; -} -var _6=_5.combos; -for(var i=0;i<_6.length;i++){ -var _8=_6[i]; -var id="CSS-class"+i; -var _a={id:id,options:_8.options,action:function(_b){ -_4.onSelect(_b,this,_8.context,_8.updatecontextclass); -},refresh:function(_c){ -_4.updateValue(_c,this); -},context:_8.context}; -_3.registerDropdown(_a); -_3.addToolbarElement(["T["+_8.label+"]",id,"separator"],"formatblock",-1); -} -} -CSS._pluginInfo={name:"CSS",version:"1.0",developer:"Mihai Bazon",developer_url:"http://dynarch.com/mishoo/",c_owner:"Mihai Bazon",sponsor:"Miro International",sponsor_url:"http://www.miro.com.au",license:"htmlArea"}; -CSS.prototype.onSelect=function(_d,_e,_f,_10){ -var _11=_d._toolbarObjects[_e.id]; -var _12=_11.element.selectedIndex; -var _13=_11.element.value; -var _14=_d.getParentElement(); -var _15=true; -var _16=(_14&&_14.tagName.toLowerCase()=="span"); -var _17=(_f&&_10&&_14&&_14.tagName.toLowerCase()==_f); -if(_17){ -_14.className=_13; -_d.updateToolbar(); -return; -} -if(_16&&_12==0&&!/\S/.test(_14.style.cssText)){ -while(_14.firstChild){ -_14.parentNode.insertBefore(_14.firstChild,_14); -} -_14.parentNode.removeChild(_14); -_d.updateToolbar(); -return; -} -if(_16){ -if(_14.childNodes.length==1){ -_14.className=_13; -_15=false; -_d.updateToolbar(); -} -} -if(_15){ -_d.surroundHTML("",""); -} -}; -CSS.prototype.updateValue=function(_18,obj){ -var _1a=_18._toolbarObjects[obj.id].element; -var _1b=_18.getParentElement(); -if(typeof _1b.className!="undefined"&&/\S/.test(_1b.className)){ -var _1c=_1a.options; -var _1d=_1b.className; -for(var i=_1c.length;--i>=0;){ -var _1f=_1c[i]; -if(_1d==_1f.value){ -_1a.selectedIndex=i; -return; -} -} -} -_1a.selectedIndex=0; -}; - +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +Xinha.Config.prototype.cssPluginConfig={combos:[{label:"Syntax",options:{None:"",Code:"code",String:"string",Comment:"comment","Variable name":"variable-name",Type:"type",Reference:"reference",Preprocessor:"preprocessor",Keyword:"keyword","Function name":"function-name","Html tag":"html-tag","Html italic":"html-helper-italic",Warning:"warning","Html bold":"html-helper-bold"},context:"pre"},{label:"Info",options:{None:"",Quote:"quote",Highlight:"highlight",Deprecated:"deprecated"}}]};function CSS(f,d){this.editor=f;var g=f.config;var j=this;var c;if(d&&d.length){c=d[0]}else{c=f.config.cssPluginConfig}var k=c.combos;for(var e=0;e","")}};CSS.prototype.updateValue=function(f,h){var a=f._toolbarObjects[h.id].element;var e=f.getParentElement();if(typeof e.className!="undefined"&&/\S/.test(e.className)){var b=a.options;var g=e.className;for(var c=b.length;--c>=0;){var d=b[c];if(g==d.value){a.selectedIndex=c;return}}}a.selectedIndex=0}; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/CharCounter/CharCounter.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/CharCounter/CharCounter.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/CharCounter/CharCounter.js 16 Jan 2009 09:05:47 -0000 1.1 @@ -0,0 +1,2 @@ +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +function CharCounter(a){this.editor=a;this._Chars=0;this._Words=0;this._HTML=0;this.onKeyPress=this.__onKeyPress}Xinha.Config.prototype.CharCounter={showChar:true,showWord:true,showHtml:true,separator:" | ",maxHTML:-1};CharCounter._pluginInfo={name:"CharCounter",version:"1.31",developer:"Udo Schmal",developer_url:"http://www.schaffrath-neuemedien.de",sponsor:"L.N.Schaffrath NeueMedien",sponsor_url:"http://www.schaffrath-neuemedien.de",c_owner:"Udo Schmal & L.N.Schaffrath NeueMedien",license:"htmlArea"};CharCounter.prototype._lc=function(a){return Xinha._lc(a,"CharCounter")};CharCounter.prototype.onGenerateOnce=function(){var b=this;if(this.charCount==null){var a=b.editor.registerStatusWidget("CharCounter",["wysiwyg"]);this.charCount=a}};CharCounter.prototype.__onKeyPress=function(b){if((b.keyCode!=8)&&(b.keyCode!=46)){if(this.editor.config.CharCounter.maxHTML!=-1){var a=this.editor.getHTML();if(a.length>=this.editor.config.CharCounter.maxHTML){Xinha._stopEvent(b);return true}}}};CharCounter.prototype._updateCharCount=function(){var d=this.editor;var b=d.config;var e=d.getHTML();var c=new Array();if(b.CharCounter.showHtml){c[c.length]=this._lc("HTML")+": "+e.length}this._HTML=e.length;if(b.CharCounter.showWord||b.CharCounter.showChar){e=e.replace(/<\/?\s*!--[^-->]*-->/gi,"");e=e.replace(/<(.+?)>/g,"");e=e.replace(/ /gi," ");e=e.replace(/([\n\r\t])/g," ");e=e.replace(/( +)/g," ");e=e.replace(/&(.*);/g," ");e=e.replace(/^\s*|\s*$/g,"")}if(b.CharCounter.showWord){this._Words=0;for(var a=0;a=1){this._Words++}c[c.length]=this._lc("Words")+": "+this._Words}if(b.CharCounter.showChar){c[c.length]=this._lc("Chars")+": "+e.length;this._Chars=e.length}this.charCount.innerHTML=c.join(b.CharCounter.separator)};CharCounter.prototype.onUpdateToolbar=function(){this.charCount.innerHTML=this._lc("... in progress");if(this._timeoutID){window.clearTimeout(this._timeoutID)}var a=this;this._timeoutID=window.setTimeout(function(){a._updateCharCount()},1000)}; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/CharacterMap/CharacterMap.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/CharacterMap/CharacterMap.css,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/CharacterMap/CharacterMap.css 2 Nov 2005 08:55:58 -0000 1.1 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/CharacterMap/CharacterMap.css 16 Jan 2009 09:05:47 -0000 1.2 @@ -1,4 +1,6 @@ -.CharacterMap { } +.CharacterMap { +background-color:white; +} .CharacterMap a.entity { font-size:12px; width:18px; @@ -38,4 +40,4 @@ cursor:pointer; background-color:#ADAD9C; border:1px inset; -} \ No newline at end of file +} Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/CharacterMap/CharacterMap.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/CharacterMap/CharacterMap.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/CharacterMap/CharacterMap.js 16 Jan 2009 09:05:47 -0000 1.1 @@ -0,0 +1,2 @@ +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +Xinha.loadStyle("CharacterMap.css","CharacterMap");function CharacterMap(c){this.editor=c;var a=c.config;var b=this;a.registerButton({id:"insertcharacter",tooltip:Xinha._lc("Insert special character","CharacterMap"),image:c.imgURL("images/tango/16x16/apps/accessories-character-map.png"),textMode:false,action:function(){b.show()}});a.addToolbarElement("insertcharacter","createlink",-1)}Xinha.Config.prototype.CharacterMap={mode:"popup"};CharacterMap._pluginInfo={name:"CharacterMap",version:"2.0",developer:"Laurent Vilday",developer_url:"http://www.mokhet.com/",c_owner:"Xinha community",sponsor:"",sponsor_url:"",license:"Creative Commons Attribution-ShareAlike License"};CharacterMap._isActive=false;CharacterMap.prototype.addEntity=function(b,f){var e=this.editor;var d=this;var c=document.createElement("a");Xinha._addClass(c,"entity");c.innerHTML=b;c.href="javascript:void(0)";Xinha._addClass(c,(f%2)?"light":"dark");c.onclick=function(){if(Xinha.is_ie){e.focusEditor()}e.insertHTML(b);return false};this.dialog.main.appendChild(c);c=null};CharacterMap.prototype.onGenerateOnce=function(){this._prepareDialog()};CharacterMap.prototype._prepareDialog=function(){var a=this;var e=this.editor;var c="

Insert special character

";this.dialog=new Xinha.Dialog(e,c,"CharacterMap",{width:300},{modal:false});Xinha._addClass(this.dialog.rootElem,"CharacterMap");if(e.config.CharacterMap&&e.config.CharacterMap.mode=="panel"){this.dialog.attachToPanel("right")}var d=["Ÿ","š","@",""","¡","¢","£","¤","¥","¦","§","¨","©","ª","«","¬","¯","°","±","²","³","´","µ","¶","·","¸","¹","º","»","¼","½","¾","¿","×","Ø","÷","ø","ƒ","ˆ","˜","–","—","‘","’","‚","“","”","„","†","‡","•","…","‰","‹","›","€","™","À","Á","Â","Ã","Ä","Å","Æ","Ç","È","É","Ê","Ë","Ì","Í","Î","Ï","Ð","Ñ","Ò","Ó","Ô","Õ","Ö","®","×","Ù","Ú","Û","Ü","Ý","Þ","ß","à","á","â","ã","ä","å","æ","ç","è","é","ê","ë","ì","í","î","ï","ð","ñ","ò","ó","ô","õ","ö","÷","ø","ù","ú","û","ü","ý","þ","ÿ","Œ","œ","Š"];for(var b=0;b=0;){var h=r[t];if(h[0].toLowerCase()==w){h[1].__msh.activate()}}}v.closeMenu=function(){v.currentMenu.parentNode.removeChild(v.currentMenu);v.currentMenu=null;Xinha._removeEvent(document,"mousedown",e);Xinha._removeEvent(v.editordoc,"mousedown",e);if(r.length>0){Xinha._removeEvent(v.editordoc,"keypress",z)}if(Xinha.is_ie){v.iePopup.hide()}};var G=Xinha.is_ie?F.srcElement:F.target;var f=C(v.editor._htmlArea);var m=F.clientX+f.x;var l=F.clientY+f.y;var s;var H;if(!Xinha.is_ie){H=document}else{var a=this.iePopup=window.createPopup();H=a.document;H.open();H.write("");H.close()}s=H.createElement("div");if(Xinha.is_ie){s.unselectable="on"}s.oncontextmenu=function(){return false};s.className="htmlarea-context-menu";if(!Xinha.is_ie){s.style.visibility="hidden";s.style.left=s.style.top="-200px"}H.body.appendChild(s);var D=H.createElement("table");s.appendChild(D);D.cellSpacing=0;D.cellPadding=0;var k=H.createElement("tbody");D.appendChild(k);var d=this.getContextMenu(G);for(var A=0;A";var c=g.cloneNode(true);c.className="label";E.appendChild(g);E.appendChild(c)}else{var j=q[0];E.className="item";E.__msh={item:E,label:j,action:q[1],tooltip:q[2]||null,icon:q[3]||null,activate:function(){v.closeMenu();v.editor.focusEditor();this.action()}};j=j.replace(/_([a-zA-Z0-9])/,"$1");if(j!=q[0]){r.push([RegExp.$1,E])}j=j.replace(/__/,"_");var c=H.createElement("td");if(Xinha.is_ie){c.unselectable="on"}E.appendChild(c);c.className="icon";if(E.__msh.icon){var p=Xinha.makeBtnImg(E.__msh.icon,H);c.appendChild(p)}var b=H.createElement("td");if(Xinha.is_ie){b.unselectable="on"}E.appendChild(b);b.className="label";b.innerHTML=j;E.onmouseover=function(){this.className+=" hover";v.editor._statusBarTree.innerHTML=this.__msh.tooltip||" "};E.onmouseout=function(){this.className="item"};E.oncontextmenu=function(h){this.__msh.activate();if(!Xinha.is_ie){Xinha._stopEvent(h)}return false};E.onmouseup=function(i){var h=(new Date()).getTime();if(h-v.timeStamp>500){this.__msh.activate()}if(!Xinha.is_ie){Xinha._stopEvent(i)}return false}}}if(!Xinha.is_ie){var u=10;if(l+s.offsetHeight+u>window.innerHeight){l=window.innerHeight-s.offsetHeight-u}if(m+s.offsetWidth+u>window.innerWidth){m=window.innerWidth-s.offsetWidth-u}s.style.left=m+"px";s.style.top=l+"px";s.style.visibility="visible"}else{this.iePopup.show(F.screenX,F.screenY,300,50);var n=s.offsetWidth;var B=s.offsetHeight;this.iePopup.show(F.screenX,F.screenY,n,B)}this.currentMenu=s;this.timeStamp=(new Date()).getTime();Xinha._addEvent(document,"mousedown",e);Xinha._addEvent(this.editordoc,"mousedown",e);if(r.length>0){Xinha._addEvent(this.editordoc,"keypress",z)}Xinha._stopEvent(F);return false}; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/DefinitionList/DefinitionList.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/DefinitionList/DefinitionList.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/DefinitionList/DefinitionList.js 16 Jan 2009 09:05:47 -0000 1.1 @@ -0,0 +1,91 @@ +// DefinitionList plugin for Xinha +// Distributed under the same terms as Xinha itself. +// This notice MUST stay intact for use (see license.txt). + + +function DefinitionList(editor) { + this.editor = editor; + var cfg = editor.config; + var bl = DefinitionList.btnList; + var self = this; + // register the toolbar buttons provided by this plugin + var toolbar = ["linebreak"]; + for (var i = 0; i < bl.length; ++i) { + var btn = bl[i]; + if (!btn) { + toolbar.push("separator"); + } else { + var id = btn[0]; + cfg.registerButton(id, this._lc(btn[1]), editor.imgURL("ed_" + btn[0] + ".gif", "DefinitionList"), false, + function(editor, id) { + // dispatch button press event + self.buttonPress(editor, id); + }); + toolbar.push(id); + } + } + // add a new line in the toolbar + cfg.toolbar.push(toolbar); +} + +DefinitionList._pluginInfo = { + name : "DefinitionList", + version : "1.0", + developer : "Udo Schmal", + developer_url : "", + c_owner : "Udo Schmal", + license : "htmlArea" +}; + +// the list of buttons added by this plugin +DefinitionList.btnList = [ + ["dl", "definition list"], + ["dt", "definition term"], + ["dd", "definition description"] + ]; + +DefinitionList.prototype._lc = function(string) { + return Xinha._lc(string, 'DefinitionList'); +}; + +DefinitionList.prototype.onGenerate = function() { + this.editor.addEditorStylesheet(Xinha.getPluginDir('DefinitionList') + '/definition-list.css'); +}; + +DefinitionList.prototype.buttonPress = function(editor,button_id) { + if (button_id=='dl') { //definition list + var pe = editor.getParentElement(); + while (pe.parentNode.tagName.toLowerCase() != 'body') { + pe = pe.parentNode; + } + var dx = editor._doc.createElement(button_id); + dx.innerHTML = ' '; + if(pe.parentNode.lastChild==pe) { + pe.parentNode.appendChild(dx); + }else{ + pe.parentNode.insertBefore(dx,pe.nextSibling); + } + } else if ((button_id=='dt')||(button_id=='dd')) { //definition term or description + var pe = editor.getParentElement(); + while (pe && (pe.nodeType == 1) && (pe.tagName.toLowerCase() != 'body')) { + if(pe.tagName.toLowerCase() == 'dl') { + var dx = editor._doc.createElement(button_id); + dx.innerHTML = ' '; + pe.appendChild(dx); + break; + }else if((pe.tagName.toLowerCase() == 'dt')||(pe.tagName.toLowerCase() == 'dd')){ + var dx = editor._doc.createElement(button_id) + dx.innerHTML = ' '; + if(pe.parentNode.lastChild==pe) { + pe.parentNode.appendChild(dx); + }else{ + pe.parentNode.insertBefore(dx,pe.nextSibling); + } + break; + } + pe = pe.parentNode; + } + if(pe.tagName.toLowerCase() == 'body') + alert('You can insert a definition term or description only in a definition list!'); + } +}; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/DefinitionList/definition-list.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/DefinitionList/definition-list.css,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/DefinitionList/definition-list.css 2 Feb 2007 21:04:50 -0000 1.1 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/DefinitionList/definition-list.css 16 Jan 2009 09:05:47 -0000 1.2 @@ -1,21 +1,15 @@ dl { border: 1px dotted #800000; } dt { - width: 18px; - height: 18px; background-image: url(img/ed_dt.gif); background-repeat: no-repeat; background-position: left top; padding-left: 19px; - display: block; color: #800000; } dd { - width: 18px; - height: 18px; background-image: url(img/ed_dd.gif); background-repeat: no-repeat; background-position: left top; padding-left: 19px; - display: block; color: #800000; } \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/DefinitionList/lang/nl.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/DefinitionList/lang/nl.js,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/DefinitionList/lang/nl.js 24 Nov 2007 15:35:34 -0000 1.1 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/DefinitionList/lang/nl.js 16 Jan 2009 09:05:47 -0000 1.2 @@ -4,5 +4,5 @@ { "definition list": "definitie lijst", "definition term": "definitie term", - "definition description": "definitie omschrijving + "definition description": "definitie omschrijving" } \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/DoubleClick/DoubleClick.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/DoubleClick/DoubleClick.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/DoubleClick/DoubleClick.js 16 Jan 2009 09:05:47 -0000 1.1 @@ -0,0 +1,66 @@ +// Double Click Plugin for Xinha +// Implementation by Marijn Kampf http://www.marijn.org +// Sponsored by http://www.smiling-faces.com +// +// (c) Marijn Kampf 2004. +// Distributed under the same terms as HTMLArea itself. +// This notice MUST stay intact for use (see license.txt). +// +// Cut-n-paste version of double click plugin. +// Almost no original code used. Based on +// Luis HTMLarea and Mihai Bazon Context Menu +// +// +// + +DoubleClick._pluginInfo = { + name : "DoubleClick", + version : "1.0", + developer : "Marijn Kampf", + developer_url : "http://www.marijn.org", + c_owner : "Marijn Kampf", + sponsor : "smiling-faces.com", + sponsor_url : "http://www.smiling-faces.com", + license : "htmlArea" +}; + +function DoubleClick(editor) { + this.editor = editor; + + // ADDING CUSTOM DOUBLE CLICK ACTIONS + // format of the dblClickList elements is "TAGNAME: [ ACTION ]" + // - TAGNAME: tagname of the tag that is double clicked + // - ACTION: function that gets called when the button is clicked. + // it has the following prototype: + // function(editor, event) + // - editor is the Xinha object that triggered the call + // - target is the selected object + this.editor.dblClickList = { + // Edit Link dialog + a: [ function(e) {e.config.btnList['createlink'][3](e); } ], + // Follow link + //a: [ function(editor, target) { window.location = target.href; properties(target); } ], + + img: [ function(e) {e.execCommand("insertimage");} ], + td: [ function(e) {e.execCommand("inserttable");} ] + }; +} + +DoubleClick.prototype.onGenerate = function() { + var self = this; + var doc = this.editordoc = this.editor._iframe.contentWindow.document; + Xinha._addEvents(doc, ["dblclick"], + function (event) { + return self.onDoubleClick(Xinha.is_ie ? self.editor._iframe.contentWindow.event : event); + }); + this.currentClick = null; +}; + +DoubleClick.prototype.onDoubleClick = function(ev) { + var target = Xinha.is_ie ? ev.srcElement : ev.target; + var tagName = target.tagName.toLowerCase(); + + if (this.editor.dblClickList[tagName] != undefined) { + this.editor.dblClickList[tagName][0](this.editor, target); + } +}; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/DynamicCSS/DynamicCSS.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/DynamicCSS/DynamicCSS.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/DynamicCSS/DynamicCSS.js 16 Jan 2009 09:05:47 -0000 1.1 @@ -0,0 +1,2 @@ +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +function DynamicCSS(e,d){this.editor=e;var a=e.config;var b=this;var g=null;var c=null;var f={id:"DynamicCSS-class",tooltip:this._lc("Choose stylesheet"),options:{"":""},action:function(h){b.onSelect(h,this)},refresh:function(h){b.updateValue(h,this)}};a.registerDropdown(f);a.addToolbarElement(["T[CSS]","DynamicCSS-class","separator"],"formatblock",-1)}DynamicCSS.parseStyleSheet=function(a){iframe=a._iframe.contentWindow.document;cssArray=DynamicCSS.cssArray;if(!cssArray){cssArray=new Array()}for(i=0;i"}}else{className="none";if(tagName=="all"){cssName=Xinha._lc("Default","DynamicCSS")}else{cssName="<"+Xinha._lc("Default","DynamicCSS")+">"}}b[tagName][className]=cssName;DynamicCSS.cssLength++}}}else{if(a[rule].styleSheet){b=DynamicCSS.applyCSSRule(a[rule].styleSheet.cssRules,b)}}}return b};DynamicCSS._pluginInfo={name:"DynamicCSS",version:"1.5.2",developer:"Holger Hees",developer_url:"http://www.systemconcept.de/",c_owner:"Holger Hees",sponsor:"System Concept GmbH",sponsor_url:"http://www.systemconcept.de/",license:"htmlArea"};DynamicCSS.prototype._lc=function(a){return Xinha._lc(a,"DynamicCSS")};DynamicCSS.prototype.onSelect=function(e,f){var b=e._toolbarObjects[f.id];var a=b.element.selectedIndex;var d=b.element.value;var c=e.getParentElement();if(d!="none"){c.className=d;DynamicCSS.lastClass=d}else{if(Xinha.is_gecko){c.removeAttribute("class")}else{c.removeAttribute("className")}}e.updateToolbar()};DynamicCSS.prototype.reparseTimer=function(b,c,a){if(DynamicCSS.parseCount<9){setTimeout(function(){DynamicCSS.cssLength=0;DynamicCSS.parseStyleSheet(b);if(DynamicCSS.cssOldLength!=DynamicCSS.cssLength){DynamicCSS.cssOldLength=DynamicCSS.cssLength;DynamicCSS.lastClass=null;a.updateValue(b,c)}a.reparseTimer(b,c,a)},DynamicCSS.parseCount*1000);DynamicCSS.parseCount=DynamicCSS.parseCount*2}};DynamicCSS.prototype.updateValue=function(e,b){cssArray=DynamicCSS.cssArray;if(!cssArray){DynamicCSS.cssLength=0;DynamicCSS.parseStyleSheet(e);cssArray=DynamicCSS.cssArray;DynamicCSS.cssOldLength=DynamicCSS.cssLength;DynamicCSS.parseCount=1;this.reparseTimer(e,b,this)}var h=e.getParentElement();var a=h.tagName.toLowerCase();var f=h.className;if(this.lastTag!=a||this.lastClass!=f){this.lastTag=a;this.lastClass=f;var g=e._toolbarObjects[b.id].element;while(g.length>0){g.options[g.length-1]=null}g.options[0]=new Option(this._lc("Default"),"none");if(cssArray){if(a!="body"||e.config.fullPage){if(cssArray[a]){for(cssClass in cssArray[a]){if(typeof cssArray[a][cssClass]!="string"){continue}if(cssClass=="none"){g.options[0]=new Option(cssArray[a][cssClass],cssClass)}else{g.options[g.length]=new Option(cssArray[a][cssClass],cssClass)}}}if(cssArray.all){for(cssClass in cssArray.all){if(typeof cssArray.all[cssClass]!="string"){continue}g.options[g.length]=new Option(cssArray.all[cssClass],cssClass)}}}else{if(cssArray[a]&&cssArray[a]["none"]){g.options[0]=new Option(cssArray[a]["none"],"none")}}}g.selectedIndex=0;if(typeof f!="undefined"&&/\S/.test(f)){var l=g.options;for(var c=l.length;--c>=0;){var d=l[c];if(f==d.value){g.selectedIndex=c;break}}if(g.selectedIndex==0){g.options[g.length]=new Option(this._lc("Undefined"),f);g.selectedIndex=g.length-1}}if(g.length>1){g.disabled=false}else{g.disabled=true}}}; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/DynamicCSS/dynamiccss.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/DynamicCSS/Attic/dynamiccss.js,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/DynamicCSS/dynamiccss.js 13 May 2008 18:53:48 -0000 1.5 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/DynamicCSS/dynamiccss.js 16 Jan 2009 09:05:47 -0000 1.6 @@ -1,202 +1,2 @@ -/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */ -/* This file is part of version 0.95 released Mon, 12 May 2008 17:33:15 +0200 */ -/* The URL of the most recent version of this file is http://svn.xinha.webfactional.com/trunk/plugins/DynamicCSS/dynamiccss.js */ -function DynamicCSS(_1,_2){ -this.editor=_1; -var _3=_1.config; -var _4=this; -var _5=null; -var _6=null; -var _7={id:"DynamicCSS-class",tooltip:this._lc("Choose stylesheet"),options:{"":""},action:function(_8){ -_4.onSelect(_8,this); -},refresh:function(_9){ -_4.updateValue(_9,this); -}}; -_3.registerDropdown(_7); -_3.addToolbarElement(["T[CSS]","DynamicCSS-class","separator"],"formatblock",-1); -} -DynamicCSS.parseStyleSheet=function(_a){ -iframe=_a._iframe.contentWindow.document; -cssArray=DynamicCSS.cssArray; -if(!cssArray){ -cssArray=new Array(); -} -for(i=0;i"; -} -}else{ -className="none"; -if(tagName=="all"){ -cssName=Xinha._lc("Default","DynamicCSS"); -}else{ -cssName="<"+Xinha._lc("Default","DynamicCSS")+">"; -} -} -_c[tagName][className]=cssName; -DynamicCSS.cssLength++; -} -} -}else{ -if(_b[rule].styleSheet){ -_c=DynamicCSS.applyCSSRule(_b[rule].styleSheet.cssRules,_c); -} -} -} -return _c; -}; -DynamicCSS._pluginInfo={name:"DynamicCSS",version:"1.5.2",developer:"Holger Hees",developer_url:"http://www.systemconcept.de/",c_owner:"Holger Hees",sponsor:"System Concept GmbH",sponsor_url:"http://www.systemconcept.de/",license:"htmlArea"}; -DynamicCSS.prototype._lc=function(_d){ -return Xinha._lc(_d,"DynamicCSS"); -}; -DynamicCSS.prototype.onSelect=function(_e,_f){ -var _10=_e._toolbarObjects[_f.id]; -var _11=_10.element.selectedIndex; -var _12=_10.element.value; -var _13=_e.getParentElement(); -if(_12!="none"){ -_13.className=_12; -DynamicCSS.lastClass=_12; -}else{ -if(Xinha.is_gecko){ -_13.removeAttribute("class"); -}else{ -_13.removeAttribute("className"); -} -} -_e.updateToolbar(); -}; -DynamicCSS.prototype.reparseTimer=function(_14,obj,_16){ -if(DynamicCSS.parseCount<9){ -setTimeout(function(){ -DynamicCSS.cssLength=0; -DynamicCSS.parseStyleSheet(_14); -if(DynamicCSS.cssOldLength!=DynamicCSS.cssLength){ -DynamicCSS.cssOldLength=DynamicCSS.cssLength; -DynamicCSS.lastClass=null; -_16.updateValue(_14,obj); -} -_16.reparseTimer(_14,obj,_16); -},DynamicCSS.parseCount*1000); -DynamicCSS.parseCount=DynamicCSS.parseCount*2; -} -}; -DynamicCSS.prototype.updateValue=function(_17,obj){ -cssArray=DynamicCSS.cssArray; -if(!cssArray){ -DynamicCSS.cssLength=0; -DynamicCSS.parseStyleSheet(_17); -cssArray=DynamicCSS.cssArray; -DynamicCSS.cssOldLength=DynamicCSS.cssLength; -DynamicCSS.parseCount=1; -this.reparseTimer(_17,obj,this); -} -var _19=_17.getParentElement(); -var _1a=_19.tagName.toLowerCase(); -var _1b=_19.className; -if(this.lastTag!=_1a||this.lastClass!=_1b){ -this.lastTag=_1a; -this.lastClass=_1b; -var _1c=_17._toolbarObjects[obj.id].element; -while(_1c.length>0){ -_1c.options[_1c.length-1]=null; -} -_1c.options[0]=new Option(this._lc("Default"),"none"); -if(cssArray){ -if(_1a!="body"||_17.config.fullPage){ -if(cssArray[_1a]){ -for(cssClass in cssArray[_1a]){ -if(typeof cssArray[_1a][cssClass]!="string"){ -continue; -} -if(cssClass=="none"){ -_1c.options[0]=new Option(cssArray[_1a][cssClass],cssClass); -}else{ -_1c.options[_1c.length]=new Option(cssArray[_1a][cssClass],cssClass); -} -} -} -if(cssArray["all"]){ -for(cssClass in cssArray["all"]){ -if(typeof cssArray["all"][cssClass]!="string"){ -continue; -} -_1c.options[_1c.length]=new Option(cssArray["all"][cssClass],cssClass); -} -} -}else{ -if(cssArray[_1a]&&cssArray[_1a]["none"]){ -_1c.options[0]=new Option(cssArray[_1a]["none"],"none"); -} -} -} -_1c.selectedIndex=0; -if(typeof _1b!="undefined"&&/\S/.test(_1b)){ -var _1d=_1c.options; -for(var i=_1d.length;--i>=0;){ -var _1f=_1d[i]; -if(_1b==_1f.value){ -_1c.selectedIndex=i; -break; -} -} -if(_1c.selectedIndex==0){ -_1c.options[_1c.length]=new Option(this._lc("Undefined"),_1b); -_1c.selectedIndex=_1c.length-1; -} -} -if(_1c.length>1){ -_1c.disabled=false; -}else{ -_1c.disabled=true; -} -} -}; - +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +function DynamicCSS(e,d){this.editor=e;var a=e.config;var b=this;var g=null;var c=null;var f={id:"DynamicCSS-class",tooltip:this._lc("Choose stylesheet"),options:{"":""},action:function(h){b.onSelect(h,this)},refresh:function(h){b.updateValue(h,this)}};a.registerDropdown(f);a.addToolbarElement(["T[CSS]","DynamicCSS-class","separator"],"formatblock",-1)}DynamicCSS.parseStyleSheet=function(a){iframe=a._iframe.contentWindow.document;cssArray=DynamicCSS.cssArray;if(!cssArray){cssArray=new Array()}for(i=0;i"}}else{className="none";if(tagName=="all"){cssName=Xinha._lc("Default","DynamicCSS")}else{cssName="<"+Xinha._lc("Default","DynamicCSS")+">"}}b[tagName][className]=cssName;DynamicCSS.cssLength++}}}else{if(a[rule].styleSheet){b=DynamicCSS.applyCSSRule(a[rule].styleSheet.cssRules,b)}}}return b};DynamicCSS._pluginInfo={name:"DynamicCSS",version:"1.5.2",developer:"Holger Hees",developer_url:"http://www.systemconcept.de/",c_owner:"Holger Hees",sponsor:"System Concept GmbH",sponsor_url:"http://www.systemconcept.de/",license:"htmlArea"};DynamicCSS.prototype._lc=function(a){return Xinha._lc(a,"DynamicCSS")};DynamicCSS.prototype.onSelect=function(e,f){var b=e._toolbarObjects[f.id];var a=b.element.selectedIndex;var d=b.element.value;var c=e.getParentElement();if(d!="none"){c.className=d;DynamicCSS.lastClass=d}else{if(Xinha.is_gecko){c.removeAttribute("class")}else{c.removeAttribute("className")}}e.updateToolbar()};DynamicCSS.prototype.reparseTimer=function(b,c,a){if(DynamicCSS.parseCount<9){setTimeout(function(){DynamicCSS.cssLength=0;DynamicCSS.parseStyleSheet(b);if(DynamicCSS.cssOldLength!=DynamicCSS.cssLength){DynamicCSS.cssOldLength=DynamicCSS.cssLength;DynamicCSS.lastClass=null;a.updateValue(b,c)}a.reparseTimer(b,c,a)},DynamicCSS.parseCount*1000);DynamicCSS.parseCount=DynamicCSS.parseCount*2}};DynamicCSS.prototype.updateValue=function(e,b){cssArray=DynamicCSS.cssArray;if(!cssArray){DynamicCSS.cssLength=0;DynamicCSS.parseStyleSheet(e);cssArray=DynamicCSS.cssArray;DynamicCSS.cssOldLength=DynamicCSS.cssLength;DynamicCSS.parseCount=1;this.reparseTimer(e,b,this)}var h=e.getParentElement();var a=h.tagName.toLowerCase();var f=h.className;if(this.lastTag!=a||this.lastClass!=f){this.lastTag=a;this.lastClass=f;var g=e._toolbarObjects[b.id].element;while(g.length>0){g.options[g.length-1]=null}g.options[0]=new Option(this._lc("Default"),"none");if(cssArray){if(a!="body"||e.config.fullPage){if(cssArray[a]){for(cssClass in cssArray[a]){if(typeof cssArray[a][cssClass]!="string"){continue}if(cssClass=="none"){g.options[0]=new Option(cssArray[a][cssClass],cssClass)}else{g.options[g.length]=new Option(cssArray[a][cssClass],cssClass)}}}if(cssArray.all){for(cssClass in cssArray.all){if(typeof cssArray.all[cssClass]!="string"){continue}g.options[g.length]=new Option(cssArray.all[cssClass],cssClass)}}}else{if(cssArray[a]&&cssArray[a]["none"]){g.options[0]=new Option(cssArray[a]["none"],"none")}}}g.selectedIndex=0;if(typeof f!="undefined"&&/\S/.test(f)){var l=g.options;for(var c=l.length;--c>=0;){var d=l[c];if(f==d.value){g.selectedIndex=c;break}}if(g.selectedIndex==0){g.options[g.length]=new Option(this._lc("Undefined"),f);g.selectedIndex=g.length-1}}if(g.length>1){g.disabled=false}else{g.disabled=true}}}; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/EditTag/EditTag.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/EditTag/EditTag.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/EditTag/EditTag.js 16 Jan 2009 09:05:47 -0000 1.1 @@ -0,0 +1,56 @@ +// Character Map plugin for Xinha +// Sponsored by http://www.systemconcept.de +// Implementation by Holger Hees based on HTMLArea XTD 1.5 (http://mosforge.net/projects/htmlarea3xtd/) +// Original Author - Bernhard Pfeifer novocaine@gmx.net +// +// (c) systemconcept.de 2004 +// Distributed under the same terms as Xinha itself. +// This notice MUST stay intact for use (see license.txt). + +function EditTag(editor) { + this.editor = editor; + var cfg = editor.config; + var self = this; + + cfg.registerButton({ + id : "edittag", + tooltip : this._lc("Edit HTML for selected text"), + image : editor.imgURL("ed_edit_tag.gif", "EditTag"), + textMode : false, + action : function(editor) { + self.buttonPress(editor); + } + }); + + cfg.addToolbarElement("edittag", "htmlmode",1); + +} + +EditTag._pluginInfo = { + name : "EditTag", + version : "1.0", + developer : "Pegoraro Marco", + developer_url : "http://www.sin-italia.com/", + c_owner : "Marco Pegoraro", + sponsor : "Sin Italia", + sponsor_url : "http://www.sin-italia.com/", + license : "htmlArea" +}; + +EditTag.prototype._lc = function(string) { + return Xinha._lc(string, 'EditTag'); +}; + +EditTag.prototype.buttonPress = function(editor) { + // Costruzione dell'oggetto parametri da passare alla dialog. + outparam = { + content : editor.getSelectedHTML() + }; // Fine costruzione parametri per il passaggio alla dialog. + editor._popupDialog( "plugin://EditTag/edit_tag", function( html ) { + if ( !html ) { + //user must have pressed Cancel + return false; + } + editor.insertHTML( html ); + }, outparam); +}; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Equation/ASCIIMathML.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Equation/ASCIIMathML.js,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Equation/ASCIIMathML.js 13 May 2008 18:53:48 -0000 1.4 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Equation/ASCIIMathML.js 16 Jan 2009 09:05:47 -0000 1.5 @@ -1,703 +1,2 @@ -/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */ -/* This file is part of version 0.95 released Mon, 12 May 2008 17:33:15 +0200 */ -/* The URL of the most recent version of this file is http://svn.xinha.webfactional.com/trunk/plugins/Equation/ASCIIMathML.js */ -var checkForMathML=true; -var notifyIfNoMathML=true; -var alertIfNoMathML=false; -if(typeof mathcolor=="undefined"){ -var mathcolor="red"; -} -if(typeof mathfontfamily=="undefined"){ -var mathfontfamily="serif"; -} -var displaystyle=true; -if(typeof showasciiformulaonhover=="undefined"){ -var showasciiformulaonhover=true; -} -var decimalsign="."; -var AMdelimiter1="`",AMescape1="\\\\`"; -var AMdelimiter2="$",AMescape2="\\\\\\$",AMdelimiter2regexp="\\$"; -var doubleblankmathdelimiter=false; -var isIE=document.createElementNS==null; -if(document.getElementById==null){ -alert("This webpage requires a recent browser such as\nMozilla/Netscape 7+ or Internet Explorer 6+MathPlayer"); -} -function AMcreateElementXHTML(t){ -if(isIE){ -return document.createElement(t); -}else{ -return document.createElementNS("http://www.w3.org/1999/xhtml",t); -} -} -function AMnoMathMLNote(){ -var nd=AMcreateElementXHTML("h3"); -nd.setAttribute("align","center"); -nd.appendChild(AMcreateElementXHTML("p")); -nd.appendChild(document.createTextNode("To view the ")); -var an=AMcreateElementXHTML("a"); -an.appendChild(document.createTextNode("ASCIIMathML")); -an.setAttribute("href","http://www.chapman.edu/~jipsen/asciimath.html"); -nd.appendChild(an); -nd.appendChild(document.createTextNode(" notation use Internet Explorer 6+")); -an=AMcreateElementXHTML("a"); -an.appendChild(document.createTextNode("MathPlayer")); -an.setAttribute("href","http://www.dessci.com/en/products/mathplayer/download.htm"); -nd.appendChild(an); -nd.appendChild(document.createTextNode(" or Netscape/Mozilla/Firefox")); -nd.appendChild(AMcreateElementXHTML("p")); -return nd; -} -function AMisMathMLavailable(){ -if(navigator.appName.slice(0,8)=="Netscape"){ -if(navigator.appVersion.slice(0,1)>="5"){ -return null; -}else{ -return AMnoMathMLNote(); -} -}else{ -if(navigator.appName.slice(0,9)=="Microsoft"){ -try{ -var _4=new ActiveXObject("MathPlayer.Factory.1"); -return null; -} -catch(e){ -return AMnoMathMLNote(); -} -}else{ -return AMnoMathMLNote(); -} -} -} -var AMcal=[61237,8492,61238,61239,8496,8497,61240,8459,8464,61241,61242,8466,8499,61243,61244,61245,61246,8475,61247,61248,61249,61250,61251,61252,61253,61254]; -var AMfrk=[61277,61278,8493,61279,61280,61281,61282,8460,8465,61283,61284,61285,61286,61287,61288,61289,61290,8476,61291,61292,61293,61294,61295,61296,61297,8488]; -var AMbbb=[61324,61325,8450,61326,61327,61328,61329,8461,61330,61331,61332,61333,61334,8469,61335,8473,8474,8477,61336,61337,61338,61339,61340,61341,61342,8484]; -var CONST=0,UNARY=1,BINARY=2,INFIX=3,LEFTBRACKET=4,RIGHTBRACKET=5,SPACE=6,UNDEROVER=7,DEFINITION=8,LEFTRIGHT=9,TEXT=10; -var AMsqrt={input:"sqrt",tag:"msqrt",output:"sqrt",tex:null,ttype:UNARY},AMroot={input:"root",tag:"mroot",output:"root",tex:null,ttype:BINARY},AMfrac={input:"frac",tag:"mfrac",output:"/",tex:null,ttype:BINARY},AMdiv={input:"/",tag:"mfrac",output:"/",tex:null,ttype:INFIX},AMover={input:"stackrel",tag:"mover",output:"stackrel",tex:null,ttype:BINARY},AMsub={input:"_",tag:"msub",output:"_",tex:null,ttype:INFIX},AMsup={input:"^",tag:"msup",output:"^",tex:null,ttype:INFIX},AMtext={input:"text",tag:"mtext",output:"text",tex:null,ttype:TEXT},AMmbox={input:"mbox",tag:"mtext",output:"mbox",tex:null,ttype:TEXT},AMquote={input:"\"",tag:"mtext",output:"mbox",tex:null,ttype:TEXT}; -var AMsymbols=[{input:"alpha",tag:"mi",output:"\u03b1",tex:null,ttype:CONST},{input:"beta",tag:"mi",output:"\u03b2",tex:null,ttype:CONST},{input:"chi",tag:"mi",output:"\u03c7",tex:null,ttype:CONST},{input:"delta",tag:"mi",output:"\u03b4",tex:null,ttype:CONST},{input:"Delta",tag:"mo",output:"\u0394",tex:null,ttype:CONST},{input:"epsi",tag:"mi",output:"\u03b5",tex:"epsilon",ttype:CONST},{input:"varepsilon",tag:"mi",output:"\u025b",tex:null,ttype:CONST},{input:"eta",tag:"mi",output:"\u03b7",tex:null,ttype:CONST},{input:"gamma",tag:"mi",output:"\u03b3",tex:null,ttype:CONST},{input:"Gamma",tag:"mo",output:"\u0393",tex:null,ttype:CONST},{input:"iota",tag:"mi",output:"\u03b9",tex:null,ttype:CONST},{input:"kappa",tag:"mi",output:"\u03ba",tex:null,ttype:CONST},{input:"lambda",tag:"mi",output:"\u03bb",tex:null,ttype:CONST},{input:"Lambda",tag:"mo",output:"\u039b",tex:null,ttype:CONST},{input:"mu",tag:"mi",output:"\u03bc",tex:null,ttype:CONST},{input:"nu",tag:"mi",output:"\u03bd",tex:null,ttype:CONST},{input:"omega",tag:"mi",output:"\u03c9",tex:null,ttype:CONST},{input:"Omega",tag:"mo",output:"\u03a9",tex:null,ttype:CONST},{input:"phi",tag:"mi",output:"\u03c6",tex:null,ttype:CONST},{input:"varphi",tag:"mi",output:"\u03d5",tex:null,ttype:CONST},{input:"Phi",tag:"mo",output:"\u03a6",tex:null,ttype:CONST},{input:"pi",tag:"mi",output:"\u03c0",tex:null,ttype:CONST},{input:"Pi",tag:"mo",output:"\u03a0",tex:null,ttype:CONST},{input:"psi",tag:"mi",output:"\u03c8",tex:null,ttype:CONST},{input:"Psi",tag:"mi",output:"\u03a8",tex:null,ttype:CONST},{input:"rho",tag:"mi",output:"\u03c1",tex:null,ttype:CONST},{input:"sigma",tag:"mi",output:"\u03c3",tex:null,ttype:CONST},{input:"Sigma",tag:"mo",output:"\u03a3",tex:null,ttype:CONST},{input:"tau",tag:"mi",output:"\u03c4",tex:null,ttype:CONST},{input:"theta",tag:"mi",output:"\u03b8",tex:null,ttype:CONST},{input:"vartheta",tag:"mi",output:"\u03d1",tex:null,ttype:CONST},{input:"Theta",tag:"mo",output:"\u0398",tex:null,ttype:CONST},{input:"upsilon",tag:"mi",output:"\u03c5",tex:null,ttype:CONST},{input:"xi",tag:"mi",output:"\u03be",tex:null,ttype:CONST},{input:"Xi",tag:"mo",output:"\u039e",tex:null,ttype:CONST},{input:"zeta",tag:"mi",output:"\u03b6",tex:null,ttype:CONST},{input:"*",tag:"mo",output:"\u22c5",tex:"cdot",ttype:CONST},{input:"**",tag:"mo",output:"\u22c6",tex:"star",ttype:CONST},{input:"//",tag:"mo",output:"/",tex:null,ttype:CONST},{input:"\\\\",tag:"mo",output:"\\",tex:"backslash",ttype:CONST},{input:"setminus",tag:"mo",output:"\\",tex:null,ttype:CONST},{input:"xx",tag:"mo",output:"\xd7",tex:"times",ttype:CONST},{input:"-:",tag:"mo",output:"\xf7",tex:"divide",ttype:CONST},{input:"@",tag:"mo",output:"\u2218",tex:"circ",ttype:CONST},{input:"o+",tag:"mo",output:"\u2295",tex:"oplus",ttype:CONST},{input:"ox",tag:"mo",output:"\u2297",tex:"otimes",ttype:CONST},{input:"o.",tag:"mo",output:"\u2299",tex:"odot",ttype:CONST},{input:"sum",tag:"mo",output:"\u2211",tex:null,ttype:UNDEROVER},{input:"prod",tag:"mo",output:"\u220f",tex:null,ttype:UNDEROVER},{input:"^^",tag:"mo",output:"\u2227",tex:"wedge",ttype:CONST},{input:"^^^",tag:"mo",output:"\u22c0",tex:"bigwedge",ttype:UNDEROVER},{input:"vv",tag:"mo",output:"\u2228",tex:"vee",ttype:CONST},{input:"vvv",tag:"mo",output:"\u22c1",tex:"bigvee",ttype:UNDEROVER},{input:"nn",tag:"mo",output:"\u2229",tex:"cap",ttype:CONST},{input:"nnn",tag:"mo",output:"\u22c2",tex:"bigcap",ttype:UNDEROVER},{input:"uu",tag:"mo",output:"\u222a",tex:"cup",ttype:CONST},{input:"uuu",tag:"mo",output:"\u22c3",tex:"bigcup",ttype:UNDEROVER},{input:"!=",tag:"mo",output:"\u2260",tex:"ne",ttype:CONST},{input:":=",tag:"mo",output:":=",tex:null,ttype:CONST},{input:"lt",tag:"mo",output:"<",tex:null,ttype:CONST},{input:"<=",tag:"mo",output:"\u2264",tex:"le",ttype:CONST},{input:"lt=",tag:"mo",output:"\u2264",tex:"leq",ttype:CONST},{input:">=",tag:"mo",output:"\u2265",tex:"ge",ttype:CONST},{input:"geq",tag:"mo",output:"\u2265",tex:null,ttype:CONST},{input:"-<",tag:"mo",output:"\u227a",tex:"prec",ttype:CONST},{input:"-lt",tag:"mo",output:"\u227a",tex:null,ttype:CONST},{input:">-",tag:"mo",output:"\u227b",tex:"succ",ttype:CONST},{input:"-<=",tag:"mo",output:"\u2aaf",tex:"preceq",ttype:CONST},{input:">-=",tag:"mo",output:"\u2ab0",tex:"succeq",ttype:CONST},{input:"in",tag:"mo",output:"\u2208",tex:null,ttype:CONST},{input:"!in",tag:"mo",output:"\u2209",tex:"notin",ttype:CONST},{input:"sub",tag:"mo",output:"\u2282",tex:"subset",ttype:CONST},{input:"sup",tag:"mo",output:"\u2283",tex:"supset",ttype:CONST},{input:"sube",tag:"mo",output:"\u2286",tex:"subseteq",ttype:CONST},{input:"supe",tag:"mo",output:"\u2287",tex:"supseteq",ttype:CONST},{input:"-=",tag:"mo",output:"\u2261",tex:"equiv",ttype:CONST},{input:"~=",tag:"mo",output:"\u2245",tex:"cong",ttype:CONST},{input:"~~",tag:"mo",output:"\u2248",tex:"approx",ttype:CONST},{input:"prop",tag:"mo",output:"\u221d",tex:"propto",ttype:CONST},{input:"and",tag:"mtext",output:"and",tex:null,ttype:SPACE},{input:"or",tag:"mtext",output:"or",tex:null,ttype:SPACE},{input:"not",tag:"mo",output:"\xac",tex:"neg",ttype:CONST},{input:"=>",tag:"mo",output:"\u21d2",tex:"implies",ttype:CONST},{input:"if",tag:"mo",output:"if",tex:null,ttype:SPACE},{input:"<=>",tag:"mo",output:"\u21d4",tex:"iff",ttype:CONST},{input:"AA",tag:"mo",output:"\u2200",tex:"forall",ttype:CONST},{input:"EE",tag:"mo",output:"\u2203",tex:"exists",ttype:CONST},{input:"_|_",tag:"mo",output:"\u22a5",tex:"bot",ttype:CONST},{input:"TT",tag:"mo",output:"\u22a4",tex:"top",ttype:CONST},{input:"|--",tag:"mo",output:"\u22a2",tex:"vdash",ttype:CONST},{input:"|==",tag:"mo",output:"\u22a8",tex:"models",ttype:CONST},{input:"(",tag:"mo",output:"(",tex:null,ttype:LEFTBRACKET},{input:")",tag:"mo",output:")",tex:null,ttype:RIGHTBRACKET},{input:"[",tag:"mo",output:"[",tex:null,ttype:LEFTBRACKET},{input:"]",tag:"mo",output:"]",tex:null,ttype:RIGHTBRACKET},{input:"{",tag:"mo",output:"{",tex:null,ttype:LEFTBRACKET},{input:"}",tag:"mo",output:"}",tex:null,ttype:RIGHTBRACKET},{input:"|",tag:"mo",output:"|",tex:null,ttype:LEFTRIGHT},{input:"(:",tag:"mo",output:"\u2329",tex:"langle",ttype:LEFTBRACKET},{input:":)",tag:"mo",output:"\u232a",tex:"rangle",ttype:RIGHTBRACKET},{input:"<<",tag:"mo",output:"\u2329",tex:null,ttype:LEFTBRACKET},{input:">>",tag:"mo",output:"\u232a",tex:null,ttype:RIGHTBRACKET},{input:"{:",tag:"mo",output:"{:",tex:null,ttype:LEFTBRACKET,invisible:true},{input:":}",tag:"mo",output:":}",tex:null,ttype:RIGHTBRACKET,invisible:true},{input:"int",tag:"mo",output:"\u222b",tex:null,ttype:CONST},{input:"dx",tag:"mi",output:"{:d x:}",tex:null,ttype:DEFINITION},{input:"dy",tag:"mi",output:"{:d y:}",tex:null,ttype:DEFINITION},{input:"dz",tag:"mi",output:"{:d z:}",tex:null,ttype:DEFINITION},{input:"dt",tag:"mi",output:"{:d t:}",tex:null,ttype:DEFINITION},{input:"oint",tag:"mo",output:"\u222e",tex:null,ttype:CONST},{input:"del",tag:"mo",output:"\u2202",tex:"partial",ttype:CONST},{input:"grad",tag:"mo",output:"\u2207",tex:"nabla",ttype:CONST},{input:"+-",tag:"mo",output:"\xb1",tex:"pm",ttype:CONST},{input:"O/",tag:"mo",output:"\u2205",tex:"emptyset",ttype:CONST},{input:"oo",tag:"mo",output:"\u221e",tex:"infty",ttype:CONST},{input:"aleph",tag:"mo",output:"\u2135",tex:null,ttype:CONST},{input:"...",tag:"mo",output:"...",tex:"ldots",ttype:CONST},{input:":.",tag:"mo",output:"\u2234",tex:"therefore",ttype:CONST},{input:"/_",tag:"mo",output:"\u2220",tex:"angle",ttype:CONST},{input:"\\ ",tag:"mo",output:"\xa0",tex:null,ttype:CONST},{input:"quad",tag:"mo",output:"\xa0\xa0",tex:null,ttype:CONST},{input:"qquad",tag:"mo",output:"\xa0\xa0\xa0\xa0",tex:null,ttype:CONST},{input:"cdots",tag:"mo",output:"\u22ef",tex:null,ttype:CONST},{input:"vdots",tag:"mo",output:"\u22ee",tex:null,ttype:CONST},{input:"ddots",tag:"mo",output:"\u22f1",tex:null,ttype:CONST},{input:"diamond",tag:"mo",output:"\u22c4",tex:null,ttype:CONST},{input:"square",tag:"mo",output:"\u25a1",tex:null,ttype:CONST},{input:"|__",tag:"mo",output:"\u230a",tex:"lfloor",ttype:CONST},{input:"__|",tag:"mo",output:"\u230b",tex:"rfloor",ttype:CONST},{input:"|~",tag:"mo",output:"\u2308",tex:"lceiling",ttype:CONST},{input:"~|",tag:"mo",output:"\u2309",tex:"rceiling",ttype:CONST},{input:"CC",tag:"mo",output:"\u2102",tex:null,ttype:CONST},{input:"NN",tag:"mo",output:"\u2115",tex:null,ttype:CONST},{input:"QQ",tag:"mo",output:"\u211a",tex:null,ttype:CONST},{input:"RR",tag:"mo",output:"\u211d",tex:null,ttype:CONST},{input:"ZZ",tag:"mo",output:"\u2124",tex:null,ttype:CONST},{input:"f",tag:"mi",output:"f",tex:null,ttype:UNARY,func:true},{input:"g",tag:"mi",output:"g",tex:null,ttype:UNARY,func:true},{input:"lim",tag:"mo",output:"lim",tex:null,ttype:UNDEROVER},{input:"Lim",tag:"mo",output:"Lim",tex:null,ttype:UNDEROVER},{input:"sin",tag:"mo",output:"sin",tex:null,ttype:UNARY,func:true},{input:"cos",tag:"mo",output:"cos",tex:null,ttype:UNARY,func:true},{input:"tan",tag:"mo",output:"tan",tex:null,ttype:UNARY,func:true},{input:"sinh",tag:"mo",output:"sinh",tex:null,ttype:UNARY,func:true},{input:"cosh",tag:"mo",output:"cosh",tex:null,ttype:UNARY,func:true},{input:"tanh",tag:"mo",output:"tanh",tex:null,ttype:UNARY,func:true},{input:"cot",tag:"mo",output:"cot",tex:null,ttype:UNARY,func:true},{input:"sec",tag:"mo",output:"sec",tex:null,ttype:UNARY,func:true},{input:"csc",tag:"mo",output:"csc",tex:null,ttype:UNARY,func:true},{input:"log",tag:"mo",output:"log",tex:null,ttype:UNARY,func:true},{input:"ln",tag:"mo",output:"ln",tex:null,ttype:UNARY,func:true},{input:"det",tag:"mo",output:"det",tex:null,ttype:UNARY,func:true},{input:"dim",tag:"mo",output:"dim",tex:null,ttype:CONST},{input:"mod",tag:"mo",output:"mod",tex:null,ttype:CONST},{input:"gcd",tag:"mo",output:"gcd",tex:null,ttype:UNARY,func:true},{input:"lcm",tag:"mo",output:"lcm",tex:null,ttype:UNARY,func:true},{input:"lub",tag:"mo",output:"lub",tex:null,ttype:CONST},{input:"glb",tag:"mo",output:"glb",tex:null,ttype:CONST},{input:"min",tag:"mo",output:"min",tex:null,ttype:UNDEROVER},{input:"max",tag:"mo",output:"max",tex:null,ttype:UNDEROVER},{input:"uarr",tag:"mo",output:"\u2191",tex:"uparrow",ttype:CONST},{input:"darr",tag:"mo",output:"\u2193",tex:"downarrow",ttype:CONST},{input:"rarr",tag:"mo",output:"\u2192",tex:"rightarrow",ttype:CONST},{input:"->",tag:"mo",output:"\u2192",tex:"to",ttype:CONST},{input:"|->",tag:"mo",output:"\u21a6",tex:"mapsto",ttype:CONST},{input:"larr",tag:"mo",output:"\u2190",tex:"leftarrow",ttype:CONST},{input:"harr",tag:"mo",output:"\u2194",tex:"leftrightarrow",ttype:CONST},{input:"rArr",tag:"mo",output:"\u21d2",tex:"Rightarrow",ttype:CONST},{input:"lArr",tag:"mo",output:"\u21d0",tex:"Leftarrow",ttype:CONST},{input:"hArr",tag:"mo",output:"\u21d4",tex:"Leftrightarrow",ttype:CONST},AMsqrt,AMroot,AMfrac,AMdiv,AMover,AMsub,AMsup,{input:"hat",tag:"mover",output:"^",tex:null,ttype:UNARY,acc:true},{input:"bar",tag:"mover",output:"\xaf",tex:"overline",ttype:UNARY,acc:true},{input:"vec",tag:"mover",output:"\u2192",tex:null,ttype:UNARY,acc:true},{input:"dot",tag:"mover",output:".",tex:null,ttype:UNARY,acc:true},{input:"ddot",tag:"mover",output:"..",tex:null,ttype:UNARY,acc:true},{input:"ul",tag:"munder",output:"\u0332",tex:"underline",ttype:UNARY,acc:true},AMtext,AMmbox,AMquote,{input:"bb",tag:"mstyle",atname:"fontweight",atval:"bold",output:"bb",tex:null,ttype:UNARY},{input:"mathbf",tag:"mstyle",atname:"fontweight",atval:"bold",output:"mathbf",tex:null,ttype:UNARY},{input:"sf",tag:"mstyle",atname:"fontfamily",atval:"sans-serif",output:"sf",tex:null,ttype:UNARY},{input:"mathsf",tag:"mstyle",atname:"fontfamily",atval:"sans-serif",output:"mathsf",tex:null,ttype:UNARY},{input:"bbb",tag:"mstyle",atname:"mathvariant",atval:"double-struck",output:"bbb",tex:null,ttype:UNARY,codes:AMbbb},{input:"mathbb",tag:"mstyle",atname:"mathvariant",atval:"double-struck",output:"mathbb",tex:null,ttype:UNARY,codes:AMbbb},{input:"cc",tag:"mstyle",atname:"mathvariant",atval:"script",output:"cc",tex:null,ttype:UNARY,codes:AMcal},{input:"mathcal",tag:"mstyle",atname:"mathvariant",atval:"script",output:"mathcal",tex:null,ttype:UNARY,codes:AMcal},{input:"tt",tag:"mstyle",atname:"fontfamily",atval:"monospace",output:"tt",tex:null,ttype:UNARY},{input:"mathtt",tag:"mstyle",atname:"fontfamily",atval:"monospace",output:"mathtt",tex:null,ttype:UNARY},{input:"fr",tag:"mstyle",atname:"mathvariant",atval:"fraktur",output:"fr",tex:null,ttype:UNARY,codes:AMfrk},{input:"mathfrak",tag:"mstyle",atname:"mathvariant",atval:"fraktur",output:"mathfrak",tex:null,ttype:UNARY,codes:AMfrk}]; -function compareNames(s1,s2){ -if(s1.input>s2.input){ -return 1; -}else{ -return -1; -} -} -var AMnames=[]; -function AMinitSymbols(){ -var _7=[],i; -for(i=0;i>1; -if(arr[m]=AMnames[k]; -} -AMpreviousSymbol=AMcurrentSymbol; -if(_1d!=""){ -AMcurrentSymbol=AMsymbols[mk].ttype; -return AMsymbols[mk]; -} -AMcurrentSymbol=CONST; -k=1; -st=str.slice(0,1); -var _20=true; -while("0"<=st&&st<="9"&&k<=str.length){ -st=str.slice(k,k+1); -k++; -} -if(st==decimalsign){ -st=str.slice(k,k+1); -if("0"<=st&&st<="9"){ -_20=false; -k++; -while("0"<=st&&st<="9"&&k<=str.length){ -st=str.slice(k,k+1); -k++; -} -} -} -if((_20&&k>1)||k>2){ -st=str.slice(0,k-1); -_1c="mn"; -}else{ -k=2; -st=str.slice(0,1); -_1c=(("A">st||st>"Z")&&("a">st||st>"z")?"mo":"mi"); -} -if(st=="-"&&AMpreviousSymbol==INFIX){ -AMcurrentSymbol=INFIX; -return {input:st,tag:_1c,output:st,ttype:UNARY,func:true}; -} -return {input:st,tag:_1c,output:st,ttype:CONST}; -} -function AMremoveBrackets(_21){ -var st; -if(_21.nodeName=="mrow"){ -st=_21.firstChild.firstChild.nodeValue; -if(st=="("||st=="["||st=="{"){ -_21.removeChild(_21.firstChild); -} -} -if(_21.nodeName=="mrow"){ -st=_21.lastChild.firstChild.nodeValue; -if(st==")"||st=="]"||st=="}"){ -_21.removeChild(_21.lastChild); -} -} -} -var AMnestingDepth,AMpreviousSymbol,AMcurrentSymbol; -function AMparseSexpr(str){ -var _24,node,result,i,st,newFrag=document.createDocumentFragment(); -str=AMremoveCharsAndBlanks(str,0); -_24=AMgetSymbol(str); -if(_24==null||_24.ttype==RIGHTBRACKET&&AMnestingDepth>0){ -return [null,str]; -} -if(_24.ttype==DEFINITION){ -str=_24.output+AMremoveCharsAndBlanks(str,_24.input.length); -_24=AMgetSymbol(str); -} -switch(_24.ttype){ -case UNDEROVER: -case CONST: -str=AMremoveCharsAndBlanks(str,_24.input.length); -return [AMcreateMmlNode(_24.tag,document.createTextNode(_24.output)),str]; -case LEFTBRACKET: -AMnestingDepth++; -str=AMremoveCharsAndBlanks(str,_24.input.length); -result=AMparseExpr(str,true); -AMnestingDepth--; -if(typeof _24.invisible=="boolean"&&_24.invisible){ -node=AMcreateMmlNode("mrow",result[0]); -}else{ -node=AMcreateMmlNode("mo",document.createTextNode(_24.output)); -node=AMcreateMmlNode("mrow",node); -node.appendChild(result[0]); -} -return [node,result[1]]; -case TEXT: -if(_24!=AMquote){ -str=AMremoveCharsAndBlanks(str,_24.input.length); -} -if(str.charAt(0)=="{"){ -i=str.indexOf("}"); -}else{ -if(str.charAt(0)=="("){ -i=str.indexOf(")"); -}else{ -if(str.charAt(0)=="["){ -i=str.indexOf("]"); -}else{ -if(_24==AMquote){ -i=str.slice(1).indexOf("\"")+1; -}else{ -i=0; -} -} -} -} -if(i==-1){ -i=str.length; -} -st=str.slice(1,i); -if(st.charAt(0)==" "){ -node=AMcreateElementMathML("mspace"); -node.setAttribute("width","1ex"); -newFrag.appendChild(node); -} -newFrag.appendChild(AMcreateMmlNode(_24.tag,document.createTextNode(st))); -if(st.charAt(st.length-1)==" "){ -node=AMcreateElementMathML("mspace"); -node.setAttribute("width","1ex"); -newFrag.appendChild(node); -} -str=AMremoveCharsAndBlanks(str,i+1); -return [AMcreateMmlNode("mrow",newFrag),str]; -case UNARY: -str=AMremoveCharsAndBlanks(str,_24.input.length); -result=AMparseSexpr(str); -if(result[0]==null){ -return [AMcreateMmlNode(_24.tag,document.createTextNode(_24.output)),str]; -} -if(typeof _24.func=="boolean"&&_24.func){ -st=str.charAt(0); -if(st=="^"||st=="_"||st=="/"||st=="|"||st==","){ -return [AMcreateMmlNode(_24.tag,document.createTextNode(_24.output)),str]; -}else{ -node=AMcreateMmlNode("mrow",AMcreateMmlNode(_24.tag,document.createTextNode(_24.output))); -node.appendChild(result[0]); -return [node,result[1]]; -} -} -AMremoveBrackets(result[0]); -if(_24.input=="sqrt"){ -return [AMcreateMmlNode(_24.tag,result[0]),result[1]]; -}else{ -if(typeof _24.acc=="boolean"&&_24.acc){ -node=AMcreateMmlNode(_24.tag,result[0]); -node.appendChild(AMcreateMmlNode("mo",document.createTextNode(_24.output))); -return [node,result[1]]; -}else{ -if(!isIE&&typeof _24.codes!="undefined"){ -for(i=0;i64&&st.charCodeAt(j)<91){ -_25=_25+String.fromCharCode(_24.codes[st.charCodeAt(j)-65]); -}else{ -_25=_25+st.charAt(j); -} -} -if(result[0].nodeName=="mi"){ -result[0]=AMcreateElementMathML("mo").appendChild(document.createTextNode(_25)); -}else{ -result[0].replaceChild(AMcreateElementMathML("mo").appendChild(document.createTextNode(_25)),result[0].childNodes[i]); -} -} -} -} -node=AMcreateMmlNode(_24.tag,result[0]); -node.setAttribute(_24.atname,_24.atval); -return [node,result[1]]; -} -} -case BINARY: -str=AMremoveCharsAndBlanks(str,_24.input.length); -result=AMparseSexpr(str); -if(result[0]==null){ -return [AMcreateMmlNode("mo",document.createTextNode(_24.input)),str]; -} -AMremoveBrackets(result[0]); -var _27=AMparseSexpr(result[1]); -if(_27[0]==null){ -return [AMcreateMmlNode("mo",document.createTextNode(_24.input)),str]; -} -AMremoveBrackets(_27[0]); -if(_24.input=="root"||_24.input=="stackrel"){ -newFrag.appendChild(_27[0]); -} -newFrag.appendChild(result[0]); -if(_24.input=="frac"){ -newFrag.appendChild(_27[0]); -} -return [AMcreateMmlNode(_24.tag,newFrag),_27[1]]; -case INFIX: -str=AMremoveCharsAndBlanks(str,_24.input.length); -return [AMcreateMmlNode("mo",document.createTextNode(_24.output)),str]; -case SPACE: -str=AMremoveCharsAndBlanks(str,_24.input.length); -node=AMcreateElementMathML("mspace"); -node.setAttribute("width","1ex"); -newFrag.appendChild(node); -newFrag.appendChild(AMcreateMmlNode(_24.tag,document.createTextNode(_24.output))); -node=AMcreateElementMathML("mspace"); -node.setAttribute("width","1ex"); -newFrag.appendChild(node); -return [AMcreateMmlNode("mrow",newFrag),str]; -case LEFTRIGHT: -AMnestingDepth++; -str=AMremoveCharsAndBlanks(str,_24.input.length); -result=AMparseExpr(str,false); -AMnestingDepth--; -var st=""; -if(result[0].lastChild!=null){ -st=result[0].lastChild.firstChild.nodeValue; -} -if(st=="|"){ -node=AMcreateMmlNode("mo",document.createTextNode(_24.output)); -node=AMcreateMmlNode("mrow",node); -node.appendChild(result[0]); -return [node,result[1]]; -}else{ -node=AMcreateMmlNode("mo",document.createTextNode(_24.output)); -node=AMcreateMmlNode("mrow",node); -return [node,str]; -} -default: -str=AMremoveCharsAndBlanks(str,_24.input.length); -return [AMcreateMmlNode(_24.tag,document.createTextNode(_24.output)),str]; -} -} -function AMparseIexpr(str){ -var _2a,sym1,sym2,node,result,underover; -str=AMremoveCharsAndBlanks(str,0); -sym1=AMgetSymbol(str); -result=AMparseSexpr(str); -node=result[0]; -str=result[1]; -_2a=AMgetSymbol(str); -if(_2a.ttype==INFIX&&_2a.input!="/"){ -str=AMremoveCharsAndBlanks(str,_2a.input.length); -result=AMparseSexpr(str); -if(result[0]==null){ -result[0]=AMcreateMmlNode("mo",document.createTextNode("\u25a1")); -}else{ -AMremoveBrackets(result[0]); -} -str=result[1]; -if(_2a.input=="_"){ -sym2=AMgetSymbol(str); -underover=(sym1.ttype==UNDEROVER); -if(sym2.input=="^"){ -str=AMremoveCharsAndBlanks(str,sym2.input.length); -var _2b=AMparseSexpr(str); -AMremoveBrackets(_2b[0]); -str=_2b[1]; -node=AMcreateMmlNode((underover?"munderover":"msubsup"),node); -node.appendChild(result[0]); -node.appendChild(_2b[0]); -node=AMcreateMmlNode("mrow",node); -}else{ -node=AMcreateMmlNode((underover?"munder":"msub"),node); -node.appendChild(result[0]); -} -}else{ -node=AMcreateMmlNode(_2a.tag,node); -node.appendChild(result[0]); -} -} -return [node,str]; -} -function AMparseExpr(str,_2d){ -var _2e,node,result,i,nodeList=[],newFrag=document.createDocumentFragment(); -do{ -str=AMremoveCharsAndBlanks(str,0); -result=AMparseIexpr(str); -node=result[0]; -str=result[1]; -_2e=AMgetSymbol(str); -if(_2e.ttype==INFIX&&_2e.input=="/"){ -str=AMremoveCharsAndBlanks(str,_2e.input.length); -result=AMparseIexpr(str); -if(result[0]==null){ -result[0]=AMcreateMmlNode("mo",document.createTextNode("\u25a1")); -}else{ -AMremoveBrackets(result[0]); -} -str=result[1]; -AMremoveBrackets(node); -node=AMcreateMmlNode(_2e.tag,node); -node.appendChild(result[0]); -newFrag.appendChild(node); -_2e=AMgetSymbol(str); -}else{ -if(node!=undefined){ -newFrag.appendChild(node); -} -} -}while((_2e.ttype!=RIGHTBRACKET&&(_2e.ttype!=LEFTRIGHT||_2d)||AMnestingDepth==0)&&_2e!=null&&_2e.output!=""); -if(_2e.ttype==RIGHTBRACKET||_2e.ttype==LEFTRIGHT){ -var len=newFrag.childNodes.length; -if(len>0&&newFrag.childNodes[len-1].nodeName=="mrow"&&len>1&&newFrag.childNodes[len-2].nodeName=="mo"&&newFrag.childNodes[len-2].firstChild.nodeValue==","){ -var _30=newFrag.childNodes[len-1].lastChild.firstChild.nodeValue; -if(_30==")"||_30=="]"){ -var _31=newFrag.childNodes[len-1].firstChild.firstChild.nodeValue; -if(_31=="("&&_30==")"&&_2e.output!="}"||_31=="["&&_30=="]"){ -var pos=[]; -var _33=true; -var m=newFrag.childNodes.length; -for(i=0;_33&&i1){ -_33=pos[i].length==pos[i-2].length; -} -} -if(_33){ -var row,frag,n,k,table=document.createDocumentFragment(); -for(i=0;i2){ -newFrag.removeChild(newFrag.firstChild); -newFrag.removeChild(newFrag.firstChild); -} -table.appendChild(AMcreateMmlNode("mtr",row)); -} -node=AMcreateMmlNode("mtable",table); -if(typeof _2e.invisible=="boolean"&&_2e.invisible){ -node.setAttribute("columnalign","left"); -} -newFrag.replaceChild(node,newFrag.firstChild); -} -} -} -} -str=AMremoveCharsAndBlanks(str,_2e.input.length); -if(typeof _2e.invisible!="boolean"||!_2e.invisible){ -node=AMcreateMmlNode("mo",document.createTextNode(_2e.output)); -newFrag.appendChild(node); -} -} -return [newFrag,str]; -} -function AMparseMath(str){ -var _38,node=AMcreateElementMathML("mstyle"); -if(mathcolor!=""){ -node.setAttribute("mathcolor",mathcolor); -} -if(displaystyle){ -node.setAttribute("displaystyle","true"); -} -if(mathfontfamily!=""){ -node.setAttribute("fontfamily",mathfontfamily); -} -AMnestingDepth=0; -node.appendChild(AMparseExpr(str.replace(/^\s+/g,""),false)[0]); -node=AMcreateMmlNode("math",node); -if(showasciiformulaonhover){ -node.setAttribute("title",str.replace(/\s+/g," ")); -} -if(mathfontfamily!=""&&(isIE||mathfontfamily!="serif")){ -var _39=AMcreateElementXHTML("font"); -_39.setAttribute("face",mathfontfamily); -_39.appendChild(node); -return _39; -} -return node; -} -function AMstrarr2docFrag(arr,_3b){ -var _3c=document.createDocumentFragment(); -var _3d=false; -for(var i=0;i1||_43){ -if(checkForMathML){ -checkForMathML=false; -var nd=AMisMathMLavailable(); -AMnoMathML=nd!=null; -if(AMnoMathML&¬ifyIfNoMathML){ -if(alertIfNoMathML){ -alert("To view the ASCIIMathML notation use Internet Explorer 6 +\nMathPlayer (free from www.dessci.com)\n or Firefox/Mozilla/Netscape"); -}else{ -AMbody.insertBefore(nd,AMbody.childNodes[0]); -} -} -} -if(!AMnoMathML){ -frg=AMstrarr2docFrag(arr,n.nodeType==8); -var len=frg.childNodes.length; -n.parentNode.replaceChild(frg,n); -return len-1; -}else{ -return 0; -} -} -} -}else{ -return 0; -} -}else{ -if(n.nodeName!="math"){ -for(i=0;i"); -document.write("<"+"?import namespace=\"m\" implementation=\"#mathplayer\"?>"); -} -function generic(){ -translate(); -} -if(typeof window.addEventListener!="undefined"){ -window.addEventListener("load",generic,false); -}else{ -if(typeof document.addEventListener!="undefined"){ -document.addEventListener("load",generic,false); -}else{ -if(typeof window.attachEvent!="undefined"){ -window.attachEvent("onload",generic); -}else{ -if(typeof window.onload=="function"){ -var existing=onload; -window.onload=function(){ -existing(); -generic(); -}; -}else{ -window.onload=generic; -} -} -} -} - +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +var checkForMathML=true;var notifyIfNoMathML=true;var alertIfNoMathML=false;if(typeof mathcolor=="undefined"){var mathcolor="red"}if(typeof mathfontfamily=="undefined"){var mathfontfamily="serif"}var displaystyle=true;if(typeof showasciiformulaonhover=="undefined"){var showasciiformulaonhover=true}var decimalsign=".";var AMdelimiter1="`",AMescape1="\\\\`";var AMdelimiter2="$",AMescape2="\\\\\\$",AMdelimiter2regexp="\\$";var doubleblankmathdelimiter=false;var isIE=document.createElementNS==null;if(document.getElementById==null){alert("This webpage requires a recent browser such as\nMozilla/Netscape 7+ or Internet Explorer 6+MathPlayer")}function AMcreateElementXHTML(a){if(isIE){return document.createElement(a)}else{return document.createElementNS("http://www.w3.org/1999/xhtml",a)}}function AMnoMathMLNote(){var b=AMcreateElementXHTML("h3");b.setAttribute("align","center");b.appendChild(AMcreateElementXHTML("p"));b.appendChild(document.createTextNode("To view the "));var a=AMcreateElementXHTML("a");a.appendChild(document.createTextNode("ASCIIMathML"));a.setAttribute("href","http://www.chapman.edu/~jipsen/asciimath.html");b.appendChild(a);b.appendChild(document.createTextNode(" notation use Internet Explorer 6+"));a=AMcreateElementXHTML("a");a.appendChild(document.createTextNode("MathPlayer"));a.setAttribute("href","http://www.dessci.com/en/products/mathplayer/download.htm");b.appendChild(a);b.appendChild(document.createTextNode(" or Netscape/Mozilla/Firefox"));b.appendChild(AMcreateElementXHTML("p"));return b}function AMisMathMLavailable(){if(navigator.appName.slice(0,8)=="Netscape"){if(navigator.appVersion.slice(0,1)>="5"){return null}else{return AMnoMathMLNote()}}else{if(navigator.appName.slice(0,9)=="Microsoft"){try{var b=new ActiveXObject("MathPlayer.Factory.1");return null}catch(a){return AMnoMathMLNote()}}else{return AMnoMathMLNote()}}}var AMcal=[61237,8492,61238,61239,8496,8497,61240,8459,8464,61241,61242,8466,8499,61243,61244,61245,61246,8475,61247,61248,61249,61250,61251,61252,61253,61254];var AMfrk=[61277,61278,8493,61279,61280,61281,61282,8460,8465,61283,61284,61285,61286,61287,61288,61289,61290,8476,61291,61292,61293,61294,61295,61296,61297,8488];var AMbbb=[61324,61325,8450,61326,61327,61328,61329,8461,61330,61331,61332,61333,61334,8469,61335,8473,8474,8477,61336,61337,61338,61339,61340,61341,61342,8484];var CONST=0,UNARY=1,BINARY=2,INFIX=3,LEFTBRACKET=4,RIGHTBRACKET=5,SPACE=6,UNDEROVER=7,DEFINITION=8,LEFTRIGHT=9,TEXT=10;var AMsqrt={input:"sqrt",tag:"msqrt",output:"sqrt",tex:null,ttype:UNARY},AMroot={input:"root",tag:"mroot",output:"root",tex:null,ttype:BINARY},AMfrac={input:"frac",tag:"mfrac",output:"/",tex:null,ttype:BINARY},AMdiv={input:"/",tag:"mfrac",output:"/",tex:null,ttype:INFIX},AMover={input:"stackrel",tag:"mover",output:"stackrel",tex:null,ttype:BINARY},AMsub={input:"_",tag:"msub",output:"_",tex:null,ttype:INFIX},AMsup={input:"^",tag:"msup",output:"^",tex:null,ttype:INFIX},AMtext={input:"text",tag:"mtext",output:"text",tex:null,ttype:TEXT},AMmbox={input:"mbox",tag:"mtext",output:"mbox",tex:null,ttype:TEXT},AMquote={input:'"',tag:"mtext",output:"mbox",tex:null,ttype:TEXT};var AMsymbols=[{input:"alpha",tag:"mi",output:"\u03B1",tex:null,ttype:CONST},{input:"beta",tag:"mi",output:"\u03B2",tex:null,ttype:CONST},{input:"chi",tag:"mi",output:"\u03C7",tex:null,ttype:CONST},{input:"delta",tag:"mi",output:"\u03B4",tex:null,ttype:CONST},{input:"Delta",tag:"mo",output:"\u0394",tex:null,ttype:CONST},{input:"epsi",tag:"mi",output:"\u03B5",tex:"epsilon",ttype:CONST},{input:"varepsilon",tag:"mi",output:"\u025B",tex:null,ttype:CONST},{input:"eta",tag:"mi",output:"\u03B7",tex:null,ttype:CONST},{input:"gamma",tag:"mi",output:"\u03B3",tex:null,ttype:CONST},{input:"Gamma",tag:"mo",output:"\u0393",tex:null,ttype:CONST},{input:"iota",tag:"mi",output:"\u03B9",tex:null,ttype:CONST},{input:"kappa",tag:"mi",output:"\u03BA",tex:null,ttype:CONST},{input:"lambda",tag:"mi",output:"\u03BB",tex:null,ttype:CONST},{input:"Lambda",tag:"mo",output:"\u039B",tex:null,ttype:CONST},{input:"mu",tag:"mi",output:"\u03BC",tex:null,ttype:CONST},{input:"nu",tag:"mi",output:"\u03BD",tex:null,ttype:CONST},{input:"omega",tag:"mi",output:"\u03C9",tex:null,ttype:CONST},{input:"Omega",tag:"mo",output:"\u03A9",tex:null,ttype:CONST},{input:"phi",tag:"mi",output:"\u03C6",tex:null,ttype:CONST},{input:"varphi",tag:"mi",output:"\u03D5",tex:null,ttype:CONST},{input:"Phi",tag:"mo",output:"\u03A6",tex:null,ttype:CONST},{input:"pi",tag:"mi",output:"\u03C0",tex:null,ttype:CONST},{input:"Pi",tag:"mo",output:"\u03A0",tex:null,ttype:CONST},{input:"psi",tag:"mi",output:"\u03C8",tex:null,ttype:CONST},{input:"Psi",tag:"mi",output:"\u03A8",tex:null,ttype:CONST},{input:"rho",tag:"mi",output:"\u03C1",tex:null,ttype:CONST},{input:"sigma",tag:"mi",output:"\u03C3",tex:null,ttype:CONST},{input:"Sigma",tag:"mo",output:"\u03A3",tex:null,ttype:CONST},{input:"tau",tag:"mi",output:"\u03C4",tex:null,ttype:CONST},{input:"theta",tag:"mi",output:"\u03B8",tex:null,ttype:CONST},{input:"vartheta",tag:"mi",output:"\u03D1",tex:null,ttype:CONST},{input:"Theta",tag:"mo",output:"\u0398",tex:null,ttype:CONST},{input:"upsilon",tag:"mi",output:"\u03C5",tex:null,ttype:CONST},{input:"xi",tag:"mi",output:"\u03BE",tex:null,ttype:CONST},{input:"Xi",tag:"mo",output:"\u039E",tex:null,ttype:CONST},{input:"zeta",tag:"mi",output:"\u03B6",tex:null,ttype:CONST},{input:"*",tag:"mo",output:"\u22C5",tex:"cdot",ttype:CONST},{input:"**",tag:"mo",output:"\u22C6",tex:"star",ttype:CONST},{input:"//",tag:"mo",output:"/",tex:null,ttype:CONST},{input:"\\\\",tag:"mo",output:"\\",tex:"backslash",ttype:CONST},{input:"setminus",tag:"mo",output:"\\",tex:null,ttype:CONST},{input:"xx",tag:"mo",output:"\u00D7",tex:"times",ttype:CONST},{input:"-:",tag:"mo",output:"\u00F7",tex:"divide",ttype:CONST},{input:"@",tag:"mo",output:"\u2218",tex:"circ",ttype:CONST},{input:"o+",tag:"mo",output:"\u2295",tex:"oplus",ttype:CONST},{input:"ox",tag:"mo",output:"\u2297",tex:"otimes",ttype:CONST},{input:"o.",tag:"mo",output:"\u2299",tex:"odot",ttype:CONST},{input:"sum",tag:"mo",output:"\u2211",tex:null,ttype:UNDEROVER},{input:"prod",tag:"mo",output:"\u220F",tex:null,ttype:UNDEROVER},{input:"^^",tag:"mo",output:"\u2227",tex:"wedge",ttype:CONST},{input:"^^^",tag:"mo",output:"\u22C0",tex:"bigwedge",ttype:UNDEROVER},{input:"vv",tag:"mo",output:"\u2228",tex:"vee",ttype:CONST},{input:"vvv",tag:"mo",output:"\u22C1",tex:"bigvee",ttype:UNDEROVER},{input:"nn",tag:"mo",output:"\u2229",tex:"cap",ttype:CONST},{input:"nnn",tag:"mo",output:"\u22C2",tex:"bigcap",ttype:UNDEROVER},{input:"uu",tag:"mo",output:"\u222A",tex:"cup",ttype:CONST},{input:"uuu",tag:"mo",output:"\u22C3",tex:"bigcup",ttype:UNDEROVER},{input:"!=",tag:"mo",output:"\u2260",tex:"ne",ttype:CONST},{input:":=",tag:"mo",output:":=",tex:null,ttype:CONST},{input:"lt",tag:"mo",output:"<",tex:null,ttype:CONST},{input:"<=",tag:"mo",output:"\u2264",tex:"le",ttype:CONST},{input:"lt=",tag:"mo",output:"\u2264",tex:"leq",ttype:CONST},{input:">=",tag:"mo",output:"\u2265",tex:"ge",ttype:CONST},{input:"geq",tag:"mo",output:"\u2265",tex:null,ttype:CONST},{input:"-<",tag:"mo",output:"\u227A",tex:"prec",ttype:CONST},{input:"-lt",tag:"mo",output:"\u227A",tex:null,ttype:CONST},{input:">-",tag:"mo",output:"\u227B",tex:"succ",ttype:CONST},{input:"-<=",tag:"mo",output:"\u2AAF",tex:"preceq",ttype:CONST},{input:">-=",tag:"mo",output:"\u2AB0",tex:"succeq",ttype:CONST},{input:"in",tag:"mo",output:"\u2208",tex:null,ttype:CONST},{input:"!in",tag:"mo",output:"\u2209",tex:"notin",ttype:CONST},{input:"sub",tag:"mo",output:"\u2282",tex:"subset",ttype:CONST},{input:"sup",tag:"mo",output:"\u2283",tex:"supset",ttype:CONST},{input:"sube",tag:"mo",output:"\u2286",tex:"subseteq",ttype:CONST},{input:"supe",tag:"mo",output:"\u2287",tex:"supseteq",ttype:CONST},{input:"-=",tag:"mo",output:"\u2261",tex:"equiv",ttype:CONST},{input:"~=",tag:"mo",output:"\u2245",tex:"cong",ttype:CONST},{input:"~~",tag:"mo",output:"\u2248",tex:"approx",ttype:CONST},{input:"prop",tag:"mo",output:"\u221D",tex:"propto",ttype:CONST},{input:"and",tag:"mtext",output:"and",tex:null,ttype:SPACE},{input:"or",tag:"mtext",output:"or",tex:null,ttype:SPACE},{input:"not",tag:"mo",output:"\u00AC",tex:"neg",ttype:CONST},{input:"=>",tag:"mo",output:"\u21D2",tex:"implies",ttype:CONST},{input:"if",tag:"mo",output:"if",tex:null,ttype:SPACE},{input:"<=>",tag:"mo",output:"\u21D4",tex:"iff",ttype:CONST},{input:"AA",tag:"mo",output:"\u2200",tex:"forall",ttype:CONST},{input:"EE",tag:"mo",output:"\u2203",tex:"exists",ttype:CONST},{input:"_|_",tag:"mo",output:"\u22A5",tex:"bot",ttype:CONST},{input:"TT",tag:"mo",output:"\u22A4",tex:"top",ttype:CONST},{input:"|--",tag:"mo",output:"\u22A2",tex:"vdash",ttype:CONST},{input:"|==",tag:"mo",output:"\u22A8",tex:"models",ttype:CONST},{input:"(",tag:"mo",output:"(",tex:null,ttype:LEFTBRACKET},{input:")",tag:"mo",output:")",tex:null,ttype:RIGHTBRACKET},{input:"[",tag:"mo",output:"[",tex:null,ttype:LEFTBRACKET},{input:"]",tag:"mo",output:"]",tex:null,ttype:RIGHTBRACKET},{input:"{",tag:"mo",output:"{",tex:null,ttype:LEFTBRACKET},{input:"}",tag:"mo",output:"}",tex:null,ttype:RIGHTBRACKET},{input:"|",tag:"mo",output:"|",tex:null,ttype:LEFTRIGHT},{input:"(:",tag:"mo",output:"\u2329",tex:"langle",ttype:LEFTBRACKET},{input:":)",tag:"mo",output:"\u232A",tex:"rangle",ttype:RIGHTBRACKET},{input:"<<",tag:"mo",output:"\u2329",tex:null,ttype:LEFTBRACKET},{input:">>",tag:"mo",output:"\u232A",tex:null,ttype:RIGHTBRACKET},{input:"{:",tag:"mo",output:"{:",tex:null,ttype:LEFTBRACKET,invisible:true},{input:":}",tag:"mo",output:":}",tex:null,ttype:RIGHTBRACKET,invisible:true},{input:"int",tag:"mo",output:"\u222B",tex:null,ttype:CONST},{input:"dx",tag:"mi",output:"{:d x:}",tex:null,ttype:DEFINITION},{input:"dy",tag:"mi",output:"{:d y:}",tex:null,ttype:DEFINITION},{input:"dz",tag:"mi",output:"{:d z:}",tex:null,ttype:DEFINITION},{input:"dt",tag:"mi",output:"{:d t:}",tex:null,ttype:DEFINITION},{input:"oint",tag:"mo",output:"\u222E",tex:null,ttype:CONST},{input:"del",tag:"mo",output:"\u2202",tex:"partial",ttype:CONST},{input:"grad",tag:"mo",output:"\u2207",tex:"nabla",ttype:CONST},{input:"+-",tag:"mo",output:"\u00B1",tex:"pm",ttype:CONST},{input:"O/",tag:"mo",output:"\u2205",tex:"emptyset",ttype:CONST},{input:"oo",tag:"mo",output:"\u221E",tex:"infty",ttype:CONST},{input:"aleph",tag:"mo",output:"\u2135",tex:null,ttype:CONST},{input:"...",tag:"mo",output:"...",tex:"ldots",ttype:CONST},{input:":.",tag:"mo",output:"\u2234",tex:"therefore",ttype:CONST},{input:"/_",tag:"mo",output:"\u2220",tex:"angle",ttype:CONST},{input:"\\ ",tag:"mo",output:"\u00A0",tex:null,ttype:CONST},{input:"quad",tag:"mo",output:"\u00A0\u00A0",tex:null,ttype:CONST},{input:"qquad",tag:"mo",output:"\u00A0\u00A0\u00A0\u00A0",tex:null,ttype:CONST},{input:"cdots",tag:"mo",output:"\u22EF",tex:null,ttype:CONST},{input:"vdots",tag:"mo",output:"\u22EE",tex:null,ttype:CONST},{input:"ddots",tag:"mo",output:"\u22F1",tex:null,ttype:CONST},{input:"diamond",tag:"mo",output:"\u22C4",tex:null,ttype:CONST},{input:"square",tag:"mo",output:"\u25A1",tex:null,ttype:CONST},{input:"|__",tag:"mo",output:"\u230A",tex:"lfloor",ttype:CONST},{input:"__|",tag:"mo",output:"\u230B",tex:"rfloor",ttype:CONST},{input:"|~",tag:"mo",output:"\u2308",tex:"lceiling",ttype:CONST},{input:"~|",tag:"mo",output:"\u2309",tex:"rceiling",ttype:CONST},{input:"CC",tag:"mo",output:"\u2102",tex:null,ttype:CONST},{input:"NN",tag:"mo",output:"\u2115",tex:null,ttype:CONST},{input:"QQ",tag:"mo",output:"\u211A",tex:null,ttype:CONST},{input:"RR",tag:"mo",output:"\u211D",tex:null,ttype:CONST},{input:"ZZ",tag:"mo",output:"\u2124",tex:null,ttype:CONST},{input:"f",tag:"mi",output:"f",tex:null,ttype:UNARY,func:true},{input:"g",tag:"mi",output:"g",tex:null,ttype:UNARY,func:true},{input:"lim",tag:"mo",output:"lim",tex:null,ttype:UNDEROVER},{input:"Lim",tag:"mo",output:"Lim",tex:null,ttype:UNDEROVER},{input:"sin",tag:"mo",output:"sin",tex:null,ttype:UNARY,func:true},{input:"cos",tag:"mo",output:"cos",tex:null,ttype:UNARY,func:true},{input:"tan",tag:"mo",output:"tan",tex:null,ttype:UNARY,func:true},{input:"sinh",tag:"mo",output:"sinh",tex:null,ttype:UNARY,func:true},{input:"cosh",tag:"mo",output:"cosh",tex:null,ttype:UNARY,func:true},{input:"tanh",tag:"mo",output:"tanh",tex:null,ttype:UNARY,func:true},{input:"cot",tag:"mo",output:"cot",tex:null,ttype:UNARY,func:true},{input:"sec",tag:"mo",output:"sec",tex:null,ttype:UNARY,func:true},{input:"csc",tag:"mo",output:"csc",tex:null,ttype:UNARY,func:true},{input:"log",tag:"mo",output:"log",tex:null,ttype:UNARY,func:true},{input:"ln",tag:"mo",output:"ln",tex:null,ttype:UNARY,func:true},{input:"det",tag:"mo",output:"det",tex:null,ttype:UNARY,func:true},{input:"dim",tag:"mo",output:"dim",tex:null,ttype:CONST},{input:"mod",tag:"mo",output:"mod",tex:null,ttype:CONST},{input:"gcd",tag:"mo",output:"gcd",tex:null,ttype:UNARY,func:true},{input:"lcm",tag:"mo",output:"lcm",tex:null,ttype:UNARY,func:true},{input:"lub",tag:"mo",output:"lub",tex:null,ttype:CONST},{input:"glb",tag:"mo",output:"glb",tex:null,ttype:CONST},{input:"min",tag:"mo",output:"min",tex:null,ttype:UNDEROVER},{input:"max",tag:"mo",output:"max",tex:null,ttype:UNDEROVER},{input:"uarr",tag:"mo",output:"\u2191",tex:"uparrow",ttype:CONST},{input:"darr",tag:"mo",output:"\u2193",tex:"downarrow",ttype:CONST},{input:"rarr",tag:"mo",output:"\u2192",tex:"rightarrow",ttype:CONST},{input:"->",tag:"mo",output:"\u2192",tex:"to",ttype:CONST},{input:"|->",tag:"mo",output:"\u21A6",tex:"mapsto",ttype:CONST},{input:"larr",tag:"mo",output:"\u2190",tex:"leftarrow",ttype:CONST},{input:"harr",tag:"mo",output:"\u2194",tex:"leftrightarrow",ttype:CONST},{input:"rArr",tag:"mo",output:"\u21D2",tex:"Rightarrow",ttype:CONST},{input:"lArr",tag:"mo",output:"\u21D0",tex:"Leftarrow",ttype:CONST},{input:"hArr",tag:"mo",output:"\u21D4",tex:"Leftrightarrow",ttype:CONST},AMsqrt,AMroot,AMfrac,AMdiv,AMover,AMsub,AMsup,{input:"hat",tag:"mover",output:"\u005E",tex:null,ttype:UNARY,acc:true},{input:"bar",tag:"mover",output:"\u00AF",tex:"overline",ttype:UNARY,acc:true},{input:"vec",tag:"mover",output:"\u2192",tex:null,ttype:UNARY,acc:true},{input:"dot",tag:"mover",output:".",tex:null,ttype:UNARY,acc:true},{input:"ddot",tag:"mover",output:"..",tex:null,ttype:UNARY,acc:true},{input:"ul",tag:"munder",output:"\u0332",tex:"underline",ttype:UNARY,acc:true},AMtext,AMmbox,AMquote,{input:"bb",tag:"mstyle",atname:"fontweight",atval:"bold",output:"bb",tex:null,ttype:UNARY},{input:"mathbf",tag:"mstyle",atname:"fontweight",atval:"bold",output:"mathbf",tex:null,ttype:UNARY},{input:"sf",tag:"mstyle",atname:"fontfamily",atval:"sans-serif",output:"sf",tex:null,ttype:UNARY},{input:"mathsf",tag:"mstyle",atname:"fontfamily",atval:"sans-serif",output:"mathsf",tex:null,ttype:UNARY},{input:"bbb",tag:"mstyle",atname:"mathvariant",atval:"double-struck",output:"bbb",tex:null,ttype:UNARY,codes:AMbbb},{input:"mathbb",tag:"mstyle",atname:"mathvariant",atval:"double-struck",output:"mathbb",tex:null,ttype:UNARY,codes:AMbbb},{input:"cc",tag:"mstyle",atname:"mathvariant",atval:"script",output:"cc",tex:null,ttype:UNARY,codes:AMcal},{input:"mathcal",tag:"mstyle",atname:"mathvariant",atval:"script",output:"mathcal",tex:null,ttype:UNARY,codes:AMcal},{input:"tt",tag:"mstyle",atname:"fontfamily",atval:"monospace",output:"tt",tex:null,ttype:UNARY},{input:"mathtt",tag:"mstyle",atname:"fontfamily",atval:"monospace",output:"mathtt",tex:null,ttype:UNARY},{input:"fr",tag:"mstyle",atname:"mathvariant",atval:"fraktur",output:"fr",tex:null,ttype:UNARY,codes:AMfrk},{input:"mathfrak",tag:"mstyle",atname:"mathvariant",atval:"fraktur",output:"mathfrak",tex:null,ttype:UNARY,codes:AMfrk}];function compareNames(b,a){if(b.input>a.input){return 1}else{return -1}}var AMnames=[];function AMinitSymbols(){var b=[],a;for(a=0;a>1;if(b[a]=AMnames[a]}AMpreviousSymbol=AMcurrentSymbol;if(e!=""){AMcurrentSymbol=AMsymbols[d].ttype;return AMsymbols[d]}AMcurrentSymbol=CONST;a=1;m=g.slice(0,1);var h=true;while("0"<=m&&m<="9"&&a<=g.length){m=g.slice(a,a+1);a++}if(m==decimalsign){m=g.slice(a,a+1);if("0"<=m&&m<="9"){h=false;a++;while("0"<=m&&m<="9"&&a<=g.length){m=g.slice(a,a+1);a++}}}if((h&&a>1)||a>2){m=g.slice(0,a-1);l="mn"}else{a=2;m=g.slice(0,1);l=(("A">m||m>"Z")&&("a">m||m>"z")?"mo":"mi")}if(m=="-"&&AMpreviousSymbol==INFIX){AMcurrentSymbol=INFIX;return{input:m,tag:l,output:m,ttype:UNARY,func:true}}return{input:m,tag:l,output:m,ttype:CONST}}function AMremoveBrackets(b){var a;if(b.nodeName=="mrow"){a=b.firstChild.firstChild.nodeValue;if(a=="("||a=="["||a=="{"){b.removeChild(b.firstChild)}}if(b.nodeName=="mrow"){a=b.lastChild.firstChild.nodeValue;if(a==")"||a=="]"||a=="}"){b.removeChild(b.lastChild)}}}var AMnestingDepth,AMpreviousSymbol,AMcurrentSymbol;function AMparseSexpr(g){var c,b,l,e,k,f=document.createDocumentFragment();g=AMremoveCharsAndBlanks(g,0);c=AMgetSymbol(g);if(c==null||c.ttype==RIGHTBRACKET&&AMnestingDepth>0){return[null,g]}if(c.ttype==DEFINITION){g=c.output+AMremoveCharsAndBlanks(g,c.input.length);c=AMgetSymbol(g)}switch(c.ttype){case UNDEROVER:case CONST:g=AMremoveCharsAndBlanks(g,c.input.length);return[AMcreateMmlNode(c.tag,document.createTextNode(c.output)),g];case LEFTBRACKET:AMnestingDepth++;g=AMremoveCharsAndBlanks(g,c.input.length);l=AMparseExpr(g,true);AMnestingDepth--;if(typeof c.invisible=="boolean"&&c.invisible){b=AMcreateMmlNode("mrow",l[0])}else{b=AMcreateMmlNode("mo",document.createTextNode(c.output));b=AMcreateMmlNode("mrow",b);b.appendChild(l[0])}return[b,l[1]];case TEXT:if(c!=AMquote){g=AMremoveCharsAndBlanks(g,c.input.length)}if(g.charAt(0)=="{"){e=g.indexOf("}")}else{if(g.charAt(0)=="("){e=g.indexOf(")")}else{if(g.charAt(0)=="["){e=g.indexOf("]")}else{if(c==AMquote){e=g.slice(1).indexOf('"')+1}else{e=0}}}}if(e==-1){e=g.length}k=g.slice(1,e);if(k.charAt(0)==" "){b=AMcreateElementMathML("mspace");b.setAttribute("width","1ex");f.appendChild(b)}f.appendChild(AMcreateMmlNode(c.tag,document.createTextNode(k)));if(k.charAt(k.length-1)==" "){b=AMcreateElementMathML("mspace");b.setAttribute("width","1ex");f.appendChild(b)}g=AMremoveCharsAndBlanks(g,e+1);return[AMcreateMmlNode("mrow",f),g];case UNARY:g=AMremoveCharsAndBlanks(g,c.input.length);l=AMparseSexpr(g);if(l[0]==null){return[AMcreateMmlNode(c.tag,document.createTextNode(c.output)),g]}if(typeof c.func=="boolean"&&c.func){k=g.charAt(0);if(k=="^"||k=="_"||k=="/"||k=="|"||k==","){return[AMcreateMmlNode(c.tag,document.createTextNode(c.output)),g]}else{b=AMcreateMmlNode("mrow",AMcreateMmlNode(c.tag,document.createTextNode(c.output)));b.appendChild(l[0]);return[b,l[1]]}}AMremoveBrackets(l[0]);if(c.input=="sqrt"){return[AMcreateMmlNode(c.tag,l[0]),l[1]]}else{if(typeof c.acc=="boolean"&&c.acc){b=AMcreateMmlNode(c.tag,l[0]);b.appendChild(AMcreateMmlNode("mo",document.createTextNode(c.output)));return[b,l[1]]}else{if(!isIE&&typeof c.codes!="undefined"){for(e=0;e64&&k.charCodeAt(d)<91){h=h+String.fromCharCode(c.codes[k.charCodeAt(d)-65])}else{h=h+k.charAt(d)}}if(l[0].nodeName=="mi"){l[0]=AMcreateElementMathML("mo").appendChild(document.createTextNode(h))}else{l[0].replaceChild(AMcreateElementMathML("mo").appendChild(document.createTextNode(h)),l[0].childNodes[e])}}}}b=AMcreateMmlNode(c.tag,l[0]);b.setAttribute(c.atname,c.atval);return[b,l[1]]}}case BINARY:g=AMremoveCharsAndBlanks(g,c.input.length);l=AMparseSexpr(g);if(l[0]==null){return[AMcreateMmlNode("mo",document.createTextNode(c.input)),g]}AMremoveBrackets(l[0]);var a=AMparseSexpr(l[1]);if(a[0]==null){return[AMcreateMmlNode("mo",document.createTextNode(c.input)),g]}AMremoveBrackets(a[0]);if(c.input=="root"||c.input=="stackrel"){f.appendChild(a[0])}f.appendChild(l[0]);if(c.input=="frac"){f.appendChild(a[0])}return[AMcreateMmlNode(c.tag,f),a[1]];case INFIX:g=AMremoveCharsAndBlanks(g,c.input.length);return[AMcreateMmlNode("mo",document.createTextNode(c.output)),g];case SPACE:g=AMremoveCharsAndBlanks(g,c.input.length);b=AMcreateElementMathML("mspace");b.setAttribute("width","1ex");f.appendChild(b);f.appendChild(AMcreateMmlNode(c.tag,document.createTextNode(c.output)));b=AMcreateElementMathML("mspace");b.setAttribute("width","1ex");f.appendChild(b);return[AMcreateMmlNode("mrow",f),g];case LEFTRIGHT:AMnestingDepth++;g=AMremoveCharsAndBlanks(g,c.input.length);l=AMparseExpr(g,false);AMnestingDepth--;var k="";if(l[0].lastChild!=null){k=l[0].lastChild.firstChild.nodeValue}if(k=="|"){b=AMcreateMmlNode("mo",document.createTextNode(c.output));b=AMcreateMmlNode("mrow",b);b.appendChild(l[0]);return[b,l[1]]}else{b=AMcreateMmlNode("mo",document.createTextNode(c.output));b=AMcreateMmlNode("mrow",b);return[b,g]}default:g=AMremoveCharsAndBlanks(g,c.input.length);return[AMcreateMmlNode(c.tag,document.createTextNode(c.output)),g]}}function AMparseIexpr(g){var e,h,f,d,a,c;g=AMremoveCharsAndBlanks(g,0);h=AMgetSymbol(g);a=AMparseSexpr(g);d=a[0];g=a[1];e=AMgetSymbol(g);if(e.ttype==INFIX&&e.input!="/"){g=AMremoveCharsAndBlanks(g,e.input.length);a=AMparseSexpr(g);if(a[0]==null){a[0]=AMcreateMmlNode("mo",document.createTextNode("\u25A1"))}else{AMremoveBrackets(a[0])}g=a[1];if(e.input=="_"){f=AMgetSymbol(g);c=(h.ttype==UNDEROVER);if(f.input=="^"){g=AMremoveCharsAndBlanks(g,f.input.length);var b=AMparseSexpr(g);AMremoveBrackets(b[0]);g=b[1];d=AMcreateMmlNode((c?"munderover":"msubsup"),d);d.appendChild(a[0]);d.appendChild(b[0]);d=AMcreateMmlNode("mrow",d)}else{d=AMcreateMmlNode((c?"munder":"msub"),d);d.appendChild(a[0])}}else{d=AMcreateMmlNode(e.tag,d);d.appendChild(a[0])}}return[d,g]}function AMparseExpr(l,h){var r,o,e,u,y=[],f=document.createDocumentFragment();do{l=AMremoveCharsAndBlanks(l,0);e=AMparseIexpr(l);o=e[0];l=e[1];r=AMgetSymbol(l);if(r.ttype==INFIX&&r.input=="/"){l=AMremoveCharsAndBlanks(l,r.input.length);e=AMparseIexpr(l);if(e[0]==null){e[0]=AMcreateMmlNode("mo",document.createTextNode("\u25A1"))}else{AMremoveBrackets(e[0])}l=e[1];AMremoveBrackets(o);o=AMcreateMmlNode(r.tag,o);o.appendChild(e[0]);f.appendChild(o);r=AMgetSymbol(l)}else{if(o!=undefined){f.appendChild(o)}}}while((r.ttype!=RIGHTBRACKET&&(r.ttype!=LEFTRIGHT||h)||AMnestingDepth==0)&&r!=null&&r.output!="");if(r.ttype==RIGHTBRACKET||r.ttype==LEFTRIGHT){var v=f.childNodes.length;if(v>0&&f.childNodes[v-1].nodeName=="mrow"&&v>1&&f.childNodes[v-2].nodeName=="mo"&&f.childNodes[v-2].firstChild.nodeValue==","){var x=f.childNodes[v-1].lastChild.firstChild.nodeValue;if(x==")"||x=="]"){var b=f.childNodes[v-1].firstChild.firstChild.nodeValue;if(b=="("&&x==")"&&r.output!="}"||b=="["&&x=="]"){var c=[];var s=true;var p=f.childNodes.length;for(u=0;s&&u1){s=c[u].length==c[u-2].length}}if(s){var d,a,g,q,w=document.createDocumentFragment();for(u=0;u2){f.removeChild(f.firstChild);f.removeChild(f.firstChild)}w.appendChild(AMcreateMmlNode("mtr",d))}o=AMcreateMmlNode("mtable",w);if(typeof r.invisible=="boolean"&&r.invisible){o.setAttribute("columnalign","left")}f.replaceChild(o,f.firstChild)}}}}l=AMremoveCharsAndBlanks(l,r.input.length);if(typeof r.invisible!="boolean"||!r.invisible){o=AMcreateMmlNode("mo",document.createTextNode(r.output));f.appendChild(o)}}return[f,l]}function AMparseMath(d){var a,c=AMcreateElementMathML("mstyle");if(mathcolor!=""){c.setAttribute("mathcolor",mathcolor)}if(displaystyle){c.setAttribute("displaystyle","true")}if(mathfontfamily!=""){c.setAttribute("fontfamily",mathfontfamily)}AMnestingDepth=0;c.appendChild(AMparseExpr(d.replace(/^\s+/g,""),false)[0]);c=AMcreateMmlNode("math",c);if(showasciiformulaonhover){c.setAttribute("title",d.replace(/\s+/g," "))}if(mathfontfamily!=""&&(isIE||mathfontfamily!="serif")){var b=AMcreateElementXHTML("font");b.setAttribute("face",mathfontfamily);b.appendChild(c);return b}return c}function AMstrarr2docFrag(a,d){var g=document.createDocumentFragment();var f=false;for(var e=0;e1||j){if(checkForMathML){checkForMathML=false;var c=AMisMathMLavailable();AMnoMathML=c!=null;if(AMnoMathML&¬ifyIfNoMathML){if(alertIfNoMathML){alert("To view the ASCIIMathML notation use Internet Explorer 6 +\nMathPlayer (free from www.dessci.com)\n or Firefox/Mozilla/Netscape")}else{AMbody.insertBefore(c,AMbody.childNodes[0])}}}if(!AMnoMathML){a=AMstrarr2docFrag(e,b.nodeType==8);var f=a.childNodes.length;b.parentNode.replaceChild(a,b);return f-1}else{return 0}}}}else{return 0}}else{if(b.nodeName!="math"){for(d=0;d');document.write('')}function generic(){translate()}if(typeof window.addEventListener!="undefined"){window.addEventListener("load",generic,false)}else{if(typeof document.addEventListener!="undefined"){document.addEventListener("load",generic,false)}else{if(typeof window.attachEvent!="undefined"){window.attachEvent("onload",generic)}else{if(typeof window.onload=="function"){var existing=onload;window.onload=function(){existing();generic()}}else{window.onload=generic}}}}; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Equation/Equation.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Equation/Equation.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Equation/Equation.js 16 Jan 2009 09:05:47 -0000 1.1 @@ -0,0 +1,2 @@ +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +function Equation(c){this.editor=c;var a=c.config;var b=this;a.registerButton({id:"equation",tooltip:this._lc("Formula Editor"),image:c.imgURL("equation.gif","Equation"),textMode:false,action:function(d,f){b.buttonPress(d,f)}});a.addToolbarElement("equation","inserthorizontalrule",-1);mathcolor=a.Equation.mathcolor;mathfontfamily=a.Equation.mathfontfamily;this.enabled=!Xinha.is_ie;if(this.enabled){this.onBeforeSubmit=this.onBeforeUnload=function(){b.unParse()}}if(typeof AMprocessNode!="function"){Xinha._loadback(Xinha.getPluginDir("Equation")+"/ASCIIMathML.js",function(){translate()})}}Xinha.Config.prototype.Equation={mathcolor:"black",mathfontfamily:"serif"};Equation._pluginInfo={name:"ASCIIMathML Formula Editor",version:"2.3 (2008-01-26)",developer:"Raimund Meyer",developer_url:"http://x-webservice.net",c_owner:"",sponsor:"",sponsor_url:"",license:"GNU/LGPL"};Equation.prototype._lc=function(a){return Xinha._lc(a,"Equation")};Equation.prototype.onGenerate=function(){this.parse()};Equation.prototype.onKeyPress=function(b){if(this.enabled){e=this.editor;var a=e._getFirstAncestor(e.getSelection(),["span"]);if(a&&a.className=="AM"){if(b.keyCode==8||b.keyCode==46||b.charCode){Xinha._stopEvent(b);return true}}}return false};Equation.prototype.onBeforeMode=function(a){if(this.enabled&&a=="textmode"){this.unParse()}};Equation.prototype.onMode=function(a){if(this.enabled&&a=="wysiwyg"){this.parse()}};Equation.prototype.parse=function(){if(this.enabled){var f=this.editor._doc;var b=f.getElementsByTagName("span");for(var a=0;a'+c+"")}}}if(this.enabled){this.parse()}}}; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Equation/equation.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Equation/Attic/equation.js,v diff -u -N -r1.7 -r1.8 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Equation/equation.js 13 May 2008 18:53:48 -0000 1.7 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Equation/equation.js 16 Jan 2009 09:05:47 -0000 1.8 @@ -1,146 +1,2 @@ -/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */ -/* This file is part of version 0.95 released Mon, 12 May 2008 17:33:15 +0200 */ -/* The URL of the most recent version of this file is http://svn.xinha.webfactional.com/trunk/plugins/Equation/equation.js */ -function Equation(_1){ -this.editor=_1; -var _2=_1.config; -var _3=this; -_2.registerButton({id:"equation",tooltip:this._lc("Formula Editor"),image:_1.imgURL("equation.gif","Equation"),textMode:false,action:function(_4,id){ -_3.buttonPress(_4,id); -}}); -_2.addToolbarElement("equation","inserthorizontalrule",-1); -mathcolor=_2.Equation.mathcolor; -mathfontfamily=_2.Equation.mathfontfamily; -this.enabled=!Xinha.is_ie; -if(this.enabled){ -this.onBeforeSubmit=this.onBeforeUnload=function(){ -_3.unParse(); -}; -} -if(typeof AMprocessNode!="function"){ -Xinha._loadback(Xinha.getPluginDir("Equation")+"/ASCIIMathML.js",function(){ -translate(); -}); -} -} -Xinha.Config.prototype.Equation={"mathcolor":"black","mathfontfamily":"serif"}; -Equation._pluginInfo={name:"ASCIIMathML Formula Editor",version:"2.3 (2008-01-26)",developer:"Raimund Meyer",developer_url:"http://xinha.raimundmeyer.de",c_owner:"",sponsor:"",sponsor_url:"",license:"GNU/LGPL"}; -Equation.prototype._lc=function(_6){ -return Xinha._lc(_6,"Equation"); -}; -Equation.prototype.onGenerate=function(){ -this.parse(); -}; -Equation.prototype.onKeyPress=function(ev){ -if(this.enabled){ -e=this.editor; -var _8=e._getFirstAncestor(e.getSelection(),["span"]); -if(_8&&_8.className=="AM"){ -if(ev.keyCode==8||ev.keyCode==46||ev.charCode){ -Xinha._stopEvent(ev); -return true; -} -} -} -return false; -}; -Equation.prototype.onBeforeMode=function(_9){ -if(this.enabled&&_9=="textmode"){ -this.unParse(); -} -}; -Equation.prototype.onMode=function(_a){ -if(this.enabled&&_a=="wysiwyg"){ -this.parse(); -} -}; -Equation.prototype.parse=function(){ -if(this.enabled){ -var _b=this.editor._doc; -var _c=_b.getElementsByTagName("span"); -for(var i=0;i<_c.length;i++){ -var _e=_c[i]; -if(_e.className!="AM"){ -continue; -} -if(_e.innerHTML.indexOf(this.editor.cc)!=-1){ -_e.innerHTML=_e.innerHTML.replace(this.editor.cc,""); -_e.parentNode.insertBefore(_b.createTextNode(this.editor.cc),_e); -} -_e.title=_e.innerHTML; -var _f=_e.cloneNode(true); -try{ -document.adoptNode(_f); -} -catch(e){ -} -AMprocessNode(_f,false); -try{ -_b.adoptNode(_f); -} -catch(e){ -} -_e.parentNode.replaceChild(_f,_e); -_f.parentNode.insertBefore(_b.createTextNode(String.fromCharCode(32)),_f); -_f.parentNode.insertBefore(_b.createTextNode(String.fromCharCode(32)),_f.nextSibling); -} -} -}; -Equation.prototype.unParse=function(){ -var doc=this.editor._doc; -var _11=doc.getElementsByTagName("span"); -for(var i=0;i<_11.length;i++){ -var _13=_11[i]; -if(_13.className.indexOf("AM")==-1||_13.getElementsByTagName("math").length==0){ -continue; -} -var _14=_13.getAttribute("title"); -_13.innerHTML=_14; -_13.setAttribute("title",null); -} -}; -Equation.prototype.buttonPress=function(){ -var _15=this; -var _16=this.editor; -var _17={}; -_17["editor"]=_16; -var _18=_16._getFirstAncestor(_16.getSelection(),["span"]); -if(_18){ -_17["editedNode"]=_18; -} -Dialog(Xinha.getPluginDir("Equation")+"/popups/dialog.html",function(_19){ -_15.insert(_19); -},_17); -}; -Equation.prototype.insert=function(_1a){ -if(typeof _1a["formula"]!="undefined"){ -var _1b=(_1a["formula"]!="")?_1a["formula"].replace(/^`?(.*)`?$/m,"`$1`"):""; -if(_1a["editedNode"]&&(_1a["editedNode"].tagName.toLowerCase()=="span")){ -var _1c=_1a["editedNode"]; -if(_1b!=""){ -_1c.innerHTML=_1b; -if(this.enabled){ -_1c.title=_1b; -} -}else{ -_1c.parentNode.removeChild(_1c); -} -}else{ -if(!_1a["editedNode"]&&_1b!=""){ -if(this.enabled){ -var _1c=document.createElement("span"); -_1c.className="AM"; -this.editor.insertNodeAtSelection(_1c); -_1c.innerHTML=_1b; -_1c.title=_1b; -}else{ -this.editor.insertHTML(""+_1b+""); -} -} -} -if(this.enabled){ -this.parse(); -} -} -}; - +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +function Equation(c){this.editor=c;var a=c.config;var b=this;a.registerButton({id:"equation",tooltip:this._lc("Formula Editor"),image:c.imgURL("equation.gif","Equation"),textMode:false,action:function(d,f){b.buttonPress(d,f)}});a.addToolbarElement("equation","inserthorizontalrule",-1);mathcolor=a.Equation.mathcolor;mathfontfamily=a.Equation.mathfontfamily;this.enabled=!Xinha.is_ie;if(this.enabled){this.onBeforeSubmit=this.onBeforeUnload=function(){b.unParse()}}if(typeof AMprocessNode!="function"){Xinha._loadback(Xinha.getPluginDir("Equation")+"/ASCIIMathML.js",function(){translate()})}}Xinha.Config.prototype.Equation={mathcolor:"black",mathfontfamily:"serif"};Equation._pluginInfo={name:"ASCIIMathML Formula Editor",version:"2.3 (2008-01-26)",developer:"Raimund Meyer",developer_url:"http://x-webservice.net",c_owner:"",sponsor:"",sponsor_url:"",license:"GNU/LGPL"};Equation.prototype._lc=function(a){return Xinha._lc(a,"Equation")};Equation.prototype.onGenerate=function(){this.parse()};Equation.prototype.onKeyPress=function(b){if(this.enabled){e=this.editor;var a=e._getFirstAncestor(e.getSelection(),["span"]);if(a&&a.className=="AM"){if(b.keyCode==8||b.keyCode==46||b.charCode){Xinha._stopEvent(b);return true}}}return false};Equation.prototype.onBeforeMode=function(a){if(this.enabled&&a=="textmode"){this.unParse()}};Equation.prototype.onMode=function(a){if(this.enabled&&a=="wysiwyg"){this.parse()}};Equation.prototype.parse=function(){if(this.enabled){var f=this.editor._doc;var b=f.getElementsByTagName("span");for(var a=0;a'+c+"")}}}if(this.enabled){this.parse()}}}; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/ExtendedFileManager.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/ExtendedFileManager.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/ExtendedFileManager.js 16 Jan 2009 09:05:47 -0000 1.1 @@ -0,0 +1,2 @@ +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +function ExtendedFileManager(e){this.editor=e;var a=e.config;var f=a.toolbar;var b=this;if(a.ExtendedFileManager.use_linker){a.registerButton({id:"linkfile",tooltip:Xinha._lc("Insert File Link","ExtendedFileManager"),image:Xinha.getPluginDir("ExtendedFileManager")+"/img/ed_linkfile.gif",textMode:false,action:function(g){g._linkFile()}});a.addToolbarElement("linkfile","createlink",1)}var d=e.config.ExtendedFileManager.backend+"__function=manager";if(a.ExtendedFileManager.backend_config!=null){d+="&backend_config="+encodeURIComponent(a.ExtendedFileManager.backend_config);d+="&backend_config_hash="+encodeURIComponent(a.ExtendedFileManager.backend_config_hash);d+="&backend_config_secret_key_location="+encodeURIComponent(a.ExtendedFileManager.backend_config_secret_key_location)}if(a.ExtendedFileManager.backend_data!=null){for(var c in a.ExtendedFileManager.backend_data){d+="&"+c+"="+encodeURIComponent(a.ExtendedFileManager.backend_data[c])}}a.ExtendedFileManager.manager=d}ExtendedFileManager._pluginInfo={name:"ExtendedFileManager",version:"1.4",developer:"Afru, Krzysztof Kotowicz, Raimund Meyer",developer_url:"http://xinha.org",license:"htmlArea"};Xinha.Config.prototype.ExtendedFileManager={use_linker:true,backend:Xinha.getPluginDir("ExtendedFileManager")+"/backend.php?__plugin=ExtendedFileManager&",backend_data:null,backend_config:null,backend_config_hash:null,backend_config_secret_key_location:"Xinha:ImageManager"};if(typeof ImageManager=="undefined"){Xinha.prototype._insertImage=function(b){var a=this;var c={editor:this,param:null};if(typeof b=="undefined"){b=this.getParentElement();if(b&&!/^img$/i.test(b.tagName)){b=null}}if(b){c.param={f_url:Xinha.is_ie?b.src:b.getAttribute("src"),f_alt:b.alt,f_title:b.title,f_border:b.style.borderWidth?b.style.borderWidth:b.border,f_align:b.align,f_width:b.width,f_height:b.height,f_padding:b.style.padding,f_margin:b.style.margin,f_backgroundColor:b.style.backgroundColor,f_borderColor:b.style.borderColor,baseHref:a.config.baseHref};c.param.f_border=shortSize(c.param.f_border);c.param.f_padding=shortSize(c.param.f_padding);c.param.f_margin=shortSize(c.param.f_margin);c.param.f_backgroundColor=convertToHex(c.param.f_backgroundColor);c.param.f_borderColor=convertToHex(c.param.f_borderColor)}Dialog(this.config.ExtendedFileManager.manager,function(h){if(!h){return false}var e=b;if(!e){if(!h.f_url){return false}if(Xinha.is_ie){var g=a.getSelection();var d=a.createRange(g);a._doc.execCommand("insertimage",false,h.f_url);e=d.parentElement();if(e.tagName.toLowerCase()!="img"){e=e.previousSibling}}else{e=document.createElement("img");e.src=h.f_url;a.insertNodeAtSelection(e)}}else{if(!h.f_url){e.parentNode.removeChild(e);a.updateToolbar();return false}else{e.src=h.f_url}}e.alt=e.alt?e.alt:"";for(field in h){var f=h[field];switch(field){case"f_alt":e.alt=f;break;case"f_title":e.title=f;break;case"f_border":if(f){e.style.borderWidth=/[^0-9]/.test(f)?f:(f!="")?(parseInt(f)+"px"):"";if(e.style.borderWidth&&!e.style.borderStyle){e.style.borderStyle="solid"}else{if(!e.style.borderWidth){e.style.border=""}}}break;case"f_borderColor":e.style.borderColor=f;break;case"f_backgroundColor":e.style.backgroundColor=f;break;case"f_align":e.align=f;break;case"f_width":if(parseInt(f)>0){e.width=parseInt(f)}break;case"f_height":if(parseInt(f)>0){e.height=parseInt(f)}break;case"f_padding":e.style.padding=/[^0-9]/.test(f)?f:(f!="")?(parseInt(f)+"px"):"";break;case"f_margin":e.style.margin=/[^0-9]/.test(f)?f:(f!="")?(parseInt(f)+"px"):"";break}}},c)}}Xinha.prototype._linkFile=function(c){var b=this;var f={editor:this,param:null};if(typeof c=="undefined"){c=this.getParentElement();if(c){if(/^img$/i.test(c.tagName)){c=c.parentNode}if(!/^a$/i.test(c.tagName)){c=null}}}if(!c){var e=b.getSelection();var a=b.createRange(e);var d=0;if(Xinha.is_ie){if(e.type=="Control"){d=a.length}else{d=a.compareEndPoints("StartToEnd",a)}}else{d=a.compareBoundaryPoints(a.START_TO_END,a)}if(d==0){alert(Xinha._lc("You must select some text before making a new link.","ExtendedFileManager"));return}f.param={f_href:"",f_title:"",f_target:"",f_usetarget:b.config.makeLinkShowsTarget,baseHref:b.config.baseHref}}else{f.param={f_href:Xinha.is_ie?c.href:c.getAttribute("href"),f_title:c.title,f_target:c.target,f_usetarget:b.config.makeLinkShowsTarget,baseHref:b.config.baseHref}}Dialog(this.config.ExtendedFileManager.manager+"&mode=link",function(l){if(!l){return false}var g=c;if(!g){try{b._doc.execCommand("createlink",false,l.f_href);g=b.getParentElement();var j=b.getSelection();var i=b.createRange(j);if(!Xinha.is_ie){g=i.startContainer;if(!/^a$/i.test(g.tagName)){g=g.nextSibling;if(g==null){g=i.startContainer.parentNode}}}}catch(k){}}else{var h=l.f_href.trim();b.selectNodeContents(g);if(h==""){b._doc.execCommand("unlink",false,null);b.updateToolbar();return false}else{g.href=h}}if(!(g&&/^a$/i.test(g.tagName))){return false}g.target=l.f_target.trim();g.title=l.f_title.trim();b.selectNodeContents(g);b.updateToolbar()},f)};function shortSize(a){if(/ /.test(a)){var d=a.split(" ");var c=true;for(var b=1;b; + 0&&parent.frames.length){ -d=parent.frames[n.substring(p+1)].document; -n=n.substring(0,p); -} -if(!(x=d[n])&&d.all){ -x=d.all[n]; -} -for(i=0;!x&&i-1&&navigator.appVersion.indexOf("Mac")>-1)){ -ox=0; -oy=0; -if(g.style.left){ -x=parseInt(g.style.left); -y=parseInt(g.style.top); -}else{ -var w1=parseInt(el.style.width); -bx=(a<0)?-5-w1:-10; -a=(Math.abs(a)<1000)?0:a; -b=(Math.abs(b)<1000)?0:b; -if(event==null){ -x=document.body.scrollLeft+bx; -}else{ -x=document.body.scrollLeft+event.clientX+bx; -} -if(event==null){ -y=document.body.scrollTop; -}else{ -y=document.body.scrollTop+event.clientY; -} -} -} -}else{ -if(document.layers){ -x=g.x; -y=g.y; -var q0=document.layers,dd=""; -for(var s=0;s4){ -xx+="px"; -yy+="px"; -} -if(navigator.appVersion.indexOf("MSIE 5")>-1&&navigator.appVersion.indexOf("Mac")>-1){ -xx+=parseInt(document.body.leftMargin); -yy+=parseInt(document.body.topMargin); -xx+="px"; -yy+="px"; -} -e.left=xx; -e.top=yy; -} -pic_x=parseInt(xx); -pic_y=parseInt(yy); -} -} -} -var ie=document.all; -var ns6=document.getElementById&&!document.all; -var dragapproved=false; -var z,x,y,status,ant,canvas,content,pic_width,pic_height,image,resizeHandle,oa_w,oa_h,oa_x,oa_y,mx2,my2; -function init_resize(){ -P7_Snap("theImage","ant",0,0); -if(canvas==null){ -canvas=MM_findObj("imgCanvas"); -} -if(pic_width==null||pic_height==null){ -image=MM_findObj("theImage"); -pic_width=image.width; -pic_height=image.height; -} -if(ant==null){ -ant=MM_findObj("ant"); -} -ant.style.left=pic_x; -ant.style.top=pic_y; -ant.style.width=pic_width; -ant.style.height=pic_height; -ant.style.visibility="visible"; -drawBoundHandle(); -jg_doc.paint(); -} -initEditor=function(){ -init_crop(); -init_resize(); -var _a=MM_findObj("markerImg",window.top.document); -if(_a.src.indexOf("img/t_white.gif")>0){ -toggleMarker(); -} -var _b=document.getElementById("theImage"); -_b._width=_b.width; -_b._height=_b.height; -}; -function init_crop(){ -P7_Snap("theImage","ant",0,0); -} -function setMode(_c){ -mode=_c; -reset(); -} -function reset(){ -if(ant==null){ -ant=MM_findObj("ant"); -} -ant.style.visibility="hidden"; -ant.style.left=0; -ant.style.top=0; -ant.style.width=0; -ant.style.height=0; -mx2=null; -my2=null; -jg_doc.clear(); -if(mode!="measure"){ -showStatus(); -} -if(mode=="scale"){ -init_resize(); -} -P7_Snap("theImage","ant",0,0); -} -function toggleMarker(){ -if(ant==null){ -ant=MM_findObj("ant"); -} -if(ant.className=="selection"){ -ant.className="selectionWhite"; -}else{ -ant.className="selection"; -} -if(jg_doc.getColor()=="#000000"){ -jg_doc.setColor("#FFFFFF"); -}else{ -jg_doc.setColor("#000000"); -} -drawBoundHandle; -jg_doc.paint(); -} -function move(e){ -if(dragapproved){ -var w=ns6?temp1+e.pageX-x:temp1+event.clientX+document.body.scrollLeft-x; -var h=ns6?temp2+e.pageY-y:temp2+event.clientY+document.body.scrollTop-y; -if(ant!=null){ -if(w>=0){ -ant.style.left=x; -ant.style.width=w; -}else{ -ant.style.left=x+w; -ant.style.width=-1*w; -} -if(h>=0){ -ant.style.top=y; -ant.style.height=h; -}else{ -ant.style.top=y+h; -ant.style.height=-1*h; -} -} -showStatus(); -return false; -} -} -function moveContent(e){ -if(dragapproved){ -var dx=ns6?oa_x+e.clientX-x:oa_x+event.clientX-x; -var dy=ns6?oa_y+e.clientY-y:oa_y+event.clientY-y; -ant.style.left=dx; -ant.style.top=dy; -showStatus(); -return false; -} -} -function moveHandle(e){ -if(dragapproved){ -var w=ns6?e.clientX-x:event.clientX-x; -var h=ns6?e.clientY-y:event.clientY-y; -var _16=MM_findObj("constProp",window.top.document); -var _17=document.theImage.height; -var _18=document.theImage.width; -rapp=_18/_17; -rapp_inv=_17/_18; -switch(resizeHandle){ -case "s-resize": -if(oa_h+h>=0){ -ant.style.height=oa_h+h; -if(_16.checked){ -ant.style.width=rapp*(oa_h+h); -ant.style.left=oa_x-rapp*h/2; -} -} -break; -case "e-resize": -if(oa_w+w>=0){ -ant.style.width=oa_w+w; -if(_16.checked){ -ant.style.height=rapp_inv*(oa_w+w); -ant.style.top=oa_y-rapp_inv*w/2; -} -} -break; -case "n-resize": -if(oa_h-h>=0){ -ant.style.top=oa_y+h; -ant.style.height=oa_h-h; -if(_16.checked){ -ant.style.width=rapp*(oa_h-h); -ant.style.left=oa_x+rapp*h/2; -} -} -break; -case "w-resize": -if(oa_w-w>=0){ -ant.style.left=oa_x+w; -ant.style.width=oa_w-w; -if(_16.checked){ -ant.style.height=rapp_inv*(oa_w-w); -ant.style.top=oa_y+rapp_inv*w/2; -} -} -break; -case "nw-resize": -if(oa_h-h>=0&&oa_w-w>=0){ -ant.style.left=oa_x+w; -ant.style.width=oa_w-w; -ant.style.top=oa_y+h; -if(_16.checked){ -ant.style.height=rapp_inv*(oa_w-w); -}else{ -ant.style.height=oa_h-h; -} -} -break; -case "ne-resize": -if(oa_h-h>=0&&oa_w+w>=0){ -ant.style.top=oa_y+h; -ant.style.width=oa_w+w; -if(_16.checked){ -ant.style.height=rapp_inv*(oa_w+w); -}else{ -ant.style.height=oa_h-h; -} -} -break; -case "se-resize": -if(oa_h+h>=0&&oa_w+w>=0){ -ant.style.width=oa_w+w; -if(_16.checked){ -ant.style.height=rapp_inv*(oa_w+w); -}else{ -ant.style.height=oa_h+h; -} -} -break; -case "sw-resize": -if(oa_h+h>=0&&oa_w-w>=0){ -ant.style.left=oa_x+w; -ant.style.width=oa_w-w; -if(_16.checked){ -ant.style.height=rapp_inv*(oa_w-w); -}else{ -ant.style.height=oa_h+h; -} -} -} -showStatus(); -return false; -} -} -function drags(e){ -if(!ie&&!ns6){ -return; -} -var _1a=ns6?e.target:event.srcElement; -var _1b=ns6?"HTML":"BODY"; -while(_1a.tagName!=_1b&&!(_1a.className=="crop"||_1a.className=="handleBox"||_1a.className=="selection"||_1a.className=="selectionWhite")){ -_1a=ns6?_1a.parentNode:_1a.parentElement; -} -if(_1a.className=="handleBox"){ -if(content!=null){ -if(content.width!=null&&content.height!=null){ -content.width=0; -content.height=0; -} -} -resizeHandle=_1a.id; -x=ns6?e.clientX:event.clientX; -y=ns6?e.clientY:event.clientY; -oa_w=parseInt(ant.style.width); -oa_h=parseInt(ant.style.height); -oa_x=parseInt(ant.style.left); -oa_y=parseInt(ant.style.top); -dragapproved=true; -document.onmousemove=moveHandle; -return false; -}else{ -if((_1a.className=="selection"||_1a.className=="selectionWhite")&&mode=="crop"){ -x=ns6?e.clientX:event.clientX; -y=ns6?e.clientY:event.clientY; -oa_x=parseInt(ant.style.left); -oa_y=parseInt(ant.style.top); -dragapproved=true; -document.onmousemove=moveContent; -return false; -}else{ -if(_1a.className=="crop"&&mode=="crop"){ -if(content!=null){ -if(content.width!=null&&content.height!=null){ -content.width=0; -content.height=0; -} -} -if(status==null){ -status=MM_findObj("status"); -} -if(ant==null){ -ant=MM_findObj("ant"); -} -if(canvas==null){ -canvas=MM_findObj("imgCanvas"); -} -if(content==null){ -content=MM_findObj("cropContent"); -} -if(pic_width==null||pic_height==null){ -image=MM_findObj("theImage"); -pic_width=image.width; -pic_height=image.height; -} -ant.style.visibility="visible"; -obj=_1a; -dragapproved=true; -z=_1a; -temp1=parseInt(z.style.left+0); -temp2=parseInt(z.style.top+0); -x=ns6?e.pageX:event.clientX+document.body.scrollLeft; -y=ns6?e.pageY:event.clientY+document.body.scrollTop; -document.onmousemove=move; -return false; -}else{ -if(_1a.className=="crop"&&mode=="measure"){ -if(ant==null){ -ant=MM_findObj("ant"); -} -if(canvas==null){ -canvas=MM_findObj("imgCanvas"); -} -x=ns6?e.pageX:event.clientX+document.body.scrollLeft; -y=ns6?e.pageY:event.clientY+document.body.scrollTop; -dragapproved=true; -document.onmousemove=measure; -return false; -} -} -} -} -} -function measure(e){ -if(dragapproved){ -mx2=ns6?e.pageX:event.clientX+document.body.scrollLeft; -my2=ns6?e.pageY:event.clientY+document.body.scrollTop; -jg_doc.clear(); -jg_doc.setStroke(Stroke.DOTTED); -jg_doc.drawLine(x,y,mx2,my2); -jg_doc.paint(); -showStatus(); -return false; -} -} -function setMarker(nx,ny,nw,nh){ -if(isNaN(nx)){ -nx=0; -} -if(isNaN(ny)){ -ny=0; -} -if(isNaN(nw)){ -nw=0; -} -if(isNaN(nh)){ -nh=0; -} -if(ant==null){ -ant=MM_findObj("ant"); -} -if(canvas==null){ -canvas=MM_findObj("imgCanvas"); -} -if(content==null){ -content=MM_findObj("cropContent"); -} -if(pic_width==null||pic_height==null){ -image=MM_findObj("theImage"); -pic_width=image.width; -pic_height=image.height; -} -ant.style.visibility="visible"; -nx=pic_x+nx; -ny=pic_y+ny; -if(nw>=0){ -ant.style.left=nx; -ant.style.width=nw; -}else{ -ant.style.left=nx+nw; -ant.style.width=-1*nw; -} -if(nh>=0){ -ant.style.top=ny; -ant.style.height=nh; -}else{ -ant.style.top=ny+nh; -ant.style.height=-1*nh; -} -} -function max(x,y){ -if(y>x){ -return x; -}else{ -return y; -} -} -function drawBoundHandle(){ -if(ant==null||ant.style==null){ -return false; -} -var ah=parseInt(ant.style.height); -var aw=parseInt(ant.style.width); -var ax=parseInt(ant.style.left); -var ay=parseInt(ant.style.top); -jg_doc.drawHandle(ax-15,ay-15,30,30,"nw-resize"); -jg_doc.drawHandle(ax-15,ay+ah-15,30,30,"sw-resize"); -jg_doc.drawHandle(ax+aw-15,ay-15,30,30,"ne-resize"); -jg_doc.drawHandle(ax+aw-15,ay+ah-15,30,30,"se-resize"); -jg_doc.drawHandle(ax+max(15,aw/10),ay-8,aw-2*max(15,aw/10),8,"n-resize"); -jg_doc.drawHandle(ax+max(15,aw/10),ay+ah,aw-2*max(15,aw/10),8,"s-resize"); -jg_doc.drawHandle(ax-8,ay+max(15,ah/10),8,ah-2*max(15,ah/10),"w-resize"); -jg_doc.drawHandle(ax+aw,ay+max(15,ah/10),8,ah-2*max(15,ah/10),"e-resize"); -jg_doc.drawHandleBox(ax-4,ay-4,8,8,"nw-resize"); -jg_doc.drawHandleBox(ax-4,ay+ah-4,8,8,"sw-resize"); -jg_doc.drawHandleBox(ax+aw-4,ay-4,8,8,"ne-resize"); -jg_doc.drawHandleBox(ax+aw-4,ay+ah-4,8,8,"se-resize"); -jg_doc.drawHandleBox(ax+aw/2-4,ay-4,8,8,"n-resize"); -jg_doc.drawHandleBox(ax+aw/2-4,ay+ah-4,8,8,"s-resize"); -jg_doc.drawHandleBox(ax-4,ay+ah/2-4,8,8,"w-resize"); -jg_doc.drawHandleBox(ax+aw-4,ay+ah/2-4,8,8,"e-resize"); -} -function showStatus(){ -if(ant==null||ant.style==null){ -return false; -} -var _27=100/parseInt(window.parent.document.getElementById("zoom").value,10); -if(mode=="measure"){ -mx1=x-pic_x; -my1=y-pic_y; -mw=mx2-x; -mh=my2-y; -md=parseInt(Math.sqrt(mw*mw+mh*mh)*100)/100; -ma=(Math.atan(-1*mh/mw)/Math.PI)*180; -if(mw<0&&mh<0){ -ma=ma+180; -} -if(mw<0&&mh>0){ -ma=ma-180; -} -ma=parseInt(ma*100)/100; -if(m_sx!=null&&!isNaN(mx1)){ -m_sx.value=mx1*_27+"px"; -} -if(m_sy!=null&&!isNaN(my1)){ -m_sy.value=my1*_27+"px"; -} -if(m_w!=null&&!isNaN(mw)){ -m_w.value=mw*_27+"px"; -} -if(m_h!=null&&!isNaN(mh)){ -m_h.value=mh*_27+"px"; -} -if(m_d!=null&&!isNaN(md)){ -m_d.value=md*_27+"px"; -} -if(m_a!=null&&!isNaN(ma)){ -m_a.value=ma+""; -} -if(r_ra!=null&&!isNaN(ma)){ -r_ra.value=ma; -} -return false; -} -var ah=parseInt(ant.style.height); -var aw=parseInt(ant.style.width); -var ax=parseInt(ant.style.left); -var ay=parseInt(ant.style.top); -var cx=ax-pic_x<0?0:ax-pic_x; -var cy=ay-pic_y<0?0:ay-pic_y; -cx=cx>pic_width?pic_width:cx; -cy=cy>pic_height?pic_height:cy; -var cw=ax-pic_x>0?aw:aw-(pic_x-ax); -var ch=ay-pic_y>0?ah:ah-(pic_y-ay); -ch=ay+ah0&&s_sh.value.indexOf("%")>0){ -sw=cw/pic_width; -sh=ch/pic_height; -} -if(s_sw!=null){ -s_sw.value=sw*_27; -} -if(s_sh!=null){ -s_sh.value=sh*_27; -} -} -} -} -function dragStopped(){ -dragapproved=false; -if(ant==null||ant.style==null){ -return false; -} -if(mode=="measure"){ -jg_doc.drawLine(x-4,y,x+4,y); -jg_doc.drawLine(x,y-4,x,y+4); -jg_doc.drawLine(mx2-4,my2,mx2+4,my2); -jg_doc.drawLine(mx2,my2-4,mx2,my2+4); -jg_doc.paint(); -showStatus(); -return false; -} -var ah=parseInt(ant.style.height); -var aw=parseInt(ant.style.width); -var ax=parseInt(ant.style.left); -var ay=parseInt(ant.style.top); -jg_doc.clear(); -if(content!=null){ -if(content.width!=null&&content.height!=null){ -content.width=aw-1; -content.height=ah-1; -} -} -if(mode=="crop"){ -jg_doc.fillRectPattern(pic_x,pic_y,pic_width,ay-pic_y,pattern); -var h1=ah; -var y1=ay; -if(ah+ay>=pic_height+pic_y){ -h1=pic_height+pic_y-ay; -}else{ -if(ay<=pic_y){ -h1=ay+ah-pic_y; -y1=pic_y; -} -} -jg_doc.fillRectPattern(pic_x,y1,ax-pic_x,h1,pattern); -jg_doc.fillRectPattern(ax+aw,y1,pic_x+pic_width-ax-aw,h1,pattern); -jg_doc.fillRectPattern(pic_x,ay+ah,pic_width,pic_height+pic_y-ay-ah,pattern); -}else{ -if(mode=="scale"){ -document.theImage.height=ah; -document.theImage.width=aw; -document.theImage.style.height=ah+" px"; -document.theImage.style.width=aw+" px"; -P7_Snap("theImage","ant",0,0); -} -} -drawBoundHandle(); -jg_doc.paint(); -showStatus(); -return false; -} -document.onmousedown=drags; -document.onmouseup=dragStopped; - +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +function MM_findObj(f,e){var c,b,a;if(!e){e=document}if((c=f.indexOf("?"))>0&&parent.frames.length){e=parent.frames[f.substring(c+1)].document;f=f.substring(0,c)}if(!(a=e[f])&&e.all){a=e.all[f]}for(b=0;!a&&b-1&&navigator.appVersion.indexOf("Mac")>-1)){ox=0;oy=0;if(g.style.left){x=parseInt(g.style.left);y=parseInt(g.style.top)}else{var w1=parseInt(el.style.width);bx=(a<0)?-5-w1:-10;a=(Math.abs(a)<1000)?0:a;b=(Math.abs(b)<1000)?0:b;if(event==null){x=document.body.scrollLeft+bx}else{x=document.body.scrollLeft+event.clientX+bx}if(event==null){y=document.body.scrollTop}else{y=document.body.scrollTop+event.clientY}}}}else{if(document.layers){x=g.x;y=g.y;var q0=document.layers,dd="";for(var s=0;s4){xx+="px";yy+="px"}if(navigator.appVersion.indexOf("MSIE 5")>-1&&navigator.appVersion.indexOf("Mac")>-1){xx+=parseInt(document.body.leftMargin);yy+=parseInt(document.body.topMargin);xx+="px";yy+="px"}e.left=xx;e.top=yy}pic_x=parseInt(xx);pic_y=parseInt(yy)}}}var ie=document.all;var ns6=document.getElementById&&!document.all;var dragapproved=false;var z,x,y,status,ant,canvas,content,pic_width,pic_height,image,resizeHandle,oa_w,oa_h,oa_x,oa_y,mx2,my2;function init_resize(){P7_Snap("theImage","ant",0,0);if(canvas==null){canvas=MM_findObj("imgCanvas")}if(pic_width==null||pic_height==null){image=MM_findObj("theImage");pic_width=image.width;pic_height=image.height}if(ant==null){ant=MM_findObj("ant")}ant.style.left=pic_x;ant.style.top=pic_y;ant.style.width=pic_width;ant.style.height=pic_height;ant.style.visibility="visible";drawBoundHandle();jg_doc.paint()}initEditor=function(){init_crop();init_resize();var b=MM_findObj("markerImg",window.top.document);if(b.src.indexOf("img/t_white.gif")>0){toggleMarker()}var a=document.getElementById("theImage");a._width=a.width;a._height=a.height};function init_crop(){P7_Snap("theImage","ant",0,0)}function setMode(a){mode=a;reset()}function reset(){if(ant==null){ant=MM_findObj("ant")}ant.style.visibility="hidden";ant.style.left=0;ant.style.top=0;ant.style.width=0;ant.style.height=0;mx2=null;my2=null;jg_doc.clear();if(mode!="measure"){showStatus()}if(mode=="scale"){init_resize()}P7_Snap("theImage","ant",0,0)}function toggleMarker(){if(ant==null){ant=MM_findObj("ant")}if(ant.className=="selection"){ant.className="selectionWhite"}else{ant.className="selection"}if(jg_doc.getColor()=="#000000"){jg_doc.setColor("#FFFFFF")}else{jg_doc.setColor("#000000")}drawBoundHandle;jg_doc.paint()}function move(c){if(dragapproved){var a=ns6?temp1+c.pageX-x:temp1+event.clientX+document.body.scrollLeft-x;var b=ns6?temp2+c.pageY-y:temp2+event.clientY+document.body.scrollTop-y;if(ant!=null){if(a>=0){ant.style.left=x;ant.style.width=a}else{ant.style.left=x+a;ant.style.width=-1*a}if(b>=0){ant.style.top=y;ant.style.height=b}else{ant.style.top=y+b;ant.style.height=-1*b}}showStatus();return false}}function moveContent(c){if(dragapproved){var b=ns6?oa_x+c.clientX-x:oa_x+event.clientX-x;var a=ns6?oa_y+c.clientY-y:oa_y+event.clientY-y;ant.style.left=b;ant.style.top=a;showStatus();return false}}function moveHandle(i){if(dragapproved){var b=ns6?i.clientX-x:event.clientX-x;var d=ns6?i.clientY-y:event.clientY-y;var f=MM_findObj("constProp",window.top.document);var c=document.theImage.height;var a=document.theImage.width;rapp=a/c;rapp_inv=c/a;switch(resizeHandle){case"s-resize":if(oa_h+d>=0){ant.style.height=oa_h+d;if(f.checked){ant.style.width=rapp*(oa_h+d);ant.style.left=oa_x-rapp*d/2}}break;case"e-resize":if(oa_w+b>=0){ant.style.width=oa_w+b;if(f.checked){ant.style.height=rapp_inv*(oa_w+b);ant.style.top=oa_y-rapp_inv*b/2}}break;case"n-resize":if(oa_h-d>=0){ant.style.top=oa_y+d;ant.style.height=oa_h-d;if(f.checked){ant.style.width=rapp*(oa_h-d);ant.style.left=oa_x+rapp*d/2}}break;case"w-resize":if(oa_w-b>=0){ant.style.left=oa_x+b;ant.style.width=oa_w-b;if(f.checked){ant.style.height=rapp_inv*(oa_w-b);ant.style.top=oa_y+rapp_inv*b/2}}break;case"nw-resize":if(oa_h-d>=0&&oa_w-b>=0){ant.style.left=oa_x+b;ant.style.width=oa_w-b;ant.style.top=oa_y+d;if(f.checked){ant.style.height=rapp_inv*(oa_w-b)}else{ant.style.height=oa_h-d}}break;case"ne-resize":if(oa_h-d>=0&&oa_w+b>=0){ant.style.top=oa_y+d;ant.style.width=oa_w+b;if(f.checked){ant.style.height=rapp_inv*(oa_w+b)}else{ant.style.height=oa_h-d}}break;case"se-resize":if(oa_h+d>=0&&oa_w+b>=0){ant.style.width=oa_w+b;if(f.checked){ant.style.height=rapp_inv*(oa_w+b)}else{ant.style.height=oa_h+d}}break;case"sw-resize":if(oa_h+d>=0&&oa_w-b>=0){ant.style.left=oa_x+b;ant.style.width=oa_w-b;if(f.checked){ant.style.height=rapp_inv*(oa_w-b)}else{ant.style.height=oa_h+d}}}showStatus();return false}}function drags(b){if(!ie&&!ns6){return}var c=ns6?b.target:event.srcElement;var a=ns6?"HTML":"BODY";while(c.tagName!=a&&!(c.className=="crop"||c.className=="handleBox"||c.className=="selection"||c.className=="selectionWhite")){c=ns6?c.parentNode:c.parentElement}if(c.className=="handleBox"){if(content!=null){if(content.width!=null&&content.height!=null){content.width=0;content.height=0}}resizeHandle=c.id;x=ns6?b.clientX:event.clientX;y=ns6?b.clientY:event.clientY;oa_w=parseInt(ant.style.width);oa_h=parseInt(ant.style.height);oa_x=parseInt(ant.style.left);oa_y=parseInt(ant.style.top);dragapproved=true;document.onmousemove=moveHandle;return false}else{if((c.className=="selection"||c.className=="selectionWhite")&&mode=="crop"){x=ns6?b.clientX:event.clientX;y=ns6?b.clientY:event.clientY;oa_x=parseInt(ant.style.left);oa_y=parseInt(ant.style.top);dragapproved=true;document.onmousemove=moveContent;return false}else{if(c.className=="crop"&&mode=="crop"){if(content!=null){if(content.width!=null&&content.height!=null){content.width=0;content.height=0}}if(status==null){status=MM_findObj("status")}if(ant==null){ant=MM_findObj("ant")}if(canvas==null){canvas=MM_findObj("imgCanvas")}if(content==null){content=MM_findObj("cropContent")}if(pic_width==null||pic_height==null){image=MM_findObj("theImage");pic_width=image.width;pic_height=image.height}ant.style.visibility="visible";obj=c;dragapproved=true;z=c;temp1=parseInt(z.style.left+0);temp2=parseInt(z.style.top+0);x=ns6?b.pageX:event.clientX+document.body.scrollLeft;y=ns6?b.pageY:event.clientY+document.body.scrollTop;document.onmousemove=move;return false}else{if(c.className=="crop"&&mode=="measure"){if(ant==null){ant=MM_findObj("ant")}if(canvas==null){canvas=MM_findObj("imgCanvas")}x=ns6?b.pageX:event.clientX+document.body.scrollLeft;y=ns6?b.pageY:event.clientY+document.body.scrollTop;dragapproved=true;document.onmousemove=measure;return false}}}}}function measure(a){if(dragapproved){mx2=ns6?a.pageX:event.clientX+document.body.scrollLeft;my2=ns6?a.pageY:event.clientY+document.body.scrollTop;jg_doc.clear();jg_doc.setStroke(Stroke.DOTTED);jg_doc.drawLine(x,y,mx2,my2);jg_doc.paint();showStatus();return false}}function setMarker(a,d,b,c){if(isNaN(a)){a=0}if(isNaN(d)){d=0}if(isNaN(b)){b=0}if(isNaN(c)){c=0}if(ant==null){ant=MM_findObj("ant")}if(canvas==null){canvas=MM_findObj("imgCanvas")}if(content==null){content=MM_findObj("cropContent")}if(pic_width==null||pic_height==null){image=MM_findObj("theImage");pic_width=image.width;pic_height=image.height}ant.style.visibility="visible";a=pic_x+a;d=pic_y+d;if(b>=0){ant.style.left=a;ant.style.width=b}else{ant.style.left=a+b;ant.style.width=-1*b}if(c>=0){ant.style.top=d;ant.style.height=c}else{ant.style.top=d+c;ant.style.height=-1*c}}function max(a,b){if(b>a){return a}else{return b}}function drawBoundHandle(){if(ant==null||ant.style==null){return false}var a=parseInt(ant.style.height);var d=parseInt(ant.style.width);var c=parseInt(ant.style.left);var b=parseInt(ant.style.top);jg_doc.drawHandle(c-15,b-15,30,30,"nw-resize");jg_doc.drawHandle(c-15,b+a-15,30,30,"sw-resize");jg_doc.drawHandle(c+d-15,b-15,30,30,"ne-resize");jg_doc.drawHandle(c+d-15,b+a-15,30,30,"se-resize");jg_doc.drawHandle(c+max(15,d/10),b-8,d-2*max(15,d/10),8,"n-resize");jg_doc.drawHandle(c+max(15,d/10),b+a,d-2*max(15,d/10),8,"s-resize");jg_doc.drawHandle(c-8,b+max(15,a/10),8,a-2*max(15,a/10),"w-resize");jg_doc.drawHandle(c+d,b+max(15,a/10),8,a-2*max(15,a/10),"e-resize");jg_doc.drawHandleBox(c-4,b-4,8,8,"nw-resize");jg_doc.drawHandleBox(c-4,b+a-4,8,8,"sw-resize");jg_doc.drawHandleBox(c+d-4,b-4,8,8,"ne-resize");jg_doc.drawHandleBox(c+d-4,b+a-4,8,8,"se-resize");jg_doc.drawHandleBox(c+d/2-4,b-4,8,8,"n-resize");jg_doc.drawHandleBox(c+d/2-4,b+a-4,8,8,"s-resize");jg_doc.drawHandleBox(c-4,b+a/2-4,8,8,"w-resize");jg_doc.drawHandleBox(c+d-4,b+a/2-4,8,8,"e-resize")}function showStatus(){if(ant==null||ant.style==null){return false}var k=100/parseInt(window.parent.document.getElementById("zoom").value,10);if(mode=="measure"){mx1=x-pic_x;my1=y-pic_y;mw=mx2-x;mh=my2-y;md=parseInt(Math.sqrt(mw*mw+mh*mh)*100)/100;ma=(Math.atan(-1*mh/mw)/Math.PI)*180;if(mw<0&&mh<0){ma=ma+180}if(mw<0&&mh>0){ma=ma-180}ma=parseInt(ma*100)/100;if(m_sx!=null&&!isNaN(mx1)){m_sx.value=mx1*k+"px"}if(m_sy!=null&&!isNaN(my1)){m_sy.value=my1*k+"px"}if(m_w!=null&&!isNaN(mw)){m_w.value=mw*k+"px"}if(m_h!=null&&!isNaN(mh)){m_h.value=mh*k+"px"}if(m_d!=null&&!isNaN(md)){m_d.value=md*k+"px"}if(m_a!=null&&!isNaN(ma)){m_a.value=ma+""}if(r_ra!=null&&!isNaN(ma)){r_ra.value=ma}return false}var i=parseInt(ant.style.height);var c=parseInt(ant.style.width);var b=parseInt(ant.style.left);var l=parseInt(ant.style.top);var e=b-pic_x<0?0:b-pic_x;var d=l-pic_y<0?0:l-pic_y;e=e>pic_width?pic_width:e;d=d>pic_height?pic_height:d;var f=b-pic_x>0?c:c-(pic_x-b);var a=l-pic_y>0?i:i-(pic_y-l);a=l+i0&&s_sh.value.indexOf("%")>0){j=f/pic_width;h=a/pic_height}if(s_sw!=null){s_sw.value=j*k}if(s_sh!=null){s_sh.value=h*k}}}}function dragStopped(){dragapproved=false;if(ant==null||ant.style==null){return false}if(mode=="measure"){jg_doc.drawLine(x-4,y,x+4,y);jg_doc.drawLine(x,y-4,x,y+4);jg_doc.drawLine(mx2-4,my2,mx2+4,my2);jg_doc.drawLine(mx2,my2-4,mx2,my2+4);jg_doc.paint();showStatus();return false}var a=parseInt(ant.style.height);var f=parseInt(ant.style.width);var e=parseInt(ant.style.left);var d=parseInt(ant.style.top);jg_doc.clear();if(content!=null){if(content.width!=null&&content.height!=null){content.width=f-1;content.height=a-1}}if(mode=="crop"){jg_doc.fillRectPattern(pic_x,pic_y,pic_width,d-pic_y,pattern);var b=a;var c=d;if(a+d>=pic_height+pic_y){b=pic_height+pic_y-d}else{if(d<=pic_y){b=d+a-pic_y;c=pic_y}}jg_doc.fillRectPattern(pic_x,c,e-pic_x,b,pattern);jg_doc.fillRectPattern(e+f,c,pic_x+pic_width-e-f,b,pattern);jg_doc.fillRectPattern(pic_x,d+a,pic_width,pic_height+pic_y-d-a,pattern)}else{if(mode=="scale"){document.theImage.height=a;document.theImage.width=f;document.theImage.style.height=a+" px";document.theImage.style.width=f+" px";P7_Snap("theImage","ant",0,0)}}drawBoundHandle();jg_doc.paint();showStatus();return false}document.onmousedown=drags;document.onmouseup=dragStopped; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/assets/dialog.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/assets/dialog.js,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/assets/dialog.js 13 May 2008 18:53:49 -0000 1.4 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/assets/dialog.js 16 Jan 2009 09:05:47 -0000 1.5 @@ -1,83 +1,2 @@ -/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */ -/* This file is part of version 0.95 released Mon, 12 May 2008 17:33:15 +0200 */ -/* The URL of the most recent version of this file is http://svn.xinha.webfactional.com/trunk/plugins/ExtendedFileManager/assets/dialog.js */ -function Dialog(_1,_2,_3){ -if(typeof _3=="undefined"){ -_3=window; -} -if(typeof window.showModalDialog=="function"){ -Dialog._return=_2; -var r=window.showModalDialog(_1,_3,"dialogheight=10;dialogwidth=10;resizable=yes"); -}else{ -Dialog._geckoOpenModal(_1,_2,_3); -} -} -Dialog._parentEvent=function(ev){ -setTimeout(function(){ -if(Dialog._modal&&!Dialog._modal.closed){ -Dialog._modal.focus(); -} -},50); -if(Dialog._modal&&!Dialog._modal.closed){ -Dialog._stopEvent(ev); -} -}; -Dialog._return=null; -Dialog._modal=null; -Dialog._arguments=null; -Dialog._geckoOpenModal=function(_6,_7,_8){ -var _9="hadialog"+_6; -var _a=/\W/g; -_9=_9.replace(_a,"_"); -var _b=window.open(_6,_9,"toolbar=no,menubar=no,personalbar=no,width=10,height=10,"+"scrollbars=no,resizable=yes,modal=yes,dependable=yes"); -Dialog._modal=_b; -Dialog._arguments=_8; -function capwin(w){ -Dialog._addEvent(w,"click",Dialog._parentEvent); -Dialog._addEvent(w,"mousedown",Dialog._parentEvent); -Dialog._addEvent(w,"focus",Dialog._parentEvent); -} -function relwin(w){ -Dialog._removeEvent(w,"click",Dialog._parentEvent); -Dialog._removeEvent(w,"mousedown",Dialog._parentEvent); -Dialog._removeEvent(w,"focus",Dialog._parentEvent); -} -capwin(window); -for(var i=0;i10)?_13:10)+"px"; -return true; -}; -dragTableCols.addEvent=function(obj,_15,fn){ -if(obj.addEventListener){ -obj.addEventListener(_15,fn,true); -}else{ -if(obj.attachEvent){ -obj.attachEvent("on"+_15,fn); -}else{ -return false; -} -} -}; -dragTableCols.removeEvent=function(obj,_18,fn){ -if(obj.addEventListener){ -obj.removeEventListener(_18,fn,true); -}else{ -if(obj.detachEvent){ -obj.detachEvent("on"+_18,fn); -}else{ -return false; -} -} -}; -dragTableCols.getElementTopLeft=function(_1a){ -var _1b=curtop=0; -if(_1a.offsetParent){ -_1b=_1a.offsetLeft; -curtop=_1a.offsetTop; -while(_1a=_1a.offsetParent){ -_1b+=_1a.offsetLeft; -curtop+=_1a.offsetTop; -} -} -return {top:curtop,left:_1b}; -}; -dragTableCols.getPageX=function(e){ -if(e.pageX){ -return e.pageX; -}else{ -if(document.documentElement&&document.documentElement.scrollTop){ -return document.documentElement.scrollLeft+e.clientX; -}else{ -if(document.body){ -return document.body.scrollLeft+e.clientX; -} -} -} -}; - +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +function dragTableCols(h){this.table=document.getElementById(h);var b=this.table.rows[0].cells;this.ths=b;var a=this;var g;for(var d=0;d10)?b:10)+"px";return true};dragTableCols.addEvent=function(c,b,a){if(c.addEventListener){c.addEventListener(b,a,true)}else{if(c.attachEvent){c.attachEvent("on"+b,a)}else{return false}}};dragTableCols.removeEvent=function(c,b,a){if(c.addEventListener){c.removeEventListener(b,a,true)}else{if(c.detachEvent){c.detachEvent("on"+b,a)}else{return false}}};dragTableCols.getElementTopLeft=function(a){var c=0;var b=0;if(a.offsetParent){c=a.offsetLeft;b=a.offsetTop;while(a=a.offsetParent){c+=a.offsetLeft;b+=a.offsetTop}}return{top:b,left:c}};dragTableCols.getPageX=function(a){if(a.pageX){return a.pageX}else{if(document.documentElement&&document.documentElement.scrollTop){return document.documentElement.scrollLeft+a.clientX}else{if(document.body){return document.body.scrollLeft+a.clientX}}}}; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/assets/editor.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/assets/editor.js,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/assets/editor.js 13 May 2008 18:53:49 -0000 1.4 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/assets/editor.js 16 Jan 2009 09:05:47 -0000 1.5 @@ -1,192 +1,2 @@ -/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */ -/* This file is part of version 0.95 released Mon, 12 May 2008 17:33:15 +0200 */ -/* The URL of the most recent version of this file is http://svn.xinha.webfactional.com/trunk/plugins/ExtendedFileManager/assets/editor.js */ -var current_action=null; -var actions=["crop","scale","rotate","measure","save"]; -var orginal_width=null,orginal_height=null; -function toggle(_1){ -if(current_action!=_1){ -for(var i in actions){ -if(actions[i]!=_1){ -var _3=document.getElementById("tools_"+actions[i]); -_3.style.display="none"; -var _4=document.getElementById("icon_"+actions[i]); -_4.className=""; -} -} -current_action=_1; -var _3=document.getElementById("tools_"+_1); -_3.style.display="block"; -var _4=document.getElementById("icon_"+_1); -_4.className="iconActive"; -var _5=document.getElementById("indicator_image"); -_5.src="img/"+_1+".gif"; -editor.setMode(current_action); -if(_1=="scale"){ -var _6=editor.window.document.getElementById("theImage"); -orginal_width=_6._width; -orginal_height=_6._height; -var w=document.getElementById("sw"); -w.value=orginal_width; -var h=document.getElementById("sh"); -h.value=orginal_height; -} -if(_1=="save"){ -var _9=document.getElementById("save_format"); -var _a=document.getElementById("save_filename").value.match(/\.(gif|png|jpe?g)/i)[1].toLowerCase(); -switch(_a){ -case "png": -_9.selectedIndex="3"; -break; -case "gif": -_9.selectedIndex="4"; -break; -default: -_9.selectedIndex="0"; -break; -} -_9.onchange(); -} -} -} -function toggleMarker(){ -var _b=document.getElementById("markerImg"); -if(_b!=null&&_b.src!=null){ -if(_b.src.indexOf("t_black.gif")>=0){ -_b.src="img/t_white.gif"; -}else{ -_b.src="img/t_black.gif"; -} -editor.toggleMarker(); -} -} -function toggleConstraints(){ -var _c=document.getElementById("scaleConstImg"); -var _d=document.getElementById("constProp"); -if(_c!=null&&_c.src!=null){ -if(_c.src.indexOf("unlocked2.gif")>=0){ -_c.src="img/islocked2.gif"; -_d.checked=true; -checkConstrains("width"); -}else{ -_c.src="img/unlocked2.gif"; -_d.checked=false; -} -} -} -function checkConstrains(_e){ -var _f=document.getElementById("constProp"); -if(_f.checked){ -var w=document.getElementById("sw"); -var _11=w.value; -var h=document.getElementById("sh"); -var _13=h.value; -if(orginal_width>0&&orginal_height>0){ -if(_e=="width"&&_11>0){ -h.value=parseInt((_11/orginal_width)*orginal_height); -}else{ -if(_e=="height"&&_13>0){ -w.value=parseInt((_13/orginal_height)*orginal_width); -} -} -} -} -updateMarker("scale"); -} -function updateMarker(_14){ -if(_14=="crop"){ -var _15=document.getElementById("cx"); -var _16=document.getElementById("cy"); -var _17=document.getElementById("cw"); -var _18=document.getElementById("ch"); -editor.setMarker(parseInt(_15.value),parseInt(_16.value),parseInt(_17.value),parseInt(_18.value)); -}else{ -if(_14=="scale"){ -var _19=document.getElementById("sw"); -var _1a=document.getElementById("sh"); -editor.setMarker(0,0,parseInt(_19.value),parseInt(_1a.value)); -} -} -} -function rotateSubActionSelect(_1b){ -var _1c=_1b.options[_1b.selectedIndex].value; -var _1d=document.getElementById("rotate_preset_select"); -var _1e=document.getElementById("flip"); -var _1f=document.getElementById("ra").parentNode; -switch(_1c){ -case "rotate": -_1d.style.display=""; -_1e.style.display="none"; -_1f.style.display=""; -break; -case "flip": -_1d.style.display="none"; -_1e.style.display=""; -_1f.style.display="none"; -break; -} -} -function rotatePreset(_20){ -var _21=_20.options[_20.selectedIndex].value; -if(_21.length>0&&parseInt(_21)!=0){ -var ra=document.getElementById("ra"); -ra.value=parseInt(_21); -} -} -function updateFormat(_23){ -var _24=_23.options[_23.selectedIndex].value; -var _25=_24.split(","); -if(_25[0]!="jpeg"){ -document.getElementById("slider").style.display="none"; -}else{ -document.getElementById("slider").style.display="inline"; -} -if(_25.length>1){ -updateSlider(parseInt(_25[1])); -} -} -function zoom(){ -var _26=editor.window.document.getElementById("theImage"); -var _27=document.getElementById("zoom").value; -_26.width=_26._width*parseInt(_27,10)/100; -_26.height=_26._height*parseInt(_27,10)/100; -editor.reset(); -editor.pic_width=null; -editor.pic_height=null; -} -function addEvent(obj,_29,fn){ -if(obj.addEventListener){ -obj.addEventListener(_29,fn,true); -return true; -}else{ -if(obj.attachEvent){ -var r=obj.attachEvent("on"+_29,fn); -return r; -}else{ -return false; -} -} -} -var init=function(){ -if(window.opener){ -__xinha_dlg_init(); -__dlg_translate("ExtendedFileManager"); -} -addEvent(window,"resize",winOnResize); -try{ -window.moveTo(0,0); -} -catch(e){ -} -window.resizeTo(window.screen.availWidth,window.screen.availHeight); -winOnResize(); -}; -function winOnResize(){ -if(typeof editor.reset=="function"&&typeof editor.ant!="undefined"){ -editor.reset(); -} -var win=Xinha.viewportSize(window); -document.getElementById("contents").style.height=win.y-parseInt(document.getElementById("indicator").offsetHeight,10)-5+"px"; -} -Xinha.addOnloadHandler(init,window); - +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +var current_action=null;var actions=["crop","scale","rotate","measure","save"];var orginal_width=null,orginal_height=null;function toggle(a){if(current_action!=a){for(var b in actions){if(actions[b]!=a){var d=document.getElementById("tools_"+actions[b]);d.style.display="none";var g=document.getElementById("icon_"+actions[b]);g.className=""}}current_action=a;var d=document.getElementById("tools_"+a);d.style.display="block";var g=document.getElementById("icon_"+a);g.className="iconActive";var k=document.getElementById("indicator_image");k.src="img/"+a+".gif";editor.setMode(current_action);if(a=="scale"){var f=editor.window.document.getElementById("theImage");orginal_width=f._width;orginal_height=f._height;var l=document.getElementById("sw");l.value=orginal_width;var c=document.getElementById("sh");c.value=orginal_height}if(a=="save"){var e=document.getElementById("save_format");var j=document.getElementById("save_filename").value.match(/\.(gif|png|jpe?g)/i)[1].toLowerCase();switch(j){case"png":e.selectedIndex="3";break;case"gif":e.selectedIndex="4";break;default:e.selectedIndex="0";break}e.onchange()}}}function toggleMarker(){var a=document.getElementById("markerImg");if(a!=null&&a.src!=null){if(a.src.indexOf("t_black.gif")>=0){a.src="img/t_white.gif"}else{a.src="img/t_black.gif"}editor.toggleMarker()}}function toggleConstraints(){var a=document.getElementById("scaleConstImg");var b=document.getElementById("constProp");if(a!=null&&a.src!=null){if(a.src.indexOf("unlocked2.gif")>=0){a.src="img/islocked2.gif";b.checked=true;checkConstrains("width")}else{a.src="img/unlocked2.gif";b.checked=false}}}function checkConstrains(f){var e=document.getElementById("constProp");if(e.checked){var b=document.getElementById("sw");var d=b.value;var c=document.getElementById("sh");var a=c.value;if(orginal_width>0&&orginal_height>0){if(f=="width"&&d>0){c.value=parseInt((d/orginal_width)*orginal_height)}else{if(f=="height"&&a>0){b.value=parseInt((a/orginal_height)*orginal_width)}}}}updateMarker("scale")}function updateMarker(f){if(f=="crop"){var e=document.getElementById("cx");var d=document.getElementById("cy");var g=document.getElementById("cw");var b=document.getElementById("ch");editor.setMarker(parseInt(e.value),parseInt(d.value),parseInt(g.value),parseInt(b.value))}else{if(f=="scale"){var a=document.getElementById("sw");var c=document.getElementById("sh");editor.setMarker(0,0,parseInt(a.value),parseInt(c.value))}}}function rotateSubActionSelect(a){var c=a.options[a.selectedIndex].value;var b=document.getElementById("rotate_preset_select");var d=document.getElementById("flip");var e=document.getElementById("ra").parentNode;switch(c){case"rotate":b.style.display="";d.style.display="none";e.style.display="";break;case"flip":b.style.display="none";d.style.display="";e.style.display="none";break}}function rotatePreset(a){var b=a.options[a.selectedIndex].value;if(b.length>0&&parseInt(b)!=0){var c=document.getElementById("ra");c.value=parseInt(b)}}function updateFormat(c){var b=c.options[c.selectedIndex].value;var a=b.split(",");if(a[0]!="jpeg"){document.getElementById("slider").style.display="none"}else{document.getElementById("slider").style.display="inline"}if(a.length>1){updateSlider(parseInt(a[1]))}}function zoom(){var a=editor.window.document.getElementById("theImage");var b=document.getElementById("zoom").value;a.width=a._width*parseInt(b,10)/100;a.height=a._height*parseInt(b,10)/100;editor.reset();editor.pic_width=null;editor.pic_height=null}function addEvent(d,c,a){if(d.addEventListener){d.addEventListener(c,a,true);return true}else{if(d.attachEvent){var b=d.attachEvent("on"+c,a);return b}else{return false}}}var init=function(){if(window.opener){__xinha_dlg_init();__dlg_translate("ExtendedFileManager")}addEvent(window,"resize",winOnResize);try{window.moveTo(0,0)}catch(a){}window.resizeTo(window.screen.availWidth,window.screen.availHeight);winOnResize()};function winOnResize(){if(typeof editor.reset=="function"&&typeof editor.ant!="undefined"){editor.reset()}var a=Xinha.viewportSize(window);document.getElementById("contents").style.height=a.y-parseInt(document.getElementById("indicator").offsetHeight,10)-5+"px"}Xinha.addOnloadHandler(init,window); \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/assets/editorFrame.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/assets/editorFrame.js,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/assets/editorFrame.js 13 May 2008 18:53:49 -0000 1.4 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/assets/editorFrame.js 16 Jan 2009 09:05:47 -0000 1.5 @@ -1,91 +1,2 @@ -/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */ -/* This file is part of version 0.95 released Mon, 12 May 2008 17:33:15 +0200 */ -/* The URL of the most recent version of this file is http://svn.xinha.webfactional.com/trunk/plugins/ExtendedFileManager/assets/editorFrame.js */ -var topDoc=window.top.document; -var t_cx=topDoc.getElementById("cx"); -var t_cy=topDoc.getElementById("cy"); -var t_cw=topDoc.getElementById("cw"); -var t_ch=topDoc.getElementById("ch"); -var m_sx=topDoc.getElementById("sx"); -var m_sy=topDoc.getElementById("sy"); -var m_w=topDoc.getElementById("mw"); -var m_h=topDoc.getElementById("mh"); -var m_a=topDoc.getElementById("ma"); -var m_d=topDoc.getElementById("md"); -var s_sw=topDoc.getElementById("sw"); -var s_sh=topDoc.getElementById("sh"); -var r_ra=topDoc.getElementById("ra"); -var pattern="img/2x2.gif"; -function doSubmit(_1){ -if(_1=="crop"){ -var _2=_backend_url+"__function=editorFrame&img="+currentImageFile+"&action=crop¶ms="+parseInt(t_cx.value)+","+parseInt(t_cy.value)+","+parseInt(t_cw.value)+","+parseInt(t_ch.value); -location.href=_2; -}else{ -if(_1=="scale"){ -var _2=_backend_url+"__function=editorFrame&img="+currentImageFile+"&action=scale¶ms="+parseInt(s_sw.value)+","+parseInt(s_sh.value); -location.href=_2; -}else{ -if(_1=="rotate"){ -var _3=topDoc.getElementById("rotate_sub_action"); -if(_3.value=="flip"){ -location.href=_backend_url+"__function=editorFrame&img="+currentImageFile+"&action=flip¶ms="+topDoc.getElementById("flip").value; -}else{ -if(isNaN(parseFloat(r_ra.value))==false){ -location.href=_backend_url+"__function=editorFrame&img="+currentImageFile+"&action=rotate¶ms="+parseFloat(r_ra.value); -} -} -}else{ -if(_1=="save"){ -var _4=topDoc.getElementById("save_filename"); -var _5=topDoc.getElementById("save_format"); -var _6=topDoc.getElementById("quality"); -var _7=_5.value.split(","); -if(_4.value.length<=0){ -alert(i18n("Please enter a filename to save.")); -}else{ -var _8=encodeURI(_4.value); -var _9=parseInt(_6.value); -var _7=_5.value.split(","); -var _2=_backend_url+"__function=editorFrame&img="+currentImageFile+"&action=save¶ms="+_7[0]+","+_9+"&file="+_8; -location.href=_2; -} -}else{ -if(_1=="preview"){ -var _5=topDoc.getElementById("save_format"); -var _6=topDoc.getElementById("quality"); -var _9=parseInt(_6.value); -var _7=_5.value.split(","); -var _2=_backend_url+"__function=editorFrame&img="+currentImageFile+"&action=preview¶ms="+_7[0]+","+_9+"&file="+_8; -location.href=_2; -} -} -} -} -} -} -function addEvent(_a,_b,fn){ -if(_a.addEventListener){ -_a.addEventListener(_b,fn,true); -return true; -}else{ -if(_a.attachEvent){ -var r=_a.attachEvent("on"+_b,fn); -return r; -}else{ -return false; -} -} -} -var jg_doc; -init=function(){ -jg_doc=new jsGraphics("imgCanvas"); -jg_doc.setColor("#000000"); -initEditor(); -if(window.parent.document.getElementById("zoom").value!="100"){ -window.parent.zoom(); -} -reset(); -window.parent.document.getElementById("filesize").innerHTML=fileSize; -}; -addEvent(window,"load",init); - +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +var topDoc=window.top.document;var t_cx=topDoc.getElementById("cx");var t_cy=topDoc.getElementById("cy");var t_cw=topDoc.getElementById("cw");var t_ch=topDoc.getElementById("ch");var m_sx=topDoc.getElementById("sx");var m_sy=topDoc.getElementById("sy");var m_w=topDoc.getElementById("mw");var m_h=topDoc.getElementById("mh");var m_a=topDoc.getElementById("ma");var m_d=topDoc.getElementById("md");var s_sw=topDoc.getElementById("sw");var s_sh=topDoc.getElementById("sh");var r_ra=topDoc.getElementById("ra");var pattern="img/2x2.gif";function doSubmit(d){if(d=="crop"){var b=_backend_url+"__function=editorFrame&img="+currentImageFile+"&action=crop¶ms="+parseInt(t_cx.value)+","+parseInt(t_cy.value)+","+parseInt(t_cw.value)+","+parseInt(t_ch.value);location.href=b}else{if(d=="scale"){var b=_backend_url+"__function=editorFrame&img="+currentImageFile+"&action=scale¶ms="+parseInt(s_sw.value)+","+parseInt(s_sh.value);location.href=b}else{if(d=="rotate"){var g=topDoc.getElementById("rotate_sub_action");if(g.value=="flip"){location.href=_backend_url+"__function=editorFrame&img="+currentImageFile+"&action=flip¶ms="+topDoc.getElementById("flip").value}else{if(isNaN(parseFloat(r_ra.value))==false){location.href=_backend_url+"__function=editorFrame&img="+currentImageFile+"&action=rotate¶ms="+parseFloat(r_ra.value)}}}else{if(d=="save"){var c=topDoc.getElementById("save_filename");var f=topDoc.getElementById("save_format");var e=topDoc.getElementById("quality");var h=f.value.split(",");if(c.value.length<=0){alert(i18n("Please enter a filename to save."))}else{var a=encodeURI(c.value);var i=parseInt(e.value);var h=f.value.split(",");var b=_backend_url+"__function=editorFrame&img="+currentImageFile+"&action=save¶ms="+h[0]+","+i+"&file="+a;location.href=b}}else{if(d=="preview"){var f=topDoc.getElementById("save_format");var e=topDoc.getElementById("quality");var i=parseInt(e.value);var h=f.value.split(",");var b=_backend_url+"__function=editorFrame&img="+currentImageFile+"&action=preview¶ms="+h[0]+","+i+"&file="+a;location.href=b}}}}}}function addEvent(d,c,a){if(d.addEventListener){d.addEventListener(c,a,true);return true}else{if(d.attachEvent){var b=d.attachEvent("on"+c,a);return b}else{return false}}}var jg_doc;init=function(){jg_doc=new jsGraphics("imgCanvas");jg_doc.setColor("#000000");initEditor();if(window.parent.document.getElementById("zoom").value!="100"){window.parent.zoom()}reset();window.parent.document.getElementById("filesize").innerHTML=fileSize};addEvent(window,"load",init); \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/assets/images.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/assets/images.js,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/assets/images.js 13 May 2008 18:53:49 -0000 1.5 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/assets/images.js 16 Jan 2009 09:05:47 -0000 1.6 @@ -1,245 +1,2 @@ -/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */ -/* This file is part of version 0.95 released Mon, 12 May 2008 17:33:15 +0200 */ -/* The URL of the most recent version of this file is http://svn.xinha.webfactional.com/trunk/plugins/ExtendedFileManager/assets/images.js */ -function i18n(_1){ -return Xinha._lc(_1,"ExtendedFileManager"); -} -function changeDir(_2){ -showMessage("Loading"); -var _3=window.top.document.getElementById("manager_mode").value; -var _4=window.top.document.getElementById("viewtype"); -var _5=_4.options[_4.selectedIndex].value; -location.href=_backend_url+"__function=images&mode="+_3+"&dir="+_2+"&viewtype="+_5; -document.cookie="EFMStartDir"+_3+"="+_2; -} -function newFolder(_6,_7){ -var _8=window.top.document.getElementById("manager_mode").value; -var _9=window.top.document.getElementById("viewtype"); -var _a=_9.options[_9.selectedIndex].value; -location.href=_backend_url+"__function=images&mode="+_8+"&dir="+_6+"&newDir="+_7+"&viewtype="+_a; -} -function renameFile(_b){ -var _c=_b.replace(/.*%2F/,"").replace(/\..*$/,""); -var _d=function(_e){ -if(_e==""||_e==null||_e==_c){ -alert(i18n("Cancelled rename.")); -return false; -} -var _f=window.top.document.getElementById("manager_mode").value; -var _10=window.top.document.getElementById("dirPath"); -var dir=_10.options[_10.selectedIndex].value; -_10=window.top.document.getElementById("viewtype"); -var _12=_10.options[_10.selectedIndex].value; -location.href=_backend_url+"__function=images&mode="+_f+"&dir="+dir+"&rename="+_b+"&renameTo="+_e+"&viewtype="+_12; -}; -if(Xinha.ie_version>6){ -popupPrompt(i18n("Please enter new name for this file..."),_c,_d,i18n("Rename")); -}else{ -var _13=prompt(i18n("Please enter new name for this file..."),_c); -_d(_13); -} -} -function renameDir(_14){ -function rename(_15){ -if(_15==""||_15==null||_15==_14){ -alert(i18n("Cancelled rename.")); -return false; -} -var _16=window.top.document.getElementById("manager_mode").value; -var _17=window.top.document.getElementById("dirPath"); -var dir=_17.options[_17.selectedIndex].value; -_17=window.top.document.getElementById("viewtype"); -var _19=_17.options[_17.selectedIndex].value; -location.href=_backend_url+"__function=images&mode="+_16+"&dir="+dir+"&rename="+_14+"&renameTo="+_15+"&viewtype="+_19; -} -if(Xinha.ie_version>6){ -popupPrompt(i18n("Please enter new name for this folder..."),_14,rename,i18n("Rename")); -}else{ -var _1a=prompt(i18n("Please enter new name for this folder..."),_14); -rename(_1a); -} -} -function copyFile(_1b,_1c){ -var _1d=window.top.document.getElementById("dirPath"); -var dir=_1d.options[_1d.selectedIndex].value; -window.top.pasteButton({"dir":dir,"file":_1b,"action":_1c+"File"}); -} -function copyDir(_1f,_20){ -var _21=window.top.document.getElementById("dirPath"); -var dir=_21.options[_21.selectedIndex].value; -window.top.pasteButton({"dir":dir,"file":_1f,"action":_20+"Dir"}); -} -function paste(_23){ -var _24=window.top.document.getElementById("manager_mode").value; -var _25=window.top.document.getElementById("dirPath"); -var dir=_25.options[_25.selectedIndex].value; -_25=window.top.document.getElementById("viewtype"); -var _27=_25.options[_25.selectedIndex].value; -location.href=_backend_url+"__function=images&mode="+_24+"&dir="+dir+"&paste="+_23.action+"&srcdir="+_23.dir+"&file="+_23.file+"&viewtype="+_27; -} -function updateDir(_28){ -var _29=window.top.document.getElementById("manager_mode").value; -document.cookie="EFMStartDir"+_29+"="+_28; -var _2a=window.top.document.getElementById("dirPath"); -if(_2a){ -for(var i=0;i<_2a.length;i++){ -var _2c=_2a.options[i].text; -if(_2c==_28){ -_2a.selectedIndex=i; -showMessage("Loading"); -break; -} -} -} -} -function emptyProperties(){ -toggleImageProperties(false); -var _2d=window.top.document; -_2d.getElementById("f_url").value=""; -_2d.getElementById("f_alt").value=""; -_2d.getElementById("f_title").value=""; -_2d.getElementById("f_width").value=""; -_2d.getElementById("f_margin").value=""; -_2d.getElementById("f_height").value=""; -_2d.getElementById("f_padding").value=""; -_2d.getElementById("f_border").value=""; -_2d.getElementById("f_borderColor").value=""; -_2d.getElementById("f_backgroundColor").value=""; -} -function toggleImageProperties(val){ -var _2f=window.top.document; -if(val==true){ -_2f.getElementById("f_width").value=""; -_2f.getElementById("f_margin").value=""; -_2f.getElementById("f_height").value=""; -_2f.getElementById("f_padding").value=""; -_2f.getElementById("f_border").value=""; -_2f.getElementById("f_borderColor").value=""; -_2f.getElementById("f_backgroundColor").value=""; -} -_2f.getElementById("f_width").disabled=val; -_2f.getElementById("f_margin").disabled=val; -_2f.getElementById("f_height").disabled=val; -_2f.getElementById("f_padding").disabled=val; -_2f.getElementById("f_align").disabled=val; -_2f.getElementById("f_border").disabled=val; -_2f.getElementById("f_borderColor").value=""; -_2f.getElementById("f_backgroundColor").value=""; -_2f.getElementById("constrain_prop").disabled=val; -} -function selectImage(_30,alt,_32,_33){ -var _34=window.top.document; -if(_34.getElementById("manager_mode").value=="image"){ -var obj=_34.getElementById("f_url"); -obj.value=_30; -obj=_34.getElementById("f_alt"); -obj.value=alt; -obj=_34.getElementById("f_title"); -obj.value=alt; -if(_32==0&&_33==0){ -toggleImageProperties(true); -}else{ -toggleImageProperties(false); -var obj=_34.getElementById("f_width"); -obj.value=_32; -var obj=_34.getElementById("f_height"); -obj.value=_33; -var obj=_34.getElementById("orginal_width"); -obj.value=_32; -var obj=_34.getElementById("orginal_height"); -obj.value=_33; -update_selected(); -} -}else{ -if(_34.getElementById("manager_mode").value=="link"){ -var obj=_34.getElementById("f_href"); -obj.value=_30; -var obj=_34.getElementById("f_title"); -obj.value=alt; -} -} -return false; -} -var _current_selected=null; -function update_selected(){ -var _36=window.top.document; -if(_current_selected){ -_current_selected.className=_current_selected.className.replace(/(^| )active( |$)/,"$1$2"); -_current_selected=null; -} -var _37=_36.getElementById("f_url").value; -var _38=_36.getElementById("dirPath"); -var _39=_38.options[_38.selectedIndex].text; -var dRe=new RegExp("^("+_39.replace(/([\/\^$*+?.()|{}[\]])/g,"\\$1")+")([^/]*)$"); -if(dRe.test(_37)){ -var _3b=document.getElementById("holder_"+asc2hex(RegExp.$2)); -if(_3b){ -_current_selected=_3b; -_3b.className+=" active"; -} -} -showPreview(_37); -} -function asc2hex(str){ -var _3d=""; -for(var i=0;i6){popupPrompt(i18n("Please enter new name for this file..."),c,b,i18n("Rename"))}else{var a=prompt(i18n("Please enter new name for this file..."),c);b(a)}}function renameDir(c){function b(d){if(d==""||d==null||d==c){alert(i18n("Cancelled rename."));return false}var h=window.top.document.getElementById("manager_mode").value;var g=window.top.document.getElementById("dirPath");var f=g.options[g.selectedIndex].value;g=window.top.document.getElementById("viewtype");var e=g.options[g.selectedIndex].value;location.href=_backend_url+"__function=images&mode="+h+"&dir="+f+"&rename="+c+"&renameTo="+d+"&viewtype="+e}if(Xinha.ie_version>6){popupPrompt(i18n("Please enter new name for this folder..."),c,b,i18n("Rename"))}else{var a=prompt(i18n("Please enter new name for this folder..."),c);b(a)}}function copyFile(b,d){var c=window.top.document.getElementById("dirPath");var a=c.options[c.selectedIndex].value;window.top.pasteButton({dir:a,file:b,action:d+"File"})}function copyDir(a,d){var c=window.top.document.getElementById("dirPath");var b=c.options[c.selectedIndex].value;window.top.pasteButton({dir:b,file:a,action:d+"Dir"})}function paste(d){var e=window.top.document.getElementById("manager_mode").value;var c=window.top.document.getElementById("dirPath");var b=c.options[c.selectedIndex].value;c=window.top.document.getElementById("viewtype");var a=c.options[c.selectedIndex].value;location.href=_backend_url+"__function=images&mode="+e+"&dir="+b+"&paste="+d.action+"&srcdir="+d.dir+"&file="+d.file+"&viewtype="+a}function updateDir(d){var e=window.top.document.getElementById("manager_mode").value;document.cookie="EFMStartDir"+e+"="+d;var c=window.top.document.getElementById("dirPath");if(c){for(var b=0;b=0;){ -var op=_3[i]; -op.selected=(op.value==_2); -} -c.value=_2; -} -function i18n(_6){ -return Xinha._lc(_6,"ExtendedFileManager"); -} -function setAlign(_7){ -var _8=document.getElementById("f_align"); -for(var i=0;i<_8.length;i++){ -if(_8.options[i].value==_7){ -_8.selectedIndex=i; -break; -} -} -} -function onTargetChanged(){ -var f=document.getElementById("f_other_target"); -if(this.value=="_other"){ -f.style.visibility="visible"; -f.select(); -f.focus(); -}else{ -f.style.visibility="hidden"; -} -} -function init(){ -if(typeof imgManager=="undefined"){ -setTimeout(init,10); -return; -} -var w=650; -var h=600; -window.resizeTo(w,h); -var _d=Xinha.pageSize(window); -window.resizeTo(w,h); -var _e=Xinha.viewportSize(window); -window.resizeBy(0,_d.y-_e.y+5); -_e=Xinha.viewportSize(window); -if(!Xinha.is_ie){ -var x=opener.screenX+(opener.outerWidth-_e.x)/2; -var y=opener.screenY+(opener.outerHeight-_e.x)/2; -}else{ -var x=(self.screen.availWidth-_e.x)/2; -var y=(self.screen.availHeight-_e.y)/2; -} -window.moveTo(x,y); -__xinha_dlg_init(); -__dlg_translate("ExtendedFileManager"); -var _11=document.getElementById("uploadForm"); -if(_11){ -_11.target="imgManager"; -} -var _12=window.dialogArguments.editor; -var _13=window.dialogArguments.param; -var _14=null; -if(manager_mode=="image"&&_13){ -var _15=new RegExp("^https?://"); -if(_13.f_url.length>0&&!_15.test(_13.f_url)&&typeof _13.baseHref=="string"){ -_13.f_url=_13.baseHref+_13.f_url; -} -var _16=new RegExp("(https?://[^/]*)?"+base_url.replace(/\/$/,"")); -_13.f_url=_13.f_url.replace(_16,""); -var rd=(_resized_dir)?_resized_dir.replace(Xinha.RE_Specials,"\\$1")+"/":""; -var rp=_resized_prefix.replace(Xinha.RE_Specials,"\\$1"); -var _19=new RegExp("^(.*/)"+rd+rp+"_([0-9]+)x([0-9]+)_([^/]+)$"); -var _1a=_13.f_url.match(_19); -if(_19.test(_13.f_url)){ -_13.f_url=RegExp.$1+RegExp.$4; -_13.f_width=RegExp.$2; -_13.f_height=RegExp.$3; -} -document.getElementById("f_url").value=_13["f_url"]; -document.getElementById("f_alt").value=_13["f_alt"]; -document.getElementById("f_title").value=_13["f_title"]; -document.getElementById("f_border").value=_13["f_border"]; -document.getElementById("f_width").value=_13["f_width"]; -document.getElementById("f_height").value=_13["f_height"]; -document.getElementById("f_margin").value=_13["f_margin"]; -document.getElementById("f_padding").value=_13["f_padding"]; -document.getElementById("f_borderColor").value=_13["f_borderColor"]; -document.getElementById("f_backgroundColor").value=_13["f_backgroundColor"]; -setAlign(_13["f_align"]); -document.getElementById("f_url").focus(); -document.getElementById("orginal_width").value=_13["f_width"]; -document.getElementById("orginal_height").value=_13["f_height"]; -var _19=new RegExp("^(.*/)([^/]+)$"); -if(_19.test(_13["f_url"])){ -_14=RegExp.$1; -} -document.getElementById("f_preview").src=_backend_url+"__function=thumbs&img="+_13.f_url; -}else{ -if(manager_mode=="link"&&_13){ -var _1b=document.getElementById("f_target"); -var _1c=true; -var _15=new RegExp("^https?://"); -if(_13.f_href.length>0&&!_15.test(_13.f_href)&&typeof _13.baseHref=="string"){ -_13.f_href=_13.baseHref+_13.f_href; -} -var _1d=new RegExp("(https?://[^/]*)?"+base_url.replace(/\/$/,"")); -_13.f_href=_13.f_href.replace(_1d,""); -var _19=new RegExp("^(.*/)([^/]+)$"); -if(_19.test(_13["f_href"])){ -_14=RegExp.$1; -}else{ -_14=document.cookie.match(/EFMStartDirlink=(.*?)(;|$)/); -if(_14){ -_14=_14[1]; -} -} -if(_13){ -if(typeof _13["f_usetarget"]!="undefined"){ -_1c=_13["f_usetarget"]; -} -if(typeof _13["f_href"]!="undefined"){ -document.getElementById("f_href").value=_13["f_href"]; -document.getElementById("f_title").value=_13["f_title"]; -comboSelectValue(_1b,_13["f_target"]); -if(_1b.value!=_13.f_target){ -var opt=document.createElement("option"); -opt.value=_13.f_target; -opt.innerHTML=opt.value; -_1b.appendChild(opt); -opt.selected=true; -} -} -} -if(!_1c){ -document.getElementById("f_target_label").style.visibility="hidden"; -document.getElementById("f_target").style.visibility="hidden"; -document.getElementById("f_other_target").style.visibility="hidden"; -} -var opt=document.createElement("option"); -opt.value="_other"; -opt.innerHTML=i18n("Other"); -_1b.appendChild(opt); -_1b.onchange=onTargetChanged; -document.getElementById("f_href").focus(); -}else{ -if(!_13){ -_14=document.cookie.match(new RegExp("EFMStartDir"+manager_mode+"=(.*?)(;|$)")); -if(_14){ -_14=_14[1]; -} -} -} -} -if(_14){ -iframeUrl+="&dir="+_14; -var _1f=document.getElementById("dirPath"); -for(var i=0;i<_1f.options.length;i++){ -if(_1f.options[i].value==encodeURIComponent(_14)){ -_1f.options[i].selected=true; -break; -} -} -} -imgManager.location.replace(iframeUrl); -if(manager_mode=="image"&&typeof Xinha.colorPicker!="undefined"&&document.getElementById("f_backgroundColor")&&document.getElementById("f_backgroundColor").type=="text"){ -var _21={cellsize:_12.config.colorPickerCellSize,granularity:_12.config.colorPickerGranularity,websafe:_12.config.colorPickerWebSafe,savecolors:_12.config.colorPickerSaveColors}; -new Xinha.colorPicker.InputBinding(document.getElementById("f_backgroundColor"),_21); -new Xinha.colorPicker.InputBinding(document.getElementById("f_borderColor"),_21); -} -setTimeout(function(){ -resize(); -addEvent(window,"resize",resize); -},500); -} -function pasteButton(_22){ -var _23=document.getElementById("pasteBtn"); -if(!_23.firstChild){ -var a=document.createElement("a"); -a.href="javascript:void(0);"; -var img=document.createElement("img"); -img.src=window.opener.Xinha.getPluginDir("ExtendedFileManager")+"/img/edit_paste.gif"; -img.alt=i18n("Paste"); -a.appendChild(img); -_23.appendChild(a); -} -_23.onclick=function(){ -if(typeof imgManager!="undefined"){ -imgManager.paste(_22); -} -if(_22.action=="moveFile"||_22.action=="moveDir"){ -this.onclick=null; -this.removeChild(this.firstChild); -} -}; -switch(_22.action){ -case "copyFile": -_23.firstChild.title=i18n("Copy \"$file="+_22.file+"$\" from \"$dir="+decodeURIComponent(_22.dir)+"$\" here"); -break; -case "copyDir": -_23.firstChild.title=i18n("Copy folder \"$file="+_22.file+"$\" from \"$dir="+decodeURIComponent(_22.dir)+"$\" here"); -break; -case "moveFile": -_23.firstChild.title=i18n("Move \"$file="+_22.file+"$\" from \"$dir="+decodeURIComponent(_22.dir)+"$\" here"); -break; -break; -case "moveDir": -_23.firstChild.title=i18n("Move folder \"$file="+_22.file+"$\" from \"$dir="+decodeURIComponent(_22.dir)+"$\" here"); -break; -} -} -function onCancel(){ -__dlg_close(null); -return false; -} -function onOK(){ -if(manager_mode=="image"){ -var _26=["f_url","f_alt","f_title","f_align","f_border","f_margin","f_padding","f_height","f_width","f_borderColor","f_backgroundColor"]; -var _27=new Object(); -for(var i in _26){ -var id=_26[i]; -var el=document.getElementById(id); -if(id=="f_url"&&el.value.indexOf("://")<0&&el.value){ -_27[id]=makeURL(base_url,el.value); -}else{ -_27[id]=el.value; -} -} -var _2b={w:document.getElementById("orginal_width").value,h:document.getElementById("orginal_height").value}; -if((_2b.w!=_27.f_width)||(_2b.h!=_27.f_height)){ -var _2c=Xinha._geturlcontent(window.opener.Xinha.getPluginDir("ExtendedFileManager")+"/"+_backend_url+"&__function=resizer&img="+encodeURIComponent(document.getElementById("f_url").value)+"&width="+_27.f_width+"&height="+_27.f_height); -_2c=eval(_2c); -if(_2c){ -_27.f_url=makeURL(base_url,_2c); -} -} -__dlg_close(_27); -return false; -}else{ -if(manager_mode=="link"){ -var _2d={}; -for(var i in _2d){ -var el=document.getElementById(i); -if(!el.value){ -alert(_2d[i]); -el.focus(); -return false; -} -} -var _26=["f_href","f_title","f_target"]; -var _27=new Object(); -for(var i in _26){ -var id=_26[i]; -var el=document.getElementById(id); -if(id=="f_href"&&el.value.indexOf("://")<0){ -_27[id]=makeURL(base_url,el.value); -}else{ -_27[id]=el.value; -} -} -if(_27.f_target=="_other"){ -_27.f_target=document.getElementById("f_other_target").value; -} -__dlg_close(_27); -return false; -} -} -} -function makeURL(_2e,_2f){ -if(_2e.substring(_2e.length-1)!="/"){ -_2e+="/"; -} -if(_2f.charAt(0)=="/"){ -} -_2f=_2f.substring(1); -return _2e+_2f; -} -function updateDir(_30){ -var _31=_30.options[_30.selectedIndex].value; -changeDir(_31); -} -function goUpDir(){ -var _32=document.getElementById("dirPath"); -var _33=_32.options[_32.selectedIndex].text; -if(_33.length<2){ -return false; -} -var _34=_33.split("/"); -var _35=""; -for(var i=0;i<_34.length-2;i++){ -_35+=_34[i]+"/"; -} -for(var i=0;i<_32.length;i++){ -var _37=_32.options[i].text; -if(_37==_35){ -_32.selectedIndex=i; -var _38=_32.options[i].value; -changeDir(_38); -break; -} -} -} -function changeDir(_39){ -if(typeof imgManager!="undefined"){ -imgManager.changeDir(_39); -} -} -function updateView(){ -refresh(); -} -function toggleConstrains(_3a){ -var _3b=document.getElementById("imgLock"); -var _3a=document.getElementById("constrain_prop"); -if(_3a.checked){ -_3b.src="img/locked.gif"; -checkConstrains("width"); -}else{ -_3b.src="img/unlocked.gif"; -} -} -function checkConstrains(_3c){ -var _3d=document.getElementById("constrain_prop"); -if(_3d.checked){ -var obj=document.getElementById("orginal_width"); -var _3f=parseInt(obj.value); -var obj=document.getElementById("orginal_height"); -var _40=parseInt(obj.value); -var _41=document.getElementById("f_width"); -var _42=document.getElementById("f_height"); -var _43=parseInt(_41.value); -var _44=parseInt(_42.value); -if(_3f>0&&_40>0){ -if(_3c=="width"&&_43>0){ -_42.value=parseInt((_43/_3f)*_40); -} -if(_3c=="height"&&_44>0){ -_41.value=parseInt((_44/_40)*_3f); -} -} -} -} -function showMessage(_45){ -var _46=document.getElementById("message"); -var _47=document.getElementById("messages"); -if(_46.firstChild){ -_46.removeChild(_46.firstChild); -} -_46.appendChild(document.createTextNode(i18n(_45))); -_47.style.display="block"; -} -function addEvent(obj,_49,fn){ -if(obj.addEventListener){ -obj.addEventListener(_49,fn,true); -return true; -}else{ -if(obj.attachEvent){ -var r=obj.attachEvent("on"+_49,fn); -return r; -}else{ -return false; -} -} -} -function doUpload(){ -var _4c=document.getElementById("uploadForm"); -if(_4c){ -showMessage("Uploading"); -} -} -function refresh(){ -var _4d=document.getElementById("dirPath"); -updateDir(_4d); -} -function newFolder(){ -function createFolder(_4e){ -var _4f=document.getElementById("dirPath"); -var dir=_4f.options[_4f.selectedIndex].value; -if(_4e==thumbdir){ -alert(i18n("Invalid folder name, please choose another folder name.")); -return false; -} -if(_4e&&_4e!=""&&typeof imgManager!="undefined"){ -imgManager.newFolder(dir,encodeURI(_4e)); -} -} -if(Xinha.ie_version>6){ -popupPrompt(i18n("Please enter name for new folder..."),i18n("Untitled"),createFolder,i18n("New Folder")); -}else{ -var _51=prompt(i18n("Please enter name for new folder..."),i18n("Untitled")); -createFolder(_51); -} -} -function resize(){ -var win=Xinha.viewportSize(window); -var m=document.getElementById("messages"); -var _54=(m&&m.style.display!="none")?parseInt(document.getElementById("messages").offsetHeight,10):0; -document.getElementById("imgManager").style.height=parseInt(win.y-130-document.getElementById("controls").offsetHeight,10)-_54+"px"; -return true; -} -Xinha.addOnloadHandler(init,window); - +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +function comboSelectValue(f,d){var b=f.getElementsByTagName("option");for(var a=b.length;--a>=0;){var e=b[a];e.selected=(e.value==d)}f.value=d}function i18n(a){return Xinha._lc(a,"ExtendedFileManager")}function setAlign(c){var b=document.getElementById("f_align");for(var a=0;a0&&!n.test(g.f_url)&&typeof g.baseHref=="string"){g.f_url=g.baseHref+g.f_url}var t=new RegExp("(https?://[^/]*)?"+base_url.replace(/\/$/,""));g.f_url=g.f_url.replace(t,"");var u=(_resized_dir)?_resized_dir.replace(Xinha.RE_Specials,"\\$1")+"/":"";var p=_resized_prefix.replace(Xinha.RE_Specials,"\\$1");var c=new RegExp("^(.*/)"+u+p+"_([0-9]+)x([0-9]+)_([^/]+)$");var l=g.f_url.match(c);if(c.test(g.f_url)){g.f_url=RegExp.$1+RegExp.$4;g.f_width=RegExp.$2;g.f_height=RegExp.$3}document.getElementById("f_url").value=g.f_url;document.getElementById("f_alt").value=g.f_alt;document.getElementById("f_title").value=g.f_title;document.getElementById("f_border").value=g.f_border;document.getElementById("f_width").value=g.f_width;document.getElementById("f_height").value=g.f_height;document.getElementById("f_margin").value=g.f_margin;document.getElementById("f_padding").value=g.f_padding;document.getElementById("f_borderColor").value=g.f_borderColor;document.getElementById("f_backgroundColor").value=g.f_backgroundColor;setAlign(g.f_align);document.getElementById("f_url").focus();document.getElementById("orginal_width").value=g.f_width;document.getElementById("orginal_height").value=g.f_height;var c=new RegExp("^(.*/)([^/]+)$");if(c.test(g.f_url)){k=RegExp.$1}document.getElementById("f_preview").src=_backend_url+"__function=thumbs&img="+g.f_url}else{if(manager_mode=="link"&&g){var e=document.getElementById("f_target");var n=new RegExp("^https?://");if(g.f_href.length>0&&!n.test(g.f_href)&&typeof g.baseHref=="string"){g.f_href=g.baseHref+g.f_href}var s=new RegExp("(https?://[^/]*)?"+base_url.replace(/\/$/,""));g.f_href=g.f_href.replace(s,"");var c=new RegExp("^(.*/)([^/]+)$");if(c.test(g.f_href)){k=RegExp.$1}else{k=document.cookie.match(/EFMStartDirlink=(.*?)(;|$)/);if(k){k=k[1]}}if(g){if(typeof g.f_href!="undefined"){document.getElementById("f_href").value=g.f_href;document.getElementById("f_title").value=g.f_title;comboSelectValue(e,g.f_target);if(e.value!=g.f_target){var a=document.createElement("option");a.value=g.f_target;a.innerHTML=a.value;e.appendChild(a);a.selected=true}}}if(g.f_usetarget==false||manager_show_target!=false){document.getElementById("f_target_label").style.visibility="hidden";document.getElementById("f_target").style.visibility="hidden";document.getElementById("f_other_target").style.visibility="hidden"}if(e&&g.f_usetarget&&manager_show_target!=false){var a=document.createElement("option");a.value="_other";a.innerHTML=i18n("Other");e.appendChild(a);e.onchange=onTargetChanged}document.getElementById("f_href").focus()}else{if(!g){k=document.cookie.match(new RegExp("EFMStartDir"+manager_mode+"=(.*?)(;|$)"));if(k){k=k[1]}}}}if(k){iframeUrl+="&dir="+k;var b=document.getElementById("dirPath");for(var z=0;z0&&f>0){if(d=="width"&&a>0){h.value=parseInt((a/b)*f)}if(d=="height"&&i>0){g.value=parseInt((i/f)*b)}}}}function showMessage(a){var c=document.getElementById("message");var b=document.getElementById("messages");if(c.firstChild){c.removeChild(c.firstChild)}c.appendChild(document.createTextNode(i18n(a)));b.style.display="block"}function addEvent(d,c,a){if(d.addEventListener){d.addEventListener(c,a,true);return true}else{if(d.attachEvent){var b=d.attachEvent("on"+c,a);return b}else{return false}}}function doUpload(){var a=document.getElementById("uploadForm");if(a){showMessage("Uploading")}}function refresh(){var a=document.getElementById("dirPath");updateDir(a)}function newFolder(){function a(e){var d=document.getElementById("dirPath");var c=d.options[d.selectedIndex].value;if(e==thumbdir){alert(i18n("Invalid folder name, please choose another folder name."));return false}if(e&&e!=""&&typeof imgManager!="undefined"){imgManager.newFolder(c,encodeURI(e))}}if(Xinha.ie_version>6){popupPrompt(i18n("Please enter name for new folder..."),i18n("Untitled"),a,i18n("New Folder"))}else{var b=prompt(i18n("Please enter name for new folder..."),i18n("Untitled"));a(b)}}function resize(){var c=Xinha.viewportSize(window);var a=document.getElementById("messages");var b=(a&&a.style.display!="none")?parseInt(document.getElementById("messages").offsetHeight,10):0;document.getElementById("imgManager").style.height=parseInt(c.y-130-document.getElementById("controls").offsetHeight,10)-b+"px";return true}Xinha.addOnloadHandler(init,window); \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/assets/popup.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/assets/popup.js,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/assets/popup.js 13 May 2008 18:53:49 -0000 1.5 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/assets/popup.js 16 Jan 2009 09:05:47 -0000 1.6 @@ -1,71 +1,87 @@ -/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */ -/* This file is part of version 0.95 released Mon, 12 May 2008 17:33:15 +0200 */ -/* The URL of the most recent version of this file is http://svn.xinha.webfactional.com/trunk/plugins/ExtendedFileManager/assets/popup.js */ -function __dlg_onclose(){ -if(opener.Dialog._return){ -opener.Dialog._return(null); -} -} -function __dlg_init(_1,_2){ -__xinha_dlg_init(_2); -} -function __xinha_dlg_init(_3){ -if(window.__dlg_init_done){ -return true; -} -if(window.opener._editor_skin){ -var _4=document.getElementsByTagName("head")[0]; -var _5=document.createElement("link"); -_5.type="text/css"; -_5.href=window.opener._editor_url+"skins/"+window.opener._editor_skin+"/skin.css"; -_5.rel="stylesheet"; -_4.appendChild(_5); -} -if(!window.dialogArguments&&opener.Dialog._arguments){ -window.dialogArguments=opener.Dialog._arguments; -} -Xinha.addDom0Event(document.body,"keypress",__dlg_close_on_esc); -window.__dlg_init_done=true; -} -function __dlg_translate(_6){ -var _7=["span","option","td","th","button","div","label","a","img","legend"]; -for(var _8=0;_8<_7.length;_8++){ -var _9=document.getElementsByTagName(_7[_8]); -for(var i=_9.length;--i>=0;){ -var _b=_9[i]; -if(_b.firstChild&&_b.firstChild.data){ -var _c=Xinha._lc(_b.firstChild.data,_6); -if(_c){ -_b.firstChild.data=_c; -} -} -if(_b.title){ -var _c=Xinha._lc(_b.title,_6); -if(_c){ -_b.title=_c; -} -} -if(_b.alt){ -var _c=Xinha._lc(_b.alt,_6); -if(_c){ -_b.alt=_c; -} -} -} -} -document.title=Xinha._lc(document.title,_6); -} -function __dlg_close(_d){ -opener.Dialog._return(_d); -window.close(); -} -function popupPrompt(_e,_f,_10,_11){ -Dialog("prompt.html",function(_12){ -if(!_12){ -return false; -}else{ -_10(_12.value); -} -},{prompt:_e,value:_f,title:_11}); -} - +// htmlArea v3.0 - Copyright (c) 2002, 2003 interactivetools.com, inc. +// This copyright notice MUST stay intact for use (see license.txt). +// +// Portions (c) dynarch.com, 2003 +// +// A free WYSIWYG editor replacement for ")},"form"];this.editor.config.btnList.insert_select_field=[this._lc("Insert a select field."),[d,3,0],false,function(){a('')},"form"];this.editor.config.btnList.insert_cb_field=[this._lc("Insert a check box."),[d,4,0],false,function(){a('')},"form"];this.editor.config.btnList.insert_rb_field=[this._lc("Insert a radio button."),[d,5,0],false,function(){a('')},"form"];this.editor.config.btnList.insert_button=[this._lc("Insert a submit/reset button."),[d,6,0],false,function(){a('')},"form"]}FormOperations.prototype.onGenerate=function(){if(Xinha.is_gecko){var a=this.editor;var b=this.editor._doc;Xinha._addEvents(b,["mousemove"],function(c){return a._editorEvent(c)})}};FormOperations.prototype._preparePanel=function(){var a=this;if(this.html==false){Xinha._getback(Xinha.getPluginDir("FormOperations")+"/panel.html",function(b){a.html=b;a._preparePanel()});return false}if(typeof Xinha.Dialog=="undefined"){Xinha._loadback(_editor_url+"modules/Dialogs/XinhaDialog.js",function(){a._preparePanel()});return false}if(typeof Xinha.PanelDialog=="undefined"){Xinha._loadback(_editor_url+"modules/Dialogs/panel-dialog.js",function(){a._preparePanel()});return false}this.panel=new Xinha.PanelDialog(this.editor,"bottom",this.html,"FormOperations");this.panel.hide();this.ready=true};FormOperations.prototype.onUpdateToolbar=function(){if(!this.ready){return true}var b=this.editor._activeElement(this.editor._getSelection());if(b!=null){if(b==this.activeElement){return true}var a=b.tagName.toLowerCase();this.hideAll();if(a==="form"){if(this.editor.config.FormOperations.allow_edit_form){this.showForm(b)}else{this.panel.hide();this.activeElement=null;this.panel.hide();return true}}else{if(this.editor.config.FormOperations.allow_edit_form&&typeof b.form!="undefined"&&b.form){this.showForm(b.form)}switch(a){case"form":this.showForm(b);break;case"input":switch(b.getAttribute("type").toLowerCase()){case"text":case"password":case"hidden":this.showText(b);break;case"radio":case"checkbox":this.showCbRd(b);break;case"submit":case"reset":case"button":this.showButton(b);break}break;case"textarea":this.showTextarea(b);break;case"select":this.showSelect(b);break;default:this.activeElement=null;this.panel.hide();return true}}this.panel.show();this.activeElement=b;return true}else{this.activeElement=null;this.panel.hide();return true}};FormOperations.prototype.hideAll=function(){this.panel.getElementById("fs_form").style.display="none";this.panel.getElementById("fs_text").style.display="none";this.panel.getElementById("fs_textarea").style.display="none";this.panel.getElementById("fs_select").style.display="none";this.panel.getElementById("fs_cbrd").style.display="none";this.panel.getElementById("fs_button").style.display="none"};FormOperations.prototype.showForm=function(a){this.panel.getElementById("fs_form").style.display="";var c={action:a.action,method:a.method.toUpperCase()};this.panel.setValues(c);var b=a;this.panel.getElementById("action").onkeyup=function(){b.action=this.value};this.panel.getElementById("method").onchange=function(){b.method=this.options[this.selectedIndex].value}};FormOperations.prototype.showText=function(b){this.panel.getElementById("fs_text").style.display="";var e={text_name:this.deformatName(b,b.name),text_value:b.value,text_type:b.type.toLowerCase(),text_width:b.style.width?parseFloat(b.style.width.replace(/[^0-9.]/,"")):"",text_width_units:b.style.width?b.style.width.replace(/[0-9.]/,"").toLowerCase():"ex",text_maxlength:b.maxlength?b.maxlength:""};this.panel.setValues(e);var d=b;var c=this;this.panel.getElementById("text_name").onkeyup=function(){d.name=c.formatName(d,this.value)};this.panel.getElementById("text_value").onkeyup=function(){d.value=this.value};this.panel.getElementById("text_type").onchange=function(){if(!Xinha.is_ie){d.type=this.options[this.selectedIndex].value}else{var h=c.editor._doc.createElement("div");if(!/type=/.test(d.outerHTML)){h.innerHTML=d.outerHTML.replace(/0?j.size:1),select_height_units:j.style.height?j.style.height.replace(/[0-9.]/,"").toLowerCase():"items"};this.panel.setValues(f);var b=j;var e=this;this.panel.getElementById("select_name").onkeyup=function(){b.name=e.formatName(b,this.value)};this.panel.getElementById("select_multiple").onclick=function(){b.multiple=this.checked};var k=this.panel.getElementById("select_width");var d=this.panel.getElementById("select_width_units");this.panel.getElementById("select_width").onkeyup=this.panel.getElementById("select_width_units").onchange=function(){if(!k.value||isNaN(parseFloat(k.value))){b.style.width=""}b.style.width=parseFloat(k.value)+d.options[d.selectedIndex].value};var c=this.panel.getElementById("select_height");var g=this.panel.getElementById("select_height_units");this.panel.getElementById("select_height").onkeyup=this.panel.getElementById("select_height_units").onchange=function(){if(!c.value||isNaN(parseFloat(c.value))){b.style.height="";return}if(g.selectedIndex==0){b.style.height="";b.size=parseInt(c.value)}else{b.style.height=parseFloat(c.value)+g.options[g.selectedIndex].value}};var a=this.panel.getElementById("select_options");this.arrayToOpts(this.optsToArray(j.options),a.options);this.panel.getElementById("add_option").onclick=function(){var h=prompt(Xinha._lc("Enter the name for new option.","FormOperations"));if(h==null){return}var l=new Option(h);var i=e.optsToArray(a.options);if(a.selectedIndex>=0){i.splice(a.selectedIndex,0,l)}else{i.push(l)}e.arrayToOpts(i,j.options);e.arrayToOpts(i,a.options)};this.panel.getElementById("del_option").onclick=function(){var m=e.optsToArray(a.options);var l=[];for(var h=0;h0)){return}var i=e.optsToArray(a.options);var h=i.splice(a.selectedIndex,1).pop();i.splice(a.selectedIndex-1,0,h);e.arrayToOpts(i,j.options);e.arrayToOpts(i,a.options)};this.panel.getElementById("down_option").onclick=function(){if(a.selectedIndex==a.options.length-1){return}var i=e.optsToArray(a.options);var h=i.splice(a.selectedIndex,1).pop();i.splice(a.selectedIndex+1,0,h);e.arrayToOpts(i,j.options);e.arrayToOpts(i,a.options)};this.panel.getElementById("select_options").onchange=function(){e.arrayToOpts(e.optsToArray(a.options),j.options)}};FormOperations.prototype.optsToArray=function(d){var b=[];for(var c=0;c=0;c--){d[c]=null}for(var c=0;c")}}},g)}else{var b="";if(typeof c=="undefined"){c=h.getParentElement();var o=c.tagName.toLowerCase();if(c&&(o=="legend")){c=c.parentElement;o=c.tagName.toLowerCase()}if(c&&!(o=="textarea"||o=="select"||o=="input"||o=="label"||o=="fieldset")){c=null}}if(c){k=c.tagName.toLowerCase();g.f_name=c.name;b=c.tagName;if(k=="input"){g.f_type=c.type;k=c.type}switch(k){case"textarea":g.f_cols=c.cols;g.f_rows=c.rows;g.f_text=c.innerHTML;g.f_wrap=c.getAttribute("wrap");g.f_readOnly=c.getAttribute("readOnly");g.f_disabled=c.getAttribute("disabled");g.f_tabindex=c.getAttribute("tabindex");g.f_accesskey=c.getAttribute("accesskey");break;case"select":g.f_size=parseInt(c.size);g.f_multiple=c.getAttribute("multiple");g.f_disabled=c.getAttribute("disabled");g.f_tabindex=c.getAttribute("tabindex");var l=new Array();for(var d=0;d<=c.options.length-1;d++){l[d]=new n(c.options[d].text,c.options[d].value)}g.f_options=l;break;case"text":case"password":g.f_value=c.value;g.f_size=c.size;g.f_maxLength=c.maxLength;g.f_readOnly=c.getAttribute("readOnly");g.f_disabled=c.getAttribute("disabled");g.f_tabindex=c.getAttribute("tabindex");g.f_accesskey=c.getAttribute("accesskey");break;case"hidden":g.f_value=c.value;break;case"submit":case"reset":g.f_value=c.value;g.f_disabled=c.getAttribute("disabled");g.f_tabindex=c.getAttribute("tabindex");g.f_accesskey=c.getAttribute("accesskey");break;case"checkbox":case"radio":g.f_value=c.value;g.f_checked=c.checked;g.f_disabled=c.getAttribute("disabled");g.f_tabindex=c.getAttribute("tabindex");g.f_accesskey=c.getAttribute("accesskey");break;case"button":g.f_value=c.value;g.f_onclick=c.getAttribute("onclick");g.f_disabled=c.getAttribute("disabled");g.f_tabindex=c.getAttribute("tabindex");g.f_accesskey=c.getAttribute("accesskey");break;case"image":g.f_value=c.value;g.f_src=c.src;g.f_disabled=c.getAttribute("disabled");g.f_tabindex=c.getAttribute("tabindex");g.f_accesskey=c.getAttribute("accesskey");break;case"file":g.f_disabled=c.getAttribute("disabled");g.f_tabindex=c.getAttribute("tabindex");g.f_accesskey=c.getAttribute("accesskey");break;case"label":g.f_text=c.innerHTML;g.f_for=c.getAttribute("for");g.f_accesskey=c.getAttribute("accesskey");break;case"fieldset":if(c.firstChild.tagName.toLowerCase()=="legend"){g.f_text=c.firstChild.innerHTML}else{g.f_text=""}break}}else{g.f_name="";switch(e){case"textarea":case"select":case"label":case"fieldset":b=e;break;default:b="input";g.f_type=e;break}g.f_options="";g.f_cols="20";g.f_rows="4";g.f_multiple="false";g.f_value="";g.f_size="";g.f_maxLength="";g.f_checked="";g.f_src="";g.f_onclick="";g.f_wrap="";g.f_readOnly="false";g.f_disabled="false";g.f_tabindex="";g.f_accesskey="";g.f_for="";g.f_text="";g.f_legend=""}h._popupDialog("plugin://Forms/"+b+".html",function(q){if(q){if(q.f_cols){if(isNaN(parseInt(q.f_cols,10))||parseInt(q.f_cols,10)<=0){q.f_cols=""}}if(q.f_rows){if(isNaN(parseInt(q.f_rows,10))||parseInt(q.f_rows,10)<=0){q.f_rows=""}}if(q.f_size){if(isNaN(parseInt(q.f_size,10))||parseInt(q.f_size,10)<=0){q.f_size=""}}if(q.f_maxlength){if(isNaN(parseInt(q.f_maxLength,10))||parseInt(q.f_maxLength,10)<=0){q.f_maxLength=""}}if(c){for(field in q){if((field=="f_text")||(field=="f_options")||(field=="f_onclick")||(field=="f_checked")){continue}if(q[field]!=""){c.setAttribute(field.substring(2,20),q[field])}else{c.removeAttribute(field.substring(2,20))}}if(k=="textarea"){c.innerHTML=q.f_text}else{if(k=="select"){c.options.length=0;var p=q.f_options;for(d=0;d<=p.length-1;d++){c.options[d]=new Option(p[d].text,p[d].value)}}else{if(k=="label"){c.innerHTML=q.f_text}else{if(k=="fieldset"){if(g.f_text!=""){if(c.firstChild.tagName.toLowerCase()=="legend"){c.firstChild.innerHTML=q.f_text}}else{}}else{if((k=="checkbox")||(k=="radio")){if(q.f_checked!=""){c.checked=true}else{c.checked=false}}else{if(q.f_onclick){c.onclick="";if(q.f_onclick!=""){c.onclick=q.f_onclick}}}}}}}}else{var i="";for(field in q){if(!q[field]){continue}if((q[field]=="")||(field=="f_text")||(field=="f_options")){continue}i+=" "+field.substring(2,20)+'="'+q[field]+'"'}if(k=="textarea"){i=""+q.f_text+""}else{if(k=="select"){i="";var p=q.f_options;for(d=0;d<=p.length-1;d++){i+='"}i+=""}else{if(k=="label"){i=""+q.f_text+""}else{if(k=="fieldset"){i="";if(q.f_legend!=""){i+=""+q.f_text+""}i+=""}else{i='"}}}}h.insertHTML(i)}}},g)}}; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Forms/forms.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Forms/Attic/forms.js,v diff -u -N -r1.6 -r1.7 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Forms/forms.js 13 May 2008 18:53:50 -0000 1.6 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Forms/forms.js 16 Jan 2009 09:05:47 -0000 1.7 @@ -1,349 +1,2 @@ -/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */ -/* This file is part of version 0.95 released Mon, 12 May 2008 17:33:15 +0200 */ -/* The URL of the most recent version of this file is http://svn.xinha.webfactional.com/trunk/plugins/Forms/forms.js */ -function Forms(_1){ -this.editor=_1; -var _2=_1.config; -var bl=Forms.btnList; -var _4=this; -var _5=["linebreak"]; -for(var i=0;i"); -} -} -},_13); -}else{ -var _1a=""; -if(typeof _10=="undefined"){ -_10=_e.getParentElement(); -var tag=_10.tagName.toLowerCase(); -if(_10&&(tag=="legend")){ -_10=_10.parentElement; -tag=_10.tagName.toLowerCase(); -} -if(_10&&!(tag=="textarea"||tag=="select"||tag=="input"||tag=="label"||tag=="fieldset")){ -_10=null; -} -} -if(_10){ -_14=_10.tagName.toLowerCase(); -_13.f_name=_10.name; -_1a=_10.tagName; -if(_14=="input"){ -_13.f_type=_10.type; -_14=_10.type; -} -switch(_14){ -case "textarea": -_13.f_cols=_10.cols; -_13.f_rows=_10.rows; -_13.f_text=_10.innerHTML; -_13.f_wrap=_10.getAttribute("wrap"); -_13.f_readOnly=_10.getAttribute("readOnly"); -_13.f_disabled=_10.getAttribute("disabled"); -_13.f_tabindex=_10.getAttribute("tabindex"); -_13.f_accesskey=_10.getAttribute("accesskey"); -break; -case "select": -_13.f_size=parseInt(_10.size); -_13.f_multiple=_10.getAttribute("multiple"); -_13.f_disabled=_10.getAttribute("disabled"); -_13.f_tabindex=_10.getAttribute("tabindex"); -var _1c=new Array(); -for(var i=0;i<=_10.options.length-1;i++){ -_1c[i]=new optionValues(_10.options[i].text,_10.options[i].value); -} -_13.f_options=_1c; -break; -case "text": -case "password": -_13.f_value=_10.value; -_13.f_size=_10.size; -_13.f_maxLength=_10.maxLength; -_13.f_readOnly=_10.getAttribute("readOnly"); -_13.f_disabled=_10.getAttribute("disabled"); -_13.f_tabindex=_10.getAttribute("tabindex"); -_13.f_accesskey=_10.getAttribute("accesskey"); -break; -case "hidden": -_13.f_value=_10.value; -break; -case "submit": -case "reset": -_13.f_value=_10.value; -_13.f_disabled=_10.getAttribute("disabled"); -_13.f_tabindex=_10.getAttribute("tabindex"); -_13.f_accesskey=_10.getAttribute("accesskey"); -break; -case "checkbox": -case "radio": -_13.f_value=_10.value; -_13.f_checked=_10.checked; -_13.f_disabled=_10.getAttribute("disabled"); -_13.f_tabindex=_10.getAttribute("tabindex"); -_13.f_accesskey=_10.getAttribute("accesskey"); -break; -case "button": -_13.f_value=_10.value; -_13.f_onclick=_10.getAttribute("onclick"); -_13.f_disabled=_10.getAttribute("disabled"); -_13.f_tabindex=_10.getAttribute("tabindex"); -_13.f_accesskey=_10.getAttribute("accesskey"); -break; -case "image": -_13.f_value=_10.value; -_13.f_src=_10.src; -_13.f_disabled=_10.getAttribute("disabled"); -_13.f_tabindex=_10.getAttribute("tabindex"); -_13.f_accesskey=_10.getAttribute("accesskey"); -break; -case "file": -_13.f_disabled=_10.getAttribute("disabled"); -_13.f_tabindex=_10.getAttribute("tabindex"); -_13.f_accesskey=_10.getAttribute("accesskey"); -break; -case "label": -_13.f_text=_10.innerHTML; -_13.f_for=_10.getAttribute("for"); -_13.f_accesskey=_10.getAttribute("accesskey"); -break; -case "fieldset": -if(_10.firstChild.tagName.toLowerCase()=="legend"){ -_13.f_text=_10.firstChild.innerHTML; -}else{ -_13.f_text=""; -} -break; -} -}else{ -_13.f_name=""; -switch(_f){ -case "textarea": -case "select": -case "label": -case "fieldset": -_1a=_f; -break; -default: -_1a="input"; -_13.f_type=_f; -break; -} -_13.f_options=""; -_13.f_cols="20"; -_13.f_rows="4"; -_13.f_multiple="false"; -_13.f_value=""; -_13.f_size=""; -_13.f_maxLength=""; -_13.f_checked=""; -_13.f_src=""; -_13.f_onclick=""; -_13.f_wrap=""; -_13.f_readOnly="false"; -_13.f_disabled="false"; -_13.f_tabindex=""; -_13.f_accesskey=""; -_13.f_for=""; -_13.f_text=""; -_13.f_legend=""; -} -_e._popupDialog("plugin://Forms/"+_1a+".html",function(_1e){ -if(_1e){ -if(_1e["f_cols"]){ -if(isNaN(parseInt(_1e["f_cols"],10))||parseInt(_1e["f_cols"],10)<=0){ -_1e["f_cols"]=""; -} -} -if(_1e["f_rows"]){ -if(isNaN(parseInt(_1e["f_rows"],10))||parseInt(_1e["f_rows"],10)<=0){ -_1e["f_rows"]=""; -} -} -if(_1e["f_size"]){ -if(isNaN(parseInt(_1e["f_size"],10))||parseInt(_1e["f_size"],10)<=0){ -_1e["f_size"]=""; -} -} -if(_1e["f_maxlength"]){ -if(isNaN(parseInt(_1e["f_maxLength"],10))||parseInt(_1e["f_maxLength"],10)<=0){ -_1e["f_maxLength"]=""; -} -} -if(_10){ -for(field in _1e){ -if((field=="f_text")||(field=="f_options")||(field=="f_onclick")||(field=="f_checked")){ -continue; -} -if(_1e[field]!=""){ -_10.setAttribute(field.substring(2,20),_1e[field]); -}else{ -_10.removeAttribute(field.substring(2,20)); -} -} -if(_14=="textarea"){ -_10.innerHTML=_1e["f_text"]; -}else{ -if(_14=="select"){ -_10.options.length=0; -var _1f=_1e["f_options"]; -for(i=0;i<=_1f.length-1;i++){ -_10.options[i]=new Option(_1f[i].text,_1f[i].value); -} -}else{ -if(_14=="label"){ -_10.innerHTML=_1e["f_text"]; -}else{ -if(_14=="fieldset"){ -if(_13.f_text!=""){ -if(_10.firstChild.tagName.toLowerCase()=="legend"){ -_10.firstChild.innerHTML=_1e["f_text"]; -} -}else{ -} -}else{ -if((_14=="checkbox")||(_14=="radio")){ -if(_1e["f_checked"]!=""){ -_10.checked=true; -}else{ -_10.checked=false; -} -}else{ -if(_1e["f_onclick"]){ -_10.onclick=""; -if(_1e["f_onclick"]!=""){ -_10.onclick=_1e["f_onclick"]; -} -} -} -} -} -} -} -}else{ -var _20=""; -for(field in _1e){ -if(!_1e[field]){ -continue; -} -if((_1e[field]=="")||(field=="f_text")||(field=="f_options")){ -continue; -} -_20+=" "+field.substring(2,20)+"=\""+_1e[field]+"\""; -} -if(_14=="textarea"){ -_20=""+_1e["f_text"]+""; -}else{ -if(_14=="select"){ -_20=""; -var _1f=_1e["f_options"]; -for(i=0;i<=_1f.length-1;i++){ -_20+=""; -} -_20+=""; -}else{ -if(_14=="label"){ -_20=""+_1e["f_text"]+""; -}else{ -if(_14=="fieldset"){ -_20=""; -if(_1e["f_legend"]!=""){ -_20+=""+_1e["f_text"]+""; -} -_20+=""; -}else{ -_20=""; -} -} -} -} -_e.insertHTML(_20); -} -} -},_13); -} -}; - +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +function Forms(e){this.editor=e;var a=e.config;var h=Forms.btnList;var b=this;var f=["linebreak"];for(var d=0;d")}}},g)}else{var b="";if(typeof c=="undefined"){c=h.getParentElement();var o=c.tagName.toLowerCase();if(c&&(o=="legend")){c=c.parentElement;o=c.tagName.toLowerCase()}if(c&&!(o=="textarea"||o=="select"||o=="input"||o=="label"||o=="fieldset")){c=null}}if(c){k=c.tagName.toLowerCase();g.f_name=c.name;b=c.tagName;if(k=="input"){g.f_type=c.type;k=c.type}switch(k){case"textarea":g.f_cols=c.cols;g.f_rows=c.rows;g.f_text=c.innerHTML;g.f_wrap=c.getAttribute("wrap");g.f_readOnly=c.getAttribute("readOnly");g.f_disabled=c.getAttribute("disabled");g.f_tabindex=c.getAttribute("tabindex");g.f_accesskey=c.getAttribute("accesskey");break;case"select":g.f_size=parseInt(c.size);g.f_multiple=c.getAttribute("multiple");g.f_disabled=c.getAttribute("disabled");g.f_tabindex=c.getAttribute("tabindex");var l=new Array();for(var d=0;d<=c.options.length-1;d++){l[d]=new n(c.options[d].text,c.options[d].value)}g.f_options=l;break;case"text":case"password":g.f_value=c.value;g.f_size=c.size;g.f_maxLength=c.maxLength;g.f_readOnly=c.getAttribute("readOnly");g.f_disabled=c.getAttribute("disabled");g.f_tabindex=c.getAttribute("tabindex");g.f_accesskey=c.getAttribute("accesskey");break;case"hidden":g.f_value=c.value;break;case"submit":case"reset":g.f_value=c.value;g.f_disabled=c.getAttribute("disabled");g.f_tabindex=c.getAttribute("tabindex");g.f_accesskey=c.getAttribute("accesskey");break;case"checkbox":case"radio":g.f_value=c.value;g.f_checked=c.checked;g.f_disabled=c.getAttribute("disabled");g.f_tabindex=c.getAttribute("tabindex");g.f_accesskey=c.getAttribute("accesskey");break;case"button":g.f_value=c.value;g.f_onclick=c.getAttribute("onclick");g.f_disabled=c.getAttribute("disabled");g.f_tabindex=c.getAttribute("tabindex");g.f_accesskey=c.getAttribute("accesskey");break;case"image":g.f_value=c.value;g.f_src=c.src;g.f_disabled=c.getAttribute("disabled");g.f_tabindex=c.getAttribute("tabindex");g.f_accesskey=c.getAttribute("accesskey");break;case"file":g.f_disabled=c.getAttribute("disabled");g.f_tabindex=c.getAttribute("tabindex");g.f_accesskey=c.getAttribute("accesskey");break;case"label":g.f_text=c.innerHTML;g.f_for=c.getAttribute("for");g.f_accesskey=c.getAttribute("accesskey");break;case"fieldset":if(c.firstChild.tagName.toLowerCase()=="legend"){g.f_text=c.firstChild.innerHTML}else{g.f_text=""}break}}else{g.f_name="";switch(e){case"textarea":case"select":case"label":case"fieldset":b=e;break;default:b="input";g.f_type=e;break}g.f_options="";g.f_cols="20";g.f_rows="4";g.f_multiple="false";g.f_value="";g.f_size="";g.f_maxLength="";g.f_checked="";g.f_src="";g.f_onclick="";g.f_wrap="";g.f_readOnly="false";g.f_disabled="false";g.f_tabindex="";g.f_accesskey="";g.f_for="";g.f_text="";g.f_legend=""}h._popupDialog("plugin://Forms/"+b+".html",function(q){if(q){if(q.f_cols){if(isNaN(parseInt(q.f_cols,10))||parseInt(q.f_cols,10)<=0){q.f_cols=""}}if(q.f_rows){if(isNaN(parseInt(q.f_rows,10))||parseInt(q.f_rows,10)<=0){q.f_rows=""}}if(q.f_size){if(isNaN(parseInt(q.f_size,10))||parseInt(q.f_size,10)<=0){q.f_size=""}}if(q.f_maxlength){if(isNaN(parseInt(q.f_maxLength,10))||parseInt(q.f_maxLength,10)<=0){q.f_maxLength=""}}if(c){for(field in q){if((field=="f_text")||(field=="f_options")||(field=="f_onclick")||(field=="f_checked")){continue}if(q[field]!=""){c.setAttribute(field.substring(2,20),q[field])}else{c.removeAttribute(field.substring(2,20))}}if(k=="textarea"){c.innerHTML=q.f_text}else{if(k=="select"){c.options.length=0;var p=q.f_options;for(d=0;d<=p.length-1;d++){c.options[d]=new Option(p[d].text,p[d].value)}}else{if(k=="label"){c.innerHTML=q.f_text}else{if(k=="fieldset"){if(g.f_text!=""){if(c.firstChild.tagName.toLowerCase()=="legend"){c.firstChild.innerHTML=q.f_text}}else{}}else{if((k=="checkbox")||(k=="radio")){if(q.f_checked!=""){c.checked=true}else{c.checked=false}}else{if(q.f_onclick){c.onclick="";if(q.f_onclick!=""){c.onclick=q.f_onclick}}}}}}}}else{var i="";for(field in q){if(!q[field]){continue}if((q[field]=="")||(field=="f_text")||(field=="f_options")){continue}i+=" "+field.substring(2,20)+'="'+q[field]+'"'}if(k=="textarea"){i=""+q.f_text+""}else{if(k=="select"){i="";var p=q.f_options;for(d=0;d<=p.length-1;d++){i+='"}i+=""}else{if(k=="label"){i=""+q.f_text+""}else{if(k=="fieldset"){i="";if(q.f_legend!=""){i+=""+q.f_text+""}i+=""}else{i='"}}}}h.insertHTML(i)}}},g)}}; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/FullPage/FullPage.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/FullPage/FullPage.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/FullPage/FullPage.js 16 Jan 2009 09:05:47 -0000 1.1 @@ -0,0 +1,2 @@ +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +function FullPage(c){this.editor=c;var a=c.config;a.fullPage=true;var b=this;a.registerButton("FP-docprop",this._lc("Document properties"),c.imgURL("docprop.gif","FullPage"),false,function(d,e){b.buttonPress(d,e)});a.addToolbarElement(["separator","FP-docprop"],"separator",-1)}FullPage._pluginInfo={name:"FullPage",version:"1.0",developer:"Mihai Bazon",developer_url:"http://dynarch.com/mishoo/",c_owner:"Mihai Bazon",sponsor:"Thycotic Software Ltd.",sponsor_url:"http://thycotic.com",license:"htmlArea"};FullPage.prototype._lc=function(a){return Xinha._lc(a,"FullPage")};FullPage.prototype.buttonPress=function(e,a){var q=this;switch(a){case"FP-docprop":var k=e._doc;var n=k.getElementsByTagName("link");var l="";var j="";var d="";var m="";var b="";for(var c=n.length;--c>=0;){var g=n[c];if(/stylesheet/i.test(g.rel)){if(/alternate/i.test(g.rel)){j=g.href}else{l=g.href}}}var f=k.getElementsByTagName("meta");for(var c=f.length;--c>=0;){var p=f[c];if(/content-type/i.test(p.httpEquiv)){r=/^text\/html; *charset=(.*)$/i.exec(p.content);b=r[1]}else{if((/keywords/i.test(p.name))||(/keywords/i.test(p.id))){d=p.content}else{if((/description/i.test(p.name))||(/description/i.test(p.id))){m=p.content}}}}var h=k.getElementsByTagName("title")[0];h=h?h.innerHTML:"";var o={f_doctype:e.doctype,f_title:h,f_body_bgcolor:Xinha._colorToRgb(k.body.style.backgroundColor),f_body_fgcolor:Xinha._colorToRgb(k.body.style.color),f_base_style:l,f_alt_style:j,f_charset:b,f_keywords:d,f_description:m,editor:e};e._popupDialog("plugin://FullPage/docprop",function(i){q.setDocProp(i)},o);break}};FullPage.prototype.setDocProp=function(q){var j="";var u=this.editor._doc;var d=u.getElementsByTagName("head")[0];var b=u.getElementsByTagName("link");var a=u.getElementsByTagName("meta");var o=null;var n=null;var c=null;var f=null;var g=null;var l=null;for(var m=b.length;--m>=0;){var e=b[m];if(/stylesheet/i.test(e.rel)){if(/alternate/i.test(e.rel)){n=e}else{o=e}}}for(var m=a.length;--m>=0;){var h=a[m];if(/content-type/i.test(h.httpEquiv)){r=/^text\/html; *charset=(.*)$/i.exec(h.content);c=r[1];f=h}else{if((/keywords/i.test(h.name))||(/keywords/i.test(h.id))){g=h}else{if((/description/i.test(h.name))||(/description/i.test(h.id))){l=h}}}}function k(v){var i=u.createElement("link");i.rel=v?"alternate stylesheet":"stylesheet";d.appendChild(i);return i}function p(i,v,w){var x=u.createElement("meta");if(i!=""){x.httpEquiv=i}if(v!=""){x.name=v}if(v!=""){x.id=v}x.content=w;d.appendChild(x);return x}if(!o&&q.f_base_style){o=k(false)}if(q.f_base_style){o.href=q.f_base_style}else{if(o){d.removeChild(o)}}if(!n&&q.f_alt_style){n=k(true)}if(q.f_alt_style){n.href=q.f_alt_style}else{if(n){d.removeChild(n)}}if(f){d.removeChild(f);f=null}if(!f&&q.f_charset){f=p("Content-Type","","text/html; charset="+q.f_charset)}if(!g&&q.f_keywords){g=p("","keywords",q.f_keywords)}else{if(q.f_keywords){g.content=q.f_keywords}else{if(g){d.removeChild(g)}}}if(!l&&q.f_description){l=p("","description",q.f_description)}else{if(q.f_description){l.content=q.f_description}else{if(l){d.removeChild(l)}}}for(var m in q){var t=q[m];switch(m){case"f_title":var s=u.getElementsByTagName("title")[0];if(!s){s=u.createElement("title");d.appendChild(s)}else{while(node=s.lastChild){s.removeChild(node)}}if(!Xinha.is_ie){s.appendChild(u.createTextNode(t))}else{u.title=t}break;case"f_doctype":this.editor.setDoctype(t);break;case"f_body_bgcolor":u.body.style.backgroundColor=t;break;case"f_body_fgcolor":u.body.style.color=t;break}}}; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/GenericPlugin/GenericPlugin.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/GenericPlugin/GenericPlugin.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/GenericPlugin/GenericPlugin.js 16 Jan 2009 09:05:47 -0000 1.1 @@ -0,0 +1,100 @@ +/*------------------------------------------*\ + GenericPlugin for Xinha + _______________________ + + Democase for plugin event handlers +\*------------------------------------------*/ + +GenericPlugin._pluginInfo = { + name : "GenericPlugin", + version : "1.0", + developer : "Xinha Developer Team", + developer_url : "http://xinha.org", + sponsor : "", + sponsor_url : "", + license : "htmlArea" +} +function GenericPlugin(editor) +{ + this.editor = editor; +} + +GenericPlugin.prototype.onGenerate = function () +{ + +} +GenericPlugin.prototype.onGenerateOnce = function () +{ + +} +GenericPlugin.prototype.inwardHtml = function(html) +{ + return html; +} +GenericPlugin.prototype.outwardHtml = function(html) +{ + return html; +} +GenericPlugin.prototype.onUpdateToolbar = function () +{ + return false; +} + +GenericPlugin.prototype.onExecCommand = function ( cmdID, UI, param ) +{ + return false; +} + +GenericPlugin.prototype.onKeyPress = function ( event ) +{ + return false; +} + +GenericPlugin.prototype.onMouseDown = function ( event ) +{ + return false; +} + +GenericPlugin.prototype.onBeforeSubmit = function () +{ + return false; +} + +GenericPlugin.prototype.onBeforeUnload = function () +{ + return false; +} + +GenericPlugin.prototype.onBeforeResize = function (width, height) +{ + return false; +} +GenericPlugin.prototype.onResize = function (width, height) +{ + return false; +} +/** + * + * @param {String} action one of 'add', 'remove', 'hide', 'show', 'multi_hide', 'multi_show' + * @param {DOMNode|Array} panel either the panel itself or an array like ['left','right','top','bottom'] + */ +GenericPlugin.prototype.onPanelChange = function (action, panel) +{ + return false; +} +/** + * + * @param {String} mode either 'textmode' or 'wysiwyg' + */ +GenericPlugin.prototype.onMode = function (mode) +{ + return false; +} +/** + * + * @param {String} mode either 'textmode' or 'wysiwyg' + */ +GenericPlugin.prototype.onBeforeMode = function (mode) +{ + return false; +} Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/GetHtml/GetHtml.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/GetHtml/GetHtml.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/GetHtml/GetHtml.js 16 Jan 2009 09:05:47 -0000 1.1 @@ -0,0 +1,17 @@ +/** + Implemented now as GetHtmlImplementation plugin in modules/GetHtml/TransformInnerHTML.js + */ + +function GetHtml(editor) { + editor.config.getHtmlMethod = "TransformInnerHTML"; +} + +GetHtml._pluginInfo = { + name : "GetHtml", + version : "1.0", + developer : "Nelson Bright", + developer_url : "http://www.brightworkweb.com/", + sponsor : "", + sponsor_url : "", + license : "htmlArea" +}; Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/HorizontalRule/HorizontalRule.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/HorizontalRule/HorizontalRule.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/HorizontalRule/HorizontalRule.js 16 Jan 2009 09:05:47 -0000 1.1 @@ -0,0 +1,2 @@ +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +HorizontalRule._pluginInfo={name:"HorizontalRule",version:"1.0",developer:"Nelson Bright",developer_url:"http://www.brightworkweb.com/",c_owner:"Nelson Bright",sponsor:"BrightWork, Inc.",sponsor_url:"http://www.brightworkweb.com/",license:"htmlArea"};function HorizontalRule(c){this.editor=c;var a=c.config;var d=a.toolbar;var b=this;a.registerButton({id:"edithorizontalrule",tooltip:this._lc("Insert/edit horizontal rule"),image:[_editor_url+"images/ed_buttons_main.gif",6,0],textMode:false,action:function(e){b.buttonPress(e)}});a.addToolbarElement("edithorizontalrule","inserthorizontalrule",0)}HorizontalRule.prototype._lc=function(a){return Xinha._lc(a,"HorizontalRule")};HorizontalRule.prototype.buttonPress=function(a){this.editor=a;this._editHorizontalRule()};HorizontalRule.prototype._editHorizontalRule=function(d){editor=this.editor;var c=editor._getSelection();var a=editor._createRange(c);var e=null;if(typeof d=="undefined"){d=editor.getParentElement();if(d&&!/^hr$/i.test(d.tagName)){d=null}}if(d){var b=d.style.width||d.width;e={f_size:parseInt(d.style.height,10)||d.size,f_widthUnit:(/(%|px)$/.test(b))?RegExp.$1:"px",f_width:parseInt(b,10),f_color:Xinha._colorToRgb(d.style.backgroundColor)||d.color,f_align:d.style.textAlign||d.align,f_noshade:(parseInt(d.style.borderWidth,10)==0)||d.noShade}}editor._popupDialog("plugin://HorizontalRule/edit_horizontal_rule.html",function(j){if(!j){return false}var g=d;if(!g){var f=editor._doc.createElement("hr");for(var i in j){var h=j[i];if(h==""){continue}switch(i){case"f_width":if(j.f_widthUnit=="%"){f.style.width=h+"%"}else{f.style.width=h+"px"}break;case"f_size":f.style.height=h+"px";break;case"f_align":f.style.textAlign=h;switch(h){case"left":f.style.marginLeft="0";break;case"right":f.style.marginRight="0";break;case"center":f.style.marginLeft="auto";f.style.marginRight="auto";break}break;case"f_color":f.style.backgroundColor=h;break;case"f_noshade":f.style.border="0";break}}if(Xinha.is_gecko){editor.execCommand("inserthtml",false,Xinha.getOuterHTML(f))}else{editor.insertNodeAtSelection(f)}}else{for(var i in j){var h=j[i];switch(i){case"f_width":if(j.f_widthUnit=="%"){g.style.width=h+"%"}else{g.style.width=h+"px"}break;case"f_size":g.style.height=h+"px";break;case"f_align":g.style.textAlign=h;switch(h){case"left":g.style.marginLeft="0";g.style.marginRight=null;break;case"right":g.style.marginRight="0";g.style.marginLeft=null;break;case"center":g.style.marginLeft="auto";g.style.marginRight="auto";break}break;case"f_color":g.style.backgroundColor=h;break;case"f_noshade":break}g.style.border=(j.f_noshade)?"0":null}}},e)}; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/HtmlEntities/HtmlEntities.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/HtmlEntities/HtmlEntities.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/HtmlEntities/HtmlEntities.js 16 Jan 2009 09:05:48 -0000 1.1 @@ -0,0 +1,51 @@ +/*------------------------------------------*\ +HtmlEntities for Xinha +____________________ + +Intended to faciliate the use of special characters with ISO 8 bit encodings. + +Using the conversion map provided by mharrisonline in ticket #127 + +If you want to adjust the list, e.g. to except the characters that are available in the used charset, +edit Entities.js. +You may save it under a different name using the xinha_config.HtmlEntities.EntitiesFile variable + +ISO-8859-1 preset is default, set + + xinha_config.HtmlEntities.Encoding = null; + +if you want all special characters to be converted or want to load a custom file +\*------------------------------------------*/ + +function HtmlEntities(editor) { + this.editor = editor; +} + +HtmlEntities._pluginInfo = { + name : "HtmlEntities", + version : "1.0", + developer : "Raimund Meyer", + developer_url : "http://x-webservice.net", + c_owner : "Xinha community", + sponsor : "", + sponsor_url : "", + license : "Creative Commons Attribution-ShareAlike License" +} +Xinha.Config.prototype.HtmlEntities = +{ + Encoding : 'iso-8859-1', + EntitiesFile : Xinha.getPluginDir("HtmlEntities") + "/Entities.js" +} +HtmlEntities.prototype.onGenerate = function() { + var e = this.editor; + var url = (e.config.HtmlEntities.Encoding) ? Xinha.getPluginDir("HtmlEntities") + "/"+e.config.HtmlEntities.Encoding+".js" : e.config.HtmlEntities.EntitiesFile; + var callback = function (getback) { + var specialReplacements = e.config.specialReplacements; + eval("var replacements =" + getback); + for (var i in replacements) + { + specialReplacements[i] = replacements[i]; + } + } + Xinha._getback(url,callback); +} Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/ImageManager.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/ImageManager.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/ImageManager.js 16 Jan 2009 09:05:48 -0000 1.1 @@ -0,0 +1,2 @@ +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +function ImageManager(a){}ImageManager._pluginInfo={name:"ImageManager",version:"1.0",developer:"Xiang Wei Zhuo",developer_url:"http://www.zhuo.org/htmlarea/",license:"htmlArea"};Xinha.Config.prototype.ImageManager={backend:Xinha.getPluginDir("ImageManager")+"/backend.php?__plugin=ImageManager&",backend_data:null,backend_config:null,backend_config_hash:null,backend_config_secret_key_location:"Xinha:ImageManager"};Xinha.prototype._insertImage=function(f){var d=this;var g=null;if(typeof f=="undefined"){f=this.getParentElement();if(f&&!/^img$/i.test(f.tagName)){f=null}}if(f){g={f_url:Xinha.is_ie?f.src:f.src,f_alt:f.alt,f_border:f.style.borderWidth?f.style.borderWidth:f.border,f_align:f.align,f_padding:f.style.padding,f_margin:f.style.margin,f_width:f.width,f_height:f.height,f_backgroundColor:f.style.backgroundColor,f_borderColor:f.style.borderColor};function a(h){if(/ /.test(h)){var l=h.split(" ");var k=true;for(var j=1;jmanager->config['allowed_image_extensions']; + if(!in_array($ext, $valid_extensions)) + { + return $base . ".".strtolower($type ? $type : 'jpg'); + } + Return $filename; } Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/Classes/ImageManager.php =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/Classes/ImageManager.php,v diff -u -N -r1.8 -r1.9 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/Classes/ImageManager.php 13 May 2008 18:53:51 -0000 1.8 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/Classes/ImageManager.php 16 Jan 2009 09:05:48 -0000 1.9 @@ -456,6 +456,14 @@ Return false; } } + + $valid_extensions = $this->config['allowed_image_extensions']; + $afruext = strtolower(substr(strrchr($file['name'], "."), 1)); + if(!in_array($afruext, $valid_extensions)) + { + Files::delFile($file['tmp_name']); + Return 'Cannot upload $extension='.$afruext.'$ Files. Permission denied.'; + } //now copy the file $path = Files::makePath($this->getImagesDir(),$relative); Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/assets/EditorContent.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/assets/EditorContent.js,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/assets/EditorContent.js 13 May 2008 18:53:51 -0000 1.5 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/assets/EditorContent.js 16 Jan 2009 09:05:48 -0000 1.6 @@ -1,660 +1,2 @@ -/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */ -/* This file is part of version 0.95 released Mon, 12 May 2008 17:33:15 +0200 */ -/* The URL of the most recent version of this file is http://svn.xinha.webfactional.com/trunk/plugins/ImageManager/assets/EditorContent.js */ -function MM_findObj(n,d){ -var p,i,x; -if(!d){ -d=document; -} -if((p=n.indexOf("?"))>0&&parent.frames.length){ -d=parent.frames[n.substring(p+1)].document; -n=n.substring(0,p); -} -if(!(x=d[n])&&d.all){ -x=d.all[n]; -} -for(i=0;!x&&i-1&&navigator.appVersion.indexOf("Mac")>-1)){ -ox=0; -oy=0; -if(g.style.left){ -x=parseInt(g.style.left); -y=parseInt(g.style.top); -}else{ -var w1=parseInt(el.style.width); -bx=(a<0)?-5-w1:-10; -a=(Math.abs(a)<1000)?0:a; -b=(Math.abs(b)<1000)?0:b; -if(event==null){ -x=document.body.scrollLeft+bx; -}else{ -x=document.body.scrollLeft+event.clientX+bx; -} -if(event==null){ -y=document.body.scrollTop; -}else{ -y=document.body.scrollTop+event.clientY; -} -} -} -}else{ -if(document.layers){ -x=g.x; -y=g.y; -var q0=document.layers,dd=""; -for(var s=0;s4){ -xx+="px"; -yy+="px"; -} -if(navigator.appVersion.indexOf("MSIE 5")>-1&&navigator.appVersion.indexOf("Mac")>-1){ -xx+=parseInt(document.body.leftMargin); -yy+=parseInt(document.body.topMargin); -xx+="px"; -yy+="px"; -} -e.left=xx; -e.top=yy; -} -pic_x=parseInt(xx); -pic_y=parseInt(yy); -} -} -} -var ie=document.all; -var ns6=document.getElementById&&!document.all; -var dragapproved=false; -var z,x,y,status,ant,canvas,content,pic_width,pic_height,image,resizeHandle,oa_w,oa_h,oa_x,oa_y,mx2,my2; -function init_resize(){ -if(mode=="scale"){ -P7_Snap("theImage","ant",0,0); -if(canvas==null){ -canvas=MM_findObj("imgCanvas"); -} -if(pic_width==null||pic_height==null){ -image=MM_findObj("theImage"); -pic_width=image.width; -pic_height=image.height; -} -if(ant==null){ -ant=MM_findObj("ant"); -} -ant.style.left=pic_x; -ant.style.top=pic_y; -ant.style.width=pic_width; -ant.style.height=pic_height; -ant.style.visibility="visible"; -drawBoundHandle(); -jg_doc.paint(); -} -} -initEditor=function(){ -init_crop(); -init_resize(); -var _a=MM_findObj("markerImg",window.top.document); -if(_a.src.indexOf("img/t_white.gif")>0){ -toggleMarker(); -} -}; -function init_crop(){ -P7_Snap("theImage","ant",0,0); -} -function setMode(_b){ -mode=_b; -reset(); -} -function reset(){ -if(ant==null){ -ant=MM_findObj("ant"); -} -ant.style.visibility="hidden"; -ant.style.left=0; -ant.style.top=0; -ant.style.width=0; -ant.style.height=0; -mx2=null; -my2=null; -jg_doc.clear(); -if(mode!="measure"){ -showStatus(); -} -if(mode=="scale"){ -init_resize(); -} -P7_Snap("theImage","ant",0,0); -} -function toggleMarker(){ -if(ant==null){ -ant=MM_findObj("ant"); -} -if(ant.className=="selection"){ -ant.className="selectionWhite"; -}else{ -ant.className="selection"; -} -if(jg_doc.getColor()=="#000000"){ -jg_doc.setColor("#FFFFFF"); -}else{ -jg_doc.setColor("#000000"); -} -drawBoundHandle; -jg_doc.paint(); -} -function move(e){ -if(dragapproved){ -var w=ns6?temp1+e.clientX-x:temp1+event.clientX-x; -var h=ns6?temp2+e.clientY-y:temp2+event.clientY-y; -if(ant!=null){ -if(w>=0){ -ant.style.left=x; -ant.style.width=w; -}else{ -ant.style.left=x+w; -ant.style.width=-1*w; -} -if(h>=0){ -ant.style.top=y; -ant.style.height=h; -}else{ -ant.style.top=y+h; -ant.style.height=-1*h; -} -} -showStatus(); -return false; -} -} -function moveContent(e){ -if(dragapproved){ -var dx=ns6?oa_x+e.clientX-x:oa_x+event.clientX-x; -var dy=ns6?oa_y+e.clientY-y:oa_y+event.clientY-y; -ant.style.left=dx; -ant.style.top=dy; -showStatus(); -return false; -} -} -function moveHandle(e){ -if(dragapproved){ -var w=ns6?e.clientX-x:event.clientX-x; -var h=ns6?e.clientY-y:event.clientY-y; -var _15=MM_findObj("constProp",window.top.document); -var _16=document.theImage.height; -var _17=document.theImage.width; -rapp=_17/_16; -rapp_inv=_16/_17; -switch(resizeHandle){ -case "s-resize": -if(oa_h+h>=0){ -ant.style.height=oa_h+h; -if(_15.checked){ -ant.style.width=rapp*(oa_h+h); -ant.style.left=oa_x-rapp*h/2; -} -} -break; -case "e-resize": -if(oa_w+w>=0){ -ant.style.width=oa_w+w; -if(_15.checked){ -ant.style.height=rapp_inv*(oa_w+w); -ant.style.top=oa_y-rapp_inv*w/2; -} -} -break; -case "n-resize": -if(oa_h-h>=0){ -ant.style.top=oa_y+h; -ant.style.height=oa_h-h; -if(_15.checked){ -ant.style.width=rapp*(oa_h-h); -ant.style.left=oa_x+rapp*h/2; -} -} -break; -case "w-resize": -if(oa_w-w>=0){ -ant.style.left=oa_x+w; -ant.style.width=oa_w-w; -if(_15.checked){ -ant.style.height=rapp_inv*(oa_w-w); -ant.style.top=oa_y+rapp_inv*w/2; -} -} -break; -case "nw-resize": -if(oa_h-h>=0&&oa_w-w>=0){ -ant.style.left=oa_x+w; -ant.style.width=oa_w-w; -ant.style.top=oa_y+h; -if(_15.checked){ -ant.style.height=rapp_inv*(oa_w-w); -}else{ -ant.style.height=oa_h-h; -} -} -break; -case "ne-resize": -if(oa_h-h>=0&&oa_w+w>=0){ -ant.style.top=oa_y+h; -ant.style.width=oa_w+w; -if(_15.checked){ -ant.style.height=rapp_inv*(oa_w+w); -}else{ -ant.style.height=oa_h-h; -} -} -break; -case "se-resize": -if(oa_h+h>=0&&oa_w+w>=0){ -ant.style.width=oa_w+w; -if(_15.checked){ -ant.style.height=rapp_inv*(oa_w+w); -}else{ -ant.style.height=oa_h+h; -} -} -break; -case "sw-resize": -if(oa_h+h>=0&&oa_w-w>=0){ -ant.style.left=oa_x+w; -ant.style.width=oa_w-w; -if(_15.checked){ -ant.style.height=rapp_inv*(oa_w-w); -}else{ -ant.style.height=oa_h+h; -} -} -} -showStatus(); -return false; -} -} -function drags(e){ -if(!ie&&!ns6){ -return; -} -var _19=ns6?e.target:event.srcElement; -var _1a=ns6?"HTML":"BODY"; -while(_19.tagName!=_1a&&!(_19.className=="crop"||_19.className=="handleBox"||_19.className=="selection"||_19.className=="selectionWhite")){ -_19=ns6?_19.parentNode:_19.parentElement; -} -if(_19.className=="handleBox"){ -if(content!=null){ -if(content.width!=null&&content.height!=null){ -content.width=0; -content.height=0; -} -} -resizeHandle=_19.id; -x=ns6?e.clientX:event.clientX; -y=ns6?e.clientY:event.clientY; -oa_w=parseInt(ant.style.width); -oa_h=parseInt(ant.style.height); -oa_x=parseInt(ant.style.left); -oa_y=parseInt(ant.style.top); -dragapproved=true; -document.onmousemove=moveHandle; -return false; -}else{ -if((_19.className=="selection"||_19.className=="selectionWhite")&&mode=="crop"){ -x=ns6?e.clientX:event.clientX; -y=ns6?e.clientY:event.clientY; -oa_x=parseInt(ant.style.left); -oa_y=parseInt(ant.style.top); -dragapproved=true; -document.onmousemove=moveContent; -return false; -}else{ -if(_19.className=="crop"&&mode=="crop"){ -if(content!=null){ -if(content.width!=null&&content.height!=null){ -content.width=0; -content.height=0; -} -} -if(status==null){ -status=MM_findObj("status"); -} -if(ant==null){ -ant=MM_findObj("ant"); -} -if(canvas==null){ -canvas=MM_findObj("imgCanvas"); -} -if(content==null){ -content=MM_findObj("cropContent"); -} -if(pic_width==null||pic_height==null){ -image=MM_findObj("theImage"); -pic_width=image.width; -pic_height=image.height; -} -ant.style.visibility="visible"; -obj=_19; -dragapproved=true; -z=_19; -temp1=parseInt(z.style.left+0); -temp2=parseInt(z.style.top+0); -x=ns6?e.clientX:event.clientX; -y=ns6?e.clientY:event.clientY; -document.onmousemove=move; -return false; -}else{ -if(_19.className=="crop"&&mode=="measure"){ -if(ant==null){ -ant=MM_findObj("ant"); -} -if(canvas==null){ -canvas=MM_findObj("imgCanvas"); -} -x=ns6?e.clientX:event.clientX; -y=ns6?e.clientY:event.clientY; -dragapproved=true; -document.onmousemove=measure; -return false; -} -} -} -} -} -function measure(e){ -if(dragapproved){ -mx2=ns6?e.clientX:event.clientX; -my2=ns6?e.clientY:event.clientY; -jg_doc.clear(); -jg_doc.setStroke(Stroke.DOTTED); -jg_doc.drawLine(x,y,mx2,my2); -jg_doc.paint(); -showStatus(); -return false; -} -} -function setMarker(nx,ny,nw,nh){ -if(isNaN(nx)){ -nx=0; -} -if(isNaN(ny)){ -ny=0; -} -if(isNaN(nw)){ -nw=0; -} -if(isNaN(nh)){ -nh=0; -} -if(ant==null){ -ant=MM_findObj("ant"); -} -if(canvas==null){ -canvas=MM_findObj("imgCanvas"); -} -if(content==null){ -content=MM_findObj("cropContent"); -} -if(pic_width==null||pic_height==null){ -image=MM_findObj("theImage"); -pic_width=image.width; -pic_height=image.height; -} -ant.style.visibility="visible"; -nx=pic_x+nx; -ny=pic_y+ny; -if(nw>=0){ -ant.style.left=nx; -ant.style.width=nw; -}else{ -ant.style.left=nx+nw; -ant.style.width=-1*nw; -} -if(nh>=0){ -ant.style.top=ny; -ant.style.height=nh; -}else{ -ant.style.top=ny+nh; -ant.style.height=-1*nh; -} -} -function max(x,y){ -if(y>x){ -return x; -}else{ -return y; -} -} -function drawBoundHandle(){ -if(ant==null||ant.style==null){ -return false; -} -var ah=parseInt(ant.style.height); -var aw=parseInt(ant.style.width); -var ax=parseInt(ant.style.left); -var ay=parseInt(ant.style.top); -jg_doc.drawHandle(ax-15,ay-15,30,30,"nw-resize"); -jg_doc.drawHandle(ax-15,ay+ah-15,30,30,"sw-resize"); -jg_doc.drawHandle(ax+aw-15,ay-15,30,30,"ne-resize"); -jg_doc.drawHandle(ax+aw-15,ay+ah-15,30,30,"se-resize"); -jg_doc.drawHandle(ax+max(15,aw/10),ay-8,aw-2*max(15,aw/10),8,"n-resize"); -jg_doc.drawHandle(ax+max(15,aw/10),ay+ah,aw-2*max(15,aw/10),8,"s-resize"); -jg_doc.drawHandle(ax-8,ay+max(15,ah/10),8,ah-2*max(15,ah/10),"w-resize"); -jg_doc.drawHandle(ax+aw,ay+max(15,ah/10),8,ah-2*max(15,ah/10),"e-resize"); -jg_doc.drawHandleBox(ax-4,ay-4,8,8,"nw-resize"); -jg_doc.drawHandleBox(ax-4,ay+ah-4,8,8,"sw-resize"); -jg_doc.drawHandleBox(ax+aw-4,ay-4,8,8,"ne-resize"); -jg_doc.drawHandleBox(ax+aw-4,ay+ah-4,8,8,"se-resize"); -jg_doc.drawHandleBox(ax+aw/2-4,ay-4,8,8,"n-resize"); -jg_doc.drawHandleBox(ax+aw/2-4,ay+ah-4,8,8,"s-resize"); -jg_doc.drawHandleBox(ax-4,ay+ah/2-4,8,8,"w-resize"); -jg_doc.drawHandleBox(ax+aw-4,ay+ah/2-4,8,8,"e-resize"); -} -function showStatus(){ -if(ant==null||ant.style==null){ -return false; -} -if(mode=="measure"){ -mx1=x-pic_x; -my1=y-pic_y; -mw=mx2-x; -mh=my2-y; -md=parseInt(Math.sqrt(mw*mw+mh*mh)*100)/100; -ma=(Math.atan(-1*mh/mw)/Math.PI)*180; -if(mw<0&&mh<0){ -ma=ma+180; -} -if(mw<0&&mh>0){ -ma=ma-180; -} -ma=parseInt(ma*100)/100; -if(m_sx!=null&&!isNaN(mx1)){ -m_sx.value=mx1+"px"; -} -if(m_sy!=null&&!isNaN(my1)){ -m_sy.value=my1+"px"; -} -if(m_w!=null&&!isNaN(mw)){ -m_w.value=mw+"px"; -} -if(m_h!=null&&!isNaN(mh)){ -m_h.value=mh+"px"; -} -if(m_d!=null&&!isNaN(md)){ -m_d.value=md+"px"; -} -if(m_a!=null&&!isNaN(ma)){ -m_a.value=ma+""; -} -if(r_ra!=null&&!isNaN(ma)){ -r_ra.value=ma; -} -return false; -} -var ah=parseInt(ant.style.height); -var aw=parseInt(ant.style.width); -var ax=parseInt(ant.style.left); -var ay=parseInt(ant.style.top); -var cx=ax-pic_x<0?0:ax-pic_x; -var cy=ay-pic_y<0?0:ay-pic_y; -cx=cx>pic_width?pic_width:cx; -cy=cy>pic_height?pic_height:cy; -var cw=ax-pic_x>0?aw:aw-(pic_x-ax); -var ch=ay-pic_y>0?ah:ah-(pic_y-ay); -ch=ay+ah0&&s_sh.value.indexOf("%")>0){ -sw=cw/pic_width; -sh=ch/pic_height; -} -if(s_sw!=null){ -s_sw.value=sw; -} -if(s_sh!=null){ -s_sh.value=sh; -} -} -} -} -function dragStopped(){ -dragapproved=false; -if(ant==null||ant.style==null){ -return false; -} -if(mode=="measure"){ -jg_doc.drawLine(x-4,y,x+4,y); -jg_doc.drawLine(x,y-4,x,y+4); -jg_doc.drawLine(mx2-4,my2,mx2+4,my2); -jg_doc.drawLine(mx2,my2-4,mx2,my2+4); -jg_doc.paint(); -showStatus(); -return false; -} -var ah=parseInt(ant.style.height); -var aw=parseInt(ant.style.width); -var ax=parseInt(ant.style.left); -var ay=parseInt(ant.style.top); -jg_doc.clear(); -if(content!=null){ -if(content.width!=null&&content.height!=null){ -content.width=aw-1; -content.height=ah-1; -} -} -if(mode=="crop"){ -jg_doc.fillRectPattern(pic_x,pic_y,pic_width,ay-pic_y,pattern); -var h1=ah; -var y1=ay; -if(ah+ay>=pic_height+pic_y){ -h1=pic_height+pic_y-ay; -}else{ -if(ay<=pic_y){ -h1=ay+ah-pic_y; -y1=pic_y; -} -} -jg_doc.fillRectPattern(pic_x,y1,ax-pic_x,h1,pattern); -jg_doc.fillRectPattern(ax+aw,y1,pic_x+pic_width-ax-aw,h1,pattern); -jg_doc.fillRectPattern(pic_x,ay+ah,pic_width,pic_height+pic_y-ay-ah,pattern); -}else{ -if(mode=="scale"){ -document.theImage.height=ah; -document.theImage.width=aw; -document.theImage.style.height=ah+" px"; -document.theImage.style.width=aw+" px"; -P7_Snap("theImage","ant",0,0); -} -} -drawBoundHandle(); -jg_doc.paint(); -showStatus(); -return false; -} -document.onmousedown=drags; -document.onmouseup=dragStopped; - +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +function MM_findObj(f,e){var c,b,a;if(!e){e=document}if((c=f.indexOf("?"))>0&&parent.frames.length){e=parent.frames[f.substring(c+1)].document;f=f.substring(0,c)}if(!(a=e[f])&&e.all){a=e.all[f]}for(b=0;!a&&b-1&&navigator.appVersion.indexOf("Mac")>-1)){ox=0;oy=0;if(g.style.left){x=parseInt(g.style.left);y=parseInt(g.style.top)}else{var w1=parseInt(el.style.width);bx=(a<0)?-5-w1:-10;a=(Math.abs(a)<1000)?0:a;b=(Math.abs(b)<1000)?0:b;if(event==null){x=document.body.scrollLeft+bx}else{x=document.body.scrollLeft+event.clientX+bx}if(event==null){y=document.body.scrollTop}else{y=document.body.scrollTop+event.clientY}}}}else{if(document.layers){x=g.x;y=g.y;var q0=document.layers,dd="";for(var s=0;s4){xx+="px";yy+="px"}if(navigator.appVersion.indexOf("MSIE 5")>-1&&navigator.appVersion.indexOf("Mac")>-1){xx+=parseInt(document.body.leftMargin);yy+=parseInt(document.body.topMargin);xx+="px";yy+="px"}e.left=xx;e.top=yy}pic_x=parseInt(xx);pic_y=parseInt(yy)}}}var ie=document.all;var ns6=document.getElementById&&!document.all;var dragapproved=false;var z,x,y,status,ant,canvas,content,pic_width,pic_height,image,resizeHandle,oa_w,oa_h,oa_x,oa_y,mx2,my2;function init_resize(){if(mode=="scale"){P7_Snap("theImage","ant",0,0);if(canvas==null){canvas=MM_findObj("imgCanvas")}if(pic_width==null||pic_height==null){image=MM_findObj("theImage");pic_width=image.width;pic_height=image.height}if(ant==null){ant=MM_findObj("ant")}ant.style.left=pic_x;ant.style.top=pic_y;ant.style.width=pic_width;ant.style.height=pic_height;ant.style.visibility="visible";drawBoundHandle();jg_doc.paint()}}initEditor=function(){init_crop();init_resize();var a=MM_findObj("markerImg",window.top.document);if(a.src.indexOf("img/t_white.gif")>0){toggleMarker()}};function init_crop(){P7_Snap("theImage","ant",0,0)}function setMode(a){mode=a;reset()}function reset(){if(ant==null){ant=MM_findObj("ant")}ant.style.visibility="hidden";ant.style.left=0;ant.style.top=0;ant.style.width=0;ant.style.height=0;mx2=null;my2=null;jg_doc.clear();if(mode!="measure"){showStatus()}if(mode=="scale"){init_resize()}P7_Snap("theImage","ant",0,0)}function toggleMarker(){if(ant==null){ant=MM_findObj("ant")}if(ant.className=="selection"){ant.className="selectionWhite"}else{ant.className="selection"}if(jg_doc.getColor()=="#000000"){jg_doc.setColor("#FFFFFF")}else{jg_doc.setColor("#000000")}drawBoundHandle;jg_doc.paint()}function move(c){if(dragapproved){var a=ns6?temp1+c.clientX-x:temp1+event.clientX-x;var b=ns6?temp2+c.clientY-y:temp2+event.clientY-y;if(ant!=null){if(a>=0){ant.style.left=x;ant.style.width=a}else{ant.style.left=x+a;ant.style.width=-1*a}if(b>=0){ant.style.top=y;ant.style.height=b}else{ant.style.top=y+b;ant.style.height=-1*b}}showStatus();return false}}function moveContent(c){if(dragapproved){var b=ns6?oa_x+c.clientX-x:oa_x+event.clientX-x;var a=ns6?oa_y+c.clientY-y:oa_y+event.clientY-y;ant.style.left=b;ant.style.top=a;showStatus();return false}}function moveHandle(i){if(dragapproved){var b=ns6?i.clientX-x:event.clientX-x;var d=ns6?i.clientY-y:event.clientY-y;var f=MM_findObj("constProp",window.top.document);var c=document.theImage.height;var a=document.theImage.width;rapp=a/c;rapp_inv=c/a;switch(resizeHandle){case"s-resize":if(oa_h+d>=0){ant.style.height=oa_h+d;if(f.checked){ant.style.width=rapp*(oa_h+d);ant.style.left=oa_x-rapp*d/2}}break;case"e-resize":if(oa_w+b>=0){ant.style.width=oa_w+b;if(f.checked){ant.style.height=rapp_inv*(oa_w+b);ant.style.top=oa_y-rapp_inv*b/2}}break;case"n-resize":if(oa_h-d>=0){ant.style.top=oa_y+d;ant.style.height=oa_h-d;if(f.checked){ant.style.width=rapp*(oa_h-d);ant.style.left=oa_x+rapp*d/2}}break;case"w-resize":if(oa_w-b>=0){ant.style.left=oa_x+b;ant.style.width=oa_w-b;if(f.checked){ant.style.height=rapp_inv*(oa_w-b);ant.style.top=oa_y+rapp_inv*b/2}}break;case"nw-resize":if(oa_h-d>=0&&oa_w-b>=0){ant.style.left=oa_x+b;ant.style.width=oa_w-b;ant.style.top=oa_y+d;if(f.checked){ant.style.height=rapp_inv*(oa_w-b)}else{ant.style.height=oa_h-d}}break;case"ne-resize":if(oa_h-d>=0&&oa_w+b>=0){ant.style.top=oa_y+d;ant.style.width=oa_w+b;if(f.checked){ant.style.height=rapp_inv*(oa_w+b)}else{ant.style.height=oa_h-d}}break;case"se-resize":if(oa_h+d>=0&&oa_w+b>=0){ant.style.width=oa_w+b;if(f.checked){ant.style.height=rapp_inv*(oa_w+b)}else{ant.style.height=oa_h+d}}break;case"sw-resize":if(oa_h+d>=0&&oa_w-b>=0){ant.style.left=oa_x+b;ant.style.width=oa_w-b;if(f.checked){ant.style.height=rapp_inv*(oa_w-b)}else{ant.style.height=oa_h+d}}}showStatus();return false}}function drags(b){if(!ie&&!ns6){return}var c=ns6?b.target:event.srcElement;var a=ns6?"HTML":"BODY";while(c.tagName!=a&&!(c.className=="crop"||c.className=="handleBox"||c.className=="selection"||c.className=="selectionWhite")){c=ns6?c.parentNode:c.parentElement}if(c.className=="handleBox"){if(content!=null){if(content.width!=null&&content.height!=null){content.width=0;content.height=0}}resizeHandle=c.id;x=ns6?b.clientX:event.clientX;y=ns6?b.clientY:event.clientY;oa_w=parseInt(ant.style.width);oa_h=parseInt(ant.style.height);oa_x=parseInt(ant.style.left);oa_y=parseInt(ant.style.top);dragapproved=true;document.onmousemove=moveHandle;return false}else{if((c.className=="selection"||c.className=="selectionWhite")&&mode=="crop"){x=ns6?b.clientX:event.clientX;y=ns6?b.clientY:event.clientY;oa_x=parseInt(ant.style.left);oa_y=parseInt(ant.style.top);dragapproved=true;document.onmousemove=moveContent;return false}else{if(c.className=="crop"&&mode=="crop"){if(content!=null){if(content.width!=null&&content.height!=null){content.width=0;content.height=0}}if(status==null){status=MM_findObj("status")}if(ant==null){ant=MM_findObj("ant")}if(canvas==null){canvas=MM_findObj("imgCanvas")}if(content==null){content=MM_findObj("cropContent")}if(pic_width==null||pic_height==null){image=MM_findObj("theImage");pic_width=image.width;pic_height=image.height}ant.style.visibility="visible";obj=c;dragapproved=true;z=c;temp1=parseInt(z.style.left+0);temp2=parseInt(z.style.top+0);x=ns6?b.clientX:event.clientX;y=ns6?b.clientY:event.clientY;document.onmousemove=move;return false}else{if(c.className=="crop"&&mode=="measure"){if(ant==null){ant=MM_findObj("ant")}if(canvas==null){canvas=MM_findObj("imgCanvas")}x=ns6?b.clientX:event.clientX;y=ns6?b.clientY:event.clientY;dragapproved=true;document.onmousemove=measure;return false}}}}}function measure(a){if(dragapproved){mx2=ns6?a.clientX:event.clientX;my2=ns6?a.clientY:event.clientY;jg_doc.clear();jg_doc.setStroke(Stroke.DOTTED);jg_doc.drawLine(x,y,mx2,my2);jg_doc.paint();showStatus();return false}}function setMarker(a,d,b,c){if(isNaN(a)){a=0}if(isNaN(d)){d=0}if(isNaN(b)){b=0}if(isNaN(c)){c=0}if(ant==null){ant=MM_findObj("ant")}if(canvas==null){canvas=MM_findObj("imgCanvas")}if(content==null){content=MM_findObj("cropContent")}if(pic_width==null||pic_height==null){image=MM_findObj("theImage");pic_width=image.width;pic_height=image.height}ant.style.visibility="visible";a=pic_x+a;d=pic_y+d;if(b>=0){ant.style.left=a;ant.style.width=b}else{ant.style.left=a+b;ant.style.width=-1*b}if(c>=0){ant.style.top=d;ant.style.height=c}else{ant.style.top=d+c;ant.style.height=-1*c}}function max(a,b){if(b>a){return a}else{return b}}function drawBoundHandle(){if(ant==null||ant.style==null){return false}var a=parseInt(ant.style.height);var d=parseInt(ant.style.width);var c=parseInt(ant.style.left);var b=parseInt(ant.style.top);jg_doc.drawHandle(c-15,b-15,30,30,"nw-resize");jg_doc.drawHandle(c-15,b+a-15,30,30,"sw-resize");jg_doc.drawHandle(c+d-15,b-15,30,30,"ne-resize");jg_doc.drawHandle(c+d-15,b+a-15,30,30,"se-resize");jg_doc.drawHandle(c+max(15,d/10),b-8,d-2*max(15,d/10),8,"n-resize");jg_doc.drawHandle(c+max(15,d/10),b+a,d-2*max(15,d/10),8,"s-resize");jg_doc.drawHandle(c-8,b+max(15,a/10),8,a-2*max(15,a/10),"w-resize");jg_doc.drawHandle(c+d,b+max(15,a/10),8,a-2*max(15,a/10),"e-resize");jg_doc.drawHandleBox(c-4,b-4,8,8,"nw-resize");jg_doc.drawHandleBox(c-4,b+a-4,8,8,"sw-resize");jg_doc.drawHandleBox(c+d-4,b-4,8,8,"ne-resize");jg_doc.drawHandleBox(c+d-4,b+a-4,8,8,"se-resize");jg_doc.drawHandleBox(c+d/2-4,b-4,8,8,"n-resize");jg_doc.drawHandleBox(c+d/2-4,b+a-4,8,8,"s-resize");jg_doc.drawHandleBox(c-4,b+a/2-4,8,8,"w-resize");jg_doc.drawHandleBox(c+d-4,b+a/2-4,8,8,"e-resize")}function showStatus(){if(ant==null||ant.style==null){return false}if(mode=="measure"){mx1=x-pic_x;my1=y-pic_y;mw=mx2-x;mh=my2-y;md=parseInt(Math.sqrt(mw*mw+mh*mh)*100)/100;ma=(Math.atan(-1*mh/mw)/Math.PI)*180;if(mw<0&&mh<0){ma=ma+180}if(mw<0&&mh>0){ma=ma-180}ma=parseInt(ma*100)/100;if(m_sx!=null&&!isNaN(mx1)){m_sx.value=mx1+"px"}if(m_sy!=null&&!isNaN(my1)){m_sy.value=my1+"px"}if(m_w!=null&&!isNaN(mw)){m_w.value=mw+"px"}if(m_h!=null&&!isNaN(mh)){m_h.value=mh+"px"}if(m_d!=null&&!isNaN(md)){m_d.value=md+"px"}if(m_a!=null&&!isNaN(ma)){m_a.value=ma+""}if(r_ra!=null&&!isNaN(ma)){r_ra.value=ma}return false}var i=parseInt(ant.style.height);var c=parseInt(ant.style.width);var a=parseInt(ant.style.left);var k=parseInt(ant.style.top);var e=a-pic_x<0?0:a-pic_x;var d=k-pic_y<0?0:k-pic_y;e=e>pic_width?pic_width:e;d=d>pic_height?pic_height:d;var f=a-pic_x>0?c:c-(pic_x-a);var b=k-pic_y>0?i:i-(pic_y-k);b=k+i0&&s_sh.value.indexOf("%")>0){j=f/pic_width;h=b/pic_height}if(s_sw!=null){s_sw.value=j}if(s_sh!=null){s_sh.value=h}}}}function dragStopped(){dragapproved=false;if(ant==null||ant.style==null){return false}if(mode=="measure"){jg_doc.drawLine(x-4,y,x+4,y);jg_doc.drawLine(x,y-4,x,y+4);jg_doc.drawLine(mx2-4,my2,mx2+4,my2);jg_doc.drawLine(mx2,my2-4,mx2,my2+4);jg_doc.paint();showStatus();return false}var a=parseInt(ant.style.height);var f=parseInt(ant.style.width);var e=parseInt(ant.style.left);var d=parseInt(ant.style.top);jg_doc.clear();if(content!=null){if(content.width!=null&&content.height!=null){content.width=f-1;content.height=a-1}}if(mode=="crop"){jg_doc.fillRectPattern(pic_x,pic_y,pic_width,d-pic_y,pattern);var b=a;var c=d;if(a+d>=pic_height+pic_y){b=pic_height+pic_y-d}else{if(d<=pic_y){b=d+a-pic_y;c=pic_y}}jg_doc.fillRectPattern(pic_x,c,e-pic_x,b,pattern);jg_doc.fillRectPattern(e+f,c,pic_x+pic_width-e-f,b,pattern);jg_doc.fillRectPattern(pic_x,d+a,pic_width,pic_height+pic_y-d-a,pattern)}else{if(mode=="scale"){document.theImage.height=a;document.theImage.width=f;document.theImage.style.height=a+" px";document.theImage.style.width=f+" px";P7_Snap("theImage","ant",0,0)}}drawBoundHandle();jg_doc.paint();showStatus();return false}document.onmousedown=drags;document.onmouseup=dragStopped; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/assets/dialog.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/assets/dialog.js,v diff -u -N -r1.7 -r1.8 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/assets/dialog.js 13 May 2008 18:53:51 -0000 1.7 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/assets/dialog.js 16 Jan 2009 09:05:48 -0000 1.8 @@ -1,83 +1,2 @@ -/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */ -/* This file is part of version 0.95 released Mon, 12 May 2008 17:33:15 +0200 */ -/* The URL of the most recent version of this file is http://svn.xinha.webfactional.com/trunk/plugins/ImageManager/assets/dialog.js */ -function Dialog(_1,_2,_3){ -if(typeof _3=="undefined"){ -_3=window; -} -if(typeof window.showModalDialog=="function"){ -Dialog._return=_2; -var r=window.showModalDialog(_1,_3,"dialogheight=10;dialogwidth=10;resizable=yes"); -}else{ -Dialog._geckoOpenModal(_1,_2,_3); -} -} -Dialog._parentEvent=function(ev){ -setTimeout(function(){ -if(Dialog._modal&&!Dialog._modal.closed){ -Dialog._modal.focus(); -} -},50); -if(Dialog._modal&&!Dialog._modal.closed){ -Dialog._stopEvent(ev); -} -}; -Dialog._return=null; -Dialog._modal=null; -Dialog._arguments=null; -Dialog._geckoOpenModal=function(_6,_7,_8){ -var _9="hadialog"+_6; -var _a=/\W/g; -_9=_9.replace(_a,"_"); -var _b=window.open(_6,_9,"toolbar=no,menubar=no,personalbar=no,width=10,height=10,"+"scrollbars=no,resizable=yes,modal=yes,dependable=yes"); -Dialog._modal=_b; -Dialog._arguments=_8; -function capwin(w){ -Dialog._addEvent(w,"click",Dialog._parentEvent); -Dialog._addEvent(w,"mousedown",Dialog._parentEvent); -Dialog._addEvent(w,"focus",Dialog._parentEvent); -} -function relwin(w){ -Dialog._removeEvent(w,"click",Dialog._parentEvent); -Dialog._removeEvent(w,"mousedown",Dialog._parentEvent); -Dialog._removeEvent(w,"focus",Dialog._parentEvent); -} -capwin(window); -for(var i=0;i=0){ -_9.src="img/t_white.gif"; -}else{ -_9.src="img/t_black.gif"; -} -editor.toggleMarker(); -} -} -function toggleConstraints(){ -var _a=document.getElementById("scaleConstImg"); -var _b=document.getElementById("constProp"); -if(_a!=null&&_a.src!=null){ -if(_a.src.indexOf("unlocked2.gif")>=0){ -_a.src="img/islocked2.gif"; -_b.checked=true; -checkConstrains("width"); -}else{ -_a.src="img/unlocked2.gif"; -_b.checked=false; -} -} -} -function checkConstrains(_c){ -var _d=document.getElementById("constProp"); -if(_d.checked){ -var w=document.getElementById("sw"); -var _f=w.value; -var h=document.getElementById("sh"); -var _11=h.value; -if(orginal_width>0&&orginal_height>0){ -if(_c=="width"&&_f>0){ -h.value=parseInt((_f/orginal_width)*orginal_height); -}else{ -if(_c=="height"&&_11>0){ -w.value=parseInt((_11/orginal_height)*orginal_width); -} -} -} -} -updateMarker("scale"); -} -function updateMarker(_12){ -if(_12=="crop"){ -var _13=document.getElementById("cx"); -var _14=document.getElementById("cy"); -var _15=document.getElementById("cw"); -var _16=document.getElementById("ch"); -editor.setMarker(parseInt(_13.value),parseInt(_14.value),parseInt(_15.value),parseInt(_16.value)); -}else{ -if(_12=="scale"){ -var _17=document.getElementById("sw"); -var _18=document.getElementById("sh"); -editor.setMarker(0,0,parseInt(_17.value),parseInt(_18.value)); -} -} -} -function rotatePreset(_19){ -var _1a=_19.options[_19.selectedIndex].value; -if(_1a.length>0&&parseInt(_1a)!=0){ -var ra=document.getElementById("ra"); -ra.value=parseInt(_1a); -} -} -function updateFormat(_1c){ -var _1d=_1c.options[_1c.selectedIndex].value; -var _1e=_1d.split(","); -if(_1e.length>1){ -updateSlider(parseInt(_1e[1])); -} -} -function addEvent(obj,_20,fn){ -if(obj.addEventListener){ -obj.addEventListener(_20,fn,true); -return true; -}else{ -if(obj.attachEvent){ -var r=obj.attachEvent("on"+_20,fn); -return r; -}else{ -return false; -} -} -} -init=function(){ -var _23=document.getElementById("bottom"); -if(window.opener){ -__dlg_init(_23); -__dlg_translate("ImageManager"); -} -}; -addEvent(window,"load",init); - +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +var current_action=null;var actions=["crop","scale","rotate","measure","save"];var orginal_width=null,orginal_height=null;function toggle(g){if(current_action!=g){for(var d in actions){if(actions[d]!=g){var j=document.getElementById("tools_"+actions[d]);j.style.display="none";var f=document.getElementById("icon_"+actions[d]);f.className=""}}current_action=g;var j=document.getElementById("tools_"+g);j.style.display="block";var f=document.getElementById("icon_"+g);f.className="iconActive";var c=document.getElementById("indicator_image");c.src="img/"+g+".gif";editor.setMode(current_action);if(g=="scale"){var a=editor.window.document.getElementById("theImage");orginal_width=a.width;orginal_height=a.height;var b=document.getElementById("sw");b.value=orginal_width;var e=document.getElementById("sh");e.value=orginal_height}}}function toggleMarker(){var a=document.getElementById("markerImg");if(a!=null&&a.src!=null){if(a.src.indexOf("t_black.gif")>=0){a.src="img/t_white.gif"}else{a.src="img/t_black.gif"}editor.toggleMarker()}}function toggleConstraints(){var a=document.getElementById("scaleConstImg");var b=document.getElementById("constProp");if(a!=null&&a.src!=null){if(a.src.indexOf("unlocked2.gif")>=0){a.src="img/islocked2.gif";b.checked=true;checkConstrains("width")}else{a.src="img/unlocked2.gif";b.checked=false}}}function checkConstrains(f){var e=document.getElementById("constProp");if(e.checked){var b=document.getElementById("sw");var d=b.value;var c=document.getElementById("sh");var a=c.value;if(orginal_width>0&&orginal_height>0){if(f=="width"&&d>0){c.value=parseInt((d/orginal_width)*orginal_height)}else{if(f=="height"&&a>0){b.value=parseInt((a/orginal_height)*orginal_width)}}}}updateMarker("scale")}function updateMarker(f){if(f=="crop"){var e=document.getElementById("cx");var d=document.getElementById("cy");var g=document.getElementById("cw");var b=document.getElementById("ch");editor.setMarker(parseInt(e.value),parseInt(d.value),parseInt(g.value),parseInt(b.value))}else{if(f=="scale"){var a=document.getElementById("sw");var c=document.getElementById("sh");editor.setMarker(0,0,parseInt(a.value),parseInt(c.value))}}}function rotatePreset(a){var b=a.options[a.selectedIndex].value;if(b.length>0&&parseInt(b)!=0){var c=document.getElementById("ra");c.value=parseInt(b)}}function updateFormat(c){var b=c.options[c.selectedIndex].value;var a=b.split(",");if(a.length>1){updateSlider(parseInt(a[1]))}}function addEvent(d,c,a){if(d.addEventListener){d.addEventListener(c,a,true);return true}else{if(d.attachEvent){var b=d.attachEvent("on"+c,a);return b}else{return false}}}init=function(){var a=document.getElementById("bottom");if(window.opener){__dlg_init(a);__dlg_translate("ImageManager")}};addEvent(window,"load",init); \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/assets/editorFrame.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/assets/editorFrame.js,v diff -u -N -r1.7 -r1.8 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/assets/editorFrame.js 13 May 2008 18:53:51 -0000 1.7 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/assets/editorFrame.js 16 Jan 2009 09:05:48 -0000 1.8 @@ -1,76 +1,2 @@ -/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */ -/* This file is part of version 0.95 released Mon, 12 May 2008 17:33:15 +0200 */ -/* The URL of the most recent version of this file is http://svn.xinha.webfactional.com/trunk/plugins/ImageManager/assets/editorFrame.js */ -var topDoc=window.top.document; -var t_cx=topDoc.getElementById("cx"); -var t_cy=topDoc.getElementById("cy"); -var t_cw=topDoc.getElementById("cw"); -var t_ch=topDoc.getElementById("ch"); -var m_sx=topDoc.getElementById("sx"); -var m_sy=topDoc.getElementById("sy"); -var m_w=topDoc.getElementById("mw"); -var m_h=topDoc.getElementById("mh"); -var m_a=topDoc.getElementById("ma"); -var m_d=topDoc.getElementById("md"); -var s_sw=topDoc.getElementById("sw"); -var s_sh=topDoc.getElementById("sh"); -var r_ra=topDoc.getElementById("ra"); -var pattern="img/2x2.gif"; -function doSubmit(_1){ -if(_1=="crop"){ -var _2=_backend_url+"__function=editorFrame&img="+currentImageFile+"&action=crop¶ms="+parseInt(t_cx.value)+","+parseInt(t_cy.value)+","+parseInt(t_cw.value)+","+parseInt(t_ch.value); -location.href=_2; -}else{ -if(_1=="scale"){ -var _2=_backend_url+"__function=editorFrame&img="+currentImageFile+"&action=scale¶ms="+parseInt(s_sw.value)+","+parseInt(s_sh.value); -location.href=_2; -}else{ -if(_1=="rotate"){ -var _3=topDoc.getElementById("flip"); -if(_3.value=="hoz"||_3.value=="ver"){ -location.href=_backend_url+"__function=editorFrame&img="+currentImageFile+"&action=flip¶ms="+_3.value; -}else{ -if(isNaN(parseFloat(r_ra.value))==false){ -location.href=_backend_url+"__function=editorFrame&img="+currentImageFile+"&action=rotate¶ms="+parseFloat(r_ra.value); -} -} -}else{ -if(_1=="save"){ -var _4=topDoc.getElementById("save_filename"); -var _5=topDoc.getElementById("save_format"); -var _6=topDoc.getElementById("quality"); -var _7=_5.value.split(","); -if(_4.value.length<=0){ -alert(i18n("Please enter a filename to save.")); -}else{ -var _8=encodeURI(_4.value); -var _9=parseInt(_6.value); -var _2=_backend_url+"__function=editorFrame&img="+currentImageFile+"&action=save¶ms="+_7[0]+","+_9+"&file="+_8; -location.href=_2; -} -} -} -} -} -} -function addEvent(_a,_b,fn){ -if(_a.addEventListener){ -_a.addEventListener(_b,fn,true); -return true; -}else{ -if(_a.attachEvent){ -var r=_a.attachEvent("on"+_b,fn); -return r; -}else{ -return false; -} -} -} -var jg_doc; -init=function(){ -jg_doc=new jsGraphics("imgCanvas"); -jg_doc.setColor("#000000"); -initEditor(); -}; -addEvent(window,"load",init); - +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +var topDoc=window.top.document;var t_cx=topDoc.getElementById("cx");var t_cy=topDoc.getElementById("cy");var t_cw=topDoc.getElementById("cw");var t_ch=topDoc.getElementById("ch");var m_sx=topDoc.getElementById("sx");var m_sy=topDoc.getElementById("sy");var m_w=topDoc.getElementById("mw");var m_h=topDoc.getElementById("mh");var m_a=topDoc.getElementById("ma");var m_d=topDoc.getElementById("md");var s_sw=topDoc.getElementById("sw");var s_sh=topDoc.getElementById("sh");var r_ra=topDoc.getElementById("ra");var pattern="img/2x2.gif";function doSubmit(d){if(d=="crop"){var b=_backend_url+"__function=editorFrame&img="+currentImageFile+"&action=crop¶ms="+parseInt(t_cx.value)+","+parseInt(t_cy.value)+","+parseInt(t_cw.value)+","+parseInt(t_ch.value);location.href=b}else{if(d=="scale"){var b=_backend_url+"__function=editorFrame&img="+currentImageFile+"&action=scale¶ms="+parseInt(s_sw.value)+","+parseInt(s_sh.value);location.href=b}else{if(d=="rotate"){var e=topDoc.getElementById("flip");if(e.value=="hoz"||e.value=="ver"){location.href=_backend_url+"__function=editorFrame&img="+currentImageFile+"&action=flip¶ms="+e.value}else{if(isNaN(parseFloat(r_ra.value))==false){location.href=_backend_url+"__function=editorFrame&img="+currentImageFile+"&action=rotate¶ms="+parseFloat(r_ra.value)}}}else{if(d=="save"){var c=topDoc.getElementById("save_filename");var g=topDoc.getElementById("save_format");var f=topDoc.getElementById("quality");var h=g.value.split(",");if(c.value.length<=0){alert(i18n("Please enter a filename to save."))}else{var a=encodeURI(c.value);var i=parseInt(f.value);var b=_backend_url+"__function=editorFrame&img="+currentImageFile+"&action=save¶ms="+h[0]+","+i+"&file="+a;location.href=b}}}}}}function addEvent(d,c,a){if(d.addEventListener){d.addEventListener(c,a,true);return true}else{if(d.attachEvent){var b=d.attachEvent("on"+c,a);return b}else{return false}}}var jg_doc;init=function(){jg_doc=new jsGraphics("imgCanvas");jg_doc.setColor("#000000");initEditor()};addEvent(window,"load",init); \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/assets/images.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/assets/images.js,v diff -u -N -r1.7 -r1.8 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/assets/images.js 13 May 2008 18:53:51 -0000 1.7 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/assets/images.js 16 Jan 2009 09:05:48 -0000 1.8 @@ -1,119 +1,2 @@ -/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */ -/* This file is part of version 0.95 released Mon, 12 May 2008 17:33:15 +0200 */ -/* The URL of the most recent version of this file is http://svn.xinha.webfactional.com/trunk/plugins/ImageManager/assets/images.js */ -function i18n(_1){ -return Xinha._lc(_1,"ImageManager"); -} -function changeDir(_2){ -showMessage("Loading"); -location.href=_backend_url+"__function=images&dir="+encodeURIComponent(_2); -} -function newFolder(_3,_4){ -location.href=_backend_url+"__function=images&dir="+encodeURIComponent(_3)+"&newDir="+encodeURIComponent(_4); -} -function updateDir(_5){ -var _6=window.top.document.getElementById("dirPath"); -if(_6){ -for(var i=0;i<_6.length;i++){ -var _8=_6.options[i].text; -if(_8==_5){ -_6.selectedIndex=i; -showMessage("Loading"); -break; -} -} -} -} -function selectImage(_9,_a,_b,_c){ -var _d=window.top.document; -var _e=_d.getElementById("f_url"); -_e.value=_9; -var _e=_d.getElementById("f_width"); -_e.value=_b; -var _e=_d.getElementById("f_width"); -_e.value=_b; -var _e=_d.getElementById("f_height"); -_e.value=_c; -var _e=_d.getElementById("f_alt"); -_e.value=_a; -var _e=_d.getElementById("orginal_width"); -_e.value=_b; -var _e=_d.getElementById("orginal_height"); -_e.value=_c; -_d.getElementById("f_preview").src=window.parent._backend_url+"__function=thumbs&img="+_9; -update_selected(); -} -var _current_selected=null; -function update_selected(){ -var _f=window.top.document; -if(_current_selected){ -_current_selected.className=_current_selected.className.replace(/(^| )active( |$)/,"$1$2"); -_current_selected=null; -} -var _10=_f.getElementById("f_url").value; -var _11=_f.getElementById("dirPath"); -var _12=_11.options[_11.selectedIndex].text; -var dRe=new RegExp("^("+_12.replace(/([\/\^$*+?.()|{}[\]])/g,"\\$1")+")([^/]*)$"); -if(dRe.test(_10)){ -var _14=document.getElementById("holder_"+asc2hex(RegExp.$2)); -if(_14){ -_current_selected=_14; -_14.className+=" active"; -} -} -} -function asc2hex(str){ -var _16=""; -for(var i=0;i0){ -alert(i18n("Please delete all files/folders inside the folder you wish to delete first.")); -return; -} -if(confirm(i18n("Delete folder?"))){ -return true; -} -return false; -} -addEvent(window,"load",init); -Xinha=window.parent.Xinha; - +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +function i18n(a){return Xinha._lc(a,"ImageManager")}function changeDir(a){showMessage("Loading");location.href=_backend_url+"__function=images&dir="+encodeURIComponent(a)}function newFolder(a,b){location.href=_backend_url+"__function=images&dir="+encodeURIComponent(a)+"&newDir="+encodeURIComponent(b)}function updateDir(d){var c=window.top.document.getElementById("dirPath");if(c){for(var b=0;b0){alert(i18n("Please delete all files/folders inside the folder you wish to delete first."));return}if(confirm(i18n("Delete folder?"))){return true}return false}addEvent(window,"load",init);Xinha=window.parent.Xinha; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/assets/manager.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/assets/manager.js,v diff -u -N -r1.8 -r1.9 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/assets/manager.js 13 May 2008 18:53:51 -0000 1.8 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/assets/manager.js 16 Jan 2009 09:05:48 -0000 1.9 @@ -1,233 +1,2 @@ -/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */ -/* This file is part of version 0.95 released Mon, 12 May 2008 17:33:15 +0200 */ -/* The URL of the most recent version of this file is http://svn.xinha.webfactional.com/trunk/plugins/ImageManager/assets/manager.js */ -function i18n(_1){ -return Xinha._lc(_1,"ImageManager"); -} -function setAlign(_2){ -var _3=document.getElementById("f_align"); -for(var i=0;i<_3.length;i++){ -if(_3.options[i].value==_2){ -_3.selectedIndex=i; -break; -} -} -} -doneinit=0; -init=function(){ -if(doneinit++){ -return; -} -__dlg_init(null,{width:600,height:460}); -__dlg_translate("ImageManager"); -document.getElementById("f_align").selectedIndex=1; -document.getElementById("f_align").selectedIndex=0; -var _5=document.getElementById("uploadForm"); -if(_5){ -_5.target="imgManager"; -} -var _6=window.dialogArguments; -if(_6){ -var _7=new RegExp("(https?://[^/]*)?"+base_url.replace(/\/$/,"")); -_6.f_url=_6.f_url.replace(_7,""); -var rd=(_resized_dir)?_resized_dir.replace(Xinha.RE_Specials,"\\$1")+"/":""; -var rp=_resized_prefix.replace(Xinha.RE_Specials,"\\$1"); -var _a=new RegExp("^(.*/)"+rd+rp+"_([0-9]+)x([0-9]+)_([^/]+)$"); -if(_a.test(_6.f_url)){ -_6.f_url=RegExp.$1+RegExp.$4; -_6.f_width=RegExp.$2; -_6.f_height=RegExp.$3; -} -for(var id in _6){ -if(id=="f_align"){ -continue; -} -if(document.getElementById(id)){ -document.getElementById(id).value=_6[id]; -} -} -document.getElementById("orginal_width").value=_6["f_width"]; -document.getElementById("orginal_height").value=_6["f_height"]; -setAlign(_6["f_align"]); -var _a=new RegExp("^(.*/)([^/]+)$"); -if(_a.test(_6["f_url"])&&!(new RegExp("^https?://","i")).test(_6["f_url"])){ -changeDir(RegExp.$1); -var _c=document.getElementById("dirPath"); -for(var i=0;i<_c.options.length;i++){ -if(_c.options[i].value==encodeURIComponent(RegExp.$1)){ -_c.options[i].selected=true; -break; -} -} -} -document.getElementById("f_preview").src=_backend_url+"__function=thumbs&img="+_6.f_url; -} -new Xinha.colorPicker.InputBinding(document.getElementById("f_backgroundColor")); -new Xinha.colorPicker.InputBinding(document.getElementById("f_borderColor")); -document.getElementById("f_alt").focus(); -}; -function onCancel(){ -__dlg_close(null); -return false; -} -function onOK(){ -var _e=["f_url","f_alt","f_align","f_width","f_height","f_padding","f_margin","f_border","f_borderColor","f_backgroundColor"]; -var _f=new Object(); -for(var i in _e){ -var id=_e[i]; -var el=document.getElementById(id); -if(id=="f_url"&&el.value.indexOf("://")<0){ -if(el.value==""){ -alert(i18n("No Image selected.")); -return (false); -} -_f[id]=makeURL(base_url,el.value); -}else{ -if(el){ -_f[id]=el.value; -}else{ -alert("Missing "+_e[i]); -} -} -} -var _13={w:document.getElementById("orginal_width").value,h:document.getElementById("orginal_height").value}; -if((_13.w!=_f.f_width)||(_13.h!=_f.f_height)){ -var _14=Xinha._geturlcontent(_backend_url+"&__function=resizer&img="+encodeURIComponent(document.getElementById("f_url").value)+"&width="+_f.f_width+"&height="+_f.f_height); -_14=eval(_14); -if(_14){ -_f.f_url=makeURL(base_url,_14); -} -} -__dlg_close(_f); -return false; -} -function makeURL(_15,_16){ -if(_15.substring(_15.length-1)!="/"){ -_15+="/"; -} -if(_16.charAt(0)=="/"){ -} -_16=_16.substring(1); -return _15+_16; -} -function updateDir(_17){ -var _18=_17.options[_17.selectedIndex].value; -changeDir(_18); -} -function goUpDir(){ -var _19=document.getElementById("dirPath"); -var _1a=_19.options[_19.selectedIndex].text; -if(_1a.length<2){ -return false; -} -var _1b=_1a.split("/"); -var _1c=""; -for(var i=0;i<_1b.length-2;i++){ -_1c+=_1b[i]+"/"; -} -for(var i=0;i<_19.length;i++){ -var _1e=_19.options[i].text; -if(_1e==_1c){ -_19.selectedIndex=i; -var _1f=_19.options[i].value; -changeDir(_1f); -break; -} -} -} -function changeDir(_20){ -if(typeof imgManager!="undefined"){ -imgManager.changeDir(_20); -} -} -function toggleConstrains(_21){ -var _22=document.getElementById("imgLock"); -var _21=document.getElementById("constrain_prop"); -if(_21.checked){ -_22.src="img/locked.gif"; -checkConstrains("width"); -}else{ -_22.src="img/unlocked.gif"; -} -} -function checkConstrains(_23){ -var _24=document.getElementById("constrain_prop"); -if(_24.checked){ -var obj=document.getElementById("orginal_width"); -var _26=parseInt(obj.value); -var obj=document.getElementById("orginal_height"); -var _27=parseInt(obj.value); -var _28=document.getElementById("f_width"); -var _29=document.getElementById("f_height"); -var _2a=parseInt(_28.value); -var _2b=parseInt(_29.value); -if(_26>0&&_27>0){ -if(_23=="width"&&_2a>0){ -_29.value=parseInt((_2a/_26)*_27); -} -if(_23=="height"&&_2b>0){ -_28.value=parseInt((_2b/_27)*_26); -} -} -} -} -function showMessage(_2c){ -var _2d=document.getElementById("message"); -var _2e=document.getElementById("messages"); -if(_2d.firstChild){ -_2d.removeChild(_2d.firstChild); -} -_2d.appendChild(document.createTextNode(i18n(_2c))); -_2e.style.display=""; -} -function addEvent(obj,_30,fn){ -if(obj.addEventListener){ -obj.addEventListener(_30,fn,true); -return true; -}else{ -if(obj.attachEvent){ -var r=obj.attachEvent("on"+_30,fn); -return r; -}else{ -return false; -} -} -} -function doUpload(){ -var _33=document.getElementById("uploadForm"); -if(_33){ -showMessage("Uploading"); -} -} -function refresh(){ -var _34=document.getElementById("dirPath"); -updateDir(_34); -} -function newFolder(){ -function createFolder(_35){ -var _36=document.getElementById("dirPath"); -var dir=_36.options[_36.selectedIndex].value; -if(_35==thumbdir){ -alert(i18n("Invalid folder name, please choose another folder name.")); -return false; -} -if(_35&&_35!=""&&typeof imgManager!="undefined"){ -imgManager.newFolder(dir,encodeURI(_35)); -} -} -if(Xinha.ie_version>6){ -Dialog("newFolder.html",function(_38){ -if(!_38){ -return false; -}else{ -var _39=_38["f_foldername"]; -createFolder(_39); -} -},null); -}else{ -var _3a=prompt(i18n("Please enter name for new folder..."),i18n("Untitled")); -createFolder(_3a); -} -} -addEvent(window,"load",init); - +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +function i18n(a){return Xinha._lc(a,"ImageManager")}function setAlign(c){var b=document.getElementById("f_align");for(var a=0;a0&&f>0){if(d=="width"&&a>0){h.value=parseInt((a/b)*f)}if(d=="height"&&i>0){g.value=parseInt((i/f)*b)}}}}function showMessage(a){var c=document.getElementById("message");var b=document.getElementById("messages");if(c.firstChild){c.removeChild(c.firstChild)}c.appendChild(document.createTextNode(i18n(a)));b.style.display=""}function addEvent(d,c,a){if(d.addEventListener){d.addEventListener(c,a,true);return true}else{if(d.attachEvent){var b=d.attachEvent("on"+c,a);return b}else{return false}}}function doUpload(){var a=document.getElementById("uploadForm");if(a){showMessage("Uploading")}}function refresh(){var a=document.getElementById("dirPath");updateDir(a)}function newFolder(){function a(e){var d=document.getElementById("dirPath");var c=d.options[d.selectedIndex].value;if(e==thumbdir){alert(i18n("Invalid folder name, please choose another folder name."));return false}if(e&&e!=""&&typeof imgManager!="undefined"){imgManager.newFolder(c,encodeURI(e))}}if(Xinha.ie_version>6){Dialog("newFolder.html",function(d){if(!d){return false}else{var c=d.f_foldername;a(c)}},null)}else{var b=prompt(i18n("Please enter name for new folder..."),i18n("Untitled"));a(b)}}addEvent(window,"load",init); \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/assets/popup.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/assets/popup.js,v diff -u -N -r1.8 -r1.9 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/assets/popup.js 13 May 2008 18:53:51 -0000 1.8 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/assets/popup.js 16 Jan 2009 09:05:48 -0000 1.9 @@ -1,32 +1,40 @@ -/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */ -/* This file is part of version 0.95 released Mon, 12 May 2008 17:33:15 +0200 */ -/* The URL of the most recent version of this file is http://svn.xinha.webfactional.com/trunk/plugins/ImageManager/assets/popup.js */ -function __dlg_translate(_1){ -var _2=["span","option","td","th","button","div","label","a","img","legend"]; -for(var _3=0;_3<_2.length;++_3){ -var _4=document.getElementsByTagName(_2[_3]); -for(var i=_4.length;--i>=0;){ -var _6=_4[i]; -if(_6.firstChild&&_6.firstChild.data){ -var _7=Xinha._lc(_6.firstChild.data,_1); -if(_7){ -_6.firstChild.data=_7; -} -} -if(_6.title){ -var _7=Xinha._lc(_6.title,_1); -if(_7){ -_6.title=_7; -} -} -if(_6.alt){ -var _7=Xinha._lc(_6.alt,_1); -if(_7){ -_6.alt=_7; -} -} -} -} -document.title=Xinha._lc(document.title,_1); -} - +// htmlArea v3.0 - Copyright (c) 2002, 2003 interactivetools.com, inc. +// This copyright notice MUST stay intact for use (see license.txt). +// +// Portions (c) dynarch.com, 2003 +// +// A free WYSIWYG editor replacement for + +
+ + +
Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertNote/img/insert-note.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertNote/img/insert-note.gif,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertPagebreak/InsertPagebreak.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertPagebreak/InsertPagebreak.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertPagebreak/InsertPagebreak.js 16 Jan 2009 09:05:48 -0000 1.1 @@ -0,0 +1,43 @@ +// InsertPagebreak plugin for HTMLArea/Xinha +// Implementation by Udo Schmal & Schaffrath NeueMedien +// Original Author - Udo Schmal +// +// (c) Udo Schmal & Schaffrath NeueMedien 2004 +// Distributed under the same terms as HTMLArea itself. +// This notice MUST stay intact for use (see license.txt). + +function InsertPagebreak(editor, args) { + this.editor = editor; + var cfg = editor.config; + var self = this; + + cfg.registerButton({ + id : "pagebreak", + tooltip : this._lc("Page break"), + image : editor.imgURL("pagebreak.gif", "InsertPagebreak"), + textMode : false, + action : function(editor) { + self.buttonPress(editor); + } + }); + cfg.addToolbarElement("pagebreak", "inserthorizontalrule", 1); +} + +InsertPagebreak._pluginInfo = { + name : "InsertPagebreak", + version : "1.0", + developer : "Udo Schmal", + developer_url : "", + sponsor : "L.N.Schaffrath NeueMedien", + sponsor_url : "http://www.schaffrath-neuemedien.de/", + c_owner : "Udo Schmal & Schaffrath NeueMedien", + license : "htmlArea" +}; + +InsertPagebreak.prototype._lc = function(string) { + return Xinha._lc(string, 'InsertPagebreak'); +}; + +InsertPagebreak.prototype.buttonPress = function(editor, context, updatecontextclass) { + editor.insertHTML('
'); +}; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSmiley/InsertSmiley.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSmiley/InsertSmiley.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSmiley/InsertSmiley.js 16 Jan 2009 09:05:48 -0000 1.1 @@ -0,0 +1,52 @@ +/*---------------------------------------*\ + Insert Smiley Plugin for Xinha + ----------------------------------------- + author: Ki Master George + e-mail: kimastergeorge@gmail.com +\*---------------------------------------*/ + +function InsertSmiley(editor) { + this.editor = editor; + var cfg = editor.config; + var self = this; + + // register the toolbar buttons provided by this plugin + cfg.registerButton({ + id : "insertsmiley", + tooltip : this._lc("Insert Smiley"), + image : editor.imgURL("ed_smiley.gif", "InsertSmiley"), + textMode : false, + action : function(editor) { + self.buttonPress(editor); + } + }); + cfg.addToolbarElement("insertsmiley", "inserthorizontalrule", 1); +} + +InsertSmiley._pluginInfo = { + name : "InsertSmiley", + version : "1.0", + developer : "Ki Master George", + developer_url : "http://kimastergeorge.i4host.com/", + c_owner : "Ki Master George", + sponsor : "Ki Master George", + sponsor_url : "http://kimastergeorge.i4host.com/", + license : "htmlArea" +}; + +InsertSmiley.prototype._lc = function(string) { + return Xinha._lc(string, 'InsertSmiley'); +}; +Xinha.Config.prototype.InsertSmiley= { + smileyURL : "http://www.x-webservice.net/storage/xinha/plugins/InsertSmiley/" +}; + +InsertSmiley.prototype.buttonPress = function(editor) { + var self = this; + var sel = editor.getSelectedHTML().replace(/(<[^>]*>| |\n|\r)/g,""); + var param = {}; + param.editor = editor; + editor._popupDialog("plugin://InsertSmiley/insertsmiley", function(param) { + editor.insertHTML("\"Smiley\""); + }, param); +}; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet/InsertSnippet.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet/InsertSnippet.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet/InsertSnippet.js 16 Jan 2009 09:05:48 -0000 1.1 @@ -0,0 +1,92 @@ +/*------------------------------------------*\ + InsertSnippet for Xinha + _______________________ + + Insert HTML fragments or template variables + +\*------------------------------------------*/ + +function InsertSnippet(editor) { + this.editor = editor; + + var cfg = editor.config; + var self = this; + + + cfg.registerButton({ + id : "insertsnippet", + tooltip : this._lc("Insert Snippet"), + image : editor.imgURL("ed_snippet.gif", "InsertSnippet"), + textMode : false, + action : function(editor) { + self.buttonPress(editor); + } + }); + cfg.addToolbarElement("insertsnippet", "insertimage", -1); + this.snippets = null; + var backend = cfg.InsertSnippet.snippets + '?'; + + if(cfg.InsertSnippet.backend_data != null) + { + for ( var i in cfg.InsertSnippet.backend_data ) + { + backend += '&' + i + '=' + encodeURIComponent(cfg.InsertSnippet.backend_data[i]); + } + } + Xinha._getback(backend,function (getback) {eval(getback); self.snippets = snippets;}); +} + +InsertSnippet.prototype.onUpdateToolbar = function() { + if (!this.snippets){ + this.editor._toolbarObjects.insertsnippet.state("enabled", false); + } + else InsertSnippet.prototype.onUpdateToolbar = null; +} + +InsertSnippet._pluginInfo = { + name : "InsertSnippet", + version : "1.2", + developer : "Raimund Meyer", + developer_url : "http://x-webservice.net", + c_owner : "Raimund Meyer", + sponsor : "", + sponsor_url : "", + license : "htmlArea" +}; + +InsertSnippet.prototype._lc = function(string) { + return Xinha._lc(string, 'InsertSnippet'); +}; + +InsertSnippet.prototype.onGenerate = function() { + this.editor.addEditorStylesheet(Xinha.getPluginDir("InsertSnippet") + '/InsertSnippet.css'); +}; + +Xinha.Config.prototype.InsertSnippet = +{ + 'snippets' : Xinha.getPluginDir("InsertSnippet")+"/demosnippets.js", // purely demo purposes, you should change this + 'css' : ['../InsertSnippet.css'], //deprecated, CSS is now pulled from xinha_config + 'showInsertVariable': false, + 'backend_data' : null +}; + +InsertSnippet.prototype.buttonPress = function(editor) { + var args = editor.config; + args.snippets = this.snippets; + var self = this; + editor._popupDialog( "plugin://InsertSnippet/insertsnippet", function( param ) { + + if ( !param ) { + return false; + } + + + editor.focusEditor(); + if (param['how'] == 'variable') { + editor.insertHTML('{'+self.snippets[param["snippetnum"]].id+'}'); + } else { + editor.insertHTML(self.snippets[param["snippetnum"]].HTML); + } + + }, args); + }; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet/demosnippets.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet/demosnippets.js,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet/demosnippets.js 13 May 2008 18:53:53 -0000 1.2 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet/demosnippets.js 16 Jan 2009 09:05:48 -0000 1.3 @@ -1,17 +1,15 @@ -/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */ -/* This file is part of version 0.95 released Mon, 12 May 2008 17:33:15 +0200 */ -/* The URL of the most recent version of this file is http://svn.xinha.webfactional.com/trunk/plugins/InsertSnippet/demosnippets.js */ -var snippets=[]; -var i=0; -snippets[i]={}; -snippets[i]["id"]="Box 1"; -snippets[i]["HTML"]="
\n Visit the Xinha website
"; +var snippets = []; +var i = 0; +snippets[i] = {}; +snippets[i]['id'] = 'Box 1'; +snippets[i]['HTML'] = '
\n Visit the Xinha website
'; + i++; -snippets[i]={}; -snippets[i]["id"]="INFORMATION ABOUT SOMETHING"; -snippets[i]["HTML"]="
\n This is an information about something\n
"; -i++; -snippets[i]={}; -snippets[i]["id"]="Menu"; -snippets[i]["HTML"]=""; +snippets[i] = {}; +snippets[i]['id'] = 'INFORMATION ABOUT SOMETHING'; +snippets[i]['HTML'] = '
\n This is an information about something\n
'; +i++; +snippets[i] = {}; +snippets[i]['id'] = 'Menu'; +snippets[i]['HTML'] = ''; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet/readme.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet/readme.html,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet/readme.html 2 Feb 2007 21:05:01 -0000 1.1 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet/readme.html 16 Jan 2009 09:05:48 -0000 1.2 @@ -20,10 +20,10 @@

Usage

-In order to use your own snippets you have to al least one parameter to your xinha_config: +In order to use your own snippets you have to add at least one parameter to your xinha_config:

-xinha_config.InsertSnippet.snippets = _editor_url+"plugins/InsertSnippet/snippets.php";
+xinha_config.InsertSnippet.snippets = Xinha.getPluginDir('InsertSnippet') + "/snippets.php";
 

The path above indicates the use of the provided backend. This parses a file that contains the snippets and @@ -54,4 +54,4 @@

Raimund Meyer (xinha@raimundmeyer.de)

- \ No newline at end of file + Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/InsertSnippet.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/InsertSnippet.css,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/InsertSnippet.css 16 Jan 2009 09:05:48 -0000 1.1 @@ -0,0 +1,92 @@ +html > body .ISsnippettable button { min-width:70px;white-space:nowrap;} + +.ISsnippettable td { + + background:white; + vertical-align:top; +} + +.ISsnippettable td { + padding:5px; + border:1px solid; + border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight; +} +.ISsnippettable button {text-align:center;} +.ISsnippettable a.button {/*background:ButtonFace;*/padding:1px 5px 1px 5px;color:black;text-decoration:none} +.ISpreview { + background-color: white; + padding: 5px; + display : none; + position : absolute; + top : 12px; + left :100px; + border : 1px dotted black; + z-index:100; +} +.IScattabs {line-height:18px; } +.IScattabs a { + white-space:nowrap; + border-width:1px 1px 0px 1px; + border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight; + border-style:solid; + padding:4px; + margin-left:1px; + text-decoration:none; + color:black; + -moz-border-radius:10px 10px 0px 0px; + height:12px; + background-repeat:repeat-x; +} + +.IScattabs .tab1 { + background-image:url(img/1.PNG); +} +.IScattabs .tab2 { + background-image:url(img/2.PNG); +} +.IScattabs .tab3 { + background-image:url(img/3.PNG); +} +.IScattabs .tab4 { + background-image:url(img/4.PNG); +} +.IScattabs .tab5 { + background-image:url(img/5.PNG); +} +.IScattabs .tab6 { + background-image:url(img/6.PNG); +} +.IScattabs .tab7 { + background-image:url(img/7.PNG); +} +.IScattabs .tab8 { + background-image:url(img/8.PNG); +} +.IScattabs .tab9 { + background-image:url(img/9.PNG); +} +.IScattabs .tab10 { + background-image:url(img/10.PNG); +} +.IScattabs .tab11 { + background-image:url(img/11.PNG); +} +.IScattabs .tab12 { + background-image:url(img/12.PNG); +} +.IScattabs .tab13 { + background-image:url(img/13.PNG); +} +.IScattabs .tab14 { + background-image:url(img/14.PNG); +} +.IScattabs .tab15 { + background-image:url(img/15.PNG); +} +.IScattabs .tab16 { + background-image:url(img/16.PNG); +} +.IScattabs a.active { + font-weight:bold; + border-width:1px 2px 0px 2px +} Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/InsertSnippet2.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/InsertSnippet2.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/InsertSnippet2.js 16 Jan 2009 09:05:48 -0000 1.1 @@ -0,0 +1,2 @@ +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +function InsertSnippet2(c){this.editor=c;var a=c.config;var b=this;a.registerButton({id:"InsertSnippet2",tooltip:this._lc("Insert Snippet"),image:c.imgURL("ed_snippet.gif","InsertSnippet2"),textMode:false,action:function(d){b.buttonPress(d)}});a.addToolbarElement("InsertSnippet2","insertimage",-1);this.snippets=null;this.categories=null;this.html=null;Xinha._getback(a.InsertSnippet2.snippets,function(f,l){var g=l.responseXML;var k=g.getElementsByTagName("c");b.categories=[];for(var e=0;e\n';c+='';if(typeof e.config.baseHref!="undefined"&&e.config.baseHref!==null){c+='\n'}if(e.config.pageStyle){c+='"}if(typeof e.config.pageStyleSheets!=="undefined"){for(var b=0;b0){c+=''}}}c+="\n";c+="\n";c+="\n";c+="";f.write(c);f.close();setTimeout(function(){a.previewBody=f.getElementsByTagName("body")[0]},100)};InsertSnippet2.prototype.buttonPress=function(a){this.dialog.toggle()};InsertSnippet2.prototype.doInsert=function(b){var c=b.target||b.srcElement;var d=this.snippets[c.snID];this.dialog.hide();var a=this.editor.config.InsertSnippet2;if(c._insAs=="variable"){this.editor.insertHTML(d.v)}else{this.editor.insertHTML(d.html)}};InsertSnippet2.prototype.resize=function(){var a=this.dialog.getElementById("insert_div");var d=this.dialog.getElementById("preview_iframe");var c={h:this.dialog.height,w:this.dialog.width};var b=c.h-90;if(this.categories.length){b-=this.catTabsH}a.style.height=d.style.height=b+"px";return true}; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/dialog.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/dialog.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/dialog.html 16 Jan 2009 09:05:48 -0000 1.1 @@ -0,0 +1,20 @@ +

Insert Snippet

+
+ +
+
+ + +
+ +
+
+
+
+
+ + +
+ +
+ \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/readme.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/readme.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/readme.html 16 Jan 2009 09:05:48 -0000 1.1 @@ -0,0 +1,51 @@ + + InsertSnippet for Xinha + + +

InsertSnippet2 for Xinha

+

Insert HTML fragments or template variables in your document.

+

Features

+
    +
  • Categorization to organize your snippets if you have a lot (optional)
  • +
  • Search for name
  • +
  • Insert as literal text/html or variable (optional) 
  • +
  • XML data format
  • +
+

Usage

+

+In order to use your own snippets you have to add a parameter to your xinha_config: +

+
xinha_config.InsertSnippet2.snippets = "/path/to/your/snippets.xml";
+
+

This path should point to a XML file that has the following format:

+
<snXML>
+ <categories>
+    <c n="the name" />
+  </categories>
+  <snippets>
+        <s n="the name" v="optional variable name to be inserted" c="the category">
+            &lt;p&gt;some text or HTML, please entize HTML tags&lt;/p&gt;
+        </s>
+        <s n="another">
+            <![CDATA[
+               <p>or put HTML in a CDATA section</p>
+            ]]>
+        </s>
+  </snipptes>
+</snXML>
+
+

+

 Tags

+
<snXML></snXML>
 The root tag
<categories></categories>
 This tag contains the categories (optional)
 <c />
 Each category
 <snippets></snippets>
This tag contains the actual snippet. As this is XML, you cannot put HTML here literally. You have to either entize the <,>, and & characters or wrap the contents in a CDATA section
+

Attributes

+
 n
 The name of one snippet or category. It is obligatory for both.
 v
If this attribute is present in a snippet tag, there is a button in the UI that allows to insert this variable instead of the textual content of the snippet.
c
 The category
+

Inside the plugin's directory, there is a sample XML file and PHP script that shows how to create the XML dynamically.

+

3 October 2008 Raimund Meyer (xinha@raimundmeyer.de)

+ + \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/snippets.php =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/snippets.php,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/snippets.php 16 Jan 2009 09:05:48 -0000 1.1 @@ -0,0 +1,37 @@ +'some text'), + * array('name'= 'snippet2','text'=>'

some HTML

', 'varname'=>'{$var}','category'=>'cat1') //varname and category are optional + * ) + * + * ?> + */ +header("Content-type: text/xml"); +print ' +'; +?> + + +'."\n"; +} + +?> + + + + +'."\n"; +} +?> + + \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/snippets.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/snippets.xml,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/snippets.xml 16 Jan 2009 09:05:48 -0000 1.1 @@ -0,0 +1,42 @@ + + + + + + + + + + + + Visit the Xinha website +
  • Nulla placerat nunc ut pede.
  • Vivamus ultrices mi sit amet urna.
  • Quisque sed augue quis nunc laoreet volutpat.
  • Nunc sit amet metus in tortor semper mattis.
  • + ]]> +
    + + <p>This is some information about something</p> + + + + + + + + + + ]]> + + + Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/img/1.PNG =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/img/1.PNG,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/img/10.PNG =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/img/10.PNG,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/img/11.PNG =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/img/11.PNG,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/img/12.PNG =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/img/12.PNG,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/img/13.PNG =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/img/13.PNG,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/img/14.PNG =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/img/14.PNG,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/img/15.PNG =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/img/15.PNG,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/img/16.PNG =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/img/16.PNG,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/img/2.PNG =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/img/2.PNG,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/img/3.PNG =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/img/3.PNG,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/img/4.PNG =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/img/4.PNG,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/img/5.PNG =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/img/5.PNG,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/img/6.PNG =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/img/6.PNG,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/img/7.PNG =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/img/7.PNG,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/img/8.PNG =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/img/8.PNG,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/img/9.PNG =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/img/9.PNG,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/img/ed_snippet.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/img/ed_snippet.gif,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/lang/de.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/lang/de.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertSnippet2/lang/de.js 16 Jan 2009 09:05:48 -0000 1.1 @@ -0,0 +1,12 @@ +// I18N constants +// LANG: "de", ENCODING: UTF-8 +{ + "Insert Snippet": "Snippet einfügen", + "Insert as HTML": "Als HTML einfügen", + "HTML": "HTML", + "Insert as template variable": "Als Template-Variable einfügen", + "Variable": "Variable", + "All Categories" : "Alle Kategorien", + "Only search word beginning" : "Nur nach Wortanfang suchen", + "Filter" : "Filter" +}; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertWords/InsertWords.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertWords/InsertWords.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/InsertWords/InsertWords.js 16 Jan 2009 09:05:48 -0000 1.1 @@ -0,0 +1,70 @@ +// Plugin for htmlArea to insert keywords, when a type of +// keyword is selected from a dropdown list +// By Adam Wright, for The University of Western Australia +// +// Distributed under the same terms as HTMLArea itself. +// This notice MUST stay intact for use (see license.txt). + +function InsertWords(editor, params) { + this.editor = editor; + var cfg = editor.config; + var self = this; + + if(params[0] && params[0].combos) { + //if arguments where passed with registerPlugin use these + var combos = params[0].combos; + } else if (cfg.InsertWords && cfg.InsertWords.combos) { + //if combos is found in config use these + var combos = cfg.InsertWords.combos; + } else { + //no combos found + var combos = []; + } + + // register the toolbar with the keywords dropdown + var first = true; + var toolbar = []; + + for (var i = combos.length; --i >= 0;) { + var combo = combos[i]; + var id = "IW-id" + i; + var iw_class = { + id : id, + options : combo.options, + action : function (editor) { self.onSelect(editor, this, combo.context); }, + refresh : function (editor) { }, + context : combo.context + }; + cfg.registerDropdown(iw_class); + + if (combo.label) + toolbar.push("T[" + combo.label + "]"); + toolbar.push(id); + toolbar.push(first ? "separator" : "space"); + } + + cfg.addToolbarElement(toolbar, "linebreak", 1); + +} + +InsertWords._pluginInfo = { + name : "InsertWords", + version : "1.0", + developer : "Adam Wright", + developer_url : "http://blog.hipikat.org/", + sponsor : "The University of Western Australia", + sponsor_url : "http://www.uwa.edu.au/", + license : "htmlArea" +}; + +InsertWords.prototype.onSelect = function(editor, obj, context) { + + // Get the toolbar object element + var elem = editor._toolbarObjects[obj.id].element; + + // Insert the keyword value blindly at the selection + editor.insertHTML(elem.value); + + // Reset the dropdown to it's label + elem.selectedIndex = 0; +}; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/LangMarks/LangMarks.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/LangMarks/LangMarks.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/LangMarks/LangMarks.js 16 Jan 2009 09:05:48 -0000 1.1 @@ -0,0 +1,2 @@ +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +function LangMarks(f,d){this.editor=f;var a=f.config;var b=this;var c={};c[this._lc("— language —")]="";for(var e in a.LangMarks){if(typeof e!="string"){continue}c[this._lc(e)]=a.LangMarks[e]}a.registerDropdown({id:"langmarks",tooltip:this._lc("language select"),options:c,action:function(g){b.onSelect(g,this)},refresh:function(g){b.updateValue(g,this)}});a.addToolbarElement("langmarks","inserthorizontalrule",1)}LangMarks._pluginInfo={name:"LangMarks",version:"1.0",developer:"Udo Schmal",developer_url:"",sponsor:"L.N.Schaffrath NeueMedien",sponsor_url:"http://www.schaffrath-neuemedien.de/",c_owner:"Udo Schmal & Schaffrath NeueMedien",license:"htmlArea"};Xinha.Config.prototype.LangMarks={Greek:"el",English:"en",French:"fr",Latin:"la"};LangMarks.prototype._lc=function(a){return Xinha._lc(a,"LangMarks")};LangMarks.prototype.onGenerate=function(){this.editor.addEditorStylesheet(Xinha.getPluginDir("LangMarks")+"/lang-marks.css")};LangMarks.prototype.onSelect=function(e,d,b,g){var i=e._toolbarObjects[d.id];var f=i.element.selectedIndex;var c=i.element.value;var k=e.getParentElement();var j=true;var h=(k&&k.tagName.toLowerCase()=="span");var a=(b&&g&&k&&k.tagName.toLowerCase()==b);if(a){k.className="haslang";k.lang=c;e.updateToolbar();return}if(h&&f==0&&!/\S/.test(k.style.cssText)){while(k.firstChild){k.parentNode.insertBefore(k.firstChild,k)}k.parentNode.removeChild(k);e.updateToolbar();return}if(h){if(k.childNodes.length==1){k.className="haslang";k.lang=c;j=false;e.updateToolbar()}}if(j){e.surroundHTML('',"")}};LangMarks.prototype.updateValue=function(d,a){var f=d._toolbarObjects[a.id].element;var e=d.getAllAncestors();var h;for(var b=0;b=0;){var c=j[b];if(g==c.value){f.selectedIndex=b;return}}}else{f.selectedIndex=0}}; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Linker/Linker.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Linker/Linker.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Linker/Linker.js 16 Jan 2009 09:05:48 -0000 1.1 @@ -0,0 +1,102 @@ +/** htmlArea - James' Fork - Linker Plugin **/ +Linker._pluginInfo = +{ + name : "Linker", + version : "1.0", + developer: "James Sleeman", + developer_url: "http://www.gogo.co.nz/", + c_owner : "Gogo Internet Services", + license : "htmlArea", + sponsor : "Gogo Internet Services", + sponsor_url : "http://www.gogo.co.nz/" +}; + +Xinha.loadStyle('dTree/dtree.css', 'Linker'); + +Xinha.Config.prototype.Linker = +{ + 'treeCaption' : document.location.host, + 'backend' : Xinha.getPluginDir("Linker") + '/scan.php', + 'backend_data' : null, + 'files' : null +}; + + +function Linker(editor, args) +{ + this.editor = editor; + this.lConfig = editor.config.Linker; + + var linker = this; + if(editor.config.btnList.createlink) + { + editor.config.btnList.createlink[3] + = function(e, objname, obj) { linker._createLink(linker._getSelectedAnchor()); }; + } + else + { + editor.config.registerButton( + 'createlink', 'Insert/Modify Hyperlink', [_editor_url + "images/ed_buttons_main.gif",6,1], false, + function(e, objname, obj) { linker._createLink(linker._getSelectedAnchor()); } + ); + } + + // See if we can find 'createlink' + editor.config.addToolbarElement("createlink", "createlink", 0); +} + +Linker.prototype._lc = function(string) +{ + return Xinha._lc(string, 'Linker'); +}; + + +Linker.prototype.onGenerateOnce = function() +{ + Linker.loadAssets(); + this.loadFiles(); +}; + +Linker.prototype.onUpdateToolbar = function() +{ + if (typeof dTree == 'undefined' || !Linker.methodsReady || !Linker.html || !this.files) + { + this.editor._toolbarObjects.createlink.state("enabled", false); + } + else this.onUpdateToolbar = null; +}; + +Linker.Dialog_dTrees = [ ]; + +Linker.loadAssets = function() +{ + var self = Linker; + if (self.loading) return; + self.loading = true; + Xinha._getback(Xinha.getPluginDir("Linker") + '/pluginMethods.js', function(getback) { eval(getback); self.methodsReady = true; }); + Xinha._loadback( Xinha.getPluginDir("Linker") + '/dTree/dtree.js', function() {Linker.dTreeReady = true; } ); + Xinha._getback( Xinha.getPluginDir("Linker") + '/dialog.html', function(getback) { self.html = getback; } ); +} + +Linker.prototype.loadFiles = function() +{ + var linker = this; + if(linker.lConfig.backend) + { + //get files from backend + Xinha._postback(linker.lConfig.backend, + linker.lConfig.backend_data, + function(txt) { + try { + linker.files = eval(txt); + } catch(Error) { + linker.files = [ {url:'',title:Error.toString()} ]; + } + }); + } + else if(linker.lConfig.files != null) + { + //get files from plugin-config + linker.files = linker.lConfig.files; + } +} Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Linker/dialog.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Linker/dialog.html,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Linker/dialog.html 13 May 2008 18:53:53 -0000 1.4 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Linker/dialog.html 16 Jan 2009 09:05:48 -0000 1.5 @@ -3,24 +3,22 @@
    (the dTree goes in here)
    - + - + - + "}}; -var opTag_a={"href":"href=\"","name":"name=\"","target":"target=\""}; -var opAtt_a={"href":{"http://":"http://","https://":"https://","ftp://":"ftp://","mailto:":"mailto:","#":"#\""},"target":{"_top":"_top\"","_self":"_self\"","_parent":"_parent\"","_blank":"_blank\""}}; -var opTag_font={"face":"face=\"","size":"size=\"","color":"color=\""}; -var opAtt_font={"face":{"Verdana":"Verdana\"","Arial":"Arial\"","Tahoma":"Tahoma\"","Courier New":"Courier New\"","Times New Roman":"Times New Roman\""},"size":{"1":"1\"","2":"2\"","3":"3\"","4":"4\"","5":"5\"","6":"6\"","+1":"+1\"","+2":"+2\"","+3":"+3\"","+4":"+4\"","+5":"+5\"","+6":"+6\"","-1":"-1\"","-2":"-2\"","-3":"-3\"","-4":"-4\"","-5":"-5\"","-6":"-6\""}}; -var opTag_div={"align":"align=\""}; -var opAtt_div={"align":{"center":"center\"","left":"left\"","right":"right\"","justify":"justify\""}}; -var opTag_h={"align":"align=\""}; -var opAtt_h={"align":{"center":"center\"","left":"left\"","right":"right\"","justify":"justify\""}}; -var opTag_p={"align":"align=\""}; -var opAtt_p={"align":{"center":"center\"","left":"left\"","right":"right\"","justify":"justify\""}}; -var opTag_table={"align":"align=\"","width":"width=\"","height":"height=\"","cellpadding":"cellpadding=\"","cellspacing":"cellspacing=\"","background":"background=\"","bgcolor":"bgcolor=\"","border":"border=\"","bordercolor":"bordercolor=\"","bordercolorlight":"bordercolorlight=\"","bordercolordark":"bordercolordark=\""}; -var opAtt_table={"align":{"center":"center\"","left":"left\"","right":"right\""}}; -var opTag_all={"class":"class=\"","dir":"dir=\"","id":"id=\"","lang":"lang=\"","onFocus":"onFocus=\"","onBlur":"onBlur=\"","onClick":"onClick=\"","onDblClick":"onDblClick=\"","onMouseDown":"onMouseDown=\"","onMouseUp":"onMouseUp=\"","onMouseOver":"onMouseOver=\"","onMouseMove":"onMouseMove=\"","onMouseOut":"onMouseOut=\"","onKeyPress":"onKeyPress=\"","onKeyDown":"onKeyDown=\"","onKeyUp":"onKeyUp=\"","style":"style=\"","title":"title=\""}; -var opAtt_all={"class":{},"dir":{"rtl":"rtl\"","ltr":"ltr\""},"lang":{"Afrikaans ":"af\"","Albanian ":"sq\"","Arabic ":"ar\"","Basque ":"eu\"","Breton ":"br\"","Bulgarian ":"bg\"","Belarusian ":"be\"","Catalan ":"ca\"","Chinese ":"zh\"","Croatian ":"hr\"","Czech ":"cs\"","Danish ":"da\"","Dutch ":"nl\"","English ":"en\"","Estonian ":"et\"","Faeroese ":"fo\"","Farsi ":"fa\"","Finnish ":"fi\"","French ":"fr\"","Gaelic ":"gd\"","German ":"de\"","Greek ":"el\"","Hebrew ":"he\"","Hindi ":"hi\"","Hungarian ":"hu\"","Icelandic ":"is\"","Indonesian ":"id\"","Italian ":"it\"","Japanese ":"ja\"","Korean ":"ko\"","Latvian ":"lv\"","Lithuanian ":"lt\"","Macedonian ":"mk\"","Malaysian ":"ms\"","Maltese ":"mt\"","Norwegian ":"no\"","Polish ":"pl\"","Portuguese ":"pt\"","Rhaeto-Romanic ":"rm\"","Romanian ":"ro\"","Russian ":"ru\"","Sami ":"sz\"","Serbian ":"sr\"","Setswana ":"tn\"","Slovak ":"sk\"","Slovenian ":"sl\"","Spanish ":"es\"","Sutu ":"sx\"","Swedish ":"sv\"","Thai ":"th\"","Tsonga ":"ts\"","Turkish ":"tr\"","Ukrainian ":"uk\"","Urdu ":"ur\"","Vietnamese ":"vi\"","Xhosa ":"xh\"","Yiddish ":"yi\"","Zulu":"zu\""},"style":{"azimuth":"azimuth: ","background":"background: ","background-attachment":"background-attachment: ","background-color":"background-color: ","background-image":"background-image: ","background-position":"background-position: ","background-repeat":"background-repeat: ","border":"border: ","border-bottom":"border-bottom: ","border-left":"border-left: ","border-right":"border-right: ","border-top":"border-top: ","border-bottom-color":"border-bottom-color: ","border-left-color":"border-left-color: ","border-right-color":"border-right-color: ","border-top-color":"border-top-color: ","border-bottom-style":"border-bottom-style: ","border-left-style":"border-left-style: ","border-right-style":"border-right-style: ","border-top-style":"border-top-style: ","border-bottom-width":"border-bottom-width: ","border-left-width":"border-left-width: ","border-right-width":"border-right-width: ","border-top-width":"border-top-width: ","border-collapse":"border-collapse: ","border-color":"border-color: ","border-style":"border-style: ","border-width":"border-width: ","bottom":"bottom: ","caption-side":"caption-side: ","cell-spacing":"cell-spacing: ","clear":"clear: ","clip":"clip: ","color":"color: ","column-span":"column-span: ","content":"content: ","cue":"cue: ","cue-after":"cue-after: ","cue-before":"cue-before: ","cursor":"cursor: ","direction":"direction: ","display":"display: ","elevation":"elevation: ","filter":"filter: ","float":"float: ","font-family":"font-family: ","font-size":"font-size: ","font-size-adjust":"font-size-adjust: ","font-style":"font-style: ","font-variant":"font-variant: ","font-weight":"font-weight: ","height":"height: ","!important":"!important: ","left":"left: ","letter-spacing":"letter-spacing: ","line-height":"line-height: ","list-style":"list-style: ","list-style-image":"list-style-image: ","list-style-position":"list-style-position: ","list-style-type":"list-style-type: ","margin":"margin: ","margin-bottom":"margin-bottom: ","margin-left":"margin-left: ","margin-right":"margin-right: ","margin-top":"margin-top: ","marks":"marks: ","max-height":"max-height: ","min-height":"min-height: ","max-width":"max-width: ","min-width":"min-width: ","orphans":"orphans: ","overflow":"overflow: ","padding":"padding: ","padding-bottom":"padding-bottom: ","padding-left":"padding-left: ","padding-right":"padding-right: ","padding-top":"padding-top: ","page-break-after":"page-break-after: ","page-break-before":"page-break-before: ","pause":"pause: ","pause-after":"pause-after: ","pause-before":"pause-before: ","pitch":"pitch: ","pitch-range":"pitch-range: ","play-during":"play-during: ","position":"position: ","richness":"richness: ","right":"right: ","row-span":"row-span: ","size":"size: ","speak":"speak: ","speak-date":"speak-date: ","speak-header":"speak-header: ","speak-numeral":"speak-numeral: ","speak-punctuation":"speak-punctuation: ","speak-time":"speak-time: ","speech-rate":"speech-rate: ","stress":"stress: ","table-layout":"table-layout: ","text-align":"text-align: ","text-decoration":"text-decoration: ","text-indent":"text-indent: ","text-shadow":"text-shadow: ","text-transform":"text-transform: ","top":"top: ","vertical-align":"vertical-align: ","visibility":"visibility: ","voice-family":"voice-family: ","volume":"volume: ","white-space":"white-space: ","widows":"widows: ","width":"width: ","word-spacing":"word-spacing: ","z-index":"z-index: "}}; -for(var i in tagLib){ -i=i.replace(/^h[1-6]$/,"h"); -for(var j in opTag_all){ -eval("opTag_"+i+"[\""+j+"\"] = opTag_all[\""+j+"\"];"); -} -for(var j in opAtt_all){ -eval("opAtt_"+i+"[\""+j+"\"] = opAtt_all[\""+j+"\"];"); -} -} - +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +var allTags={a:"a","a (full)":'a href="" target=""',address:"address",b:"b",big:"big",blockquote:"blockquote",code:"code",div:"div",em:"em",fieldset:"fieldset",font:"font","font (full)":'font face="" size="" color=""',h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",i:"i",legend:"legend",li:"li",ol:"ol",ul:"ul",p:"p",pre:"pre",small:"small",span:"span",strong:"strong",sub:"sub",sup:"sup",table:"table"};var tagLib={a:true,div:true,font:true,h1:true,h2:true,h3:true,h4:true,h5:true,h6:true,p:true,table:true};var subTagLib={table:{op:""}};var opTag_a={href:'href="',name:'name="',target:'target="'};var opAtt_a={href:{"http://":"http://","https://":"https://","ftp://":"ftp://","mailto:":"mailto:","#":'#"'},target:{_top:'_top"',_self:'_self"',_parent:'_parent"',_blank:'_blank"'}};var opTag_font={face:'face="',size:'size="',color:'color="'};var opAtt_font={face:{Verdana:'Verdana"',Arial:'Arial"',Tahoma:'Tahoma"',"Courier New":'Courier New"',"Times New Roman":'Times New Roman"'},size:{"1":'1"',"2":'2"',"3":'3"',"4":'4"',"5":'5"',"6":'6"',"+1":'+1"',"+2":'+2"',"+3":'+3"',"+4":'+4"',"+5":'+5"',"+6":'+6"',"-1":'-1"',"-2":'-2"',"-3":'-3"',"-4":'-4"',"-5":'-5"',"-6":'-6"'}};var opTag_div={align:'align="'};var opAtt_div={align:{center:'center"',left:'left"',right:'right"',justify:'justify"'}};var opTag_h={align:'align="'};var opAtt_h={align:{center:'center"',left:'left"',right:'right"',justify:'justify"'}};var opTag_p={align:'align="'};var opAtt_p={align:{center:'center"',left:'left"',right:'right"',justify:'justify"'}};var opTag_table={align:'align="',width:'width="',height:'height="',cellpadding:'cellpadding="',cellspacing:'cellspacing="',background:'background="',bgcolor:'bgcolor="',border:'border="',bordercolor:'bordercolor="',bordercolorlight:'bordercolorlight="',bordercolordark:'bordercolordark="'};var opAtt_table={align:{center:'center"',left:'left"',right:'right"'}};var opTag_all={"class":'class="',dir:'dir="',id:'id="',lang:'lang="',onFocus:'onFocus="',onBlur:'onBlur="',onClick:'onClick="',onDblClick:'onDblClick="',onMouseDown:'onMouseDown="',onMouseUp:'onMouseUp="',onMouseOver:'onMouseOver="',onMouseMove:'onMouseMove="',onMouseOut:'onMouseOut="',onKeyPress:'onKeyPress="',onKeyDown:'onKeyDown="',onKeyUp:'onKeyUp="',style:'style="',title:'title="'};var opAtt_all={"class":{},dir:{rtl:'rtl"',ltr:'ltr"'},lang:{"Afrikaans ":'af"',"Albanian ":'sq"',"Arabic ":'ar"',"Basque ":'eu"',"Breton ":'br"',"Bulgarian ":'bg"',"Belarusian ":'be"',"Catalan ":'ca"',"Chinese ":'zh"',"Croatian ":'hr"',"Czech ":'cs"',"Danish ":'da"',"Dutch ":'nl"',"English ":'en"',"Estonian ":'et"',"Faeroese ":'fo"',"Farsi ":'fa"',"Finnish ":'fi"',"French ":'fr"',"Gaelic ":'gd"',"German ":'de"',"Greek ":'el"',"Hebrew ":'he"',"Hindi ":'hi"',"Hungarian ":'hu"',"Icelandic ":'is"',"Indonesian ":'id"',"Italian ":'it"',"Japanese ":'ja"',"Korean ":'ko"',"Latvian ":'lv"',"Lithuanian ":'lt"',"Macedonian ":'mk"',"Malaysian ":'ms"',"Maltese ":'mt"',"Norwegian ":'no"',"Polish ":'pl"',"Portuguese ":'pt"',"Rhaeto-Romanic ":'rm"',"Romanian ":'ro"',"Russian ":'ru"',"Sami ":'sz"',"Serbian ":'sr"',"Setswana ":'tn"',"Slovak ":'sk"',"Slovenian ":'sl"',"Spanish ":'es"',"Sutu ":'sx"',"Swedish ":'sv"',"Thai ":'th"',"Tsonga ":'ts"',"Turkish ":'tr"',"Ukrainian ":'uk"',"Urdu ":'ur"',"Vietnamese ":'vi"',"Xhosa ":'xh"',"Yiddish ":'yi"',Zulu:'zu"'},style:{azimuth:"azimuth: ",background:"background: ","background-attachment":"background-attachment: ","background-color":"background-color: ","background-image":"background-image: ","background-position":"background-position: ","background-repeat":"background-repeat: ",border:"border: ","border-bottom":"border-bottom: ","border-left":"border-left: ","border-right":"border-right: ","border-top":"border-top: ","border-bottom-color":"border-bottom-color: ","border-left-color":"border-left-color: ","border-right-color":"border-right-color: ","border-top-color":"border-top-color: ","border-bottom-style":"border-bottom-style: ","border-left-style":"border-left-style: ","border-right-style":"border-right-style: ","border-top-style":"border-top-style: ","border-bottom-width":"border-bottom-width: ","border-left-width":"border-left-width: ","border-right-width":"border-right-width: ","border-top-width":"border-top-width: ","border-collapse":"border-collapse: ","border-color":"border-color: ","border-style":"border-style: ","border-width":"border-width: ",bottom:"bottom: ","caption-side":"caption-side: ","cell-spacing":"cell-spacing: ",clear:"clear: ",clip:"clip: ",color:"color: ","column-span":"column-span: ",content:"content: ",cue:"cue: ","cue-after":"cue-after: ","cue-before":"cue-before: ",cursor:"cursor: ",direction:"direction: ",display:"display: ",elevation:"elevation: ",filter:"filter: ","float":"float: ","font-family":"font-family: ","font-size":"font-size: ","font-size-adjust":"font-size-adjust: ","font-style":"font-style: ","font-variant":"font-variant: ","font-weight":"font-weight: ",height:"height: ","!important":"!important: ",left:"left: ","letter-spacing":"letter-spacing: ","line-height":"line-height: ","list-style":"list-style: ","list-style-image":"list-style-image: ","list-style-position":"list-style-position: ","list-style-type":"list-style-type: ",margin:"margin: ","margin-bottom":"margin-bottom: ","margin-left":"margin-left: ","margin-right":"margin-right: ","margin-top":"margin-top: ",marks:"marks: ","max-height":"max-height: ","min-height":"min-height: ","max-width":"max-width: ","min-width":"min-width: ",orphans:"orphans: ",overflow:"overflow: ",padding:"padding: ","padding-bottom":"padding-bottom: ","padding-left":"padding-left: ","padding-right":"padding-right: ","padding-top":"padding-top: ","page-break-after":"page-break-after: ","page-break-before":"page-break-before: ",pause:"pause: ","pause-after":"pause-after: ","pause-before":"pause-before: ",pitch:"pitch: ","pitch-range":"pitch-range: ","play-during":"play-during: ",position:"position: ",richness:"richness: ",right:"right: ","row-span":"row-span: ",size:"size: ",speak:"speak: ","speak-date":"speak-date: ","speak-header":"speak-header: ","speak-numeral":"speak-numeral: ","speak-punctuation":"speak-punctuation: ","speak-time":"speak-time: ","speech-rate":"speech-rate: ",stress:"stress: ","table-layout":"table-layout: ","text-align":"text-align: ","text-decoration":"text-decoration: ","text-indent":"text-indent: ","text-shadow":"text-shadow: ","text-transform":"text-transform: ",top:"top: ","vertical-align":"vertical-align: ",visibility:"visibility: ","voice-family":"voice-family: ",volume:"volume: ","white-space":"white-space: ",widows:"widows: ",width:"width: ","word-spacing":"word-spacing: ","z-index":"z-index: "}};for(var i in tagLib){i=i.replace(/^h[1-6]$/,"h");for(var j in opTag_all){eval("opTag_"+i+'["'+j+'"] = opTag_all["'+j+'"];')}for(var j in opAtt_all){eval("opAtt_"+i+'["'+j+'"] = opAtt_all["'+j+'"];')}}; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SaveSubmit/SaveSubmit.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SaveSubmit/SaveSubmit.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SaveSubmit/SaveSubmit.js 16 Jan 2009 09:05:49 -0000 1.1 @@ -0,0 +1,2 @@ +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +function SaveSubmit(c){this.editor=c;this.changed=false;var b=this;var a=c.config;this.textarea=this.editor._textArea;a.registerIcon("savesubmitchanged",Xinha.getPluginDir("SaveSubmit")+"/img/ed_save_red.gif");a.registerIcon("savesubmitunchanged",Xinha.getPluginDir("SaveSubmit")+"/img/ed_save_green.gif");a.registerButton({id:"savesubmit",tooltip:b._lc("Save"),image:a.iconList.savesubmitunchanged,textMode:false,action:function(){b.save()}});a.addToolbarElement("savesubmit","popupeditor",-1)}SaveSubmit.prototype._lc=function(a){return Xinha._lc(a,"SaveSubmit")};SaveSubmit._pluginInfo={name:"SaveSubmit",version:"1.0",developer:"Raimund Meyer",developer_url:"http://x-webservice.net",c_owner:"Raimund Meyer",sponsor:"",sponsor_url:"",license:"htmlArea"};SaveSubmit.prototype.onKeyPress=function(a){if(a.ctrlKey&&this.editor.getKey(a)=="s"){this.save(this.editor);Xinha._stopEvent(a);return true}else{if(!this.changed){if(this.getChanged()){this.setChanged()}return false}}};SaveSubmit.prototype.onExecCommand=function(a){if(this.changed&&a=="undo"){if(this.initial_html==this.editor.getInnerHTML()){this.setUnChanged()}return false}};SaveSubmit.prototype.onUpdateToolbar=function(){if(!this.initial_html){this.initial_html=this.editor.getInnerHTML()}if(!this.changed){if(this.getChanged()){this.setChanged()}return false}};SaveSubmit.prototype.getChanged=function(){if(this.initial_html===null){this.initial_html=this.editor.getInnerHTML()}if(this.initial_html!=this.editor.getInnerHTML()&&this.changed==false){this.changed=true;return true}else{return false}};SaveSubmit.prototype.setChanged=function(){this.editor._toolbarObjects.savesubmit.swapImage(this.editor.config.iconList.savesubmitchanged);this.editor.updateToolbar()};SaveSubmit.prototype.setUnChanged=function(){this.changed=false;this.editor._toolbarObjects.savesubmit.swapImage(this.editor.config.iconList.savesubmitunchanged)};SaveSubmit.prototype.changedReset=function(){this.initial_html=null;this.setUnChanged()};SaveSubmit.prototype.save=function(){this.buildMessage();var e=this.editor;var a=this;var g=e._textArea.form;g.onsubmit();var c,h,f="";for(var d=0;d0)?"&":"")+g.elements[d].name+"="+encodeURIComponent(g.elements[d].value)}var b=e._textArea.form.action||window.location.href;Xinha._postback(b,f,function(i){if(i){a.setMessage(i);a.changedReset()}removeMessage=function(){a.removeMessage()};window.setTimeout("removeMessage()",1000)})};SaveSubmit.prototype.setMessage=function(c){var a=this.textarea;if(!document.getElementById("message_sub_"+a.id)){return}var b=document.getElementById("message_sub_"+a.id);b.innerHTML=Xinha._lc(c,"SaveSubmit")};SaveSubmit.prototype.removeMessage=function(){var a=this.textarea;if(!document.getElementById("message_"+a.id)){return}document.body.removeChild(document.getElementById("message_"+a.id))};SaveSubmit.prototype.buildMessage=function(){var a=this.textarea;var e=this.editor._htmlArea;var d=document.createElement("div");d.id="message_"+a.id;d.className="loading";d.style.width=e.offsetWidth+"px";d.style.left=Xinha.findPosX(e)+"px";d.style.top=(Xinha.findPosY(e)+parseInt(e.offsetHeight)/2)-50+"px";var c=document.createElement("div");c.className="loading_main";c.id="loading_main_"+a.id;c.appendChild(document.createTextNode(this._lc("Saving...")));var b=document.createElement("div");b.className="loading_sub";b.id="message_sub_"+a.id;b.appendChild(document.createTextNode(this._lc("in progress")));d.appendChild(c);d.appendChild(b);document.body.appendChild(d)}; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SetId/SetId.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SetId/SetId.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SetId/SetId.js 16 Jan 2009 09:05:49 -0000 1.1 @@ -0,0 +1,88 @@ +function SetId(editor) { + this.editor = editor; + var cfg = editor.config; + var self = this; + + // register the toolbar buttons provided by this plugin + cfg.registerButton({ + id : "setid", + tooltip : this._lc("Set Id and Name"), + image : editor.imgURL("set-id.gif", "SetId"), + textMode : false, + action : function(editor) { + self.buttonPress(editor); + } + }); + cfg.addToolbarElement("setid", "createlink", 1); +} + +SetId._pluginInfo = { + name : "SetId", + version : "2.0", + developer : "Udo Schmal", + developer_url : "http://www.schaffrath-neuemedien.de", + c_owner : "Udo Schmal", + sponsor : "L.N.Schaffrath NeueMedien", + sponsor_url : "http://www.schaffrath-neuemedien.de", + license : "htmlArea" +}; + +SetId.prototype._lc = function(string) { + return Xinha._lc(string, 'SetId'); +}; + + +SetId.prototype.onGenerate = function() { + this.editor.addEditorStylesheet(Xinha.getPluginDir("SetId") + '/set-id.css'); +}; + +SetId.prototype.buttonPress = function(editor) { + var outparam = null; + var html = editor.getSelectedHTML(); + var sel = editor._getSelection(); + var range = editor._createRange(sel); + var node = editor._activeElement(sel); + if (node) + outparam = { name : node.id }; + else + outparam = { name : '' }; + + editor._popupDialog( "plugin://SetId/set_id", function( param ) { + if ( param ) { + var name = param["name"]; + if (name == "" || name == null) { + if (node) { + node.removeAttribute("name"); + node.removeAttribute("id"); + node.removeAttribute("title"); + if (node.className == "hasid") { + node.removeAttribute("class"); + } + } + return; + } + try { + var doc = editor._doc; + if (!node) { + node = doc.createElement("span"); + node.id = name; + node.name = name; + node.title = name; + node.className = "hasid"; + node.innerHTML = html; + if (Xinha.is_ie) { + range.pasteHTML(node.outerHTML); + } else { + editor.insertNodeAtSelection(node); + } + } else { + node.id = name; + node.name = name; + node.title = name; + node.className = "hasid"; + } + } + catch (e) { } + } + }, outparam); +}; Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SmartReplace/SmartReplace.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SmartReplace/SmartReplace.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SmartReplace/SmartReplace.js 16 Jan 2009 09:05:49 -0000 1.1 @@ -0,0 +1,2 @@ +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +function SmartReplace(c){this.editor=c;var a=c.config;var b=this;a.registerButton({id:"smartreplace",tooltip:this._lc("SmartReplace"),image:[_editor_url+"iconsets/Tango/ed_buttons_main.png",3,8],textMode:false,action:function(f,g,d){b.buttonPress(null,d)}});a.addToolbarElement("smartreplace","htmlmode",1)}SmartReplace._pluginInfo={name:"SmartReplace",version:"1.0",developer:"Raimund Meyer",developer_url:"http://x-webservice.net",c_owner:"Raimund Meyer",sponsor:"",sponsor_url:"",license:"htmlArea"};SmartReplace.prototype._lc=function(a){return Xinha._lc(a,"SmartReplace")};Xinha.Config.prototype.SmartReplace={defaultActive:true,quotes:null};SmartReplace.prototype.toggleActivity=function(a){if(typeof a!="undefined"){this.active=a}else{this.active=this.active?false:true}this.editor._toolbarObjects.smartreplace.state("active",this.active)};SmartReplace.prototype.onUpdateToolbar=function(){this.editor._toolbarObjects.smartreplace.state("active",this.active)};SmartReplace.prototype.onGenerate=function(){this.active=this.editor.config.SmartReplace.defaultActive;this.editor._toolbarObjects.smartreplace.state("active",this.active);var b=this;Xinha._addEvent(b.editor._doc,"keypress",function(c){return b.keyEvent(Xinha.is_ie?b.editor._iframe.contentWindow.event:c)});var a=this.editor.config.SmartReplace.quotes;if(a&&typeof a=="object"){this.openingQuotes=a[0];this.closingQuotes=a[1];this.openingQuote=a[2];this.closingQuote=a[3]}else{this.openingQuotes=this._lc("OpeningDoubleQuotes");this.closingQuote=this._lc("ClosingSingleQuote");this.closingQuotes=this._lc("ClosingDoubleQuotes");this.openingQuote=this._lc("OpeningSingleQuote")}if(this.openingQuotes=="OpeningDoubleQuotes"){this.openingQuotes=String.fromCharCode(8220);this.closingQuotes=String.fromCharCode(8221);this.openingQuote=String.fromCharCode(8216);this.closingQuote=String.fromCharCode(8217)}};SmartReplace.prototype.keyEvent=function(d){if(!this.active){return true}var c=this.editor;var a=Xinha.is_ie?d.keyCode:d.which;var b=String.fromCharCode(a);if(b=='"'||b=="'"){Xinha._stopEvent(d);return this.smartQuotes(b)}if(a==32){return this.smartReplace(d,2,/^\s-/," "+String.fromCharCode(8211),false)}if(b=="."){return this.smartReplace(d,2,/\.\./,String.fromCharCode(8230),true)}return true};SmartReplace.prototype.smartQuotes=function(d){if(d=="'"){var a=this.openingQuote;var b=this.closingQuote}else{var a=this.openingQuotes;var b=this.closingQuotes}var c=this.editor;var f=c.getSelection();if(Xinha.is_ie){var e=c.createRange(f);if(e.text!==""){e.text=""}e.moveStart("character",-1);if(e.text.match(/\S/)){e.moveStart("character",+1);e.text=b}else{e.moveStart("character",+1);e.text=a}}else{var e=c.createRange(f);if(!e.collapsed){c.insertNodeAtSelection(document.createTextNode(""))}if(e.startOffset>0){e.setStart(e.startContainer,e.startOffset-1)}if(e.toString().match(/[^\s\xA0]/)){e.collapse(false);c.insertNodeAtSelection(document.createTextNode(b))}else{c.insertNodeAtSelection(document.createTextNode(a))}c.getSelection().collapseToEnd()}return false};SmartReplace.prototype.smartReplace=function(g,f,d,a,c){var b=this.editor;var h=this.editor.getSelection();var e=this.editor.createRange(h);if(Xinha.is_ie){e.moveStart("character",-f);if(e.text.match(d)){e.text=a;if(c){Xinha._stopEvent(g);return false}}}else{if(e.startOffset>1){e.setStart(e.startContainer,e.startOffset-f)}if(e.toString().match(d)){this.editor.insertNodeAtSelection(document.createTextNode(a));e.deleteContents();e.collapse(true);if(c){Xinha._stopEvent(g);return false}}b.getSelection().collapseToEnd()}return true};SmartReplace.prototype.replaceAll=function(){var g=[""",String.fromCharCode(8220),String.fromCharCode(8221),String.fromCharCode(8222),String.fromCharCode(187),String.fromCharCode(171)];var e=["'",String.fromCharCode(8216),String.fromCharCode(8217),String.fromCharCode(8218),String.fromCharCode(8250),String.fromCharCode(8249)];var c=this.editor.getHTML();var h=new RegExp("(\\s|^|>)("+g.join("|")+")(\\S)","g");c=c.replace(h,"$1"+this.openingQuotes+"$3");var b=new RegExp("(\\s|^|>)("+e.join("|")+")(\\S)","g");c=c.replace(b,"$1"+this.openingQuote+"$3");var a=new RegExp("(\\S)("+g.join("|")+")","g");c=c.replace(a,"$1"+this.closingQuotes);var f=new RegExp("(\\S)("+e.join("|")+")","g");c=c.replace(f,"$1"+this.closingQuote);var d=new RegExp("( | )(-)( | )","g");c=c.replace(d," "+String.fromCharCode(8211)+" ");this.editor.setHTML(c)};SmartReplace.prototype.buttonPress=function(c,d){var b=this;if(this.dialog.rootElem.style.display!="none"){return this.dialog.hide()}var e=function(){var f=b.dialog.hide();b.toggleActivity((f.enable)?true:false);if(f.convert){b.replaceAll();b.dialog.getElementById("convert").checked=false}};var a={enable:b.active?"on":"",convert:""};this.show(a,e)};SmartReplace.prototype.onGenerateOnce=function(){this._prepareDialog()};SmartReplace.prototype._prepareDialog=function(){var a=this;var b=this.editor;if(!this.html){Xinha._getback(Xinha.getPluginDir("SmartReplace")+"/dialog.html",function(c){a.html=c;a._prepareDialog()});return}this.dialog=new Xinha.Dialog(b,this.html,"SmartReplace",{},{modal:false});this.dialog.attachToPanel("top");this.dialog.getElementById("enable").onchange=function(){a.toggleActivity(this.checked)};this.dialog.getElementById("convert").onchange=function(){a.dialog.getElementById("ok").style.display=(this.checked)?"":"none"};this.dialog.getElementById("ok").onclick=function(){a.replaceAll();a.dialog.getElementById("convert").checked=false;this.style.display="none"};this.ready=true};SmartReplace.prototype.show=function(a){if(!this.ready){var b=this;window.setTimeout(function(){b.show(a,ok,cancel)},100);return}var b=this;this.dialog.show(a);this.dialog.onresize()}; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SmartReplace/dialog.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SmartReplace/dialog.html,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SmartReplace/dialog.html 14 Jun 2007 01:36:57 -0000 1.1 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SmartReplace/dialog.html 16 Jan 2009 09:05:49 -0000 1.2 @@ -7,11 +7,10 @@ - +
    Target: -
    -
    -
    -
    - +
    +
    +
    +
    +
    @@ -59,16 +57,14 @@
    -
    - +
    + - + @@ -82,11 +78,9 @@
    - +
    @@ -100,8 +94,10 @@
    - +
    - \ No newline at end of file + + + Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Linker/linker.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Linker/Attic/linker.js,v diff -u -N -r1.8 -r1.9 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Linker/linker.js 13 May 2008 18:53:53 -0000 1.8 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Linker/linker.js 16 Jan 2009 09:05:48 -0000 1.9 @@ -1,388 +1,102 @@ -/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */ -/* This file is part of version 0.95 released Mon, 12 May 2008 17:33:15 +0200 */ -/* The URL of the most recent version of this file is http://svn.xinha.webfactional.com/trunk/plugins/Linker/linker.js */ -Linker._pluginInfo={name:"Linker",version:"1.0",developer:"James Sleeman",developer_url:"http://www.gogo.co.nz/",c_owner:"Gogo Internet Services",license:"htmlArea",sponsor:"Gogo Internet Services",sponsor_url:"http://www.gogo.co.nz/"}; -Xinha.loadStyle("dTree/dtree.css","Linker"); -Xinha.Config.prototype.Linker={"treeCaption":document.location.host,"backend":Xinha.getPluginDir("Linker")+"/scan.php","backend_data":null,"files":null}; -function Linker(_1,_2){ -this.editor=_1; -this.lConfig=_1.config.Linker; -var _3=this; -if(_1.config.btnList.createlink){ -_1.config.btnList.createlink[3]=function(e,_5,_6){ -_3._createLink(_3._getSelectedAnchor()); +/** htmlArea - James' Fork - Linker Plugin **/ +Linker._pluginInfo = +{ + name : "Linker", + version : "1.0", + developer: "James Sleeman", + developer_url: "http://www.gogo.co.nz/", + c_owner : "Gogo Internet Services", + license : "htmlArea", + sponsor : "Gogo Internet Services", + sponsor_url : "http://www.gogo.co.nz/" }; -}else{ -_1.config.registerButton("createlink","Insert/Modify Hyperlink",[_editor_url+"images/ed_buttons_main.gif",6,1],false,function(e,_8,_9){ -_3._createLink(_3._getSelectedAnchor()); -}); -} -_1.config.addToolbarElement("createlink","createlink",0); -} -Linker.prototype._lc=function(_a){ -return Xinha._lc(_a,"Linker"); + +Xinha.loadStyle('dTree/dtree.css', 'Linker'); + +Xinha.Config.prototype.Linker = +{ + 'treeCaption' : document.location.host, + 'backend' : Xinha.getPluginDir("Linker") + '/scan.php', + 'backend_data' : null, + 'files' : null }; -Linker.prototype._createLink=function(a){ -if(!a&&this.editor.selectionEmpty(this.editor.getSelection())){ -alert(this._lc("You must select some text before making a new link.")); -return false; + + +function Linker(editor, args) +{ + this.editor = editor; + this.lConfig = editor.config.Linker; + + var linker = this; + if(editor.config.btnList.createlink) + { + editor.config.btnList.createlink[3] + = function(e, objname, obj) { linker._createLink(linker._getSelectedAnchor()); }; + } + else + { + editor.config.registerButton( + 'createlink', 'Insert/Modify Hyperlink', [_editor_url + "images/ed_buttons_main.gif",6,1], false, + function(e, objname, obj) { linker._createLink(linker._getSelectedAnchor()); } + ); + } + + // See if we can find 'createlink' + editor.config.addToolbarElement("createlink", "createlink", 0); } -var _c={type:"url",href:"http://www.example.com/",target:"",p_width:"",p_height:"",p_options:["menubar=no","toolbar=yes","location=no","status=no","scrollbars=yes","resizeable=yes"],to:"alice@example.com",subject:"",body:"",anchor:""}; -if(a&&a.tagName.toLowerCase()=="a"){ -var _d=this.editor.fixRelativeLinks(a.getAttribute("href")); -var m=_d.match(/^mailto:(.*@[^?&]*)(\?(.*))?$/); -var _f=_d.match(/^#(.*)$/); -if(m){ -_c.type="mailto"; -_c.to=m[1]; -if(m[3]){ -var _10=m[3].split("&"); -for(var x=0;x<_10.length;x++){ -var j=_10[x].match(/(subject|body)=(.*)/); -if(j){ -_c[j[1]]=decodeURIComponent(j[2]); -} -} -} -}else{ -if(_f){ -_c.type="anchor"; -_c.anchor=_f[1]; -}else{ -if(a.getAttribute("onclick")){ -var m=a.getAttribute("onclick").match(/window\.open\(\s*this\.href\s*,\s*'([a-z0-9_]*)'\s*,\s*'([a-z0-9_=,]*)'\s*\)/i); -_c.href=_d?_d:""; -_c.target="popup"; -_c.p_name=m[1]; -_c.p_options=[]; -var _10=m[2].split(","); -for(var x=0;x<_10.length;x++){ -var i=_10[x].match(/(width|height)=([0-9]+)/); -if(i){ -_c["p_"+i[1]]=parseInt(i[2]); -}else{ -_c.p_options.push(_10[x]); -} -} -}else{ -_c.href=_d; -_c.target=a.target; -} -} -} -} -var _14=this; -this.a=a; -var _15=function(){ -var a=_14.a; -var _17=_14._dialog.hide(); -var atr={href:"",target:"",title:"",onclick:""}; -if(_17.type=="url"){ -if(_17.href){ -atr.href=_17.href; -atr.target=_17.target; -if(_17.target=="popup"){ -if(_17.p_width){ -_17.p_options.push("width="+_17.p_width); -} -if(_17.p_height){ -_17.p_options.push("height="+_17.p_height); -} -atr.onclick="if(window.top && window.top.Xinha){return false}window.open(this.href, '"+(_17.p_name.replace(/[^a-z0-9_]/i,"_"))+"', '"+_17.p_options.join(",")+"');return false;"; -} -} -}else{ -if(_17.type=="anchor"){ -if(_17.anchor){ -atr.href=_17.anchor.value; -} -}else{ -if(_17.to){ -atr.href="mailto:"+_17.to; -if(_17.subject){ -atr.href+="?subject="+encodeURIComponent(_17.subject); -} -if(_17.body){ -atr.href+=(_17.subject?"&":"?")+"body="+encodeURIComponent(_17.body); -} -} -} -} -if(a&&a.tagName.toLowerCase()=="a"){ -if(!atr.href){ -if(confirm(_14._dialog._lc("Are you sure you wish to remove this link?"))){ -var p=a.parentNode; -while(a.hasChildNodes()){ -p.insertBefore(a.removeChild(a.childNodes[0]),a); -} -p.removeChild(a); -_14.editor.updateToolbar(); -return; -} -}else{ -for(var i in atr){ -a.setAttribute(i,atr[i]); -} -if(Xinha.is_ie){ -if(/mailto:([^?<>]*)(\?[^<]*)?$/i.test(a.innerHTML)){ -a.innerHTML=RegExp.$1; -} -} -} -}else{ -if(!atr.href){ -return true; -} -var tmp=Xinha.uniq("http://www.example.com/Link"); -_14.editor._doc.execCommand("createlink",false,tmp); -var _1c=_14.editor._doc.getElementsByTagName("a"); -for(var i=0;i<_1c.length;i++){ -var _1d=_1c[i]; -if(_1d.href==tmp){ -if(!a){ -a=_1d; -} -for(var j in atr){ -_1d.setAttribute(j,atr[j]); -} -} -} -} -_14.editor.selectNodeContents(a); -_14.editor.updateToolbar(); + +Linker.prototype._lc = function(string) +{ + return Xinha._lc(string, 'Linker'); }; -this._dialog.show(_c,_15); + + +Linker.prototype.onGenerateOnce = function() +{ + Linker.loadAssets(); + this.loadFiles(); }; -Linker.prototype._getSelectedAnchor=function(){ -var sel=this.editor.getSelection(); -var rng=this.editor.createRange(sel); -var a=this.editor.activeElement(sel); -if(a!=null&&a.tagName.toLowerCase()=="a"){ -return a; -}else{ -a=this.editor._getFirstAncestor(sel,"a"); -if(a!=null){ -return a; -} -} -return null; + +Linker.prototype.onUpdateToolbar = function() +{ + if (typeof dTree == 'undefined' || !Linker.methodsReady || !Linker.html || !this.files) + { + this.editor._toolbarObjects.createlink.state("enabled", false); + } + else this.onUpdateToolbar = null; }; -Linker.prototype.onGenerateOnce=function(){ -this._dialog=new Linker.Dialog(this); -}; -Linker.Dialog_dTrees=[]; -Linker.Dialog=function(_22){ -var _23=this; -this.Dialog_nxtid=0; -this.linker=_22; -this.id={}; -this.ready=false; -this.files=false; -this.html=false; -this.dialog=false; -this._prepareDialog(); -}; -Linker.Dialog.prototype._prepareDialog=function(){ -var _24=this; -var _25=this.linker; -if(typeof dTree=="undefined"){ -Xinha._loadback(Xinha.getPluginDir("Linker")+"/dTree/dtree.js",function(){ -_24._prepareDialog(); -}); -return; + +Linker.Dialog_dTrees = [ ]; + +Linker.loadAssets = function() +{ + var self = Linker; + if (self.loading) return; + self.loading = true; + Xinha._getback(Xinha.getPluginDir("Linker") + '/pluginMethods.js', function(getback) { eval(getback); self.methodsReady = true; }); + Xinha._loadback( Xinha.getPluginDir("Linker") + '/dTree/dtree.js', function() {Linker.dTreeReady = true; } ); + Xinha._getback( Xinha.getPluginDir("Linker") + '/dialog.html', function(getback) { self.html = getback; } ); } -if(this.files===false){ -if(_25.lConfig.backend){ -Xinha._postback(_25.lConfig.backend,_25.lConfig.backend_data,function(txt){ -try{ -_24.files=eval(txt); -} -catch(Error){ -_24.files=[{url:"",title:Error.toString()}]; -} -_24._prepareDialog(); -}); -}else{ -if(_25.lConfig.files!=null){ -_24.files=_25.lConfig.files; -_24._prepareDialog(); -} -} -return; -} -var _27=this.files; -if(this.html==false){ -Xinha._getback(Xinha.getPluginDir("Linker")+"/dialog.html",function(txt){ -_24.html=txt; -_24._prepareDialog(); -}); -return; -} -var _29=this.html; -var _2a=this.dialog=new Xinha.Dialog(_25.editor,this.html,"Linker"); -var _2b=Xinha.uniq("dTree_"); -this.dTree=new dTree(_2b,Xinha.getPluginDir("Linker")+"/dTree/"); -eval(_2b+" = this.dTree"); -this.dTree.add(this.Dialog_nxtid++,-1,_25.lConfig.treeCaption,null,_25.lConfig.treeCaption); -this.makeNodes(_27,0); -var _2c=this.dialog.getElementById("dTree"); -_2c.innerHTML=""; -_2c.style.position="absolute"; -_2c.style.left=1+"px"; -_2c.style.top=0+"px"; -_2c.style.overflow="auto"; -_2c.style.backgroundColor="white"; -this.ddTree=_2c; -this.dTree._linker_premade=this.dTree.toString(); -var _2d=this.dialog.getElementById("options"); -_2d.style.position="absolute"; -_2d.style.top=0+"px"; -_2d.style.right=0+"px"; -_2d.style.width=320+"px"; -_2d.style.overflow="auto"; -this.dialog.onresize=function(){ -var h=parseInt(_2a.height)-_2a.getElementById("h1").offsetHeight; -var w=parseInt(_2a.width)-322; -if(w<0){ -w=0; -} -if(h<0){ -h=0; -} -_2d.style.height=_2c.style.height=h+"px"; -_2c.style.width=w+"px"; -}; -this.ready=true; -}; -Linker.Dialog.prototype.makeNodes=function(_30,_31){ -for(var i=0;i<_30.length;i++){ -if(typeof _30[i]=="string"){ -this.dTree.add(Linker.nxtid++,_31,_30[i].replace(/^.*\//,""),"javascript:document.getElementsByName('"+this.dialog.id.href+"')[0].value=decodeURIComponent('"+encodeURIComponent(_30[i])+"');document.getElementsByName('"+this.dialog.id.type+"')[0].click();document.getElementsByName('"+this.dialog.id.href+"')[0].focus();void(0);",_30[i]); -}else{ -if(typeof _30[i]=="object"&&_30[i]&&typeof _30[i].length==="number"){ -var id=this.Dialog_nxtid++; -this.dTree.add(id,_31,_30[i][0].replace(/^.*\//,""),null,_30[i][0]); -this.makeNodes(_30[i][1],id); -}else{ -if(typeof _30[i]=="object"){ -if(_30[i].children){ -var id=this.Dialog_nxtid++; -}else{ -var id=Linker.nxtid++; -} -if(_30[i].title){ -var _34=_30[i].title; -}else{ -if(_30[i].url){ -var _34=_30[i].url.replace(/^.*\//,""); -}else{ -var _34="no title defined"; -} -} -if(_30[i].url){ -var _35="javascript:document.getElementsByName('"+this.dialog.id.href+"')[0].value=decodeURIComponent('"+encodeURIComponent(_30[i].url)+"');document.getElementsByName('"+this.dialog.id.type+"')[0].click();document.getElementsByName('"+this.dialog.id.href+"')[0].focus();void(0);"; -}else{ -var _35=""; -} -this.dTree.add(id,_31,_34,_35,_34); -if(_30[i].children){ -this.makeNodes(_30[i].children,id); -} -} -} -} -} -}; -Linker.Dialog.prototype._lc=Linker.prototype._lc; -Linker.Dialog.prototype.show=function(_36,ok,_38){ -if(!this.ready){ -var _39=this; -window.setTimeout(function(){ -_39.show(_36,ok,_38); -},100); -return; -} -if(this.ddTree.innerHTML==""){ -this.ddTree.innerHTML=this.dTree._linker_premade; -} -if(_36.type=="url"){ -this.dialog.getElementById("urltable").style.display=""; -this.dialog.getElementById("mailtable").style.display="none"; -this.dialog.getElementById("anchortable").style.display="none"; -}else{ -if(_36.type=="anchor"){ -this.dialog.getElementById("urltable").style.display="none"; -this.dialog.getElementById("mailtable").style.display="none"; -this.dialog.getElementById("anchortable").style.display=""; -}else{ -this.dialog.getElementById("urltable").style.display="none"; -this.dialog.getElementById("mailtable").style.display=""; -this.dialog.getElementById("anchortable").style.display="none"; -} -} -if(_36.target=="popup"){ -this.dialog.getElementById("popuptable").style.display=""; -}else{ -this.dialog.getElementById("popuptable").style.display="none"; -} -var _3a=this.dialog.getElementById("anchor"); -for(var i=_3a.length;i>=0;i--){ -_3a[i]=null; -} -var _3c=this.linker.editor.getHTML(); -var _3d=new Array(); -var m=_3c.match(/]+name="([^"]+)"/gi); -if(m){ -for(i=0;i]*)(\?[^<]*)?$/i.test(w.innerHTML)){w.innerHTML=RegExp.$1}}}}else{if(!v.href){return true}var t=Xinha.uniq("http://www.example.com/Link");h.editor._doc.execCommand("createlink",false,t);var m=h.editor._doc.getElementsByTagName("a");for(var s=0;s=0;h--){j[h]=null}var k=this.linker.editor.getHTML();var b=new Array();var e=k.match(/]+name="([^"]+)"/gi);if(e){for(h=0;h0){this.dialog.getElementById(a[0]).checked=true}this.dialog.onresize()};Linker.Dialog.prototype.hide=function(){this.linker.editor.enableToolbar();return this.dialog.hide()};Linker.Dialog.prototype.removeLink=function(a){this.dialog.getElementById("href").value="";this.dialog.getElementById("to").value="";return a()};Linker.Dialog.prototype.showOptionsForType=function(c){var a=this.dialog.getElementById("urltable");var d=this.dialog.getElementById("mailtable");var b=this.dialog.getElementById("anchortable");if(c=="anchor"){b.style.display="";a.style.display="none";d.style.display="none"}else{if(c=="mailto"){d.style.display="";a.style.display="none";b.style.display="none"}else{a.style.display="";d.style.display="none";b.style.display="none"}}};Linker.Dialog.prototype.showOptionsForTarget=function(a){var b=this.dialog.getElementById("popuptable");b.style.display=a=="popup"?"":"none"}; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Linker/dTree/dtree.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Linker/dTree/dtree.js,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Linker/dTree/dtree.js 13 May 2008 18:53:53 -0000 1.5 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Linker/dTree/dtree.js 16 Jan 2009 09:05:48 -0000 1.6 @@ -1,357 +1,2 @@ -/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */ -/* This file is part of version 0.95 released Mon, 12 May 2008 17:33:15 +0200 */ -/* The URL of the most recent version of this file is http://svn.xinha.webfactional.com/trunk/plugins/Linker/dTree/dtree.js */ -function Node(id,_2,_3,_4,_5,_6,_7,_8,_9){ -this.id=id; -this.pid=_2; -this.name=_3; -this.url=_4; -this.title=_5; -this.target=_6; -this.icon=_7; -this.iconOpen=_8; -this._io=_9||false; -this._is=false; -this._ls=false; -this._hc=false; -this._ai=0; -this._p; -} -function dTree(_a,_b){ -this.config={target:null,folderLinks:true,useSelection:true,useCookies:true,useLines:true,useIcons:true,useStatusText:false,closeSameLevel:false,inOrder:false}; -this.icon={root:_b+"img/base.gif",folder:_b+"img/folder.gif",folderOpen:_b+"img/folderopen.gif",node:_b+"img/page.gif",empty:_b+"img/empty.gif",line:_b+"img/line.gif",join:_b+"img/join.gif",joinBottom:_b+"img/joinbottom.gif",plus:_b+"img/plus.gif",plusBottom:_b+"img/plusbottom.gif",minus:_b+"img/minus.gif",minusBottom:_b+"img/minusbottom.gif",nlPlus:_b+"img/nolines_plus.gif",nlMinus:_b+"img/nolines_minus.gif"}; -this.obj=_a; -this.aNodes=[]; -this.aIndent=[]; -this.root=new Node(-1); -this.selectedNode=null; -this.selectedFound=false; -this.completed=false; -} -dTree.prototype.add=function(id,_d,_e,_f,_10,_11,_12,_13,_14){ -this.aNodes[this.aNodes.length]=new Node(id,_d,_e,_f,_10,_11,_12,_13,_14); -}; -dTree.prototype.openAll=function(){ -this.oAll(true); -}; -dTree.prototype.closeAll=function(){ -this.oAll(false); -}; -dTree.prototype.toString=function(){ -this.setCS_All(); -var str="
    \n"; -if(document.getElementById){ -if(this.config.useCookies){ -this.selectedNode=this.getSelected(); -} -str+=this.addNode(this.root); -}else{ -str+="Browser not supported."; -} -str+="
    "; -if(!this.selectedFound){ -this.selectedNode=null; -} -this.completed=true; -return str; -}; -dTree.prototype.addNode=function(_16){ -var str=""; -var n=0; -if(this.config.inOrder){ -n=_16._ai; -} -for(n;n"+this.indent(_1a,_1b); -if(this.config.useIcons){ -if(!_1a.icon){ -_1a.icon=(this.root.id==_1a.pid)?this.icon.root:((_1a._hc)?this.icon.folder:this.icon.node); -} -if(!_1a.iconOpen){ -_1a.iconOpen=(_1a._hc)?this.icon.folderOpen:this.icon.node; -} -if(this.root.id==_1a.pid){ -_1a.icon=this.icon.root; -_1a.iconOpen=this.icon.root; -} -str+="\"\""; -} -if(_1a.url){ -str+=""; -} -} -str+=_1a.name; -if(_1a.url||((!this.config.folderLinks||!_1a.url)&&_1a._hc)){ -str+=""; -} -str+=""; -if(_1a._hc){ -str+="
    "; -str+=this.addNode(_1a); -str+="
    "; -} -this.aIndent.pop(); -return str; -}; -dTree.prototype.indent=function(_1d,_1e){ -var str=""; -if(this.root.id!=_1d.pid){ -for(var n=0;n"; -} -(_1d._ls)?this.aIndent.push(0):this.aIndent.push(1); -if(_1d._hc){ -str+="\"\""; -}else{ -str+="\"\""; -} -} -return str; -}; -dTree.prototype.setCS=function(_21){ -var _22; -for(var n=0;n'}if(a.url){b+=''}}b+=a.name;if(a.url||((!this.config.folderLinks||!a.url)&&a._hc)){b+=""}b+="";if(a._hc){b+='
    ';b+=this.addNode(a);b+="
    "}this.aIndent.pop();return b};dTree.prototype.indent=function(a,c){var b="";if(this.root.id!=a.pid){for(var d=0;d'}(a._ls)?this.aIndent.push(0):this.aIndent.push(1);if(a._hc){b+=''}else{b+=''}}return b};dTree.prototype.setCS=function(a){var b;for(var c=0;cd){return}if(!e.plugins.PersistentStorage||!e.plugins.PersistentStorage.instance||!e.plugins.PersistentStorage.instance.ready){window.setTimeout(function(){c._registerBackend(f?f*2:50)},f?f:50);return}e.plugins.PersistentStorage.instance.registerBackend("PSFixed",this)};b.prototype.loadData=function(c){if(!this.config.$type){this.config.$type="folder"}c(this.config)};var a=function a(c,f,d){if(typeof d=="undefined"){d="/";f("/","",c)}for(var e in c){f(d,e,c[e]);if(c[e].$type=="folder"){a(c[e],f,d+e+"/")}}};b.prototype.getFilters=function(c){var d=[];a(c,function(h,f,g){if(g.$type!="folder"){return}var e=f.length?h+f+"/":h;d.push({value:e,display:e})});return d};b.prototype.getMetadata=function(d,g){var f=this.editor;var c=this;var e=[];a(d,function(j,h,i){if(!i.$type||!h){return}if(j!=g){return}if(i.$type=="folder"){e.push({URL:c.editor.imgURL("folder.gif","PersistentStorage"),name:h,key:j+h,$type:i.$type})}else{e.push({URL:i.URL,name:h,key:j+h,$type:i.$type})}});return e}})(); \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/PSLocal/PSLocal.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/PSLocal/PSLocal.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/PSLocal/PSLocal.js 16 Jan 2009 09:05:48 -0000 1.1 @@ -0,0 +1,2 @@ +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +(function(){var PSLocal=window.PSLocal=function PSLocal(editor){this.editor=editor;this.config={capabilities:{directory_operations:true,file_operations:true,image_operations:false,upload_operations:true,import_operations:false,user_publish:false,shared_publish:false,user_storage:true},displayName:"Local"}};PSLocal._pluginInfo={name:"PSLocal",version:"2.0",developer:"Douglas Mayle",developer_url:"http://xinha.org",license:"BSD"};PSLocal.prototype.onGenerateOnce=function(){this._prepareBackend()};PSLocal.prototype._showGearsButton=function(){var self=this;var editor=this.editor;editor.config.registerButton({id:"localstorage",tooltip:Xinha._lc("Learn About Local Storage","PSLocal"),image:[_editor_url+editor.config.imgURL+"ed_buttons_main.png",2,8],textMode:true,action:function(){self.learnDialog()}});editor.config.addToolbarElement("localstorage","fullscreen",1);editor._rebuildToolbar()};PSLocal.prototype._prepareBackend=function(){var self=this;var editor=this.editor;if(!this.gears_init){this.gears_init=true;Xinha._loadback(Xinha.getPluginDir("PSLocal")+"/gears_init.js",function(){self._prepareBackend()});return}if(!window.google||!google.gears){this._showGearsButton();return}if(!google.gears.factory.hasPermission){if(!google.gears.factory.getPermission("Xinha",editor.imgURL("/images/xinha-small-icon.gif"),Xinha._lc("Enable Gears in order to use local document storage and configuration.","PSLocal"))){this._showGearsButton();return}}this.workerPool=google.gears.factory.create("beta.workerpool","1.0");this.remoteStorageWorker=this.workerPool.createWorkerFromUrl("http://xinhadocs.org/worker.js");this._registerBackend()};PSLocal.prototype.learnDialog=function(timeWaited){var self=this;var editor=this.editor;if(!this.html){Xinha._getback(Xinha.getPluginDir("PSLocal")+"/dialog.html",function(getback){self.html=getback;self.learnDialog()});return}if(this.dialog){this.dialog.show();return}this.dialog=new Xinha.Dialog(editor,this.html,"PersistentStorage",{width:700,closeOnEscape:true,resizable:true,centered:true,modal:true});var link=this.dialog.getElementById("GearsLink");link.href+=location.href;var button=this.dialog.getElementById("confirm");if(window.google&&google.gears){Xinha._addClass(this.dialog.getElementById("InstallText"),"hidden");button.value=Xinha._lc("Enable","PSLocal");button.onclick=function(){if(confirm(Xinha._lc('This will reload the page, causing you to lose any unsaved work. Press "OK" to reload.',"PSLocal"))){window.location.reload(true)}}}else{Xinha._addClass(this.dialog.getElementById("EnableText"),"hidden");button.value=Xinha._lc("Install","PSLocal");button.onclick=function(){location.href=link.href}}var cancel=this.dialog.getElementById("cancel");cancel.onclick=function(){self.dialog.hide()};this.dialog.show()};PSLocal.prototype._registerBackend=function(timeWaited){var editor=this.editor;var self=this;if(!timeWaited){timeWaited=0}var registerTimeout=10000;if(timeWaited>registerTimeout){return}if(!editor.plugins.PersistentStorage||!editor.plugins.PersistentStorage.instance||!editor.plugins.PersistentStorage.instance.ready){window.setTimeout(function(){self._registerBackend(timeWaited?timeWaited*2:50)},timeWaited?timeWaited:50);return}var PS=editor.plugins.PersistentStorage.instance;var self=this;this.config.thumbURL=this.editor.imgURL("images/tango/32x32/places/folder.png");this.loadDocument({URL:"",name:"config.js",key:"/config.js"},function(json){var userconfig=json?eval("("+json+")"):false;PS.registerBackend("PSLocal",self,self.config,userconfig)})};PSLocal.prototype.loadDocument=function(entry,asyncCallback){this.workerPool.onmessage=function(a,b,message){if(!message.body||!message.body.authorized){asyncCallback("")}if(message.body.response){asyncCallback(message.body.response)}else{if(entry.URL){Xinha._getback(entry.URL,function(documentSource){asyncCallback(documentSource)})}else{asyncCallback("")}}};this.workerPool.sendMessage({func:"loadDocument",entry:entry},this.remoteStorageWorker)};PSLocal.prototype.loadData=function(asyncCallback){this.workerPool.onmessage=function(a,b,message){if(!message.body||!message.body.authorized){asyncCallback("")}asyncCallback({dirs:message.body.dirs,files:message.body.files})};this.workerPool.sendMessage({func:"loadData"},this.remoteStorageWorker)};PSLocal.prototype.getFilters=function(filedata){var filters=[],paths={};var dirList=filedata.dirs;for(var index=0;index2){pathpart=pathpart.slice(0,pathpart.length-1).join("/")}else{pathpart="/"}var filepart=fileList[index].fullpath.split("/").slice(-1)[0];if(filterPath==pathpart){metadata.push({URL:fileList[index].url,thumbURL:editor.imgURL("images/tango/32x32/mimetypes/text-x-generic.png"),name:filepart,key:fileList[index].fullpath,$type:fileList[index].filetype})}}var dirList=filedata.dirs;for(var index=0;index1&&dirList[index].split("/").length==2}else{var matches=dirList[index].split("/").slice(0,-1).join("/")==filterPath}if(matches){metadata.push({name:dirList[index].split("/").slice(-1),key:dirList[index],$type:"folder"})}}return metadata};PSLocal.prototype.saveDocument=function(parentpath,filename,documentSource,asyncCallback){this.workerPool.onmessage=function(a,b,message){if(!message.body||!message.body.authorized){asyncCallback(false)}if(asyncCallback){asyncCallback(message.body.response)}};this.workerPool.sendMessage({func:"saveDocument",parentpath:parentpath,filename:filename,content:documentSource},this.remoteStorageWorker)};PSLocal.prototype.deleteEntry=function(entry,asyncCallback){this.workerPool.onmessage=function(a,b,message){if(!message.body||!message.body.authorized){asyncCallback(false)}if(asyncCallback){asyncCallback(message.body.response)}};this.workerPool.sendMessage({func:"deleteEntry",entry:entry},this.remoteStorageWorker)};PSLocal.prototype.makeFolder=function(currentPath,folderName,asyncCallback){this.workerPool.onmessage=function(a,b,message){if(!message.body||!message.body.authorized){asyncCallback(false)}if(asyncCallback){asyncCallback(true)}};this.workerPool.sendMessage({func:"makeFolder",parentpath:currentPath,dirname:folderName},this.remoteStorageWorker)};PSLocal.prototype.copyEntry=function(entry,asyncCallback){this.workerPool.onmessage=function(a,b,message){if(!message.body||!message.body.authorized){asyncCallback(false)}if(asyncCallback){asyncCallback(message.body.response,message.body.entry)}};this.workerPool.sendMessage({func:"copyEntry",entry:entry},this.remoteStorageWorker)}})(); \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/PSLocal/dialog.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/PSLocal/dialog.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/PSLocal/dialog.html 16 Jan 2009 09:05:48 -0000 1.1 @@ -0,0 +1,6 @@ +

    Enabling Local Storage

    +

    Xinha uses Google Gears to enable local document storage. With Gears installed, you can save drafts of your documents on your hard drive, configure Xinha to look the way you want, and carry this information wherever you use Xinha on the web.

    +

    To learn more about Gears, and enable this functionality on your system, please see http://gears.google.com or click "Install" below.

    +

    To enable Gears for this website, click "Enable" to reload the page then enable Gears.. Since the page will be refreshed, please be sure to save any unfinished work.

    + + Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/PSLocal/gears_init.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/PSLocal/gears_init.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/PSLocal/gears_init.js 16 Jan 2009 09:05:48 -0000 1.1 @@ -0,0 +1,2 @@ +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +(function(){if(window.google&&google.gears){return}var a=null;if(typeof GearsFactory!="undefined"){a=new GearsFactory()}else{try{a=new ActiveXObject("Gears.Factory");if(a.getBuildInfo().indexOf("ie_mobile")!=-1){a.privateSetGlobalObject(this)}}catch(b){if((typeof navigator.mimeTypes!="undefined")&&navigator.mimeTypes["application/x-googlegears"]){a=document.createElement("object");a.style.display="none";a.width=0;a.height=0;a.type="application/x-googlegears";document.documentElement.appendChild(a)}}}if(!a){return}if(!window.google){google={}}if(!google.gears){google.gears={factory:a}}})(); \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/PSServer/PSServer.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/PSServer/PSServer.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/PSServer/PSServer.js 16 Jan 2009 09:05:49 -0000 1.1 @@ -0,0 +1,2 @@ +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +(function(){var PSServer=window.PSServer=function PSServer(editor){this.editor=editor};PSServer._pluginInfo={name:"PSServer",version:"2.0",developer:"Douglas Mayle",developer_url:"http://xinha.org",license:"MIT"};PSServer.prototype.onGenerateOnce=function(){this._loadConfig()};PSServer.prototype._loadConfig=function(){var self=this;if(!this._serverConfig){Xinha._getback(Xinha.getPluginDir("PSServer")+"/config.inc.php",function(config){self._serverConfig=eval("("+config+")");self._serverConfig.user_affinity=20;self._serverConfig.displayName="Server";self._loadConfig()});return}this._registerBackend()};PSServer.prototype._registerBackend=function(timeWaited){var editor=this.editor;var self=this;if(!timeWaited){timeWaited=0}var registerTimeout=10000;if(timeWaited>registerTimeout){return}if(!editor.plugins.PersistentStorage||!editor.plugins.PersistentStorage.instance||!editor.plugins.PersistentStorage.instance.ready){window.setTimeout(function(){self._registerBackend(timeWaited?timeWaited*2:50)},timeWaited?timeWaited:50);return}editor.plugins.PersistentStorage.instance.registerBackend("PSServer",this,this._serverConfig)};PSServer.prototype.loadData=function(asyncCallback){var self=this;Xinha._getback(Xinha.getPluginDir("PSServer")+"/backend.php?directory&listing",function(json){self.dirTree=eval("("+json+")");asyncCallback(self.dirTree)})};var treeRecurse=function treeRecurse(tree,callback,root){if(typeof root=="undefined"){root="/";callback("/","",tree)}for(var key in tree){callback(root,key,tree[key]);if(tree[key].$type=="folder"){treeRecurse(tree[key],callback,root+key+"/")}}};PSServer.prototype.getFilters=function(dirTree){var filters=[];treeRecurse(dirTree,function(path,key,value){if(value.$type!="folder"){return}var filePath=key.length?path+key+"/":path;var filePathDisplay=key.length?path+key+"/":path;if(filePathDisplay.length>1){filePathDisplay=filePathDisplay.substring(0,filePathDisplay.length-1)}filters.push({value:filePath,display:filePathDisplay})});return filters};PSServer.prototype.loadDocument=function(entry,asyncCallback){Xinha._getback(entry.URL,function(documentSource){asyncCallback(documentSource)})};PSServer.prototype.getMetadata=function(dirTree,pathFilter,typeFilter){var editor=this.editor;var self=this;var metadata=[];var typeKeys={};for(var index=0;index + * @version 1.0 + * @package PersistentStorage + * + */ + +/** + * Config file + */ +require_once('config.inc.php'); + + +// Strip slashes if MQGPC is on +set_magic_quotes_runtime(0); +if(get_magic_quotes_gpc()) +{ + $to_clean = array(&$_GET, &$_POST, &$_REQUEST, &$_COOKIE); + while(count($to_clean)) + { + $cleaning =& $to_clean[array_pop($junk = array_keys($to_clean))]; + unset($to_clean[array_pop($junk = array_keys($to_clean))]); + foreach(array_keys($cleaning) as $k) + { + if(is_array($cleaning[$k])) + { + $to_clean[] =& $cleaning[$k]; + } + else + { + $cleaning[$k] = stripslashes($cleaning[$k]); + } + } + } +} + +// Set the return headers for a JSON response. +header('Cache-Control: no-cache, must-revalidate'); +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +//header('Content-type: application/json'); + + +/**#@+ + * Constants + * + * Since this is being used as part of a web interface, we'll set some rather + * conservative limits to keep from overloading the user or the backend. + */ + +/** + * This is the maximum folder depth to present to the user + */ +define('MAX_DEPTH', 10); + +/** + * This is the maximum number of file entries per folder to show to the user, + */ +define('MAX_FILES_PER_FOLDER', 50); + +/** + * This array contains the default HTTP Response messages + * + */ +$HTTP_ERRORS = array( + 'HTTP_SUCCESS_OK' => array('code' => 200, 'message' => 'OK'), + 'HTTP_SUCCESS_CREATED' => array('code' => 201, 'message' => 'Created'), + 'HTTP_SUCCESS_ACCEPTED' => array('code' => 202, 'message' => 'Accepted'), + 'HTTP_SUCCESS_NON_AUTHORITATIVE' => array('code' => 203, 'message' => 'Non-Authoritative Information'), + 'HTTP_SUCCESS_NO_CONTENT' => array('code' => 204, 'message' => 'No Content'), + 'HTTP_SUCCESS_RESET_CONTENT' => array('code' => 205, 'message' => 'Reset Content'), + 'HTTP_SUCCESS_PARTIAL_CONTENT' => array('code' => 206, 'message' => 'Partial Content'), + + 'HTTP_REDIRECTION_MULTIPLE_CHOICES' => array('code' => 300, 'message' => 'Multiple Choices'), + 'HTTP_REDIRECTION_PERMANENT' => array('code' => 301, 'message' => 'Moved Permanently'), + 'HTTP_REDIRECTION_FOUND' => array('code' => 302, 'message' => 'Found'), + 'HTTP_REDIRECTION_SEE_OTHER' => array('code' => 303, 'message' => 'See Other'), + 'HTTP_REDIRECTION_NOT_MODIFIED' => array('code' => 304, 'message' => 'Not Modified'), + 'HTTP_REDIRECTION_USE_PROXY' => array('code' => 305, 'message' => 'Use Proxy'), + 'HTTP_REDIRECTION_UNUSED' => array('code' => 306, 'message' => '(Unused)'), + 'HTTP_REDIRECTION_TEMPORARY' => array('code' => 307, 'message' => 'Temporary Redirect'), + + 'HTTP_CLIENT_BAD_REQUEST' => array('code' => 400, 'message' => 'Bad Request'), + 'HTTP_CLIENT_UNAUTHORIZED' => array('code' => 401, 'message' => 'Unauthorized'), + 'HTTP_CLIENT_PAYMENT_REQUIRED' => array('code' => 402, 'message' => 'Payment Required'), + 'HTTP_CLIENT_FORBIDDEN' => array('code' => 403, 'message' => 'Forbidden'), + 'HTTP_CLIENT_NOT_FOUND' => array('code' => 404, 'message' => 'Not Found'), + 'HTTP_CLIENT_METHOD_NOT_ALLOWED' => array('code' => 405, 'message' => 'Method Not Allowed'), + 'HTTP_CLIENT_NOT_ACCEPTABLE' => array('code' => 406, 'message' => 'Not Acceptable'), + 'HTTP_CLIENT_PROXY_AUTH_REQUIRED' => array('code' => 407, 'message' => 'Proxy Authentication Required'), + 'HTTP_CLIENT_REQUEST_TIMEOUT' => array('code' => 408, 'message' => 'Request Timeout'), + 'HTTP_CLIENT_CONFLICT' => array('code' => 409, 'message' => 'Conflict'), + 'HTTP_CLIENT_GONE' => array('code' => 410, 'message' => 'Gone'), + 'HTTP_CLIENT_LENGTH_REQUIRED' => array('code' => 411, 'message' => 'Length Required'), + 'HTTP_CLIENT_PRECONDITION_FAILED' => array('code' => 412, 'message' => 'Precondition Failed'), + 'HTTP_CLIENT_REQUEST_TOO_LARGE' => array('code' => 413, 'message' => 'Request Entity Too Large'), + 'HTTP_CLIENT_REQUEST_URI_TOO_LARGE' => array('code' => 414, 'message' => 'Request-URI Too Long'), + 'HTTP_CLIENT_UNSUPPORTED_MEDIA_TYPE' => array('code' => 415, 'message' => 'Unsupported Media Type'), + 'HTTP_CLIENT_REQUESTED_RANGE_NOT_POSSIBLE' => array('code' => 416, 'message' => 'Requested Range Not Satisfiable'), + 'HTTP_CLIENT_EXPECTATION_FAILED' => array('code' => 417, 'message' => 'Expectation Failed'), + + 'HTTP_SERVER_INTERNAL' => array('code' => 500, 'message' => 'Internal Server Error'), + 'HTTP_SERVER_NOT_IMPLEMENTED' => array('code' => 501, 'message' => 'Not Implemented'), + 'HTTP_SERVER_BAD_GATEWAY' => array('code' => 502, 'message' => 'Bad Gateway'), + 'HTTP_SERVER_SERVICE_UNAVAILABLE' => array('code' => 503, 'message' => 'Service Unavailable'), + 'HTTP_SERVER_GATEWAY_TIMEOUT' => array('code' => 504, 'message' => 'Gateway Timeout'), + 'HTTP_SERVER_UNSUPPORTED_VERSION' => array('code' => 505, 'message' => 'HTTP Version not supported') + ); + +/** + * This is a regular expression used to detect reserved or dangerous filenames. + * Most NTFS special filenames begin with a dollar sign ('$'), and most Unix + * special filenames begin with a period (.), so we'll keep them out of this + * list and just prevent those two characters in the first position. The rest + * of the special filenames are included below. + */ +define('RESERVED_FILE_NAMES', 'pagefile\.sys|a\.out|core'); +/** + * This is a regular expression used to detect invalid file names. It's more + * strict than necessary, to be valid multi-platform, but not posix-strict + * because we want to allow unicode filenames. We do, however, allow path + * seperators in the filename because the file could exist in a subdirectory. + */ +define('INVALID_FILE_NAME','^[.$]|^(' . RESERVED_FILE_NAMES . ')$|[?%*:|"<>]'); +/**#@-*/ + +function main($arguments) { + $config = get_config(true); + + // Trigger authentication if it's configured. + if ($config['capabilities']['user_storage'] && empty($_SERVER['PHP_AUTH_USER'])) { + header('WWW-Authenticate: Basic realm="Xinha Persistent Storage"'); + header('HTTP/1.0 401 Unauthorized'); + echo "You must login in order to use Persistent Storage"; + exit; + } + if (!input_valid($arguments, $config['capabilities'])) { + http_error_exit(); + } + if (!method_valid($arguments)) { + http_error_exit('HTTP_CLIENT_METHOD_NOT_ALLOWED'); + } + if (!dispatch($arguments)) { + http_error_exit(); + } + exit(); +} + +main($_REQUEST + $_FILES); +// ************************************************************ +// ************************************************************ +// Helper Functions +// ************************************************************ +// ************************************************************ + +/** + * Take the call and properly dispatch it to the methods below. This method + * assumes valid input. + */ +function dispatch($arguments) { + if (array_key_exists('file', $arguments)) { + if (array_key_exists('rename', $arguments)) { + if (!file_directory_rename($arguments['filename'], $arguments['newname'], working_directory())) { + http_error_exit('HTTP_CLIENT_FORBIDDEN'); + } + return true; + } + if (array_key_exists('copy', $arguments)) { + if (!$newentry = file_copy($arguments['filename'], working_directory())) { + http_error_exit('HTTP_CLIENT_FORBIDDEN'); + } + echo json_encode($newentry); + return true; + } + if (array_key_exists('delete', $arguments)) { + if (!file_delete($arguments['filename'], working_directory())) { + http_error_exit('HTTP_CLIENT_FORBIDDEN'); + } + return true; + } + } + if (array_key_exists('directory', $arguments)) { + if (array_key_exists('listing', $arguments)) { + echo json_encode(directory_listing()); + return true; + } + if (array_key_exists('create', $arguments)) { + if (!directory_create($arguments['dirname'], working_directory())) { + http_error_exit('HTTP_CLIENT_FORBIDDEN'); + } + return true; + } + if (array_key_exists('delete', $arguments)) { + if (!directory_delete($arguments['dirname'], working_directory())) { + http_error_exit('HTTP_CLIENT_FORBIDDEN'); + } + return true; + } + if (array_key_exists('rename', $arguments)) { + if (!file_directory_rename($arguments['dirname'], $arguments['newname'], working_directory())) { + http_error_exit('HTTP_CLIENT_FORBIDDEN'); + } + return true; + } + } + if (array_key_exists('image', $arguments)) { + } + if (array_key_exists('upload', $arguments)) { + store_uploaded_file($arguments['filename'], $arguments['filedata'], working_directory()); + return true; + } + + return false; +} + +/** + * Validation of the HTTP Method. For operations that make changes we require + * POST. To err on the side of safety, we'll only allow GET for known safe + * operations. This way, if the API is extended, and the method is not + * updated, we will not accidentally expose non-idempotent methods to GET. + * This method can only correctly validate the operation if the input is + * already known to be valid. + * + * @param array $arguments The arguments array received by the page. + * @return boolean Whether or not the HTTP method is correct for the given input. + */ +function method_valid($arguments) { + // We assume that the only + $method = $_SERVER['REQUEST_METHOD']; + + if ($method == 'GET') { + if (array_key_exists('directory', $arguments) && array_key_exists('listing', $arguments)) { + return true; + } + + return false; + } + + if ($method == 'POST') { + return true; + } + return false; +} + +/** + * Validation of the user input. We'll verify what we receive from the user, + * and send an error in the case of malformed input. + * + * Some examples of the URLS associated with this API: + * ** File Operations ** + * ?file&delete&filename='' + * ?file©&filename='' + * ?file&rename&filename=''&newname='' + * + * ** Directory Operations ** + * ?directory&listing + * ?directory&create&dirname='' + * ?directory&delete&dirname='' + * ?directory&rename&dirname=''&newname='' + * + * ** Image Operations ** + * ?image&filename=''&[scale|rotate|convert] + * + * ** Upload ** + * ?upload&filedata=[binary|text]&filename=''&replace=[true|false] + * + * @param array $arguments The arguments array received by the page. + * @param array $capabilities The capabilities config array used to limit operations. + * @return boolean Whether or not the input received is valid. + */ +function input_valid($arguments, $capabilities) { + // This is going to be really ugly code because it's basically a DFA for + // parsing arguments. To make things a little clearer, I'll put a + // pseudo-BNF for each block to show the decision structure. + // + // file[empty] filename[valid] (delete[empty] | copy[empty] | (rename[empty] newname[valid])) + if ($capabilities['file_operations'] && + array_key_exists('file', $arguments) && + empty($arguments['file']) && + array_key_exists('filename', $arguments) && + !ereg(INVALID_FILE_NAME, $arguments['filename'])) { + + if (array_key_exists('delete', $arguments) && + empty($arguments['delete']) && + 3 == count($arguments)) { + + return true; + } + + if (array_key_exists('copy', $arguments) && + empty($arguments['copy']) && + 3 == count($arguments)) { + + return true; + } + + if (array_key_exists('rename', $arguments) && + empty($arguments['rename']) && + 4 == count($arguments)) { + + if (array_key_exists('newname', $arguments) && + !ereg(INVALID_FILE_NAME, $arguments['newname'])) { + + return true; + } + } + + return false; + } elseif (array_key_exists('file', $arguments)) { + // This isn't necessary because we'll fall through to false, but I'd + // rather return earlier than later. + return false; + } + + // directory[empty] (listing[empty] | (dirname[valid] (create[empty] | delete[empty] | (rename[empty] newname[valid])))) + if ($capabilities['directory_operations'] && + array_key_exists('directory', $arguments) && + empty($arguments['directory'])) { + + if (array_key_exists('listing', $arguments) && + empty($arguments['listing']) && + 2 == count($arguments)) { + + return true; + } + + if (array_key_exists('dirname', $arguments) && + !ereg(INVALID_FILE_NAME, $arguments['dirname'])) { + + if (array_key_exists('create', $arguments) && + empty($arguments['create']) && + 3 == count($arguments)) { + + return true; + } + + if (array_key_exists('delete', $arguments) && + empty($arguments['delete']) && + 3 == count($arguments)) { + + return true; + } + + if (array_key_exists('rename', $arguments) && + empty($arguments['rename']) && + 4 == count($arguments)) { + + if (array_key_exists('newname', $arguments) && + !ereg(INVALID_FILE_NAME, $arguments['newname'])) { + + return true; + } + } + } + + return false; + } elseif (array_key_exists('directory', $arguments)) { + // This isn't necessary because we'll fall through to false, but I'd + // rather return earlier than later. + return false; + } + + // image[empty] filename[valid] ((scale[empty] dimensions[valid]) | (rotate[empty] angle[valid]) | (convert[empty] imagetype[valid])) + if ($capabilities['image_operations'] && + array_key_exists('image', $arguments) && + empty($arguments['image']) && + array_key_exists('filename', $arguments) && + !ereg(INVALID_FILE_NAME, $arguments['filename']) && + 4 == count($arguments)) { + + if (array_key_exists('scale', $arguments) && + empty($arguments['scale']) && + !ereg(INVALID_FILE_NAME, $arguments['dimensions'])) { + // TODO: FIX REGEX + http_error_exit(); + + return true; + } + + if (array_key_exists('rotate', $arguments) && + empty($arguments['rotate']) && + !ereg(INVALID_FILE_NAME, $arguments['angle'])) { + // TODO: FIX REGEX + http_error_exit(); + + return true; + } + + if (array_key_exists('convert', $arguments) && + empty($arguments['convert']) && + !ereg(INVALID_FILE_NAME, $arguments['imagetype'])) { + // TODO: FIX REGEX + http_error_exit(); + + return true; + } + + return false; + } elseif (array_key_exists('image', $arguments)) { + // This isn't necessary because we'll fall through to false, but I'd + // rather return earlier than later. + return false; + } + + // upload[empty] filedata[binary|text] replace[true|false] filename[valid]? + if ($capabilities['upload_operations'] && + array_key_exists('upload', $arguments) && + empty($arguments['upload']) && + array_key_exists('filedata', $arguments) && + !empty($arguments['filedata']) && + array_key_exists('replace', $arguments) && + ereg('true|false', $arguments['replace'])) { + + if (4 == count($arguments) && + array_key_exists('filename', $arguments) && + !ereg(INVALID_FILE_NAME, $arguments['filename'])) { + + return true; + } + + if (3 == count($arguments)) { + + return true; + } + + return false; + } elseif (array_key_exists('upload', $arguments)) { + // This isn't necessary because we'll fall through to false, but I'd + // rather return earlier than later. + return false; + } + + + return false; +} + +/** + * HTTP level error handling. + * @param integer $code The HTTP error code to return to the client. This defaults to 400. + * @param string $message Error message to send to the client. This defaults to the standard HTTP error messages. + */ +function http_error_exit($error = 'HTTP_CLIENT_BAD_REQUEST', $message='') { + global $HTTP_ERRORS; + $message = !empty($message) ? $message : "HTTP/1.0 {$HTTP_ERRORS[$error]['code']} {$HTTP_ERRORS[$error]['message']}"; + header($message); + exit($message); +} + +/** + * Process the config and return the absolute directory we should be working with, + * @return string contains the path of the directory all file operations are limited to. + */ +function working_directory() { + $config = get_config(true); + return realpath(getcwd() . DIRECTORY_SEPARATOR . $config['storage_dir'] . DIRECTORY_SEPARATOR); +} + +/** + * Check to see if the supplied filename is inside + */ +function directory_contains($container_directory, $checkfile) { + + // Get the canonical directory and canonical filename. We add a directory + // seperator to prevent the user from sidestepping into a sibling directory + // that starts with the same prefix. (e.g. from /home/john to + // /home/johnson) + $container_directory = realpath($container_directory) + DIRECTORY_SEPARATOR; + $checkfile = realpath($checkfile); + + // Now that we have the canonical versions, we can do a string comparison + // to see if checkfile is inside of container_directory. + if (strlen($checkfile) <= strlen($container_directory)) { + // We don't consider the directory to be inside of itself. This + // prevents users from trying to perform operations on the container + // directory itself. + return false; + } + + // PHP equivalent of string.startswith() + return substr($checkfile, 0, strlen($container_directory)) == $container_directory; +} + +/**#@+ + * Directory Operations + * {@internal ***************************************************************** + * **************************************************************************}} + */ + +/** + * Return a directory listing as a PHP array. + * @param string $directory The directory to return a listing of. + * @param integer $depth The private argument used to limit recursion depth. + * @return array representing the directory structure. + */ + +function directory_listing($directory='', $depth=1) { + // We return an empty array if the directory is empty + $result = array('$type'=>'folder'); + + // We won't recurse below MAX_DEPTH. + if ($depth > MAX_DEPTH) { + return $result; + } + + $path = empty($directory) ? working_directory() : $directory; + + // We'll open the directory to check each of the entries + if ($dir = opendir($path)) { + + // We'll keep track of how many file we process. + $count = 0; + + // For each entry in the file + while (($file = readdir($dir)) !== false) { + + // Limit the number of files we process in this folder + $count += 1; + if ($count > MAX_FILES_PER_FOLDER) { + return $result; + } + + // Ignore hidden files (this includes special files '.' and '..') + if (strlen($file) && ($file[0] == '.')) { + continue; + } + + $filepath = $path . DIRECTORY_SEPARATOR . $file; + + if (filetype($filepath) == 'dir') { + // We'll recurse and add those results + $result[$file] = directory_listing($filepath, $depth + 1); + } else { + // We'll check to see if we can read any image information from + // the file. If so, we know it's an image, and we can return + // it's metadata. + $imageinfo = @getimagesize($filepath); + if ($imageinfo) { + + $result[$file] = array('$type'=>'image','metadata'=>array( + 'width'=>$imageinfo[0], + 'height'=>$imageinfo[1], + 'mimetype'=>$imageinfo['mime'] + )); + + } elseif ($extension = strrpos($file, '.')) { + $extension = substr($file, $extension); + if (($extension == '.htm') || ($extension == '.html')) { + $result[$file] = array('$type'=>'html'); + } else { + $result[$file] = array('$type'=>'text'); + } + } else { + $result[$file] = array('$type'=>'document'); + } + } + } + + closedir($dir); + } + return $result; +} + +/** + * Create a directory, limiting operations to the chroot directory. + * @param string $dirname The path to the directory, relative to $chroot. + * @param string $chroot Only directories inside this directory or its subdirectories can be affected. + * @return boolean Returns TRUE if successful, and FALSE otherwise. + */ +function directory_create($dirname, $chroot) { + // If chroot is empty, then we will not perform the operation. + if (empty($chroot)) { + return false; + } + + // We have to take the dirname of the parent directory first, since + // realpath just returns false if the directory doesn't already exist on + // the filesystem. + $createparent = realpath(dirname($chroot . DIRECTORY_SEPARATOR . $dirname)); + $createsub = basename($chroot . DIRECTORY_SEPARATOR . $dirname); + + // The bailout rules for directories that don't exist are complicated + // because of having to work around realpath. If the parent directory is + // the same as the chroot, it won't be contained. For this case, we'll + // check to see if the chroot and the parent are the same and allow it only + // if the sub portion of dirname is not-empty. + if (!directory_contains($chroot, $createparent) && + !(($chroot == $createparent) && !empty($createsub))) { + return false; + } + + return @mkdir($createparent . DIRECTORY_SEPARATOR . $createsub); +} + +/** + * Delete a directory, limiting operations to the chroot directory. + * @param string $dirname The path to the directory, relative to $chroot. + * @param string $chroot Only directories inside this directory or its subdirectories can be affected. + * @return boolean Returns TRUE if successful, and FALSE otherwise. + */ +function directory_delete($dirname, $chroot) { + // If chroot is empty, then we will not perform the operation. + if (empty($chroot)) { + return false; + } + + // $dirname is relative to $chroot. + $dirname = realpath($chroot . DIRECTORY_SEPARATOR . $dirname); + + // Limit directory operations to the supplied directory. + if (!directory_contains($chroot, $dirname)) { + return false; + } + + return @rmdir($dirname); +} + + +/**#@-*/ +/**#@+ + * File Operations + * {@internal ***************************************************************** + * **************************************************************************}} + */ + +/** + * Rename a file or directory, limiting operations to the chroot directory. + * @param string $filename The path to the file or directory, relative to $chroot. + * @param string $renameto The path to the renamed file or directory, relative to $chroot. + * @param string $chroot Only files and directories inside this directory or its subdirectories can be affected. + * @return boolean Returns TRUE if successful, and FALSE otherwise. + */ +function file_directory_rename($filename, $renameto, $chroot) { + // If chroot is empty, then we will not perform the operation. + if (empty($chroot)) { + return false; + } + + // $filename is relative to $chroot. + $filename = realpath($chroot . DIRECTORY_SEPARATOR . $filename); + + // We have to take the dirname of the renamed file or directory first, + // since realpath just returns false if the file or direcotry doesn't + // already exist on the filesystem. + $renameparent = realpath(dirname($chroot . DIRECTORY_SEPARATOR . $renameto)); + $renamefile = basename($chroot . DIRECTORY_SEPARATOR . $renameto); + + // Limit file operations to the supplied directory. + if (!directory_contains($chroot, $filename)) { + return false; + } + + // The bailout rules for the renamed file or directory are more complicated + // because of having to work around realpath. If the renamed parent + // directory is the same as the chroot, it won't be contained. For this + // case, we'll check to see if they're the same and allow it only if the + // file portion of renameto is not-empty. + if (!directory_contains($chroot, $renameparent) && + !(($chroot == $renameparent) && !empty($renamefile))) { + return false; + } + + return @rename($filename, $renameparent . DIRECTORY_SEPARATOR . $renamefile); +} + + +/** + * Copy a file, limiting operations to the chroot directory. + * @param string $filename The path to the file, relative to $chroot. + * @param string $chroot Only files inside this directory or its subdirectories can be affected. + * @return boolean Returns TRUE if successful, and FALSE otherwise. + */ +function file_copy($filename, $chroot) { + // If chroot is empty, then we will not perform the operation. + if (empty($chroot)) { + return false; + } + + // $filename is relative to $chroot. + $filename = realpath($chroot . DIRECTORY_SEPARATOR . $filename); + + // Limit file operations to the supplied directory. + if (!directory_contains($chroot, $filename)) { + return false; + } + + // The PHP copy function blindly copies over existing files. We don't wish + // this to happen, so we have to perform the copy a bit differently. If we + // do a check to make sure the file exists, there's always the chance of a + // race condition where someone else creates the file in between the check + // and the copy. The only safe way to ensure we don't overwrite an + // existing file is to call fopen in create-only mode (mode 'x'). If it + // succeeds, the file did not exist before, and we've successfully created + // it, meaning we own the file. After that, we can safely copy over our + // own file. + for ($count=1; $countarray('$type'=>'image')); + } + } + + return false; +} + +/** + * Delete a file, limiting operations to the chroot directory. + * @param string $filename The path to the file, relative to $chroot. + * @param string $chroot Only files inside this directory or its subdirectories can be affected. + * @return boolean Returns TRUE if successful, and FALSE otherwise. + */ +function file_delete($filename, $chroot) { + // If chroot is empty, then we will not perform the operation. + if (empty($chroot)) { + return false; + } + + // $filename is relative to $chroot. + $filename = realpath($chroot . DIRECTORY_SEPARATOR . $filename); + + // Limit file operations to the supplied directory. + if (!directory_contains($chroot, $filename)) { + return false; + } + + return @unlink($filename); +} +/**#@-*/ +/**#@+ + * Upload Operations + * {@internal ***************************************************************** + * **************************************************************************}} + */ + +function store_uploaded_file($filename, $filedata, $chroot) { + + // If chroot is empty, then we will not perform the operation. + if (empty($chroot)) { + return false; + } + + // If the filename is empty, it was possibly supplied as part of the + // upload. + $filename = empty($filename) ? $filedata['name'] : $filename; + + // We have to take the dirname of the parent directory first, since + // realpath just returns false if the directory doesn't already exist on + // the filesystem. + $uploadparent = realpath(dirname($chroot . DIRECTORY_SEPARATOR . $filename)); + $uploadfile = basename($chroot . DIRECTORY_SEPARATOR . $filename); + + // The bailout rules for directories that don't exist are complicated + // because of having to work around realpath. If the parent directory is + // the same as the chroot, it won't be contained. For this case, we'll + // check to see if the chroot and the parent are the same and allow it only + // if the sub portion of dirname is not-empty. + if (!directory_contains($chroot, $uploadparent) && + !(($chroot == $uploadparent) && !empty($uploadfile))) { + return false; + } + + $target_path = $uploadparent . DIRECTORY_SEPARATOR . $uploadfile; + + if (is_array($filedata)) { + // We've received the file as an upload, so it's been saved to a temp + // directory. We'll move it to where it belongs. + + if(move_uploaded_file($filedata['tmp_name'], $target_path)) { + return true; + } + } elseif ($file = @fopen($target_path, 'w')) { + // We've received the file as data. We'll create/open the file and + // save the data. + @fwrite($file, $filedata); + @fclose($file); + return true; + } + + return false; +} + +/**#@-*/ + +?> Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/PSServer/config.inc.php =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/PSServer/config.inc.php,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/PSServer/config.inc.php 16 Jan 2009 09:05:49 -0000 1.1 @@ -0,0 +1,194 @@ + + * @version 1.0 + * @package PersistentStorage + */ + +/** + * If this file is being requested over the web, we display a JSON version of + * the publicly viewable config info. + */ +if (__FILE__ == $_SERVER['SCRIPT_FILENAME']) { + echo json_encode(get_config()); +} + +/** + * Gets the configuration information used by this package. + * {@source } + * @param boolean $getprivates Return private configuration info merged with the public. + * @returns array The configuration information for this package. + */ +function get_config($getprivates=False) { + + // We set up two different settings array, so that we can have settings + // that won't be shown to the public. + $Private = array(); + $Public = array(); + + /** + * For demo purposes, we can lie to the frontend and pretend to have user + * storage. Since we don't have a password mechanism, this simulation will + * accept any password. + */ + $Private['simulate_user_auth'] = false; + + /** + * The capabilities array contains directives about what major options to + * allow or disallow. + */ + $Public['capabilities'] = array( + // Allow directory operations (e.g. rename, create, delete directories) + 'directory_operations' => true, + // Allow file operations (e.g. copy, rename, delete files) + 'file_operations' => true, + // Allow image operations (e.g. scale, rotate, convert images) + 'image_operations' => true, + // Allow file uploads + 'upload_operations' => true, + // Stored files have a published URL + 'shared_publish' => true, + // By default, if the user is authenticated, we enable user storage. + // Set to false to disable. + 'user_storage' => !empty($_SERVER['PHP_AUTH_USER']) || $Private['simulate_user_auth'] + ); + + /** + * Directory exposed to user operations. Be sure that the web server has + * read and write access to this directory. + */ + $Private['storage_dir'] = 'demo_images'; + + /** + * The URL that the storage directory is exposed as. By default, we try + * and guess based on the URL used to access this page. Also, since we + * allow user upload, this directory should not be executable by the + * server. A sample .htaccess file is included in demo_images. + */ + $Private['storage_url'] = str_replace( array("backend.php","manager.php"), + "", $_SERVER["PHP_SELF"] ) . $Private['storage_dir']; + + /* + Possible values: true, false + + TRUE - If PHP on the web server is in safe mode, set this to true. + SAFE MODE restrictions: directory creation will not be possible, + only the GD library can be used, other libraries require + Safe Mode to be off. + + FALSE - Set to false if PHP on the web server is not in safe mode. + */ + $Private['safe_mode'] = ini_get('safe_mode'); + + /** + * If PHP Safe Mode is on than only the GD image library will function, so + * we force the default + */ + if ($Private['safe_mode']) { + @define('IMAGE_CLASS', 'GD'); + } else { + /* + Possible values: 'GD', 'IM', or 'NetPBM' + + The image manipulation library to use, either GD or ImageMagick or NetPBM. + */ + @define('IMAGE_CLASS', 'GD'); + + /* + After defining which library to use, if it is NetPBM or IM, you need to + specify where the binary for the selected library are. And of course + your server and PHP must be able to execute them (i.e. safe mode is OFF). + GD does not require the following definition. + */ + @define('IMAGE_TRANSFORM_LIB_PATH', '/usr/bin/'); + } + + /* + The prefix for thumbnail files, something like .thumb will do. The + thumbnails files will be named as "prefix_imagefile.ext", that is, + prefix + orginal filename. + */ + $Private['thumbnail_prefix'] = 't_'; + + /** + * The thumbnail array groups all of the configuration related to thumbnail + * operations. + */ + $Private['thumbnails'] = array( + // The prefix to apply to all created thumbnails. + 'prefix' => 't_', + // A subdirectory to keep thumbnails in. If this is empty, thumbnails + // will be stored alongside the files. + 'directory' => '', + // Whether or not to filter thumbnails from the directory listing. + 'filter' => true, + // Filetypes which we restrict thumbnail operations to. + 'filetypes' => array("jpg", "gif", "png", "bmp"), + // What pixel sizes to save the thumbnails as. + 'width' => 84, + 'height' => 84 + ); + + + /** + * Resized prefix + * + * The prefix for resized files, something like .resized will do. The + * resized files will be named _x_ + * resized files are created when one changes the dimensions of an image + * in the image manager selection dialog - the image is scaled when the + * user clicks the ok button. + */ + + $Private['resized_prefix'] = '.resized'; + + // ------------------------------------------------------------------------- + + /** + * Resized Directory + * + * Resized images may also be stored in a directory, except in safe mode. + */ + + $Private['resized_dir'] = ''; + + /* Maximum upload file size + + Possible values: number, "max" + + number - maximum size in Kilobytes. + + "max" - the maximum allowed by the server (the value is retrieved from the server configuration). + */ + $Private['max_filesize_kb_image'] = 200; + + $Private['max_filesize_kb_link'] = 5000; + + /* Maximum upload folder size in Megabytes. Use 0 to disable limit */ + $Private['max_foldersize_mb'] = 0; + + /* + Allowed extensions that can be shown and allowed to upload. + Available icons are for "doc,fla,gif,gz,html,jpg,js,mov,pdf,php,png,ppt,rar,txt,xls,zip" + -Changed by AFRU. + */ + + $Private['allowed_image_extensions'] = array("jpg","gif","png","bmp"); + $Private['allowed_link_extensions'] = array("jpg","gif","js","php","pdf","zip","txt","psd","png","html","swf","xml","xls","doc"); + + + /* + Image Editor temporary filename prefix. + */ + $Private['tmp_prefix'] = '.editor_'; + + + // Config variables are finished, this returns our data to the caller. + if ($getprivates) { + return $Public+$Private; + } + + return $Public; +} +?> Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/PSServer/demo_images/.htaccess =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/PSServer/demo_images/.htaccess,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/PSServer/demo_images/.htaccess 16 Jan 2009 09:05:49 -0000 1.1 @@ -0,0 +1,2 @@ +php_flag engine off +AddType text/html .html .htm .shtml .php .php3 .phtml .phtm .pl .py .cgi \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/PSServer/demo_images/bikerpeep.jpg =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/PSServer/demo_images/bikerpeep.jpg,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/PSServer/demo_images/wesnoth078.jpg =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/PSServer/demo_images/wesnoth078.jpg,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/PSServer/demo_images/linux/linux.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/PSServer/demo_images/linux/linux.gif,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/PasteText/PasteText.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/PasteText/PasteText.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/PasteText/PasteText.js 16 Jan 2009 09:05:49 -0000 1.1 @@ -0,0 +1,2 @@ +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +function PasteText(c){this.editor=c;var a=c.config;var b=this;a.registerButton({id:"pastetext",tooltip:this._lc("Paste as Plain Text"),image:c.imgURL("ed_paste_text.gif","PasteText"),textMode:false,action:function(){b.show()}});a.addToolbarElement("pastetext",["paste","killword"],1)}PasteText._pluginInfo={name:"PasteText",version:"1.2",developer:"Michael Harris",developer_url:"http://www.jonesadvisorygroup.com",c_owner:"Jones Advisory Group",sponsor:"Jones International University",sponsor_url:"http://www.jonesinternational.edu",license:"htmlArea"};PasteText.prototype._lc=function(a){return Xinha._lc(a,"PasteText")};Xinha.Config.prototype.PasteText={showParagraphOption:true,newParagraphDefault:true};PasteText.prototype.onGenerateOnce=function(){var a=PasteText;if(a.loading){return}a.loading=true;Xinha._getback(Xinha.getPluginDir("PasteText")+"/popups/paste_text.html",function(b){a.html=b})};PasteText.prototype._prepareDialog=function(){var a=this;var b=this.editor;var a=this;this.dialog=new Xinha.Dialog(b,PasteText.html,"PasteText",{width:350});this.dialog.getElementById("ok").onclick=function(){a.apply()};this.dialog.getElementById("cancel").onclick=function(){a.dialog.hide()};if(b.config.PasteText.showParagraphOption){this.dialog.getElementById("paragraphOption").style.display=""}if(b.config.PasteText.newParagraphDefault){this.dialog.getElementById("insertParagraphs").checked=true}this.dialog.onresize=function(){this.getElementById("inputArea").style.height=parseInt(this.height,10)-this.getElementById("h1").offsetHeight-this.getElementById("buttons").offsetHeight-parseInt(this.rootElem.style.paddingBottom,10)+"px";this.getElementById("inputArea").style.width=(this.width-2)+"px"}};PasteText.prototype.show=function(){if(!this.dialog){this._prepareDialog()}var a={inputArea:""};this.dialog.show(a);this.dialog.onresize();this.dialog.getElementById("inputArea").focus()};PasteText.prototype.apply=function(){var a=this.dialog.hide();var b=a.inputArea;var c=a.insertParagraphs;b=b.replace(//g,">");if(a.insertParagraphs){b=b.replace(/\t/g,"    ");b=b.replace(/\n/g,"

    ");b="

    "+b+"

    ";if(Xinha.is_ie){this.editor.insertHTML(b)}else{this.editor.execCommand("inserthtml",false,b)}}else{b=b.replace(/\n/g,"
    ");this.editor.insertHTML(b)}}; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/PasteText/lang/de.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/PasteText/lang/de.js,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/PasteText/lang/de.js 2 Nov 2005 08:56:27 -0000 1.1 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/PasteText/lang/de.js 16 Jan 2009 09:05:49 -0000 1.2 @@ -1,5 +1,6 @@ // I18N constants // LANG: "de", ENCODING: UTF-8 { - "Paste as Plain Text": "unformatierten Text einfügen" + "Paste as Plain Text": "unformatierten Text einfügen", + "Insert text in new paragraph" : "Neue Absätze eifügen" }; Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/PasteText/popups/paste_text.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/PasteText/popups/paste_text.html,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/PasteText/popups/paste_text.html 24 Nov 2007 15:35:45 -0000 1.4 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/PasteText/popups/paste_text.html 16 Jan 2009 09:05:49 -0000 1.5 @@ -1,52 +1,9 @@ - - - - Paste Text - - - - - - -
    Paste as Plain Text
    -
    -
    - -
    -
    - - - \ No newline at end of file + + +
    \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/PersistentStorage/PersistentStorage.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/PersistentStorage/PersistentStorage.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/PersistentStorage/PersistentStorage.js 16 Jan 2009 09:05:49 -0000 1.1 @@ -0,0 +1,2 @@ +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +(function(e){var c=window.PersistentStorage=function(h){this.editor=h;var g=this};c._pluginInfo={name:"PersistentStorage",version:"1.0",developer:"Douglas Mayle",developer_url:"http://douglas.mayle.org",license:"BSD"};c.prototype._backends={};c.prototype._userconfigs=[];c.prototype._activeBackend="";c.prototype._typeFilter="";c.prototype._viewType="thumbnail";c.prototype.onGenerateOnce=function(){this._prepareDialog()};function d(g,h){var i=new RegExp(" ?"+h+" ?");if(!i.test(g.className)){g.className+=" "+h}}function f(g,h){var i=new RegExp(" ?"+h+" ?");if(i.test(g.className)){g.className=g.className.replace(i," ")}}function a(g,h){var i=new RegExp(" ?"+h+" ?");if(i.test(g.className)){g.className=g.className.replace(i," ")}else{g.className+=" "+h}}c.prototype._registerDocumentUI=function(){if(this._documentEnabled){return}this._documentEnabled=true;var g=this;var h=this.editor;h.config.registerButton({id:"newdocument",tooltip:b._lc("New Document","PersistentStorage"),image:[_editor_url+h.config.imgURL+"ed_buttons_main.png",0,5],textMode:true,action:function(){g.newDocument()}});h.config.registerButton({id:"opendocument",tooltip:b._lc("Open Document","PersistentStorage"),image:[_editor_url+h.config.imgURL+"ed_buttons_main.png",1,5],textMode:true,action:function(){g.openDialog()}});h.config.registerButton({id:"savedocument",tooltip:b._lc("Save Document","PersistentStorage"),image:[_editor_url+h.config.imgURL+"ed_buttons_main.png",9,1],textMode:true,action:function(){g.saveDialog()}});h.config.addToolbarElement("newdocument","fullscreen",1);h.config.addToolbarElement("opendocument","newdocument",1);h.config.addToolbarElement("savedocument","opendocument",1);h._rebuildToolbar()};c.prototype.registerBackend=function(h,j,g,i){this._backends[h]={module:j,config:g,name:h};if(!this._activeBackend){this.setBackend(h)}if(g.capabilities.upload_operations&&g.capabilities.file_operations){this._registerDocumentUI()}if(i){this._userconfigs.push(i);this.configureUser()}this.updatePlacesDisplay()};c.prototype.configureUser=function(){var g=this;for(var i=0;iFile Browser +
    +
    Places +
    +

    WWW

    +
    +
    +
    +
    +
    +
    File Manager +
    + + + + +
    + + + + + _(Directory Up) + + + _(New Folder) + + +
    +
    +
    +
    + +
    +
    +
    Web URL +
    + +
    +
    + +
    + Filename + +
    + +
    + Details +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    Constrained Proportions + + + + +
    + Color + × +
    Border Color ×
    + + +
    + +
    + + + +
    +
    Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/PreserveScripts/PreserveScripts.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/PreserveScripts/PreserveScripts.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/PreserveScripts/PreserveScripts.js 16 Jan 2009 09:05:49 -0000 1.1 @@ -0,0 +1,68 @@ +/*------------------------------------------*\ +PreserveScripts for Xinha +____________________ +Replace blocks of of PHP or JavaScript with icons in the editor, this way making it possible to edit sourcecode containing PHP, +and preventing Javascript from being accidentally deleted because it's normally invisible + +\*------------------------------------------*/ + +function PreserveScripts(editor) { + this.editor = editor; +} + +PreserveScripts._pluginInfo = { + name : "PreserveScripts", + version : "1.0", + developer : "Raimund Meyer", + developer_url : "http://x-webservice.net", + c_owner : "Raimund Meyer", + sponsor : "", + sponsor_url : "", + license : "LGPL" +} +Xinha.Config.prototype.PreserveScripts = +{ + 'preservePHP' : true, + 'preserveJS' : true +} +PreserveScripts.prototype.inwardHtml = function(html) +{ + var s = this; + var c = s.editor.config.PreserveScripts; + this.storage = {}; //empty the cache + var i = 1; + html = html.replace(/\n?<\?php(\s|[^\s])*?\?>\n?/ig, + function(m) + { + if ( c.preservePHP ) // if config set to false wipe out php completely, otherwise ugly fragments may remain + { + s.storage['PreserveScripts_'+i] = m; + var r = ''; + i++; + return r; + } + else + { + return ''; + } + }); + if ( c.preserveJS ) + { + html = html.replace(/\n?\n?/g, + function(m) + { + s.storage['PreserveScripts_'+i] = m; + var r = ''; + i++; + return r; + }); + } + return html; +} + +PreserveScripts.prototype.outwardHtml = function(html) +{ + var s = this; + html = html.replace(/]*id="(PreserveScripts_\d+)"[^>]*>/g,function(m0,m1){return s.storage[m1];}); + return html; +} \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/QuickTag/QuickTag.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/QuickTag/QuickTag.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/QuickTag/QuickTag.js 16 Jan 2009 09:05:49 -0000 1.1 @@ -0,0 +1,53 @@ +/*---------------------------------------*\ + Quick Tag Editor Plugin for HTMLArea-3.0 + ----------------------------------------- + author: Cau guanabara + e-mail: caugb@ibest.com.br +\*---------------------------------------*/ + +function QuickTag(editor) { + var cfg = editor.config; + var self = this; + + cfg.registerButton({ + id : "quickeditor", + tooltip : this._lc("Quick Tag Editor"), + image : editor.imgURL("ed_quicktag.gif", "QuickTag"), + textMode : false, + action : function(editor) { + self.buttonPress(editor); + } + }); + cfg.addToolbarElement("quickeditor", "htmlmode", 1); +} + +QuickTag.prototype.buttonPress = function(editor) { +var self = this; +var sel = editor.getSelectedHTML().replace(/(<[^>]*>| |\n|\r)/g,""); +var param = new Object(); +param.editor = editor; + + if(/\w/.test(sel)) + editor._popupDialog("plugin://QuickTag/quicktag", function(p) { self.setTag(editor, p); }, param); + else + alert(this._lc('You have to select some text')); +}; + +QuickTag.prototype.setTag = function(editor, param) { +editor.surroundHTML(param.tagopen,param.tagclose); +}; + +QuickTag._pluginInfo = { +name : "QuickTag", +version : "1.0 - beta", +developer : "Cau Guanabara", +developer_url : "mailto:caugb@ibest.com.br", +c_owner : "Cau Guanabara", +sponsor : "Independent production", +sponsor_url : "http://www.netflash.com.br/gb/HA3-rc1/examples/quick-tag.html", +license : "htmlArea" +}; + +QuickTag.prototype._lc = function(string) { + return Xinha._lc(string, 'QuickTag'); +}; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/QuickTag/tag-lib.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/QuickTag/tag-lib.js,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/QuickTag/tag-lib.js 13 May 2008 18:53:54 -0000 1.4 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/QuickTag/tag-lib.js 16 Jan 2009 09:05:49 -0000 1.5 @@ -1,30 +1,2 @@ -/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */ -/* This file is part of version 0.95 released Mon, 12 May 2008 17:33:15 +0200 */ -/* The URL of the most recent version of this file is http://svn.xinha.webfactional.com/trunk/plugins/QuickTag/tag-lib.js */ -var allTags={"a":"a","a (full)":"a href=\"\" target=\"\"","address":"address","b":"b","big":"big","blockquote":"blockquote","code":"code","div":"div","em":"em","fieldset":"fieldset","font":"font","font (full)":"font face=\"\" size=\"\" color=\"\"","h1":"h1","h2":"h2","h3":"h3","h4":"h4","h5":"h5","h6":"h6","i":"i","legend":"legend","li":"li","ol":"ol","ul":"ul","p":"p","pre":"pre","small":"small","span":"span","strong":"strong","sub":"sub","sup":"sup","table":"table"}; -var tagLib={"a":true,"div":true,"font":true,"h1":true,"h2":true,"h3":true,"h4":true,"h5":true,"h6":true,"p":true,"table":true}; -var subTagLib={"table":{"op":"
    ","cl":"
    ",cl:"
    Convert all quotes and dashes in the current documentConvert all quotes and dashes in the current document
    -
    - - -
    +
    +
    +
    \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SmartReplace/img/SmartReplace.svg =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SmartReplace/img/SmartReplace.svg,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SmartReplace/img/SmartReplace.svg 16 Jan 2009 09:05:49 -0000 1.1 @@ -0,0 +1,231 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SmartReplace/img/smartquotes.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SmartReplace/img/smartquotes.png,v diff -u -N Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SpellChecker/SpellChecker.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SpellChecker/SpellChecker.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SpellChecker/SpellChecker.js 16 Jan 2009 09:05:49 -0000 1.1 @@ -0,0 +1,73 @@ +// Spell Checker Plugin for HTMLArea-3.0 +// Sponsored by www.americanbible.org +// Implementation by Mihai Bazon, http://dynarch.com/mishoo/ +// +// (c) dynarch.com 2003. +// Distributed under the same terms as HTMLArea itself. +// This notice MUST stay intact for use (see license.txt). +// +// $Id: SpellChecker.js,v 1.1 2009/01/16 09:05:49 gustafn Exp $ + +Xinha.Config.prototype.SpellChecker = { 'backend': 'php', 'personalFilesDir' : '', 'defaultDictionary' : 'en_GB', 'utf8_to_entities' : true }; + +function SpellChecker(editor) { + this.editor = editor; + + var cfg = editor.config; + var bl = SpellChecker.btnList; + var self = this; + + // see if we can find the mode switch button, insert this before that + var id = "SC-spell-check"; + cfg.registerButton(id, this._lc("Spell-check"), editor.imgURL("spell-check.gif", "SpellChecker"), false, + function(editor, id) { + // dispatch button press event + self.buttonPress(editor, id); + }); + + cfg.addToolbarElement("SC-spell-check", "htmlmode", 1); +} + +SpellChecker._pluginInfo = { + name : "SpellChecker", + version : "1.0", + developer : "Mihai Bazon", + developer_url : "http://dynarch.com/mishoo/", + c_owner : "Mihai Bazon", + sponsor : "American Bible Society", + sponsor_url : "http://www.americanbible.org", + license : "htmlArea" +}; + +SpellChecker.prototype._lc = function(string) { + return Xinha._lc(string, 'SpellChecker'); +}; + +SpellChecker.btnList = [ + null, // separator + ["spell-check"] + ]; + +SpellChecker.prototype.buttonPress = function(editor, id) { + switch (id) { + case "SC-spell-check": + SpellChecker.editor = editor; + SpellChecker.init = true; + var uiurl = Xinha.getPluginDir("SpellChecker") + "/spell-check-ui.html"; + var win; + if (Xinha.is_ie) { + win = window.open(uiurl, "SC_spell_checker", + "toolbar=no,location=no,directories=no,status=no,menubar=no," + + "scrollbars=no,resizable=yes,width=600,height=450"); + } else { + win = window.open(uiurl, "SC_spell_checker", + "toolbar=no,menubar=no,personalbar=no,width=600,height=450," + + "scrollbars=no,resizable=yes"); + } + win.focus(); + break; + } +}; + +// this needs to be global, it's accessed from spell-check-ui.html +SpellChecker.editor = null; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SpellChecker/spell-check-ui.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SpellChecker/spell-check-ui.js,v diff -u -N -r1.7 -r1.8 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SpellChecker/spell-check-ui.js 13 May 2008 18:53:56 -0000 1.7 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SpellChecker/spell-check-ui.js 16 Jan 2009 09:05:49 -0000 1.8 @@ -1,394 +1,2 @@ -/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */ -/* This file is part of version 0.95 released Mon, 12 May 2008 17:33:15 +0200 */ -/* The URL of the most recent version of this file is http://svn.xinha.webfactional.com/trunk/plugins/SpellChecker/spell-check-ui.js */ -var SpellChecker=window.opener.SpellChecker; -var Xinha=window.opener.Xinha; -var _editor_url=window.opener._editor_url; -var is_ie=Xinha.is_ie; -var editor=SpellChecker.editor; -var frame=null; -var currentElement=null; -var wrongWords=null; -var modified=false; -var allWords={}; -var fixedWords=[]; -var suggested_words={}; -var to_p_dict=[]; -var to_r_list=[]; -function _lc(_1){ -return Xinha._lc(_1,"SpellChecker"); -} -function makeCleanDoc(_2){ -var _3=wrongWords.concat(fixedWords); -for(var i=_3.length;--i>=0;){ -var el=_3[i]; -if(!(_2&&/HA-spellcheck-fixed/.test(el.className))){ -if(el.firstChild){ -el.parentNode.insertBefore(el.firstChild,el); -} -el.parentNode.removeChild(el); -}else{ -el.className="HA-spellcheck-fixed"; -} -} -return Xinha.getHTML(frame.contentWindow.document.body,true,editor); -} -function recheckClicked(){ -document.getElementById("status").innerHTML=_lc("Please wait: changing dictionary to")+": \""+document.getElementById("f_dictionary").value+"\"."; -var _6=document.getElementById("f_content"); -_6.value=makeCleanDoc(true); -_6.form.submit(); -} -function saveClicked(){ -if(modified){ -editor.setHTML(makeCleanDoc(false)); -} -if(to_p_dict.length||to_r_list.length&&editor.config.SpellChecker.backend=="php"){ -var _7={}; -for(var i=0;i=0;){ -var el=els[j]; -if(el.childNodes.length==1&&/\S/.test(el.innerHTML)){ -var txt=el.innerHTML; -el.innerHTML=_lc(txt); -} -} -} -} -function initDocument(){ -internationalizeWindow(); -modified=false; -frame=document.getElementById("i_framecontent"); -var _1a=document.getElementById("f_content"); -_1a.value=Xinha.getHTML(editor._doc.body,false,editor); -var _1b=document.getElementById("f_dictionary"); -if(typeof editor.config.SpellChecker.defaultDictionary!="undefined"&&editor.config.SpellChecker.defaultDictionary!=""){ -_1b.value=editor.config.SpellChecker.defaultDictionary; -}else{ -_1b.value="en_GB"; -} -if(editor.config.SpellChecker.backend=="php"){ -_1a.form.action=Xinha.getPluginDir("SpellChecker")+"/spell-check-logic.php"; -} -if(editor.config.SpellChecker.utf8_to_entities){ -document.getElementById("utf8_to_entities").value=1; -}else{ -document.getElementById("utf8_to_entities").value=0; -} -_1a.form.submit(); -document.getElementById("f_init").value="0"; -var _1c=document.getElementById("v_suggestions"); -_1c.onchange=function(){ -document.getElementById("v_replacement").value=this.value; -}; -if(is_ie){ -_1c.attachEvent("ondblclick",replaceClicked); -}else{ -_1c.addEventListener("dblclick",replaceClicked,true); -} -document.getElementById("b_replace").onclick=replaceClicked; -if(editor.config.SpellChecker.backend=="php"){ -document.getElementById("b_learn").onclick=learnClicked; -}else{ -document.getElementById("b_learn").parentNode.removeChild(document.getElementById("b_learn")); -} -document.getElementById("b_replall").onclick=replaceAllClicked; -document.getElementById("b_ignore").onclick=ignoreClicked; -document.getElementById("b_ignall").onclick=ignoreAllClicked; -document.getElementById("b_recheck").onclick=recheckClicked; -document.getElementById("b_revert").onclick=revertClicked; -document.getElementById("b_info").onclick=displayInfo; -document.getElementById("b_ok").onclick=saveClicked; -document.getElementById("b_cancel").onclick=cancelClicked; -_1c=document.getElementById("v_dictionaries"); -_1c.onchange=function(){ -document.getElementById("f_dictionary").value=this.value; -}; -} -function getAbsolutePos(el){ -var r={x:el.offsetLeft,y:el.offsetTop}; -if(el.offsetParent){ -var tmp=getAbsolutePos(el.offsetParent); -r.x+=tmp.x; -r.y+=tmp.y; -} -return r; -} -function wordClicked(_20){ -var _21=this; -if(_20){ -(function(){ -var pos=getAbsolutePos(_21); -var ws={x:frame.offsetWidth-4,y:frame.offsetHeight-4}; -var wp={x:frame.contentWindow.document.body.scrollLeft,y:frame.contentWindow.document.body.scrollTop}; -pos.x-=Math.round(ws.x/2); -if(pos.x<0){ -pos.x=0; -} -pos.y-=Math.round(ws.y/2); -if(pos.y<0){ -pos.y=0; -} -frame.contentWindow.scrollTo(pos.x,pos.y); -})(); -} -if(currentElement){ -var a=allWords[currentElement.__msh_origWord]; -currentElement.className=currentElement.className.replace(/\s*HA-spellcheck-current\s*/g," "); -for(var i=0;i"+currentElement.__msh_origWord+"\""; -for(var i=_2a.length;--i>=0;){ -_2a.remove(i); -} -for(var i=0;i<_29.length;++i){ -var txt=_29[i]; -var _2b=document.createElement("option"); -_2b.value=txt; -_2b.appendChild(document.createTextNode(txt)); -_2a.appendChild(_2b); -} -document.getElementById("v_currentWord").innerHTML=this.__msh_origWord; -if(_29.length>0){ -_2a.selectedIndex=0; -_2a.onchange(); -}else{ -document.getElementById("v_replacement").value=this.innerHTML; -} -_2a.style.display="none"; -_2a.style.display="block"; -return false; -} -function wordMouseOver(){ -this.className+=" HA-spellcheck-hover"; -} -function wordMouseOut(){ -this.className=this.className.replace(/\s*HA-spellcheck-hover\s*/g," "); -} -function displayInfo(){ -var _2c=frame.contentWindow.spellcheck_info; -if(!_2c){ -alert("No information available"); -}else{ -var txt="** Document information **"; -for(var i in _2c){ -txt+="\n"+i+" : "+_2c[i]; -} -alert(txt); -} -return false; -} -function finishedSpellChecking(){ -currentElement=null; -wrongWords=null; -allWords={}; -fixedWords=[]; -suggested_words=frame.contentWindow.suggested_words; -document.getElementById("status").innerHTML="Xinha Spell Checker (info)"; -var doc=frame.contentWindow.document; -var _30=doc.getElementsByTagName("span"); -var sps=[]; -var id=0; -for(var i=0;i<_30.length;++i){ -var el=_30[i]; -if(/HA-spellcheck-error/.test(el.className)){ -sps.push(el); -el.__msh_wordClicked=wordClicked; -el.onclick=function(ev){ -ev||(ev=window.event); -ev&&Xinha._stopEvent(ev); -return this.__msh_wordClicked(false); -}; -el.onmouseover=wordMouseOver; -el.onmouseout=wordMouseOut; -el.__msh_id=id++; -var txt=(el.__msh_origWord=el.firstChild.data); -el.__msh_fixed=false; -if(typeof allWords[txt]=="undefined"){ -allWords[txt]=[el]; -}else{ -allWords[txt].push(el); -} -}else{ -if(/HA-spellcheck-fixed/.test(el.className)){ -fixedWords.push(el); -} -} -} -var _37=doc.getElementById("HA-spellcheck-dictionaries"); -if(_37){ -_37.parentNode.removeChild(_37); -_37=_37.innerHTML.split(/,/); -var _38=document.getElementById("v_dictionaries"); -for(var i=_38.length;--i>=0;){ -_38.remove(i); -} -var _39=document.getElementById("f_dictionary").value; -for(var i=0;i<_37.length;++i){ -var txt=_37[i]; -var _3a=document.createElement("option"); -if(txt==_39){ -_3a.selected=true; -} -_3a.value=txt; -_3a.appendChild(document.createTextNode(txt)); -_38.appendChild(_3a); -} -} -wrongWords=sps; -if(sps.length==0){ -if(!modified){ -alert(_lc("No mispelled words found with the selected dictionary.")); -}else{ -alert(_lc("No mispelled words found with the selected dictionary.")); -} -return false; -} -(currentElement=sps[0]).__msh_wordClicked(true); -var as=doc.getElementsByTagName("a"); -for(var i=as.length;--i>=0;){ -var a=as[i]; -a.onclick=function(){ -if(confirm(_lc("Please confirm that you want to open this link")+":\n"+this.href+"\n"+_lc("I will open it in a new page."))){ -window.open(this.href); -} -return false; -}; -} -} - +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +var SpellChecker=window.opener.SpellChecker;var Xinha=window.opener.Xinha;var _editor_url=window.opener._editor_url;var is_ie=Xinha.is_ie;var editor=SpellChecker.editor;var frame=null;var currentElement=null;var wrongWords=null;var modified=false;var allWords={};var fixedWords=[];var suggested_words={};var to_p_dict=[];var to_r_list=[];function _lc(a){return Xinha._lc(a,"SpellChecker")}function makeCleanDoc(c){var d=wrongWords.concat(fixedWords);for(var a=d.length;--a>=0;){var b=d[a];if(!(c&&/HA-spellcheck-fixed/.test(b.className))){if(b.firstChild){b.parentNode.insertBefore(b.firstChild,b)}b.parentNode.removeChild(b)}else{b.className="HA-spellcheck-fixed"}}return Xinha.getHTML(frame.contentWindow.document.body,true,editor)}function recheckClicked(){document.getElementById("status").innerHTML=_lc("Please wait: changing dictionary to")+': "'+document.getElementById("f_dictionary").value+'".';var a=document.getElementById("f_content");a.value=makeCleanDoc(true);a.form.submit()}function saveClicked(){if(modified){editor.setHTML(makeCleanDoc(false))}if(to_p_dict.length||to_r_list.length&&editor.config.SpellChecker.backend=="php"){var b={};for(var a=0;a=0;){var g=d[c];if(g.childNodes.length==1&&/\S/.test(g.innerHTML)){var a=g.innerHTML;g.innerHTML=_lc(a)}}}}function initDocument(){internationalizeWindow();modified=false;frame=document.getElementById("i_framecontent");var b=document.getElementById("f_content");b.value=Xinha.getHTML(editor._doc.body,false,editor);var c=document.getElementById("f_dictionary");if(typeof editor.config.SpellChecker.defaultDictionary!="undefined"&&editor.config.SpellChecker.defaultDictionary!=""){c.value=editor.config.SpellChecker.defaultDictionary}else{c.value="en_GB"}if(editor.config.SpellChecker.backend=="php"){b.form.action=Xinha.getPluginDir("SpellChecker")+"/spell-check-logic.php"}if(editor.config.SpellChecker.utf8_to_entities){document.getElementById("utf8_to_entities").value=1}else{document.getElementById("utf8_to_entities").value=0}b.form.submit();document.getElementById("f_init").value="0";var a=document.getElementById("v_suggestions");a.onchange=function(){document.getElementById("v_replacement").value=this.value};if(is_ie){a.attachEvent("ondblclick",replaceClicked)}else{a.addEventListener("dblclick",replaceClicked,true)}document.getElementById("b_replace").onclick=replaceClicked;if(editor.config.SpellChecker.backend=="php"){document.getElementById("b_learn").onclick=learnClicked}else{document.getElementById("b_learn").parentNode.removeChild(document.getElementById("b_learn"))}document.getElementById("b_replall").onclick=replaceAllClicked;document.getElementById("b_ignore").onclick=ignoreClicked;document.getElementById("b_ignall").onclick=ignoreAllClicked;document.getElementById("b_recheck").onclick=recheckClicked;document.getElementById("b_revert").onclick=revertClicked;document.getElementById("b_info").onclick=displayInfo;document.getElementById("b_ok").onclick=saveClicked;document.getElementById("b_cancel").onclick=cancelClicked;a=document.getElementById("v_dictionaries");a.onchange=function(){document.getElementById("f_dictionary").value=this.value}}function getAbsolutePos(b){var c={x:b.offsetLeft,y:b.offsetTop};if(b.offsetParent){var a=getAbsolutePos(b.offsetParent);c.x+=a.x;c.y+=a.y}return c}function wordClicked(h){var k=this;if(h){(function(){var l=getAbsolutePos(k);var a={x:frame.offsetWidth-4,y:frame.offsetHeight-4};var i={x:frame.contentWindow.document.body.scrollLeft,y:frame.contentWindow.document.body.scrollTop};l.x-=Math.round(a.x/2);if(l.x<0){l.x=0}l.y-=Math.round(a.y/2);if(l.y<0){l.y=0}frame.contentWindow.scrollTo(l.x,l.y)})()}if(currentElement){var g=allWords[currentElement.__msh_origWord];currentElement.className=currentElement.className.replace(/\s*HA-spellcheck-current\s*/g," ");for(var c=0;c'+currentElement.__msh_origWord+'"';for(var c=j.length;--c>=0;){j.remove(c)}for(var c=0;c0){j.selectedIndex=0;j.onchange()}else{document.getElementById("v_replacement").value=this.innerHTML}j.style.display="none";j.style.display="block";return false}function wordMouseOver(){this.className+=" HA-spellcheck-hover"}function wordMouseOut(){this.className=this.className.replace(/\s*HA-spellcheck-hover\s*/g," ")}function displayInfo(){var c=frame.contentWindow.spellcheck_info;if(!c){alert("No information available")}else{var a="** Document information **";for(var b in c){a+="\n"+b+" : "+c[b]}alert(a)}return false}function finishedSpellChecking(){currentElement=null;wrongWords=null;allWords={};fixedWords=[];suggested_words=frame.contentWindow.suggested_words;document.getElementById("status").innerHTML='Xinha Spell Checker (info)';var o=frame.contentWindow.document;var k=o.getElementsByTagName("span");var b=[];var d=0;for(var g=0;g=0;){n.remove(g)}var l=document.getElementById("f_dictionary").value;for(var g=0;g=0;){var m=f[g];m.onclick=function(){if(confirm(_lc("Please confirm that you want to open this link")+":\n"+this.href+"\n"+_lc("I will open it in a new page."))){window.open(this.href)}return false}}}; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Stylist/Stylist.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Stylist/Stylist.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Stylist/Stylist.js 16 Jan 2009 09:05:49 -0000 1.1 @@ -0,0 +1,2 @@ +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +Xinha.Config.prototype.css_style={};Xinha.Config.prototype.stylistLoadStylesheet=function(a,d){if(!d){d={}}var c=Xinha.ripStylesFromCSSFile(a);for(var b in c){if(d[b]){this.css_style[b]=d[b]}else{this.css_style[b]=c[b]}}this.pageStyleSheets[this.pageStyleSheets.length]=a};Xinha.Config.prototype.stylistLoadStyles=function(b,d){if(!d){d={}}var c=Xinha.ripStylesFromCSSString(b);for(var a in c){if(d[a]){this.css_style[a]=d[a]}else{this.css_style[a]=c[a]}}this.pageStyle+=b};Xinha.prototype._fillStylist=function(){if(!this.plugins.Stylist.instance.dialog){return false}var c=this.plugins.Stylist.instance.dialog.main;c.innerHTML="";var f=true;var a=this._getSelection();var i=this._activeElement(a);for(var l in this.config.css_style){var m=null;var k=l.trim();var d=true;var b=i;if(d&&/[^a-zA-Z0-9_.-]/.test(k)){d=false}if(k.indexOf(".")<0){d=false}if(d&&(k.indexOf(".")>0)){m=k.substring(0,k.indexOf(".")).toLowerCase();k=k.substring(k.indexOf("."),k.length);if(i!=null&&i.tagName.toLowerCase()==m){d=true;b=i}else{if(this._getFirstAncestor(this._getSelection(),[m])!=null){d=true;b=this._getFirstAncestor(this._getSelection(),[m])}else{if((m=="div"||m=="span"||m=="p"||(m.substr(0,1)=="h"&&m.length==2&&m!="hr"))){if(!this._selectionEmpty(this._getSelection())){d=true;b="new"}else{b=this._getFirstAncestor(a,["p","h1","h2","h3","h4","h5","h6","h7"]);if(b!=null){d=true}else{d=false}}}else{d=false}}}}if(d){k=k.substring(k.indexOf("."),k.length);k=k.replace("."," ");if(b==null){if(this._selectionEmpty(this._getSelection())){b=this._getFirstAncestor(this._getSelection(),null)}else{b="new";m="span"}}}var e=(this._ancestorsWithClasses(a,m,k).length>0?true:false);var g=this._ancestorsWithClasses(a,m,k);if(d){var j=document.createElement("a");j.onfocus=function(){this.blur()};j._stylist_className=k.trim();j._stylist_applied=e;j._stylist_appliedTo=g;j._stylist_applyTo=b;j._stylist_applyTag=m;j.innerHTML=this.config.css_style[l];j.href="javascript:void(0)";var h=this;j.onclick=function(){if(this._stylist_applied==true){h._stylistRemoveClasses(this._stylist_className,this._stylist_appliedTo)}else{h._stylistAddClasses(this._stylist_applyTo,this._stylist_applyTag,this._stylist_className)}return false};j.style.display="block";j.style.paddingLeft="3px";j.style.paddingTop="1px";j.style.paddingBottom="1px";j.style.textDecoration="none";if(e){j.style.background="Highlight";j.style.color="HighlightText"}c.appendChild(j)}}};Xinha.prototype._stylistAddClasses=function(c,a,b){if(c=="new"){this.insertHTML("<"+a+' class="'+b+'">'+this.getSelectedHTML()+"")}else{if(a!=null&&c.tagName.toLowerCase()!=a){var d=this.switchElementTag(c,a);if(typeof c._stylist_usedToBe!="undefined"){d._stylist_usedToBe=c._stylist_usedToBe;d._stylist_usedToBe[d._stylist_usedToBe.length]={tagName:c.tagName,className:c.getAttribute("class")}}else{d._stylist_usedToBe=[{tagName:c.tagName,className:c.getAttribute("class")}]}Xinha.addClasses(d,b)}else{Xinha._addClasses(c,b)}}this.focusEditor();this.updateToolbar()};Xinha.prototype._stylistRemoveClasses=function(b,c){for(var a=0;a0&&a._stylist_usedToBe[a._stylist_usedToBe.length-1].className!=null){var h=a._stylist_usedToBe[a._stylist_usedToBe.length-1];var k=Xinha.arrayFilter(h.className.trim().split(" "),function(i){if(i==null||i.trim()==""){return false}return true});if((g.length==0)||(Xinha.arrayContainsArray(g,k)&&Xinha.arrayContainsArray(k,g))){a=this.switchElementTag(a,h.tagName);g=k}else{a._stylist_usedToBe=[]}}if(g.length>0||a.tagName.toLowerCase()!="span"||(a.id&&a.id!="")){a.className=g.join(" ").trim()}else{var b=a.parentNode;var d;while(a.hasChildNodes()){if(a.firstChild.nodeType==1){this._stylistRemoveClassesFull(a.firstChild,c)}d=a.removeChild(a.firstChild);b.insertBefore(d,a)}b.removeChild(a)}}};Xinha.prototype.switchElementTag=function(d,b){var c=d.parentNode;var f=this._doc.createElement(b);if(Xinha.is_ie||d.hasAttribute("id")){f.setAttribute("id",d.getAttribute("id"))}if(Xinha.is_ie||d.hasAttribute("style")){f.setAttribute("style",d.getAttribute("style"))}var e=d.childNodes;for(var a=0;a0)?a.offsetHeight-h.panel.offsetHeight:0)+"px";c.rootElem.style.height=b.offsetHeight+"px";e.sizeEditor();break;case"hide":f.resize();break}});e.notifyOn("before_resize",function(){if(!c.attached){return}c.rootElem.style.height=b.offsetHeight+"px"});e.notifyOn("resize",function(){if(!c.attached){return}f.resize()})};Stylist.prototype.resize=function(){var e=this.editor;var b=this.dialog.rootElem;if(b.style.display=="none"){return}var d=b.parentNode;var a=d.offsetHeight;for(var c=0;c0)){ -_d=_e.substring(0,_e.indexOf(".")).toLowerCase(); -_e=_e.substring(_e.indexOf("."),_e.length); -if(_b!=null&&_b.tagName.toLowerCase()==_d){ -_f=true; -_10=_b; -}else{ -if(this._getFirstAncestor(this._getSelection(),[_d])!=null){ -_f=true; -_10=this._getFirstAncestor(this._getSelection(),[_d]); -}else{ -if((_d=="div"||_d=="span"||_d=="p"||(_d.substr(0,1)=="h"&&_d.length==2&&_d!="hr"))){ -if(!this._selectionEmpty(this._getSelection())){ -_f=true; -_10="new"; -}else{ -_10=this._getFirstAncestor(_a,["p","h1","h2","h3","h4","h5","h6","h7"]); -if(_10!=null){ -_f=true; -}else{ -_f=false; -} -} -}else{ -_f=false; -} -} -} -} -if(_f){ -_e=_e.substring(_e.indexOf("."),_e.length); -_e=_e.replace("."," "); -if(_10==null){ -if(this._selectionEmpty(this._getSelection())){ -_10=this._getFirstAncestor(this._getSelection(),null); -}else{ -_10="new"; -_d="span"; -} -} -} -var _11=(this._ancestorsWithClasses(_a,_d,_e).length>0?true:false); -var _12=this._ancestorsWithClasses(_a,_d,_e); -if(_f){ -var _13=document.createElement("a"); -if(Xinha.is_real_gecko){ -_13.onfocus=function(){ -this.blur(); -}; -} -_13._stylist_className=_e.trim(); -_13._stylist_applied=_11; -_13._stylist_appliedTo=_12; -_13._stylist_applyTo=_10; -_13._stylist_applyTag=_d; -_13.innerHTML=this.config.css_style[x]; -_13.href="javascript:void(0)"; -var _14=this; -_13.onclick=function(){ -if(this._stylist_applied==true){ -_14._stylistRemoveClasses(this._stylist_className,this._stylist_appliedTo); -}else{ -_14._stylistAddClasses(this._stylist_applyTo,this._stylist_applyTag,this._stylist_className); -} -return false; -}; -_13.style.display="block"; -_13.style.paddingLeft="3px"; -_13.style.paddingTop="1px"; -_13.style.paddingBottom="1px"; -_13.style.textDecoration="none"; -if(_11){ -_13.style.background="Highlight"; -_13.style.color="HighlightText"; -} -this.plugins.Stylist.instance.main.appendChild(_13); -} -} -}; -Xinha.prototype._stylistAddClasses=function(el,tag,_17){ -if(el=="new"){ -this.insertHTML("<"+tag+" class=\""+_17+"\">"+this.getSelectedHTML()+""); -}else{ -if(tag!=null&&el.tagName.toLowerCase()!=tag){ -var _18=this.switchElementTag(el,tag); -if(typeof el._stylist_usedToBe!="undefined"){ -_18._stylist_usedToBe=el._stylist_usedToBe; -_18._stylist_usedToBe[_18._stylist_usedToBe.length]={"tagName":el.tagName,"className":el.getAttribute("class")}; -}else{ -_18._stylist_usedToBe=[{"tagName":el.tagName,"className":el.getAttribute("class")}]; -} -Xinha.addClasses(_18,_17); -}else{ -Xinha._addClasses(el,_17); -} -} -this.focusEditor(); -this.updateToolbar(); -}; -Xinha.prototype._stylistRemoveClasses=function(_19,_1a){ -for(var x=0;x<_1a.length;x++){ -this._stylistRemoveClassesFull(_1a[x],_19); -} -this.focusEditor(); -this.updateToolbar(); -}; -Xinha.prototype._stylistRemoveClassesFull=function(el,_1d){ -if(el!=null){ -var _1e=el.className.trim().split(" "); -var _1f=[]; -var _20=_1d.split(" "); -for(var x=0;x<_1e.length;x++){ -var _22=false; -for(var i=0;_22==false&&i<_20.length;i++){ -if(_20[i]==_1e[x]){ -_22=true; -} -} -if(_22==false){ -_1f[_1f.length]=_1e[x]; -} -} -if(_1f.length==0&&el._stylist_usedToBe&&el._stylist_usedToBe.length>0&&el._stylist_usedToBe[el._stylist_usedToBe.length-1].className!=null){ -var _24=el._stylist_usedToBe[el._stylist_usedToBe.length-1]; -var _25=Xinha.arrayFilter(_24.className.trim().split(" "),function(c){ -if(c==null||c.trim()==""){ -return false; -} -return true; -}); -if((_1f.length==0)||(Xinha.arrayContainsArray(_1f,_25)&&Xinha.arrayContainsArray(_25,_1f))){ -el=this.switchElementTag(el,_24.tagName); -_1f=_25; -}else{ -el._stylist_usedToBe=[]; -} -} -if(_1f.length>0||el.tagName.toLowerCase()!="span"||(el.id&&el.id!="")){ -el.className=_1f.join(" ").trim(); -}else{ -var _27=el.parentNode; -var _28=el.childNodes; -for(var x=0;x<_28.length;x++){ -_27.insertBefore(_28[x],el); -} -_27.removeChild(el); -} -} -}; -Xinha.prototype.switchElementTag=function(el,tag){ -var _2b=el.parentNode; -var _2c=this._doc.createElement(tag); -if(Xinha.is_ie||el.hasAttribute("id")){ -_2c.setAttribute("id",el.getAttribute("id")); -} -if(Xinha.is_ie||el.hasAttribute("style")){ -_2c.setAttribute("style",el.getAttribute("style")); -} -var _2d=el.childNodes; -for(var x=0;x<_2d.length;x++){ -_2c.appendChild(_2d[x].cloneNode(true)); -} -_2b.insertBefore(_2c,el); -_2c._stylist_usedToBe=[el.tagName]; -_2b.removeChild(el); -this.selectNodeContents(_2c); -return _2c; -}; -Xinha.prototype._getAncestorsClassNames=function(sel){ -var _30=this._activeElement(sel); -if(_30==null){ -_30=(Xinha.is_ie?this._createRange(sel).parentElement():this._createRange(sel).commonAncestorContainer); -} -var _31=[]; -while(_30){ -if(_30.nodeType==1){ -var _32=_30.className.trim().split(" "); -for(var x=0;x<_32.length;x++){ -_31[_31.length]=_32[x]; -} -if(_30.tagName.toLowerCase()=="body"){ -break; -} -if(_30.tagName.toLowerCase()=="table"){ -break; -} -} -_30=_30.parentNode; -} -return _31; -}; -Xinha.prototype._ancestorsWithClasses=function(sel,tag,_36){ -var _37=[]; -var _38=this._activeElement(sel); -if(_38==null){ -try{ -_38=(Xinha.is_ie?this._createRange(sel).parentElement():this._createRange(sel).commonAncestorContainer); -} -catch(e){ -return _37; -} -} -var _39=_36.trim().split(" "); -while(_38){ -if(_38.nodeType==1&&_38.className){ -if(tag==null||_38.tagName.toLowerCase()==tag){ -var _36=_38.className.trim().split(" "); -var _3a=true; -for(var i=0;i<_39.length;i++){ -var _3c=false; -for(var x=0;x<_36.length;x++){ -if(_39[i]==_36[x]){ -_3c=true; -break; -} -} -if(!_3c){ -_3a=false; -break; -} -} -if(_3a){ -_37[_37.length]=_38; -} -} -if(_38.tagName.toLowerCase()=="body"){ -break; -} -if(_38.tagName.toLowerCase()=="table"){ -break; -} -} -_38=_38.parentNode; -} -return _37; -}; -Xinha.ripStylesFromCSSFile=function(URL){ -var css=Xinha._geturlcontent(URL); -return Xinha.ripStylesFromCSSString(css); -}; -Xinha.ripStylesFromCSSString=function(css){ -RE_comment=/\/\*(.|\r|\n)*?\*\//g; -RE_rule=/\{(.|\r|\n)*?\}/g; -css=css.replace(RE_comment,""); -css=css.replace(RE_rule,","); -css=css.split(","); -var _41={}; -for(var x=0;x0)?_47.main.offsetHeight-_4b.panel.offsetHeight:0)+"px"; -_46._stylist.style.height=_47.caption.offsetHeight+"px"; -_46.sizeEditor(); -break; -case "hide": -_47.resize(); -break; -} -}); -_46.notifyOn("before_resize",function(){ -_46._stylist.style.height=_47.caption.offsetHeight+"px"; -}); -_46.notifyOn("resize",function(){ -_47.resize(); -}); -} -}; -Stylist.prototype.resize=function(){ -var _4d=this.editor; -var _4e=_4d._stylist.parentNode; -var _4f=_4e.offsetHeight; -for(var i=0;i<_4e.childNodes.length;++i){ -if(_4e.childNodes[i]==_4d._stylist||!_4e.childNodes[i].offsetHeight){ -continue; -} -_4f-=_4e.childNodes[i].offsetHeight; -} -_4d._stylist.style.height=_4f+"px"; -this.main.style.height=_4f-this.caption.offsetHeight+"px"; -}; -Stylist.prototype.onUpdateToolbar=function(){ -if(this.editor._stylist){ -if(this._timeoutID){ -window.clearTimeout(this._timeoutID); -} -var e=this.editor; -this._timeoutID=window.setTimeout(function(){ -e._fillStylist(); -},250); -} -}; - +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +Xinha.Config.prototype.css_style={};Xinha.Config.prototype.stylistLoadStylesheet=function(a,d){if(!d){d={}}var c=Xinha.ripStylesFromCSSFile(a);for(var b in c){if(d[b]){this.css_style[b]=d[b]}else{this.css_style[b]=c[b]}}this.pageStyleSheets[this.pageStyleSheets.length]=a};Xinha.Config.prototype.stylistLoadStyles=function(b,d){if(!d){d={}}var c=Xinha.ripStylesFromCSSString(b);for(var a in c){if(d[a]){this.css_style[a]=d[a]}else{this.css_style[a]=c[a]}}this.pageStyle+=b};Xinha.prototype._fillStylist=function(){if(!this.plugins.Stylist.instance.dialog){return false}var c=this.plugins.Stylist.instance.dialog.main;c.innerHTML="";var f=true;var a=this._getSelection();var i=this._activeElement(a);for(var l in this.config.css_style){var m=null;var k=l.trim();var d=true;var b=i;if(d&&/[^a-zA-Z0-9_.-]/.test(k)){d=false}if(k.indexOf(".")<0){d=false}if(d&&(k.indexOf(".")>0)){m=k.substring(0,k.indexOf(".")).toLowerCase();k=k.substring(k.indexOf("."),k.length);if(i!=null&&i.tagName.toLowerCase()==m){d=true;b=i}else{if(this._getFirstAncestor(this._getSelection(),[m])!=null){d=true;b=this._getFirstAncestor(this._getSelection(),[m])}else{if((m=="div"||m=="span"||m=="p"||(m.substr(0,1)=="h"&&m.length==2&&m!="hr"))){if(!this._selectionEmpty(this._getSelection())){d=true;b="new"}else{b=this._getFirstAncestor(a,["p","h1","h2","h3","h4","h5","h6","h7"]);if(b!=null){d=true}else{d=false}}}else{d=false}}}}if(d){k=k.substring(k.indexOf("."),k.length);k=k.replace("."," ");if(b==null){if(this._selectionEmpty(this._getSelection())){b=this._getFirstAncestor(this._getSelection(),null)}else{b="new";m="span"}}}var e=(this._ancestorsWithClasses(a,m,k).length>0?true:false);var g=this._ancestorsWithClasses(a,m,k);if(d){var j=document.createElement("a");j.onfocus=function(){this.blur()};j._stylist_className=k.trim();j._stylist_applied=e;j._stylist_appliedTo=g;j._stylist_applyTo=b;j._stylist_applyTag=m;j.innerHTML=this.config.css_style[l];j.href="javascript:void(0)";var h=this;j.onclick=function(){if(this._stylist_applied==true){h._stylistRemoveClasses(this._stylist_className,this._stylist_appliedTo)}else{h._stylistAddClasses(this._stylist_applyTo,this._stylist_applyTag,this._stylist_className)}return false};j.style.display="block";j.style.paddingLeft="3px";j.style.paddingTop="1px";j.style.paddingBottom="1px";j.style.textDecoration="none";if(e){j.style.background="Highlight";j.style.color="HighlightText"}c.appendChild(j)}}};Xinha.prototype._stylistAddClasses=function(c,a,b){if(c=="new"){this.insertHTML("<"+a+' class="'+b+'">'+this.getSelectedHTML()+"")}else{if(a!=null&&c.tagName.toLowerCase()!=a){var d=this.switchElementTag(c,a);if(typeof c._stylist_usedToBe!="undefined"){d._stylist_usedToBe=c._stylist_usedToBe;d._stylist_usedToBe[d._stylist_usedToBe.length]={tagName:c.tagName,className:c.getAttribute("class")}}else{d._stylist_usedToBe=[{tagName:c.tagName,className:c.getAttribute("class")}]}Xinha.addClasses(d,b)}else{Xinha._addClasses(c,b)}}this.focusEditor();this.updateToolbar()};Xinha.prototype._stylistRemoveClasses=function(b,c){for(var a=0;a0&&a._stylist_usedToBe[a._stylist_usedToBe.length-1].className!=null){var h=a._stylist_usedToBe[a._stylist_usedToBe.length-1];var k=Xinha.arrayFilter(h.className.trim().split(" "),function(i){if(i==null||i.trim()==""){return false}return true});if((g.length==0)||(Xinha.arrayContainsArray(g,k)&&Xinha.arrayContainsArray(k,g))){a=this.switchElementTag(a,h.tagName);g=k}else{a._stylist_usedToBe=[]}}if(g.length>0||a.tagName.toLowerCase()!="span"||(a.id&&a.id!="")){a.className=g.join(" ").trim()}else{var b=a.parentNode;var d;while(a.hasChildNodes()){if(a.firstChild.nodeType==1){this._stylistRemoveClassesFull(a.firstChild,c)}d=a.removeChild(a.firstChild);b.insertBefore(d,a)}b.removeChild(a)}}};Xinha.prototype.switchElementTag=function(d,b){var c=d.parentNode;var f=this._doc.createElement(b);if(Xinha.is_ie||d.hasAttribute("id")){f.setAttribute("id",d.getAttribute("id"))}if(Xinha.is_ie||d.hasAttribute("style")){f.setAttribute("style",d.getAttribute("style"))}var e=d.childNodes;for(var a=0;a0)?a.offsetHeight-h.panel.offsetHeight:0)+"px";c.rootElem.style.height=b.offsetHeight+"px";e.sizeEditor();break;case"hide":f.resize();break}});e.notifyOn("before_resize",function(){if(!c.attached){return}c.rootElem.style.height=b.offsetHeight+"px"});e.notifyOn("resize",function(){if(!c.attached){return}f.resize()})};Stylist.prototype.resize=function(){var e=this.editor;var b=this.dialog.rootElem;if(b.style.display=="none"){return}var d=b.parentNode;var a=d.offsetHeight;for(var c=0;cClean up HTML -
    +
    Please select from the following cleaning options... -
    - - -
    +
    + + + + +
    + +
    \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SuperClean/pluginMethods.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SuperClean/pluginMethods.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SuperClean/pluginMethods.js 16 Jan 2009 09:05:49 -0000 1.1 @@ -0,0 +1,2 @@ +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +SuperClean.prototype._superClean=function(opts,obj){if(this.editor.config.SuperClean.show_dialog&&!this._dialog){this._dialog=new SuperClean.Dialog(this)}var superclean=this;var doOK=function(){superclean._dialog.dialog.getElementById("main").style.display="none";superclean._dialog.dialog.getElementById("waiting").style.display="";superclean._dialog.dialog.getElementById("buttons").style.display="none";var opts=superclean._dialog.dialog.getValues();var editor=superclean.editor;if(opts.word_clean){editor._wordClean()}var D=editor.getEditorContent();for(var filter in editor.config.SuperClean.filters){if(filter=="tidy"||filter=="word_clean"){continue}if(opts[filter]){D=SuperClean.filterFunctions[filter](D,editor)}}D=D.replace(/(style|class)="\s*"/gi,"");D=D.replace(/<(font|span)\s*>/gi,"");editor.setEditorContent(D);if(opts.tidy){var callback=function(javascriptResponse){eval("var response = "+javascriptResponse);switch(response.action){case"setHTML":editor.setEditorContent(response.value);superclean._dialog.hide();break;case"alert":superclean._dialog.dialog.getElementById("buttons").style.display="";superclean._dialog.dialog.getElementById("ok").style.display="none";superclean._dialog.dialog.getElementById("waiting").style.display="none";superclean._dialog.dialog.getElementById("alert").style.display="";superclean._dialog.dialog.getElementById("alert").innerHTML=superclean._lc(response.value);break;default:superclean._dialog.hide();break}};Xinha._postback(editor.config.SuperClean.tidy_handler,{content:editor.getInnerHTML()},callback)}else{superclean._dialog.hide()}return true};if(this.editor.config.SuperClean.show_dialog){var inputs={};this._dialog.show(inputs,doOK)}else{var editor=this.editor;var html=editor.getEditorContent();for(var filter in editor.config.SuperClean.filters){if(filter=="tidy"){continue}html=SuperClean.filterFunctions[filter](html,editor)}html=html.replace(/(style|class)="\s*"/gi,"");html=html.replace(/<(font|span)\s*>/gi,"");editor.setEditorContent(html);if(editor.config.SuperClean.filters.tidy){SuperClean.filterFunctions.tidy(html,editor)}}};SuperClean.filterFunctions.remove_colors=function(a){a=a.replace(/color="?[^" >]*"?/gi,"");a=a.replace(/([^-])color:[^;}"']+;?/gi,"$1");return(a)};SuperClean.filterFunctions.remove_sizes=function(a){a=a.replace(/size="?[^" >]*"?/gi,"");a=a.replace(/font-size:[^;}"']+;?/gi,"");return(a)};SuperClean.filterFunctions.remove_faces=function(a){a=a.replace(/face="?[^" >]*"?/gi,"");a=a.replace(/font-family:[^;}"']+;?/gi,"");return(a)};SuperClean.filterFunctions.remove_lang=function(a){a=a.replace(/lang="?[^" >]*"?/gi,"");return(a)};SuperClean.filterFunctions.word_clean=function(a,b){b.setHTML(a);b._wordClean();return b.getInnerHTML()};SuperClean.filterFunctions.remove_fancy_quotes=function(a){a=a.replace(new RegExp(String.fromCharCode(8216),"g"),"'");a=a.replace(new RegExp(String.fromCharCode(8217),"g"),"'");a=a.replace(new RegExp(String.fromCharCode(8218),"g"),"'");a=a.replace(new RegExp(String.fromCharCode(8219),"g"),"'");a=a.replace(new RegExp(String.fromCharCode(8220),"g"),'"');a=a.replace(new RegExp(String.fromCharCode(8221),"g"),'"');a=a.replace(new RegExp(String.fromCharCode(8222),"g"),'"');a=a.replace(new RegExp(String.fromCharCode(8223),"g"),'"');return a};SuperClean.filterFunctions.tidy=function(html,editor){var callback=function(javascriptResponse){eval("var response = "+javascriptResponse);switch(response.action){case"setHTML":editor.setEditorContent(response.value);break;case"alert":alert(Xinha._lc(response.value,"SuperClean"));break}};Xinha._postback(editor.config.SuperClean.tidy_handler,{content:html},callback)};SuperClean.Dialog=function(a){var b=this;this.Dialog_nxtid=0;this.SuperClean=a;this.id={};this.ready=false;this.dialog=false;this._prepareDialog()};SuperClean.Dialog.prototype._prepareDialog=function(){var g=this;var e=this.SuperClean;var c=window.SuperClean.html;var f="";for(var d in this.SuperClean.editor.config.SuperClean.filters){f+="
    \n";var b=this.SuperClean.editor.config.SuperClean.filters[d];if(typeof b.label=="undefined"){f+=' \n';f+=' \n"}else{f+=' \n";f+=' \n"}f+="
    \n"}c=c.replace("",f);var a=this.dialog=new Xinha.Dialog(e.editor,c,"SuperClean",{width:400});this.ready=true};SuperClean.Dialog.prototype._lc=SuperClean.prototype._lc;SuperClean.Dialog.prototype.show=function(a,c,d){if(!this.ready){var e=this;window.setTimeout(function(){e.show(a,c,d)},100);return}var b=this.dialog;var e=this;if(c){this.dialog.getElementById("ok").onclick=c}else{this.dialog.getElementById("ok").onclick=function(){e.hide()}}if(d){this.dialog.getElementById("cancel").onclick=d}else{this.dialog.getElementById("cancel").onclick=function(){e.hide()}}this.SuperClean.editor.disableToolbar(["fullscreen","SuperClean"]);this.dialog.show(a);this.dialog.onresize()};SuperClean.Dialog.prototype.hide=function(){var a=this.dialog.hide();this.SuperClean.editor.enableToolbar();this.dialog.getElementById("main").style.display="";this.dialog.getElementById("buttons").style.display="";this.dialog.getElementById("waiting").style.display="none";this.dialog.getElementById("alert").style.display="none";this.dialog.getElementById("ok").style.display="";return a}; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SuperClean/filters/paragraph.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SuperClean/filters/paragraph.js,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SuperClean/filters/paragraph.js 13 May 2008 18:53:57 -0000 1.2 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SuperClean/filters/paragraph.js 16 Jan 2009 09:05:49 -0000 1.3 @@ -1,10 +1,6 @@ -/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */ -/* This file is part of version 0.95 released Mon, 12 May 2008 17:33:15 +0200 */ -/* The URL of the most recent version of this file is http://svn.xinha.webfactional.com/trunk/plugins/SuperClean/filters/paragraph.js */ -function(_1){ -_1=_1.replace(/<\s*p[^>]*>/gi,""); -_1=_1.replace(/<\/\s*p\s*>/gi,""); -_1=_1.trim(); -return _1; -} - +function(html) { + html = html.replace(/<\s*p[^>]*>/gi, ''); + html = html.replace(/<\/\s*p\s*>/gi, ''); + html = html.trim(); + return html; +} \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SuperClean/filters/word.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SuperClean/filters/word.js,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SuperClean/filters/word.js 13 May 2008 18:53:57 -0000 1.2 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SuperClean/filters/word.js 16 Jan 2009 09:05:49 -0000 1.3 @@ -1,30 +1,53 @@ -/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */ -/* This file is part of version 0.95 released Mon, 12 May 2008 17:33:15 +0200 */ -/* The URL of the most recent version of this file is http://svn.xinha.webfactional.com/trunk/plugins/SuperClean/filters/word.js */ -function(_1){ -_1=_1.replace(//gi,""); -_1=_1.replace(//gi,""); -_1=_1.replace(/<\/?\s*HTML[^>]*>/gi,""); -_1=_1.replace(/<\/?\s*BODY[^>]*>/gi,""); -_1=_1.replace(/<\/?\s*META[^>]*>/gi,""); -_1=_1.replace(/<\/?\s*SPAN[^>]*>/gi,""); -_1=_1.replace(/<\/?\s*FONT[^>]*>/gi,""); -_1=_1.replace(/<\/?\s*IFRAME[^>]*>/gi,""); -_1=_1.replace(/<\/?\s*STYLE[^>]*>(.|[\n\r\t])*<\/\s*STYLE\s*>/gi,""); -_1=_1.replace(/<\s*TITLE[^>]*>(.|[\n\r\t])*<\/\s*TITLE\s*>/gi,""); -_1=_1.replace(/<\s*SCRIPT[^>]*>[^\0]*<\/\s*SCRIPT\s*>/gi,""); -_1=_1.replace(/<\s*HEAD[^>]*>(.|[\n\r\t])*<\/\s*HEAD\s*>/gi,""); -_1=_1.replace(/<\s*(\w[^>]*) class=([^ |>]*)([^>]*)/gi,"<$1$3"); -_1=_1.replace(/<\s*(\w[^>]*) style="([^"]*)"([^>]*)/gi,"<$1$3"); -_1=_1.replace(/<\s*(\w[^>]*) lang=([^ |>]*)([^>]*)/gi,"<$1$3"); -_1=_1.replace(/<\\?\?xml[^>]*>/gi,""); -_1=_1.replace(/<\/?\w+:[^>]*>/gi,""); -_1=_1.replace(/ /," "); -_1=_1.replace(/<\s*p[^>]*><\s*br\s*\/?>\s*<\/\s*p[^>]*>/gi,"
    "); -_1=_1.replace(/<\s*p[^>]*>/gi,""); -_1=_1.replace(/<\/\s*p[^>]*>/gi,"
    "); -_1=_1.replace(/(\s*
    \s*)*$/,""); -_1=_1.trim(); -return _1; -} +function(html) { + // Remove HTML comments + html = html.replace(//gi, "" ); + html = html.replace(//gi, ''); + // Remove all HTML tags + html = html.replace(/<\/?\s*HTML[^>]*>/gi, "" ); + // Remove all BODY tags + html = html.replace(/<\/?\s*BODY[^>]*>/gi, "" ); + // Remove all META tags + html = html.replace(/<\/?\s*META[^>]*>/gi, "" ); + // Remove all SPAN tags + html = html.replace(/<\/?\s*SPAN[^>]*>/gi, "" ); + // Remove all FONT tags + html = html.replace(/<\/?\s*FONT[^>]*>/gi, ""); + // Remove all IFRAME tags. + html = html.replace(/<\/?\s*IFRAME[^>]*>/gi, ""); + // Remove all STYLE tags & content + html = html.replace(/<\/?\s*STYLE[^>]*>(.|[\n\r\t])*<\/\s*STYLE\s*>/gi, "" ); + // Remove all TITLE tags & content + html = html.replace(/<\s*TITLE[^>]*>(.|[\n\r\t])*<\/\s*TITLE\s*>/gi, "" ); + // Remove javascript + html = html.replace(/<\s*SCRIPT[^>]*>[^\0]*<\/\s*SCRIPT\s*>/gi, ""); + // Remove all HEAD tags & content + html = html.replace(/<\s*HEAD[^>]*>(.|[\n\r\t])*<\/\s*HEAD\s*>/gi, "" ); + // Remove Class attributes + html = html.replace(/<\s*(\w[^>]*) class=([^ |>]*)([^>]*)/gi, "<$1$3") ; + // Remove Style attributes + html = html.replace(/<\s*(\w[^>]*) style="([^"]*)"([^>]*)/gi, "<$1$3") ; + // Remove Lang attributes + html = html.replace(/<\s*(\w[^>]*) lang=([^ |>]*)([^>]*)/gi, "<$1$3") ; + // Remove XML elements and declarations + html = html.replace(/<\\?\?xml[^>]*>/gi, "") ; + // Remove Tags with XML namespace declarations: + html = html.replace(/<\/?\w+:[^>]*>/gi, "") ; + // Replace the   + html = html.replace(/ /, " " ); + // Transform


    to
    + //html = html.replace(/<\s*p[^>]*>\s*<\s*br\s*\/>\s*<\/\s*p[^>]*>/gi, "
    "); + html = html.replace(/<\s*p[^>]*><\s*br\s*\/?>\s*<\/\s*p[^>]*>/gi, "
    "); + + // Remove

    + html = html.replace(/<\s*p[^>]*>/gi, ""); + + // Replace

    with
    + html = html.replace(/<\/\s*p[^>]*>/gi, "
    "); + + // Remove any
    at the end + html = html.replace(/(\s*
    \s*)*$/, ""); + + html = html.trim(); + return html; +} \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SuperClean/lang/de.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SuperClean/lang/de.js,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SuperClean/lang/de.js 2 Nov 2005 08:56:29 -0000 1.1 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SuperClean/lang/de.js 16 Jan 2009 09:05:49 -0000 1.2 @@ -13,5 +13,6 @@ "Go": "Go", "Cancel": "Abbrechen", "Tidy failed. Check your HTML for syntax errors.": "Säubern fehlgeschlagen. Überprüfen Sie Ihren Code auf Fehler.", - "You don't have anything to tidy!": "Es gibt nichts zu säubern...!" + "You don't have anything to tidy!": "Es gibt nichts zu säubern...!", + "Please stand by while cleaning in process..." : "Bitte warten Sie, während die Säuberung läuft..." }; Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/TableOperations/TableOperations.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/TableOperations/TableOperations.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/TableOperations/TableOperations.js 16 Jan 2009 09:05:49 -0000 1.1 @@ -0,0 +1,2 @@ +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +Xinha.Config.prototype.TableOperations={showButtons:true};function TableOperations(e){this.editor=e;var a=e.config;var h=TableOperations.btnList;var b=this;a.removeToolbarElement(" inserttable toggleborders ");var f=["linebreak","inserttable","toggleborders"];for(var d=0;d":"";function g(I){var H=I.getElementsByTagName("td");for(var G=H.length;--G>=0;){var J=H[G];J.rowSpan=1;J.innerHTML=f}}function y(L){var K=parseInt(""+L.rowSpan);var J=parseInt(""+L.colSpan);L.rowSpan=1;a=L.parentNode;var H=a.rowIndex;var i=a.parentNode.rows;var G=L.cellIndex;while(--K>0){a=i[++H];var I=e._doc.createElement("td");I.colSpan=L.colSpan;I.innerHTML=f;a.insertBefore(I,a.cells[G])}e.forceRedraw();e.updateToolbar()}function s(I){var H=parseInt(""+I.colSpan);I.colSpan=1;a=I.parentNode;var G=I.nextSibling;while(--H>0){var i=e._doc.createElement("td");i.rowSpan=I.rowSpan;i.innerHTML=f;a.insertBefore(i,G)}e.forceRedraw();e.updateToolbar()}function F(I){var H=parseInt(""+I.colSpan);s(I);var i=I.parentNode.cells;var G=I.cellIndex;while(H-->0){y(i[G++])}}function z(i){var G=i.nextSibling;while(G&&G.nodeType!=1){G=G.nextSibling}if(!G){G=i.previousSibling;while(G&&G.nodeType!=1){G=G.previousSibling}}if(!G){G=i.parentNode}e.selectNodeContents(G)}function l(S,H,O,G,J){var V=[];var T=[];try{for(C=O;C1||U.cells[K].rowSpan>1){F(U.cells[K])}T.push(U.cells[K])}if(T.length>0){V.push(T);T=[]}}}catch(N){alert("Invalid selection");return false}var Q=V[0][0].parentNode.rowIndex;var P=V[V.length-1][0].parentNode.rowIndex;var M=V[V.length-1][0].rowSpan;var L="";for(C=0;C=0;){var a=p[C];var B=e._doc.createElement("td");B.innerHTML=f;if(n&&Xinha.is_ie){a.insertBefore(B)}else{var h=a.cells[j+(/after/.test(k)?1:0)];a.insertBefore(B,h)}}e.focusEditor();break;case"TO-col-split":var m=this.getClosest("td");if(!m){break}s(m);break;case"TO-col-delete":var m=this.getClosest("td");if(!m){break}var j=m.cellIndex;if(m.parentNode.cells.length==1){alert(Xinha._lc("Xinha cowardly refuses to delete the last column in table.","TableOperations"));break}z(m);var p=m.parentNode.parentNode.rows;for(var C=p.length;--C>=0;){var a=p[C];a.removeChild(a.cells[j])}e.forceRedraw();e.focusEditor();e.updateToolbar();break;case"TO-cell-split":var m=this.getClosest("td");if(!m){break}F(m);break;case"TO-cell-insert-before":case"TO-cell-insert-after":var m=this.getClosest("td");if(!m){break}var a=m.parentNode;var B=e._doc.createElement("td");B.innerHTML=f;a.insertBefore(B,/after/.test(k)?m.nextSibling:m);e.forceRedraw();e.focusEditor();break;case"TO-cell-delete":var m=this.getClosest("td");if(!m){break}if(m.parentNode.cells.length==1){alert(Xinha._lc("Xinha cowardly refuses to delete the last cell in row.","TableOperations"));break}z(m);m.parentNode.removeChild(m);e.forceRedraw();e.updateToolbar();break;case"TO-cell-merge":var A=e._getSelection();if(!Xinha.is_ie&&A.rangeCount>1){var t=A.getRangeAt(0);var m=t.startContainer.childNodes[t.startOffset];var a=m.parentNode;var o=m.cellIndex;var r=a.rowIndex;var x=0;var w=r;var c=0;var v=0;var d,E;for(C=0;Cc){c=v}if(E.rowIndex+d.rowSpan-1>x){x=E.rowIndex+d.rowSpan-1}}var b=x-r+1;var D=a.parentNode;l(D,o,r,c,b)}else{var m=this.getClosest("td");if(!m){alert(Xinha._lc("Please click into some cell","TableOperations"));break}var a=m.parentNode;var o=m.cellIndex;var r=a.rowIndex;this.dialogMerge(l,o,r)}break;case"TO-table-prop":this.dialogTableProperties();break;case"TO-row-prop":this.dialogRowCellProperties(false);break;case"TO-cell-prop":this.dialogRowCellProperties(true);break;default:alert("Button ["+k+"] not yet implemented")}};TableOperations.btnList=[["table-prop","table","Table properties"],null,["row-prop","tr","Row properties"],["row-insert-above","tr","Insert row before"],["row-insert-under","tr","Insert row after"],["row-delete","tr","Delete row"],["row-split","td[rowSpan!=1]","Split row"],null,["col-insert-before","td","Insert column before"],["col-insert-after","td","Insert column after"],["col-delete","td","Delete column"],["col-split","td[colSpan!=1]","Split column"],null,["cell-prop","td","Cell properties"],["cell-insert-before","td","Insert cell before"],["cell-insert-after","td","Insert cell after"],["cell-delete","td","Delete cell"],["cell-merge","tr","Merge cells"],["cell-split","td[colSpan!=1,rowSpan!=1]","Split cell"]];TableOperations.prototype.dialogMerge=function(g,h,e){var f=this.getClosest("table");var b=this;var d=this.editor;if(!this.dialogMergeCellsHtml){Xinha._getback(Xinha.getPluginDir("TableOperations")+"/popups/dialogMergeCells.html",function(i){b.dialogMergeCellsHtml=i;b.dialogMerge(g,h,e)});return}if(!this.dialogMergeCells){this.dialogMergeCells=new Xinha.Dialog(d,this.dialogMergeCellsHtml,"TableOperations",{width:400});this.dialogMergeCells.getElementById("cancel").onclick=function(){b.dialogMergeCells.hide()}}var c=this.dialogMergeCells;function a(){c.hide();no_cols=parseInt(c.getElementById("f_cols").value,10)+1;no_rows=parseInt(c.getElementById("f_rows").value,10)+1;g(f,h,e,no_cols,no_rows);return}this.dialogMergeCells.getElementById("ok").onclick=a;this.dialogMergeCells.show();this.dialogMergeCells.getElementById("f_cols").focus()};TableOperations.prototype.dialogTableProperties=function(){var k=this.getClosest("table");var l=this;var d=this.editor;if(!this.dialogTablePropertiesHtml){Xinha._getback(Xinha.getPluginDir("TableOperations")+"/popups/dialogTable.html",function(m){l.dialogTablePropertiesHtml=m;l.dialogTableProperties()});return}if(!this.dialogTable){this.dialogTable=new Xinha.Dialog(d,this.dialogTablePropertiesHtml,"TableOperations",{width:440});this.dialogTable.getElementById("cancel").onclick=function(){l.dialogTable.hide()}}var g=this.dialogTable;var c=new Xinha.InlineStyler(k,this.editor,g);function i(){var q=g.hide();c.applyStyle(q);for(var n in q){if(typeof q[n]=="function"){continue}var p=q[n];if(typeof p=="object"&&p!=null&&p.tagName){p=p.value}switch(n){case"caption":if(/\S/.test(p)){var m=k.getElementsByTagName("caption")[0];if(!m){m=g.editor._doc.createElement("caption");k.insertBefore(m,k.firstChild)}m.innerHTML=p}else{var m=k.getElementsByTagName("caption")[0];if(m){m.parentNode.removeChild(m)}}break;case"summary":k.summary=p;break;case"width":k.style.width=(""+p)+q.f_unit;break;case"align":k.align=p;break;case"spacing":k.cellSpacing=p;break;case"padding":k.cellPadding=p;break;case"borders":k.border=p;break;case"frames":k.frame=p;break;case"rules":k.rules=p;break}}l.editor.forceRedraw();l.editor.focusEditor();l.editor.updateToolbar();var o=k.style.borderCollapse;k.style.borderCollapse="collapse";k.style.borderCollapse="separate";k.style.borderCollapse=o}var a=c.createStyleLayoutFieldset();var b=g.getElementById("TO_layout");b.replaceChild(a,b.firstChild);var j=c.createStyleFieldset();b=g.getElementById("TO_style");b.replaceChild(j,b.firstChild);this.dialogTable.getElementById("ok").onclick=i;var h={};var e=k.getElementsByTagName("caption")[0];if(e){h.caption=e.innerHTML}else{h.caption=""}h.summary=k.summary;h.spacing=k.cellSpacing;h.padding=k.cellPadding;var f=k.border;h.frames=k.frame;h.rules=k.rules;this.dialogTable.show(h)};TableOperations.prototype.dialogRowCellProperties=function(h){var d=this.getClosest(h?"td":"tr");var j=this.getClosest("table");var k=this;var e=this.editor;if(!k.dialogRowCellPropertiesHtml){Xinha._getback(Xinha.getPluginDir("TableOperations")+"/popups/dialogRowCell.html",function(l){k.dialogRowCellPropertiesHtml=l;k.dialogRowCellProperties(h)});return}if(!this.dialogRowCell){this.dialogRowCell=new Xinha.Dialog(e,k.dialogRowCellPropertiesHtml,"TableOperations",{width:440});this.dialogRowCell.getElementById("cancel").onclick=function(){k.dialogRowCell.hide()}}var f=this.dialogRowCell;f.getElementById("title").innerHTML=h?Xinha._lc("Cell Properties","TableOperations"):Xinha._lc("Row Properties","TableOperations");var c=new Xinha.InlineStyler(d,k.editor,f);function g(){var m=f.hide();c.applyStyle(m);k.editor.forceRedraw();k.editor.focusEditor();k.editor.updateToolbar();var l=j.style.borderCollapse;j.style.borderCollapse="collapse";j.style.borderCollapse="separate";j.style.borderCollapse=l}var a=c.createStyleLayoutFieldset();var b=f.getElementById("TO_layout");b.replaceChild(a,b.firstChild);var i=c.createStyleFieldset();b=f.getElementById("TO_style");b.replaceChild(i,b.firstChild);this.dialogRowCell.getElementById("ok").onclick=g;this.dialogRowCell.show()}; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/TableOperations/popups/dialogMergeCells.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/TableOperations/popups/dialogMergeCells.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/TableOperations/popups/dialogMergeCells.html 16 Jan 2009 09:05:49 -0000 1.1 @@ -0,0 +1,26 @@ +

    Merge Cells

    + + + + + + + + + + + + + + + +
    + Merge current cell with: +
    Cells to the right, and
    Cells down
    +
    +
    + + +
    +
    + Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/TableOperations/popups/dialogRowCell.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/TableOperations/popups/dialogRowCell.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/TableOperations/popups/dialogRowCell.html 16 Jan 2009 09:05:49 -0000 1.1 @@ -0,0 +1,15 @@ +

    Title

    + + + + + + + +

    +

    +
    +
    + + +
    \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/TableOperations/popups/dialogTable.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/TableOperations/popups/dialogTable.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/TableOperations/popups/dialogTable.html 16 Jan 2009 09:05:49 -0000 1.1 @@ -0,0 +1,119 @@ +

    Table Properties

    + + + + + + + + + + + + + + + + + + +
    +
    + + Description + + + + + + + + + + + + +
    + Caption: + + +
    + Summary: + + +
    +
    +

    +
    +
    + + Spacing and padding + + + + + + + + +
    + Spacing: + +  Padding:   pixels +
    +
    +
    +
    + + Frame and borders + + + + + + + + + + + + + + + + +
    + Borders: + +   pixels +
    + Frames: + + +
    + Rules: + + +
    +
    +

    +
    +
    + + +
    + Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/UnFormat/UnFormat.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/UnFormat/UnFormat.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/UnFormat/UnFormat.js 16 Jan 2009 09:05:49 -0000 1.1 @@ -0,0 +1,107 @@ +// Unormat plugin for Xinha + + +UnFormat._pluginInfo = { + name : "UnFormat", + version : "1.0", + license : "htmlArea" +}; + + +function UnFormat(editor) { + this.editor = editor; + var cfg = editor.config; + var self = this; + + cfg.registerButton({ + id : "unformat", + tooltip : Xinha._lc("Page Cleaner",'UnFormat'), + image : editor.imgURL("unformat.gif", "UnFormat"), + textMode : false, + action : function(editor) { + self.show(); + } + }); + + cfg.addToolbarElement("unformat", "killword", 1); +} + +UnFormat.prototype.onGenerateOnce = function(editor){ + // Load assets + var self = UnFormat; + if (self.loading) return; + self.loading = true; + self.methodsReady = true; + Xinha._getback(Xinha.getPluginDir('UnFormat') + '/dialog.html', function(getback) { self.html = getback; self.dialogReady = true; }); +} +UnFormat.prototype.onUpdateToolbar = function(editor){ + if (!(UnFormat.dialogReady && UnFormat.methodsReady)) + { + this.editor._toolbarObjects.UnFormat.state("enabled", false); + } + else this.onUpdateToolbar = null; + +} +UnFormat.prototype.prepareDialog = function(editor){ + var self = this; + var editor = this.editor; + + var dialog = this.dialog = new Xinha.Dialog(editor, UnFormat.html, 'Xinha',{width:400}) + // Connect the OK and Cancel buttons + dialog.getElementById('ok').onclick = function() {self.apply();} + dialog.getElementById('cancel').onclick = function() { self.dialog.hide()}; + + this.dialogReady = true; +} +UnFormat.prototype.show = function(editor){ + if (!this.dialog) this.prepareDialog(); + + var editor = this.editor; + + var values = + { + "cleaning_area" : 'selection', + "formatting" : '', + "html_all" : '' + } + // now calling the show method of the Xinha.Dialog object to set the values and show the actual dialog + this.dialog.show(values); + this.dialog.onresize(); +} +UnFormat.prototype.apply = function(editor){ + var editor = this.editor; + var doc = editor._doc; + var param = this.dialog.getValues(); + + // selection is only restored on dialog.hide() + this.dialog.hide(); + // assign the given arguments + + if (param["cleaning_area"] == "all") { + var html = editor._doc.body.innerHTML; + } else { + var html = editor.getSelectedHTML(); + } + + if (param.html_all) { + html = html.replace(/<[\!]*?[^<>]*?>/g, ""); + } + + if (param.formatting) { + html = html.replace(/style="[^"]*"/gi, ""); + html = html.replace(/<\/?font[^>]*>/gi,""); + html = html.replace(/<\/?b>/gi,""); + html = html.replace(/<\/?strong[^>]*>/gi,""); + html = html.replace(/<\/?i>/gi,""); + html = html.replace(/<\/?em[^>]*>/gi,""); + html = html.replace(/<\/?u[^>]*>/gi,""); + html = html.replace(/<\/?strike[^>]*>/gi,""); + html = html.replace(/ align=[^\s|>]*/gi,""); + html = html.replace(/ class=[^\s|>]*/gi,""); + } + if (param["cleaning_area"] == "all") { + editor._doc.body.innerHTML = html; + } else { + editor.insertHTML(html); + } +}; Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/UnFormat/dialog.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/UnFormat/dialog.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/UnFormat/dialog.html 16 Jan 2009 09:05:49 -0000 1.1 @@ -0,0 +1,28 @@ +

    Page Cleaner

    + +
    +
    + Cleaning Area + Selection + All +
    +
    +
    + Cleaning options +
    +
    Formatting:
    + +

    +

    All HTML:
    + +

    +

    +

    +

    Select which types of formatting you would like to remove.

    + +
    + + +
    + +
    Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/UnsavedChanges/UnsavedChanges.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/UnsavedChanges/UnsavedChanges.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/UnsavedChanges/UnsavedChanges.js 16 Jan 2009 09:05:49 -0000 1.1 @@ -0,0 +1,55 @@ +function UnsavedChanges(editor) { + // Keep a copy of the editor to perform any necessary functions + var editor = editor; + + // Private variable for storing the unmodified contents. This is necessary + // because whenDocReady needs a closure to reference this object. + var defaultValue; + + // Variable to allow the protector to be bypassed in the case of submit. + var bypass = false; + + var protector = function(event) { + if (bypass) { + return; + } + + if (defaultValue != (editor.getEditorContent ? editor.getEditorContent() : editor.outwardHtml(editor.getHTML()))) { + // This needs to use _lc for multiple languages + var dirty_prompt = Xinha._lc('You have unsaved changes in the editor', 'UnsavedChanges'); + event.returnValue = dirty_prompt; + return dirty_prompt; + } + } + + this.onBeforeSubmit = function() { + bypass = true; + } + + // Setup to be called when the plugin is loaded. + // We need a copy of the initial content for detection to work properly, so + // we will setup a callback for when the document is ready to store an + // unmodified copy of the content. + this.onGenerate = function() { + editor.whenDocReady(function () { + // Copy the original, unmodified contents to check for changes + defaultValue = defaultValue || (editor.getEditorContent ? editor.getEditorContent() : editor.outwardHtml(editor.getHTML())); + + // Set up the blocker + Xinha._addEvent(window, 'beforeunload', protector); + }); + } + +} + +// An object containing metadata for this plugin +UnsavedChanges._pluginInfo = { + name:'UnsavedChanges', + version:'3.7', + developer:'Douglas Mayle', + developer_url:'http://douglas.mayle.org', + c_owner:'Douglas Mayle', + sponsor:'The Open Planning Project', + sponsor_url:'http://topp.openplans.org', + license:'LGPL' +} Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/UnsavedChanges/lang/es.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/UnsavedChanges/lang/es.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/UnsavedChanges/lang/es.js 16 Jan 2009 09:05:49 -0000 1.1 @@ -0,0 +1,5 @@ +// I18N constants +// LANG: "es", ENCODING: UTF-8 +{ + "You have unsaved changes in the editor": "Usted no ha guardado sus modificaciones" +}; Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/UnsavedChanges/lang/fr.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/UnsavedChanges/lang/fr.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/UnsavedChanges/lang/fr.js 16 Jan 2009 09:05:49 -0000 1.1 @@ -0,0 +1,5 @@ +// I18N constants +// LANG: "fr", ENCODING: UTF-8 +{ + "You have unsaved changes in the editor": "Vous n'avez pas enregistré vos modifications" +}; Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/UnsavedChanges/lang/fr_ca.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/UnsavedChanges/lang/fr_ca.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/UnsavedChanges/lang/fr_ca.js 16 Jan 2009 09:05:49 -0000 1.1 @@ -0,0 +1,5 @@ +// I18N constants +// LANG: "fr_ca", ENCODING: UTF-8 +{ + "You have unsaved changes in the editor": "Tu n'as pas enregistré tes modifications" +}; Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/popups/popup.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/popups/popup.js,v diff -u -N -r1.9 -r1.10 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/popups/popup.js 13 May 2008 18:53:58 -0000 1.9 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/popups/popup.js 16 Jan 2009 09:05:49 -0000 1.10 @@ -1,108 +1,2 @@ -/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */ -/* This file is part of version 0.95 released Mon, 12 May 2008 17:33:15 +0200 */ -/* The URL of the most recent version of this file is http://svn.xinha.webfactional.com/trunk/popups/popup.js */ -if(typeof Xinha=="undefined"){ -Xinha=window.opener.Xinha; -} -HTMLArea=Xinha; -function getAbsolutePos(el){ -var r={x:el.offsetLeft,y:el.offsetTop}; -if(el.offsetParent){ -var _3=getAbsolutePos(el.offsetParent); -r.x+=_3.x; -r.y+=_3.y; -} -return r; -} -function comboSelectValue(c,_5){ -var _6=c.getElementsByTagName("option"); -for(var i=_6.length;--i>=0;){ -var op=_6[i]; -op.selected=(op.value==_5); -} -c.value=_5; -} -function __dlg_onclose(){ -opener.Dialog._return(null); -} -function __dlg_init(_9,_a){ -__xinha_dlg_init(_a); -} -function __xinha_dlg_init(_b){ -if(window.__dlg_init_done){ -return true; -} -if(window.opener._editor_skin){ -var _c=document.getElementsByTagName("head")[0]; -var _d=document.createElement("link"); -_d.type="text/css"; -_d.href=window.opener._editor_url+"skins/"+window.opener._editor_skin+"/skin.css"; -_d.rel="stylesheet"; -_c.appendChild(_d); -} -if(!window.dialogArguments&&opener.Dialog._arguments){ -window.dialogArguments=opener.Dialog._arguments; -} -var _e=Xinha.pageSize(window); -if(!_b){ -_b={width:_e.x,height:_e.y}; -} -window.resizeTo(_b.width,_b.height); -var _f=Xinha.viewportSize(window); -window.resizeBy(0,_e.y-_f.y); -if(_b.top&&_b.left){ -window.moveTo(_b.left,_b.top); -}else{ -if(!Xinha.is_ie){ -var x=opener.screenX+(opener.outerWidth-_b.width)/2; -var y=opener.screenY+(opener.outerHeight-_b.height)/2; -}else{ -var x=(self.screen.availWidth-_b.width)/2; -var y=(self.screen.availHeight-_b.height)/2; -} -window.moveTo(x,y); -} -Xinha.addDom0Event(document.body,"keypress",__dlg_close_on_esc); -window.__dlg_init_done=true; -} -function __dlg_translate(_12){ -var _13=["input","select","legend","span","option","td","th","button","div","label","a","img"]; -for(var _14=0;_14<_13.length;++_14){ -var _15=document.getElementsByTagName(_13[_14]); -for(var i=_15.length;--i>=0;){ -var _17=_15[i]; -if(_17.firstChild&&_17.firstChild.data){ -var txt=Xinha._lc(_17.firstChild.data,_12); -if(txt){ -_17.firstChild.data=txt; -} -} -if(_17.title){ -var txt=Xinha._lc(_17.title,_12); -if(txt){ -_17.title=txt; -} -} -if(_17.tagName.toLowerCase()=="input"&&(/^(button|submit|reset)$/i.test(_17.type))){ -var txt=Xinha._lc(_17.value,_12); -if(txt){ -_17.value=txt; -} -} -} -} -document.title=Xinha._lc(document.title,_12); -} -function __dlg_close(val){ -opener.Dialog._return(val); -window.close(); -} -function __dlg_close_on_esc(ev){ -ev||(ev=window.event); -if(ev.keyCode==27){ -__dlg_close(null); -return false; -} -return true; -} - +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +if(typeof Xinha=="undefined"){Xinha=window.opener.Xinha}HTMLArea=Xinha;function getAbsolutePos(b){var c={x:b.offsetLeft,y:b.offsetTop};if(b.offsetParent){var a=getAbsolutePos(b.offsetParent);c.x+=a.x;c.y+=a.y}return c}function comboSelectValue(f,d){var b=f.getElementsByTagName("option");for(var a=b.length;--a>=0;){var e=b[a];e.selected=(e.value==d)}f.value=d}function __dlg_onclose(){opener.Dialog._return(null)}function __dlg_init(b,a){__xinha_dlg_init(a)}function __xinha_dlg_init(b){if(window.__dlg_init_done){return true}if(window.opener._editor_skin){var c=document.getElementsByTagName("head")[0];var d=document.createElement("link");d.type="text/css";d.href=window.opener._editor_url+"skins/"+window.opener._editor_skin+"/skin.css";d.rel="stylesheet";c.appendChild(d)}if(!window.dialogArguments&&opener.Dialog._arguments){window.dialogArguments=opener.Dialog._arguments}var e=Xinha.pageSize(window);if(!b){b={width:e.x,height:e.y}}window.resizeTo(b.width,b.height);var f=Xinha.viewportSize(window);window.resizeBy(0,e.y-f.y);if(b.top&&b.left){window.moveTo(b.left,b.top)}else{if(!Xinha.is_ie){var a=opener.screenX+(opener.outerWidth-b.width)/2;var g=opener.screenY+(opener.outerHeight-b.height)/2}else{var a=(self.screen.availWidth-b.width)/2;var g=(self.screen.availHeight-b.height)/2}window.moveTo(a,g)}Xinha.addDom0Event(document.body,"keypress",__dlg_close_on_esc);window.__dlg_init_done=true}function __dlg_translate(e){var d=["input","select","legend","span","option","td","th","button","div","label","a","img"];for(var g=0;g=0;){var f=c[b];if(f.firstChild&&f.firstChild.data){var a=Xinha._lc(f.firstChild.data,e);if(a){f.firstChild.data=a}}if(f.title){var a=Xinha._lc(f.title,e);if(a){f.title=a}}if(f.tagName.toLowerCase()=="input"&&(/^(button|submit|reset)$/i.test(f.type))){var a=Xinha._lc(f.value,e);if(a){f.value=a}}}}document.title=Xinha._lc(document.title,e)}function __dlg_close(a){opener.Dialog._return(a);window.close()}function __dlg_close_on_esc(a){a||(a=window.event);if(a.keyCode==27){__dlg_close(null);return false}return true}; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/skins/blue-look/skin.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/skins/blue-look/skin.css,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/skins/blue-look/skin.css 11 Nov 2005 20:32:49 -0000 1.3 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/skins/blue-look/skin.css 16 Jan 2009 09:05:49 -0000 1.4 @@ -68,6 +68,13 @@ font: 11px helvetica,arial,sans-serif; } +.htmlarea .statusBar .statusBarWidgetContainer +{ + background-image: url(button-background.png); + background-repeat: repeat-x; + background-color: #f7f8fd; +} + .htmlarea .statusBar .statusBarTree { display:block; @@ -95,4 +102,4 @@ } .dialog button{ background-image: url(button-background.png); -} \ No newline at end of file +} Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/skins/blue-metallic/skin.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/skins/blue-metallic/skin.css,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/skins/blue-metallic/skin.css 4 Jun 2006 00:45:55 -0000 1.4 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/skins/blue-metallic/skin.css 16 Jan 2009 09:05:49 -0000 1.5 @@ -65,6 +65,13 @@ font: 11px helvetica,arial,sans-serif; } +.htmlarea .statusBar .statusBarWidgetContainer +{ + background-image: url(button-background.png); + background-repeat: repeat-x; + background-color: #f7f8fd; +} + .htmlarea .statusBar .statusBarTree { display:block; Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/skins/green-look/skin.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/skins/green-look/skin.css,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/skins/green-look/skin.css 11 Nov 2005 20:32:49 -0000 1.3 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/skins/green-look/skin.css 16 Jan 2009 09:05:49 -0000 1.4 @@ -60,6 +60,14 @@ color:ButtonText; font:11px helvetica,arial,sans-serif; } + +.htmlarea .statusBar .statusBarWidgetContainer +{ + background-image: url(button-background.gif); + background-repeat: repeat-x; + background-color: #f8fdf8; +} + .htmlarea .statusBar .statusBarTree { display:block; @@ -85,4 +93,4 @@ } .dialog button{ background-image: url(button-background.png); -} \ No newline at end of file +} Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/skins/inditreuse/skin.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/skins/inditreuse/skin.css,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/skins/inditreuse/skin.css 11 Nov 2005 20:32:49 -0000 1.3 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/skins/inditreuse/skin.css 16 Jan 2009 09:05:49 -0000 1.4 @@ -48,6 +48,14 @@ color:ButtonText; font:11px helvetica,arial,sans-serif; } + +.htmlarea .statusBar .statusBarWidgetContainer +{ + background-image: url(button-background.png); + background-repeat: repeat-x; + background-color: #889fc9; +} + .htmlarea .statusBar .statusBarTree { display:block; margin:3px; @@ -70,4 +78,4 @@ } .dialog button{ background-image: url(button-background.png); -} \ No newline at end of file +} Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/skins/silva/skin.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/skins/silva/skin.css,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/skins/silva/skin.css 13 May 2008 18:53:58 -0000 1.4 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/skins/silva/skin.css 16 Jan 2009 09:05:49 -0000 1.5 @@ -1,172 +1,2 @@ -/*--------------------------------*/ -/* silva skin for Xinha */ -/* */ -/* by Raimund Meyer (ray) */ -/* xinha@raimundmeyer.de */ -/* 2007-1-9 */ -/*--------------------------------*/ - -.htmlarea .toolbar, .htmlarea .toolbar .button -{ - background-color:transparent; -} -.htmlarea .toolbar -{ - padding:0; - background-image: url(toolbar.png); -} -.htmlarea .toolbarRow -{ - margin-top:0px; - margin-bottom:0px; - border:1px solid #F1F1F1; - padding:0px; - -moz-border-radius:15px; - margin:4px; - height:20px; -} -/* hack: IE6 does not know border-color: transparent;*/ -html > body .htmlarea .toolbarRow { - border-color: transparent; -} - -.htmlarea .toolbar .button -{ - width:18px; - height:18px; - padding:1px 2px 2px 1px ; - border: solid #F1F1F1; - border-width:1px; -} - -html > body .htmlarea .toolbar .button { - border-color: transparent; -} - -.buttonImageContainer -{ - position:relative; - left:1px; - top :1px; -} - -.htmlarea .toolbar a.button:hover -{ - border: solid 1px; - border-color: black; -} -.htmlarea .toolbar a.buttonDisabled:hover -{ - border: solid transparent 1px; -} - -.htmlarea .toolbar .button.buttonActive, -.htmlarea .toolbar .button.buttonPressed -{ - border: black dotted 1px; - padding:2px 1px 1px 2px; -} - -.htmlarea .toolbar .button.buttonPressed { - padding:1px 2px 2px 1px ; -} -.htmlarea .toolbar .separator { - margin: 3px; - border-left: 1px dotted black; - border-right: none; - width: 1px; - height: 11px; - padding: 0px; -} - -.htmlarea .statusBar { - border-color: #CCC white white #CCC; - padding: 0px; - height:20px; - background-image: url(statusbar.png); - background-repeat: repeat-x; - background-color: white; - color: grey; - font: 11px Arial,Helvetica,sans-serif; - vertical-align: middle; -} - -.htmlarea .statusBar .statusBarTree -{ - display:block; - margin: 3px; -} -.htmlarea .statusBar span { - display:none; -} -.htmlarea .statusBar .statusBarTree a -{ - padding: 0 5px; - color: green; - text-decoration:none; - letter-spacing:0.15em; - font-size:120%; - border: none; - padding: 2px 5px; -} -.htmlarea .statusBar .statusBarTree a:visited { color:green; } -.htmlarea .statusBar .statusBarTree a:hover { - background-color: transparent; - color: green; - border: none; - padding: 1px 5px; -} - -.dialog { - /* background: url(dialog.jpg) #f0f0f0 no-repeat; */ - background-color: #f0f0f0; - } -body.dialog { - padding-top:0; -} -.dialog, .dialog button, .dialog input, .dialog select, .dialog textarea, .dialog table,.dialog td,.dialog th, .panel { - font: 11px Arial,Helvetica,sans-serif !IMPORTANT; -} -.panel a { - color:#444; - border-bottom: 1px dotted #bbb; -} -.panel a:hover { - background-color: #eee; -} -.dialog .title,.dialog h1,.htmlarea .panel h1 { - background-image: url(toolbar.png); - background-repeat: repeat-x; - color:black; - font:Arial,Helvetica,sans-serif !IMPORTANT; - letter-spacing:0.2em; - font-size:13px; - font-weight:400; -} -.dialog .title { - -} - -.dialog button{ - background: url(statusbar.png) bottom repeat-x; - border:1px solid grey; - height:18px; - vertical-align: middle -} -/* separate definition for the sake of IE6*/ -.dialog input[type=button],.dialog input[type=submit]{ - background: url(statusbar.png) bottom repeat-x; - border:1px solid grey; - height:18px; - vertical-align: middle -} -.htmlarea textarea.xinha_textarea { - background:url(html.gif) bottom right no-repeat; - /*padding:5px; - border:2px dotted #bbb;*/ - font-family: "Lucida Console",Courier,monospace; - font-size: 10pt; -} -.htmlarea .dTreeNode { - color:black; -} \ No newline at end of file +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +.htmlarea .toolbar,.htmlarea .toolbar .button{background-color:transparent;}.htmlarea .toolbar{padding:0;background-image:url(toolbar.png);}.htmlarea .toolbarRow{margin-top:0;margin-bottom:0;border:1px solid #F1F1F1;padding:0;-moz-border-radius:15px;margin:4px;height:20px;}html>body .htmlarea .toolbarRow{border-color:transparent;}.htmlarea .toolbar .button{width:18px;height:18px;padding:1px 2px 2px 1px;border:solid #F1F1F1;border-width:1px;}html>body .htmlarea .toolbar .button{border-color:transparent;}.buttonImageContainer{position:relative;left:1px;top:1px;}.htmlarea .toolbar a.button:hover{border:solid 1px;border-color:black;}.htmlarea .toolbar a.buttonDisabled:hover{border:solid transparent 1px;}.htmlarea .toolbar .button.buttonActive,.htmlarea .toolbar .button.buttonPressed{border:black dotted 1px;padding:2px 1px 1px 2px;}.htmlarea .toolbar .button.buttonPressed{padding:1px 2px 2px 1px;}.htmlarea .toolbar .separator{margin:3px;border-left:1px dotted black;border-right:none;width:1px;height:11px;padding:0;}.htmlarea .statusBar{border-color:#CCC white white #CCC;padding:0;height:20px;background-image:url(statusbar.png);background-repeat:repeat-x;background-color:white;color:grey;font:11px Arial,Helvetica,sans-serif;vertical-align:middle;}.htmlarea .statusBar .statusBarWidgetContainer{background-image:url(statusbar.png);background-repeat:repeat-x;background-color:white;}.htmlarea .statusBar .statusBarTree{display:block;margin:3px;}.htmlarea .statusBar .statusBarTree a{padding:0 5px;color:green;text-decoration:none;letter-spacing:.15em;font-size:120%;border:none;padding:2px 5px;}.htmlarea .statusBar .statusBarTree a:visited{color:green;}.htmlarea .statusBar .statusBarTree a:hover{background-color:transparent;color:green;border:none;padding:1px 5px;}.dialog{background-color:#f0f0f0;}body.dialog{padding-top:0;}.dialog,.dialog button,.dialog input,.dialog select,.dialog textarea,.dialog table,.dialog td,.dialog th,.panel{font:11px Arial,Helvetica,sans-serif!IMPORTANT;}.panel a{color:#444;border-bottom:1px dotted #bbb;}.panel a:hover{background-color:#eee;}.dialog .title,.dialog h1,.htmlarea .panel h1{background-image:url(toolbar.png);background-repeat:repeat-x;color:black;font:Arial,Helvetica,sans-serif!IMPORTANT;letter-spacing:.2em;font-size:13px;font-weight:400;}.dialog button{background:url(statusbar.png) bottom repeat-x;border:1px solid grey;height:18px;vertical-align:middle;}.dialog input[type=button],.dialog input[type=submit]{background:url(statusbar.png) bottom repeat-x;border:1px solid grey;height:18px;vertical-align:middle;}.htmlarea textarea.xinha_textarea{background:url(html.gif) bottom right no-repeat;font-family:"Lucida Console",Courier,monospace;font-size:10pt;}.htmlarea .dTreeNode{color:black;} \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/skins/silva/skin.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/skins/silva/skin.xml,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/skins/silva/skin.xml 16 Jan 2009 09:05:49 -0000 1.1 @@ -0,0 +1,11 @@ + + + + + + + + + + Crystal + \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/skins/titan/skin.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/skins/titan/skin.css,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/skins/titan/skin.css 11 Nov 2005 20:32:49 -0000 1.3 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/skins/titan/skin.css 16 Jan 2009 09:05:49 -0000 1.4 @@ -48,6 +48,14 @@ color:ButtonText; font:11px helvetica,arial,sans-serif; } + +.htmlarea .statusBar .statusBarWidgetContainer +{ + background-image: url(button-background.png); + background-repeat: repeat-x; + background-color: #889fc9; +} + .htmlarea .statusBar .statusBarTree { display:block; margin:3px; @@ -70,4 +78,4 @@ } .dialog button{ background-image: url(button-background.png); -} \ No newline at end of file +} Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/skins/xp-blue/skin.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/skins/xp-blue/skin.css,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/skins/xp-blue/skin.css 11 Nov 2005 20:32:49 -0000 1.3 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/skins/xp-blue/skin.css 16 Jan 2009 09:05:49 -0000 1.4 @@ -51,6 +51,14 @@ color:ButtonText; font:11px helvetica,arial,sans-serif; } + +.htmlarea .statusBar .statusBarWidgetContainer +{ + background-image: url(button-background.png); + background-repeat: repeat-x; + background-color: #c3daf9; +} + .htmlarea .statusBar .statusBarTree { display:block; margin:3px; @@ -73,4 +81,4 @@ } .dialog button{ background-image: url(button-background.png); -} \ No newline at end of file +} Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/skins/xp-green/skin.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/skins/xp-green/skin.css,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/skins/xp-green/skin.css 11 Nov 2005 20:32:50 -0000 1.3 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/skins/xp-green/skin.css 16 Jan 2009 09:05:49 -0000 1.4 @@ -51,6 +51,14 @@ color:ButtonText; font:11px helvetica,arial,sans-serif; } + +.htmlarea .statusBar .statusBarWidgetContainer +{ + background-image: url(button-background.png); + background-repeat: repeat-x; + background-color: #f2f0e4; +} + .htmlarea .statusBar .statusBarTree { display:block; margin:3px; @@ -73,4 +81,4 @@ } .dialog button{ background-image: url(button-background.png); -} \ No newline at end of file +}