mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-06 05:19:32 +00:00
TinyMCE 2.0.8
git-svn-id: http://svn.automattic.com/wordpress/trunk@4506 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
84bef56f9d
commit
f336d22da7
@ -97,20 +97,20 @@ addLoadEvent( function() {
|
|||||||
h += "<form name='uploadoptions' id='uploadoptions' class='alignleft'>";
|
h += "<form name='uploadoptions' id='uploadoptions' class='alignleft'>";
|
||||||
h += "<table>";
|
h += "<table>";
|
||||||
if ( this.currentImage.thumb ) {
|
if ( this.currentImage.thumb ) {
|
||||||
h += "<tr><th style='padding-bottom:.5em'>Show:</th><td style='padding-bottom:.5em'>";
|
h += "<tr><th style='padding-bottom:.5em'><?php echo addslashes(__('Show:')); ?></th><td style='padding-bottom:.5em'>";
|
||||||
h += "<label for='display-thumb'><input type='radio' name='display' id='display-thumb' value='thumb' checked='checked' /> Thumbnail</label><br />";
|
h += "<label for='display-thumb'><input type='radio' name='display' id='display-thumb' value='thumb' checked='checked' /> <?php echo addslashes(__('Thumbnail')); ?></label><br />";
|
||||||
h += "<label for='display-full'><input type='radio' name='display' id='display-full' value='full' /> Full size</label>";
|
h += "<label for='display-full'><input type='radio' name='display' id='display-full' value='full' /> <?php echo addslashes(__('Full size')); ?></label>";
|
||||||
h += "</td></tr>";
|
h += "</td></tr>";
|
||||||
}
|
}
|
||||||
|
|
||||||
h += "<tr><th>Link to:</th><td>";
|
h += "<tr><th><?php echo addslashes(__('Link to:')); ?></th><td>";
|
||||||
h += "<label for='link-file'><input type='radio' name='link' id='link-file' value='file' checked='checked'/> File</label><br />";
|
h += "<label for='link-file'><input type='radio' name='link' id='link-file' value='file' checked='checked'/> <?php echo addslashes(__('File')); ?></label><br />";
|
||||||
h += "<label for='link-page'><input type='radio' name='link' id='link-page' value='page' /> Page</label><br />";
|
h += "<label for='link-page'><input type='radio' name='link' id='link-page' value='page' /> <?php echo addslashes(__('Page')); ?></label><br />";
|
||||||
h += "<label for='link-none'><input type='radio' name='link' id='link-none' value='none' /> None</label>";
|
h += "<label for='link-none'><input type='radio' name='link' id='link-none' value='none' /> <?php echo addslashes(__('None')); ?></label>";
|
||||||
h += "</td></tr>";
|
h += "</td></tr>";
|
||||||
|
|
||||||
h += "<tr><td colspan='2'><p class='submit'>";
|
h += "<tr><td colspan='2'><p class='submit'>";
|
||||||
h += "<input type='button' class='button' name='send' onclick='theFileList.sendToEditor(" + id + ")' value='Send to editor »' />";
|
h += "<input type='button' class='button' name='send' onclick='theFileList.sendToEditor(" + id + ")' value='<?php echo addslashes(__('Send to editor')); ?> »' />";
|
||||||
h += "</p></td></tr></table>";
|
h += "</p></td></tr></table>";
|
||||||
h += "</form>";
|
h += "</form>";
|
||||||
|
|
||||||
@ -243,7 +243,7 @@ addLoadEvent( function() {
|
|||||||
},
|
},
|
||||||
|
|
||||||
deleteFile: function(id) {
|
deleteFile: function(id) {
|
||||||
if ( confirm("Are you sure you want to delete the file '" + this.currentImage.title + "'?\nClick ok to delete or cancel to go back.") ) {
|
if ( confirm("<?php printf(addslashes(__("Are you sure you want to delete the file %s?\nClick ok to delete or cancel to go back.")), '" + this.currentImage.title + "'); ?>") {
|
||||||
$('action-value').value = 'delete';
|
$('action-value').value = 'delete';
|
||||||
$('upload-file').submit();
|
$('upload-file').submit();
|
||||||
return true;
|
return true;
|
||||||
|
@ -3,10 +3,18 @@ cache_javascript_headers();
|
|||||||
?>
|
?>
|
||||||
var autosaveLast = '';
|
var autosaveLast = '';
|
||||||
var autosavePeriodical;
|
var autosavePeriodical;
|
||||||
|
|
||||||
function autosave_start_timer() {
|
function autosave_start_timer() {
|
||||||
var form = $('post');
|
var form = $('post');
|
||||||
autosaveLast = form.post_title.value+form.content.value;
|
autosaveLast = form.post_title.value+form.content.value;
|
||||||
autosavePeriodical = new PeriodicalExecuter(autosave, <?php echo apply_filters('autosave_interval', '60'); ?>);
|
autosavePeriodical = new PeriodicalExecuter(autosave, <?php echo apply_filters('autosave_interval', '16'); ?>);
|
||||||
|
//Disable autosave after the form has been submitted
|
||||||
|
// if(form.addEventListener) {
|
||||||
|
// form.addEventListener("submit", function () { autosavePeriodical.currentlyExecuting = true; }, false);
|
||||||
|
// }
|
||||||
|
if(form.attachEvent) {
|
||||||
|
form.attachEvent("onsubmit", function () { autosavePeriodical.currentlyExecuting = true; });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
addLoadEvent(autosave_start_timer)
|
addLoadEvent(autosave_start_timer)
|
||||||
|
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
GNU LESSER GENERAL PUBLIC LICENSE
|
||||||
Version 2, June 1991
|
Version 2.1, February 1999
|
||||||
|
|
||||||
Copyright (C) 1991 Free Software Foundation, Inc.
|
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
of this license document, but changing it is not allowed.
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
[This is the first released version of the library GPL. It is
|
[This is the first released version of the Lesser GPL. It also counts
|
||||||
numbered 2 because it goes with version 2 of the ordinary GPL.]
|
as the successor of the GNU Library Public License, version 2, hence
|
||||||
|
the version number 2.1.]
|
||||||
|
|
||||||
Preamble
|
Preamble
|
||||||
|
|
||||||
@ -16,97 +17,109 @@ freedom to share and change it. By contrast, the GNU General Public
|
|||||||
Licenses are intended to guarantee your freedom to share and change
|
Licenses are intended to guarantee your freedom to share and change
|
||||||
free software--to make sure the software is free for all its users.
|
free software--to make sure the software is free for all its users.
|
||||||
|
|
||||||
This license, the Library General Public License, applies to some
|
This license, the Lesser General Public License, applies to some
|
||||||
specially designated Free Software Foundation software, and to any
|
specially designated software packages--typically libraries--of the
|
||||||
other libraries whose authors decide to use it. You can use it for
|
Free Software Foundation and other authors who decide to use it. You
|
||||||
your libraries, too.
|
can use it too, but we suggest you first think carefully about whether
|
||||||
|
this license or the ordinary General Public License is the better
|
||||||
|
strategy to use in any particular case, based on the explanations below.
|
||||||
|
|
||||||
When we speak of free software, we are referring to freedom, not
|
When we speak of free software, we are referring to freedom of use,
|
||||||
price. Our General Public Licenses are designed to make sure that you
|
not price. Our General Public Licenses are designed to make sure that
|
||||||
have the freedom to distribute copies of free software (and charge for
|
you have the freedom to distribute copies of free software (and charge
|
||||||
this service if you wish), that you receive source code or can get it
|
for this service if you wish); that you receive source code or can get
|
||||||
if you want it, that you can change the software or use pieces of it
|
it if you want it; that you can change the software and use pieces of
|
||||||
in new free programs; and that you know you can do these things.
|
it in new free programs; and that you are informed that you can do
|
||||||
|
these things.
|
||||||
|
|
||||||
To protect your rights, we need to make restrictions that forbid
|
To protect your rights, we need to make restrictions that forbid
|
||||||
anyone to deny you these rights or to ask you to surrender the rights.
|
distributors to deny you these rights or to ask you to surrender these
|
||||||
These restrictions translate to certain responsibilities for you if
|
rights. These restrictions translate to certain responsibilities for
|
||||||
you distribute copies of the library, or if you modify it.
|
you if you distribute copies of the library or if you modify it.
|
||||||
|
|
||||||
For example, if you distribute copies of the library, whether gratis
|
For example, if you distribute copies of the library, whether gratis
|
||||||
or for a fee, you must give the recipients all the rights that we gave
|
or for a fee, you must give the recipients all the rights that we gave
|
||||||
you. You must make sure that they, too, receive or can get the source
|
you. You must make sure that they, too, receive or can get the source
|
||||||
code. If you link a program with the library, you must provide
|
code. If you link other code with the library, you must provide
|
||||||
complete object files to the recipients so that they can relink them
|
complete object files to the recipients, so that they can relink them
|
||||||
with the library, after making changes to the library and recompiling
|
with the library after making changes to the library and recompiling
|
||||||
it. And you must show them these terms so they know their rights.
|
it. And you must show them these terms so they know their rights.
|
||||||
|
|
||||||
Our method of protecting your rights has two steps: (1) copyright
|
We protect your rights with a two-step method: (1) we copyright the
|
||||||
the library, and (2) offer you this license which gives you legal
|
library, and (2) we offer you this license, which gives you legal
|
||||||
permission to copy, distribute and/or modify the library.
|
permission to copy, distribute and/or modify the library.
|
||||||
|
|
||||||
Also, for each distributor's protection, we want to make certain
|
To protect each distributor, we want to make it very clear that
|
||||||
that everyone understands that there is no warranty for this free
|
there is no warranty for the free library. Also, if the library is
|
||||||
library. If the library is modified by someone else and passed on, we
|
modified by someone else and passed on, the recipients should know
|
||||||
want its recipients to know that what they have is not the original
|
that what they have is not the original version, so that the original
|
||||||
version, so that any problems introduced by others will not reflect on
|
author's reputation will not be affected by problems that might be
|
||||||
the original authors' reputations.
|
introduced by others.
|
||||||
.
|
|
||||||
Finally, any free program is threatened constantly by software
|
|
||||||
patents. We wish to avoid the danger that companies distributing free
|
|
||||||
software will individually obtain patent licenses, thus in effect
|
|
||||||
transforming the program into proprietary software. To prevent this,
|
|
||||||
we have made it clear that any patent must be licensed for everyone's
|
|
||||||
free use or not licensed at all.
|
|
||||||
|
|
||||||
Most GNU software, including some libraries, is covered by the ordinary
|
Finally, software patents pose a constant threat to the existence of
|
||||||
GNU General Public License, which was designed for utility programs. This
|
any free program. We wish to make sure that a company cannot
|
||||||
license, the GNU Library General Public License, applies to certain
|
effectively restrict the users of a free program by obtaining a
|
||||||
designated libraries. This license is quite different from the ordinary
|
restrictive license from a patent holder. Therefore, we insist that
|
||||||
one; be sure to read it in full, and don't assume that anything in it is
|
any patent license obtained for a version of the library must be
|
||||||
the same as in the ordinary license.
|
consistent with the full freedom of use specified in this license.
|
||||||
|
|
||||||
The reason we have a separate public license for some libraries is that
|
Most GNU software, including some libraries, is covered by the
|
||||||
they blur the distinction we usually make between modifying or adding to a
|
ordinary GNU General Public License. This license, the GNU Lesser
|
||||||
program and simply using it. Linking a program with a library, without
|
General Public License, applies to certain designated libraries, and
|
||||||
changing the library, is in some sense simply using the library, and is
|
is quite different from the ordinary General Public License. We use
|
||||||
analogous to running a utility program or application program. However, in
|
this license for certain libraries in order to permit linking those
|
||||||
a textual and legal sense, the linked executable is a combined work, a
|
libraries into non-free programs.
|
||||||
derivative of the original library, and the ordinary General Public License
|
|
||||||
treats it as such.
|
|
||||||
|
|
||||||
Because of this blurred distinction, using the ordinary General
|
When a program is linked with a library, whether statically or using
|
||||||
Public License for libraries did not effectively promote software
|
a shared library, the combination of the two is legally speaking a
|
||||||
sharing, because most developers did not use the libraries. We
|
combined work, a derivative of the original library. The ordinary
|
||||||
concluded that weaker conditions might promote sharing better.
|
General Public License therefore permits such linking only if the
|
||||||
|
entire combination fits its criteria of freedom. The Lesser General
|
||||||
|
Public License permits more lax criteria for linking other code with
|
||||||
|
the library.
|
||||||
|
|
||||||
However, unrestricted linking of non-free programs would deprive the
|
We call this license the "Lesser" General Public License because it
|
||||||
users of those programs of all benefit from the free status of the
|
does Less to protect the user's freedom than the ordinary General
|
||||||
libraries themselves. This Library General Public License is intended to
|
Public License. It also provides other free software developers Less
|
||||||
permit developers of non-free programs to use free libraries, while
|
of an advantage over competing non-free programs. These disadvantages
|
||||||
preserving your freedom as a user of such programs to change the free
|
are the reason we use the ordinary General Public License for many
|
||||||
libraries that are incorporated in them. (We have not seen how to achieve
|
libraries. However, the Lesser license provides advantages in certain
|
||||||
this as regards changes in header files, but we have achieved it as regards
|
special circumstances.
|
||||||
changes in the actual functions of the Library.) The hope is that this
|
|
||||||
will lead to faster development of free libraries.
|
For example, on rare occasions, there may be a special need to
|
||||||
|
encourage the widest possible use of a certain library, so that it becomes
|
||||||
|
a de-facto standard. To achieve this, non-free programs must be
|
||||||
|
allowed to use the library. A more frequent case is that a free
|
||||||
|
library does the same job as widely used non-free libraries. In this
|
||||||
|
case, there is little to gain by limiting the free library to free
|
||||||
|
software only, so we use the Lesser General Public License.
|
||||||
|
|
||||||
|
In other cases, permission to use a particular library in non-free
|
||||||
|
programs enables a greater number of people to use a large body of
|
||||||
|
free software. For example, permission to use the GNU C Library in
|
||||||
|
non-free programs enables many more people to use the whole GNU
|
||||||
|
operating system, as well as its variant, the GNU/Linux operating
|
||||||
|
system.
|
||||||
|
|
||||||
|
Although the Lesser General Public License is Less protective of the
|
||||||
|
users' freedom, it does ensure that the user of a program that is
|
||||||
|
linked with the Library has the freedom and the wherewithal to run
|
||||||
|
that program using a modified version of the Library.
|
||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
The precise terms and conditions for copying, distribution and
|
||||||
modification follow. Pay close attention to the difference between a
|
modification follow. Pay close attention to the difference between a
|
||||||
"work based on the library" and a "work that uses the library". The
|
"work based on the library" and a "work that uses the library". The
|
||||||
former contains code derived from the library, while the latter only
|
former contains code derived from the library, whereas the latter must
|
||||||
works together with the library.
|
be combined with the library in order to run.
|
||||||
|
|
||||||
Note that it is possible for a library to be covered by the ordinary
|
GNU LESSER GENERAL PUBLIC LICENSE
|
||||||
General Public License rather than by this special one.
|
|
||||||
.
|
|
||||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
|
||||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
0. This License Agreement applies to any software library which
|
0. This License Agreement applies to any software library or other
|
||||||
contains a notice placed by the copyright holder or other authorized
|
program which contains a notice placed by the copyright holder or
|
||||||
party saying it may be distributed under the terms of this Library
|
other authorized party saying it may be distributed under the terms of
|
||||||
General Public License (also called "this License"). Each licensee is
|
this Lesser General Public License (also called "this License").
|
||||||
addressed as "you".
|
Each licensee is addressed as "you".
|
||||||
|
|
||||||
A "library" means a collection of software functions and/or data
|
A "library" means a collection of software functions and/or data
|
||||||
prepared so as to be conveniently linked with application programs
|
prepared so as to be conveniently linked with application programs
|
||||||
@ -145,7 +158,7 @@ Library.
|
|||||||
You may charge a fee for the physical act of transferring a copy,
|
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
|
and you may at your option offer warranty protection in exchange for a
|
||||||
fee.
|
fee.
|
||||||
.
|
|
||||||
2. You may modify your copy or copies of the Library or any portion
|
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
|
of it, thus forming a work based on the Library, and copy and
|
||||||
distribute such modifications or work under the terms of Section 1
|
distribute such modifications or work under the terms of Section 1
|
||||||
@ -203,7 +216,7 @@ 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
|
ordinary GNU General Public License has appeared, then you can specify
|
||||||
that version instead if you wish.) Do not make any other change in
|
that version instead if you wish.) Do not make any other change in
|
||||||
these notices.
|
these notices.
|
||||||
.
|
|
||||||
Once this change is made in a given copy, it is irreversible for
|
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
|
that copy, so the ordinary GNU General Public License applies to all
|
||||||
subsequent copies and derivative works made from that copy.
|
subsequent copies and derivative works made from that copy.
|
||||||
@ -254,8 +267,8 @@ Library will still fall under Section 6.)
|
|||||||
distribute the object code for the work under the terms of Section 6.
|
distribute the object code for the work under the terms of Section 6.
|
||||||
Any executables containing that work also fall under Section 6,
|
Any executables containing that work also fall under Section 6,
|
||||||
whether or not they are linked directly with the Library itself.
|
whether or not they are linked directly with the Library itself.
|
||||||
.
|
|
||||||
6. As an exception to the Sections above, you may also compile or
|
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
|
link a "work that uses the Library" with the Library to produce a
|
||||||
work containing portions of the Library, and distribute that work
|
work containing portions of the Library, and distribute that work
|
||||||
under terms of your choice, provided that the terms permit
|
under terms of your choice, provided that the terms permit
|
||||||
@ -282,23 +295,31 @@ of these things:
|
|||||||
Library will not necessarily be able to recompile the application
|
Library will not necessarily be able to recompile the application
|
||||||
to use the modified definitions.)
|
to use the modified definitions.)
|
||||||
|
|
||||||
b) Accompany the work with a written offer, valid for at
|
b) 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.
|
||||||
|
|
||||||
|
c) Accompany the work with a written offer, valid for at
|
||||||
least three years, to give the same user the materials
|
least three years, to give the same user the materials
|
||||||
specified in Subsection 6a, above, for a charge no more
|
specified in Subsection 6a, above, for a charge no more
|
||||||
than the cost of performing this distribution.
|
than the cost of performing this distribution.
|
||||||
|
|
||||||
c) If distribution of the work is made by offering access to copy
|
d) If distribution of the work is made by offering access to copy
|
||||||
from a designated place, offer equivalent access to copy the above
|
from a designated place, offer equivalent access to copy the above
|
||||||
specified materials from the same place.
|
specified materials from the same place.
|
||||||
|
|
||||||
d) Verify that the user has already received a copy of these
|
e) Verify that the user has already received a copy of these
|
||||||
materials or that you have already sent this user a copy.
|
materials or that you have already sent this user a copy.
|
||||||
|
|
||||||
For an executable, the required form of the "work that uses the
|
For an executable, the required form of the "work that uses the
|
||||||
Library" must include any data and utility programs needed for
|
Library" must include any data and utility programs needed for
|
||||||
reproducing the executable from it. However, as a special exception,
|
reproducing the executable from it. However, as a special exception,
|
||||||
the source code distributed need not include anything that is normally
|
the materials to be distributed need not include anything that is
|
||||||
distributed (in either source or binary form) with the major
|
normally distributed (in either source or binary form) with the major
|
||||||
components (compiler, kernel, and so on) of the operating system on
|
components (compiler, kernel, and so on) of the operating system on
|
||||||
which the executable runs, unless that component itself accompanies
|
which the executable runs, unless that component itself accompanies
|
||||||
the executable.
|
the executable.
|
||||||
@ -308,7 +329,7 @@ restrictions of other proprietary libraries that do not normally
|
|||||||
accompany the operating system. Such a contradiction means you cannot
|
accompany the operating system. Such a contradiction means you cannot
|
||||||
use both them and the Library together in an executable that you
|
use both them and the Library together in an executable that you
|
||||||
distribute.
|
distribute.
|
||||||
.
|
|
||||||
7. You may place library facilities that are a work based on the
|
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
|
Library side-by-side in a single library together with other library
|
||||||
facilities not covered by this License, and distribute such a combined
|
facilities not covered by this License, and distribute such a combined
|
||||||
@ -347,9 +368,9 @@ Library), the recipient automatically receives a license from the
|
|||||||
original licensor to copy, distribute, link with or modify the Library
|
original licensor to copy, distribute, link with or modify the Library
|
||||||
subject to these terms and conditions. You may not impose any further
|
subject to these terms and conditions. You may not impose any further
|
||||||
restrictions on the recipients' exercise of the rights granted herein.
|
restrictions on the recipients' exercise of the rights granted herein.
|
||||||
You are not responsible for enforcing compliance by third parties to
|
You are not responsible for enforcing compliance by third parties with
|
||||||
this License.
|
this License.
|
||||||
.
|
|
||||||
11. If, as a consequence of a court judgment or allegation of patent
|
11. If, as a consequence of a court judgment or allegation of patent
|
||||||
infringement or for any other reason (not limited to patent issues),
|
infringement or for any other reason (not limited to patent issues),
|
||||||
conditions are imposed on you (whether by court order, agreement or
|
conditions are imposed on you (whether by court order, agreement or
|
||||||
@ -390,7 +411,7 @@ excluded. In such case, this License incorporates the limitation as if
|
|||||||
written in the body of this License.
|
written in the body of this License.
|
||||||
|
|
||||||
13. The Free Software Foundation may publish revised and/or new
|
13. The Free Software Foundation may publish revised and/or new
|
||||||
versions of the Library General Public License from time to time.
|
versions of the Lesser General Public License from time to time.
|
||||||
Such new versions will be similar in spirit to the present version,
|
Such new versions will be similar in spirit to the present version,
|
||||||
but may differ in detail to address new problems or concerns.
|
but may differ in detail to address new problems or concerns.
|
||||||
|
|
||||||
@ -401,7 +422,7 @@ conditions either of that version or of any later version published by
|
|||||||
the Free Software Foundation. If the Library does not specify a
|
the Free Software Foundation. If the Library does not specify a
|
||||||
license version number, you may choose any version ever published by
|
license version number, you may choose any version ever published by
|
||||||
the Free Software Foundation.
|
the Free Software Foundation.
|
||||||
.
|
|
||||||
14. If you wish to incorporate parts of the Library into other free
|
14. If you wish to incorporate parts of the Library into other free
|
||||||
programs whose distribution conditions are incompatible with these,
|
programs whose distribution conditions are incompatible with these,
|
||||||
write to the author to ask for permission. For software which is
|
write to the author to ask for permission. For software which is
|
||||||
@ -435,3 +456,49 @@ SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
|||||||
DAMAGES.
|
DAMAGES.
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Libraries
|
||||||
|
|
||||||
|
If you develop a new library, and you want it to be of the greatest
|
||||||
|
possible use to the public, we recommend making it free software that
|
||||||
|
everyone can redistribute and change. You can do so by permitting
|
||||||
|
redistribution under these terms (or, alternatively, under the terms of the
|
||||||
|
ordinary General Public License).
|
||||||
|
|
||||||
|
To apply these terms, attach the following notices to the library. It is
|
||||||
|
safest to attach them to the start of each source file to most effectively
|
||||||
|
convey the exclusion of warranty; and each file should have at least the
|
||||||
|
"copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the library's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or your
|
||||||
|
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||||
|
necessary. Here is a sample; alter the names:
|
||||||
|
|
||||||
|
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||||
|
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||||
|
|
||||||
|
<signature of Ty Coon>, 1 April 1990
|
||||||
|
Ty Coon, President of Vice
|
||||||
|
|
||||||
|
That's all there is to it!
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,20 +1,18 @@
|
|||||||
/**
|
/**
|
||||||
* $RCSfile: editor_plugin_src.js,v $
|
* $Id: editor_plugin_src.js 126 2006-10-22 16:19:55Z spocke $
|
||||||
* $Revision: 1.11 $
|
|
||||||
* $Date: 2006/03/22 12:21:21 $
|
|
||||||
*
|
*
|
||||||
* @author Moxiecode
|
* @author Moxiecode
|
||||||
* @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
|
* @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Import plugin specific language pack */
|
/* Import plugin specific language pack */
|
||||||
tinyMCE.importPluginLanguagePack('autosave', 'en,tr,sv,cs,he,nb,hu,de,da,ru,ru_KOI8-R,ru_UTF-8,nn,fi,cy,es,is,pl,pt_br');
|
tinyMCE.importPluginLanguagePack('autosave');
|
||||||
|
|
||||||
var TinyMCE_AutoSavePlugin = {
|
var TinyMCE_AutoSavePlugin = {
|
||||||
getInfo : function() {
|
getInfo : function() {
|
||||||
return {
|
return {
|
||||||
longname : 'Auto save',
|
longname : 'Auto save',
|
||||||
author : 'Moxiecode Systems',
|
author : 'Moxiecode Systems AB',
|
||||||
authorurl : 'http://tinymce.moxiecode.com',
|
authorurl : 'http://tinymce.moxiecode.com',
|
||||||
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_autosave.html',
|
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_autosave.html',
|
||||||
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
|
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
|
||||||
|
@ -1,20 +1,18 @@
|
|||||||
/**
|
/**
|
||||||
* $RCSfile: editor_plugin_src.js,v $
|
* $Id: editor_plugin_src.js 126 2006-10-22 16:19:55Z spocke $
|
||||||
* $Revision: 1.16 $
|
|
||||||
* $Date: 2006/02/10 21:34:28 $
|
|
||||||
*
|
*
|
||||||
* @author Moxiecode
|
* @author Moxiecode
|
||||||
* @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
|
* @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Import plugin specific language pack */
|
/* Import plugin specific language pack */
|
||||||
tinyMCE.importPluginLanguagePack('directionality', 'en,tr,sv,fr_ca,zh_cn,cs,da,he,nb,de,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,pl,nl,fr,pt_br');
|
tinyMCE.importPluginLanguagePack('directionality');
|
||||||
|
|
||||||
var TinyMCE_DirectionalityPlugin = {
|
var TinyMCE_DirectionalityPlugin = {
|
||||||
getInfo : function() {
|
getInfo : function() {
|
||||||
return {
|
return {
|
||||||
longname : 'Directionality',
|
longname : 'Directionality',
|
||||||
author : 'Moxiecode Systems',
|
author : 'Moxiecode Systems AB',
|
||||||
authorurl : 'http://tinymce.moxiecode.com',
|
authorurl : 'http://tinymce.moxiecode.com',
|
||||||
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_directionality.html',
|
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_directionality.html',
|
||||||
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
|
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* $RCSfile: editor_plugin_src.js,v $
|
* $Id: editor_plugin_src.js 126 2006-10-22 16:19:55Z spocke $
|
||||||
* $Revision: 1.8 $
|
|
||||||
* $Date: 2006/02/06 20:02:38 $
|
|
||||||
*
|
*
|
||||||
* Moxiecode DHTML Windows script.
|
* Moxiecode DHTML Windows script.
|
||||||
*
|
*
|
||||||
@ -15,7 +13,7 @@ var TinyMCE_InlinePopupsPlugin = {
|
|||||||
getInfo : function() {
|
getInfo : function() {
|
||||||
return {
|
return {
|
||||||
longname : 'Inline Popups',
|
longname : 'Inline Popups',
|
||||||
author : 'Moxiecode Systems',
|
author : 'Moxiecode Systems AB',
|
||||||
authorurl : 'http://tinymce.moxiecode.com',
|
authorurl : 'http://tinymce.moxiecode.com',
|
||||||
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_inlinepopups.html',
|
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_inlinepopups.html',
|
||||||
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
|
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
|
||||||
@ -436,7 +434,7 @@ TinyMCE_Windows.prototype.onLoad = function(name) {
|
|||||||
|
|
||||||
TinyMCE_Windows.prototype.createFloatingIFrame = function(id_prefix, left, top, width, height, html) {
|
TinyMCE_Windows.prototype.createFloatingIFrame = function(id_prefix, left, top, width, height, html) {
|
||||||
var iframe = document.createElement("iframe");
|
var iframe = document.createElement("iframe");
|
||||||
var div = document.createElement("div");
|
var div = document.createElement("div"), doc;
|
||||||
|
|
||||||
width = parseInt(width);
|
width = parseInt(width);
|
||||||
height = parseInt(height)+1;
|
height = parseInt(height)+1;
|
||||||
@ -488,7 +486,7 @@ TinyMCE_Windows.prototype.createFloatingIFrame = function(id_prefix, left, top,
|
|||||||
if (this.isSafari) {
|
if (this.isSafari) {
|
||||||
// Give Safari some time to setup
|
// Give Safari some time to setup
|
||||||
window.setTimeout(function() {
|
window.setTimeout(function() {
|
||||||
doc = window.frames[id_prefix + '_iframe'].document;
|
var doc = window.frames[id_prefix + '_iframe'].document;
|
||||||
doc.open();
|
doc.open();
|
||||||
doc.write(html);
|
doc.write(html);
|
||||||
doc.close();
|
doc.close();
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* $RCSfile: mcwindows.js,v $
|
* $Id: mcwindows.js 18 2006-06-29 14:11:23Z spocke $
|
||||||
* $Revision: 1.2 $
|
|
||||||
* $Date: 2005/10/18 13:59:43 $
|
|
||||||
*
|
*
|
||||||
* Moxiecode DHTML Windows script.
|
* Moxiecode DHTML Windows script.
|
||||||
*
|
*
|
||||||
|
File diff suppressed because one or more lines are too long
@ -15,6 +15,10 @@ function saveContent() {
|
|||||||
function onLoadInit() {
|
function onLoadInit() {
|
||||||
tinyMCEPopup.resizeToInnerSize();
|
tinyMCEPopup.resizeToInnerSize();
|
||||||
|
|
||||||
|
// Remove Gecko spellchecking
|
||||||
|
if (tinyMCE.isGecko)
|
||||||
|
document.body.spellcheck = tinyMCE.getParam("gecko_spellcheck");
|
||||||
|
|
||||||
resizeInputs();
|
resizeInputs();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,7 +25,13 @@ var wHeight=0, wWidth=0, owHeight=0, owWidth=0;
|
|||||||
|
|
||||||
function initIframe(doc) {
|
function initIframe(doc) {
|
||||||
var dir = tinyMCE.selectedInstance.settings['directionality'];
|
var dir = tinyMCE.selectedInstance.settings['directionality'];
|
||||||
|
|
||||||
doc.body.dir = dir;
|
doc.body.dir = dir;
|
||||||
|
|
||||||
|
// Remove Gecko spellchecking
|
||||||
|
if (tinyMCE.isGecko)
|
||||||
|
doc.body.spellcheck = tinyMCE.getParam("gecko_spellcheck");
|
||||||
|
|
||||||
resizeInputs();
|
resizeInputs();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<script language="javascript" type="text/javascript" src="jscripts/charmap.js"></script>
|
<script language="javascript" type="text/javascript" src="jscripts/charmap.js"></script>
|
||||||
<base target="_self" />
|
<base target="_self" />
|
||||||
</head>
|
</head>
|
||||||
<body onload="tinyMCEPopup.executeOnLoad('init();');document.body.style.display='';document.getElementById('insert').focus();" style="display: none">
|
<body onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
|
||||||
<table align="center" border="0" cellspacing="0" cellpadding="2">
|
<table align="center" border="0" cellspacing="0" cellpadding="2">
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" class="title">{$lang_theme_charmap_title}</td>
|
<td colspan="2" class="title">{$lang_theme_charmap_title}</td>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<script language="javascript" type="text/javascript" src="jscripts/color_picker.js"></script>
|
<script language="javascript" type="text/javascript" src="jscripts/color_picker.js"></script>
|
||||||
<base target="_self" />
|
<base target="_self" />
|
||||||
</head>
|
</head>
|
||||||
<body onload="tinyMCEPopup.executeOnLoad('init();');document.body.style.display='';document.getElementById('insert').focus();" style="margin: 3px; display: none">
|
<body onload="tinyMCEPopup.executeOnLoad('init();');" style="margin: 3px; display: none">
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<script language="javascript" type="text/javascript">renderColorMap();</script>
|
<script language="javascript" type="text/javascript">renderColorMap();</script>
|
||||||
</div>
|
</div>
|
||||||
|
@ -14,6 +14,11 @@ body {
|
|||||||
border: 1px dashed #BBBBBB !important;
|
border: 1px dashed #BBBBBB !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div.mceVisualAid {
|
||||||
|
background-image:url('../images/spacer.gif');
|
||||||
|
visibility: visible !important;
|
||||||
|
}
|
||||||
|
|
||||||
.mceItemAnchor {
|
.mceItemAnchor {
|
||||||
width: 12px;
|
width: 12px;
|
||||||
line-height: 6px;
|
line-height: 6px;
|
||||||
|
@ -312,6 +312,10 @@ h3 {
|
|||||||
height: 190px;
|
height: 190px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
label.msg { display: none; }
|
||||||
|
label.invalid { color: #EE0000; display: inline; }
|
||||||
|
input.invalid { border: 1px solid #EE0000; }
|
||||||
|
|
||||||
/* Disables the advanced tab in the table plugin. */
|
/* Disables the advanced tab in the table plugin. */
|
||||||
/*
|
/*
|
||||||
#table #advanced_tab {
|
#table #advanced_tab {
|
||||||
|
@ -1,348 +1,97 @@
|
|||||||
/* This file contains the CSS data for the editor UI of TinyMCE instances */
|
/* This file contains the CSS data for the editor UI of TinyMCE instances */
|
||||||
|
|
||||||
.mceToolbarTop a, .mceToolbarTop a:visited, .mceToolbarTop a:hover, .mceToolbarBottom a, .mceToolbarBottom a:visited, .mceToolbarBottom a:hover {
|
.mceToolbarTop a, .mceToolbarTop a:visited, .mceToolbarTop a:hover, .mceToolbarBottom a, .mceToolbarBottom a:visited, .mceToolbarBottom a:hover {border: 0; margin: 0; padding: 0; background: transparent;}
|
||||||
border: 0; margin: 0; padding: 0; background: transparent;
|
.mceSeparatorLine {border: 0; padding: 0; margin-left: 4px; margin-right: 2px;}
|
||||||
}
|
.mceSelectList {font-family: 'MS Sans Serif', sans-serif, Verdana, Arial; font-size: 7pt !important; font-weight: normal; margin-top: 3px; padding: 0; display: inline; vertical-align: top; background-color: #F0F0EE;}
|
||||||
|
.mceLabel, .mceLabelDisabled {font-family: 'MS Sans Serif', sans-serif, Verdana, Arial; font-size: 9pt;}
|
||||||
.mceSeparatorLine {
|
.mceLabel {color: #000000;}
|
||||||
border: 0;
|
.mceLabelDisabled {cursor: text; color: #999999;}
|
||||||
padding: 0;
|
.mceEditor {background: #F0F0EE; border: 1px solid #cccccc; padding: 0; margin: 0;}
|
||||||
margin-left: 4px;
|
.mceEditorArea { font-family: 'MS Sans Serif', sans-serif, Verdana, Arial; background: #FFFFFF; padding: 0; margin: 0; }
|
||||||
margin-right: 2px;
|
.mceToolbarTop, .mceToolbarBottom {background: #F0F0EE; line-height: 1px; font-size: 1px;}
|
||||||
}
|
.mceToolbarTop {border-bottom: 1px solid #cccccc; padding-bottom: 1px;}
|
||||||
|
.mceToolbarBottom {border-top: 1px solid #cccccc;}
|
||||||
.mceSelectList {
|
.mceToolbarContainer {position: relative; left: 0; top: 0; display: block;}
|
||||||
font-family: 'MS Sans Serif', sans-serif, Verdana, Arial;
|
.mceStatusbarTop, .mceStatusbarBottom, .mceStatusbar {height: 20px;}
|
||||||
font-size: 7pt !important;
|
.mceStatusbarTop .mceStatusbarPathText, .mceStatusbarBottom .mceStatusbarPathText, .mceStatusbar .mceStatusbarPathText {font-family: 'MS Sans Serif', sans-serif, Verdana, Arial; font-size: 9pt; padding: 2px; line-height: 16px; overflow: visible;}
|
||||||
font-weight: normal;
|
.mceStatusbarTop {border-bottom: 1px solid #cccccc;}
|
||||||
margin-top: 3px;
|
.mceStatusbarBottom {border-top: 1px solid #cccccc;}
|
||||||
padding: 0;
|
.mceStatusbar {border-bottom: 1px solid #cccccc;}
|
||||||
display: inline;
|
.mcePathItem, .mcePathItem:link, .mcePathItem:visited, .mcePathItem:hover {text-decoration: none; font-family: 'MS Sans Serif', sans-serif, Verdana, Arial; font-size: 9pt; color: #000000;}
|
||||||
vertical-align: top;
|
.mcePathItem:hover {text-decoration: underline;}
|
||||||
background-color: #F0F0EE;
|
.mceStatusbarPathText {float: left;}
|
||||||
}
|
.mceStatusbarResize {float: right; background-image: url('../images/statusbar_resize.gif'); background-repeat: no-repeat; width: 11px; height: 20px; cursor: se-resize;}
|
||||||
|
.mceResizeBox {width: 10px; height: 10px; display: none; border: 1px dotted gray; margin: 0; padding: 0;}
|
||||||
.mceLabel, .mceLabelDisabled {
|
.mceEditorIframe {border: 0;}
|
||||||
font-family: 'MS Sans Serif', sans-serif, Verdana, Arial;
|
|
||||||
font-size: 9pt;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mceLabel {
|
|
||||||
color: #000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mceLabelDisabled {
|
|
||||||
cursor: text;
|
|
||||||
color: #999999;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mceEditor {
|
|
||||||
background: #F0F0EE;
|
|
||||||
border: 1px solid #cccccc;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mceEditorArea {
|
|
||||||
font-family: 'MS Sans Serif', sans-serif, Verdana, Arial;
|
|
||||||
background: #FFFFFF;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mceToolbarTop, .mceToolbarBottom {
|
|
||||||
background: #F0F0EE;
|
|
||||||
line-height: 1px;
|
|
||||||
font-size: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mceToolbarTop {
|
|
||||||
border-bottom: 1px solid #cccccc;
|
|
||||||
padding-bottom: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mceToolbarBottom {
|
|
||||||
border-top: 1px solid #cccccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mceStatusbarTop, .mceStatusbarBottom, .mceStatusbar {
|
|
||||||
height: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mceStatusbarTop .mceStatusbarPathText, .mceStatusbarBottom .mceStatusbarPathText, .mceStatusbar .mceStatusbarPathText {
|
|
||||||
font-family: 'MS Sans Serif', sans-serif, Verdana, Arial;
|
|
||||||
font-size: 9pt;
|
|
||||||
padding: 2px;
|
|
||||||
line-height: 16px;
|
|
||||||
overflow: visible;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mceStatusbarTop {
|
|
||||||
border-bottom: 1px solid #cccccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mceStatusbarBottom {
|
|
||||||
border-top: 1px solid #cccccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mceStatusbar {
|
|
||||||
border-bottom: 1px solid #cccccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mcePathItem, .mcePathItem:link, .mcePathItem:visited, .mcePathItem:hover {
|
|
||||||
text-decoration: none;
|
|
||||||
font-family: 'MS Sans Serif', sans-serif, Verdana, Arial;
|
|
||||||
font-size: 9pt;
|
|
||||||
color: #000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mcePathItem:hover {
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mceStatusbarPathText {
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mceStatusbarResize {
|
|
||||||
float: right;
|
|
||||||
background-image: url('../images/statusbar_resize.gif');
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
width: 11px;
|
|
||||||
height: 20px;
|
|
||||||
cursor: se-resize;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mceResizeBox {
|
|
||||||
width: 10px;
|
|
||||||
height: 10px;
|
|
||||||
display: none;
|
|
||||||
border: 1px dotted gray;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Button CSS rules */
|
/* Button CSS rules */
|
||||||
|
|
||||||
a.mceButtonDisabled img, a.mceButtonNormal img, a.mceButtonSelected img {
|
a.mceButtonDisabled img, a.mceButtonNormal img, a.mceButtonSelected img {width: 20px; height: 20px; cursor: default; margin-top: 1px; margin-left: 1px;}
|
||||||
width: 20px;
|
a.mceButtonDisabled img {border: 0 !important;}
|
||||||
height: 20px;
|
a.mceButtonNormal img, a.mceButtonSelected img {border: 1px solid #F0F0EE !important;}
|
||||||
cursor: default;
|
a.mceButtonSelected img {border: 1px solid #6779AA !important; background-color: #D4D5D8;}
|
||||||
margin-top: 1px;
|
a.mceButtonNormal img:hover, a.mceButtonSelected img:hover {border: 1px solid #0A246A !important; cursor: default; background-color: #B6BDD2;}
|
||||||
margin-left: 1px;
|
a.mceButtonDisabled img {-moz-opacity:0.3; opacity: 0.3; border: 1px solid #F0F0EE !important; cursor: default;}
|
||||||
}
|
a.mceTiledButton img {background-image: url('../images/buttons.gif'); background-repeat: no-repeat;}
|
||||||
|
|
||||||
a.mceButtonDisabled img {
|
|
||||||
border: 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
a.mceButtonNormal img, a.mceButtonSelected img {
|
|
||||||
border: 1px solid #F0F0EE !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
a.mceButtonSelected img {
|
|
||||||
border: 1px solid #6779AA !important;
|
|
||||||
background-color: #D4D5D8;
|
|
||||||
}
|
|
||||||
|
|
||||||
a.mceButtonNormal img:hover, a.mceButtonSelected img:hover {
|
|
||||||
border: 1px solid #0A246A !important;
|
|
||||||
cursor: default;
|
|
||||||
background-color: #B6BDD2;
|
|
||||||
}
|
|
||||||
|
|
||||||
a.mceButtonDisabled img {
|
|
||||||
-moz-opacity:0.3;
|
|
||||||
opacity: 0.3;
|
|
||||||
border: 1px solid #F0F0EE !important;
|
|
||||||
cursor: default;
|
|
||||||
}
|
|
||||||
|
|
||||||
a.mceTiledButton img {
|
|
||||||
background-image: url('../images/buttons.gif');
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* MSIE specific rules */
|
|
||||||
|
|
||||||
* html a.mceButtonNormal img, * html a.mceButtonSelected img, * html a.mceButtonDisabled img {
|
|
||||||
border: 0 !important;
|
|
||||||
margin-top: 2px;
|
|
||||||
margin-bottom: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
* html a.mceButtonDisabled img {
|
|
||||||
filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);
|
|
||||||
border: 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
* html a.mceButtonDisabled {
|
|
||||||
border: 1px solid #F0F0EE !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
* html a.mceButtonNormal, * html a.mceButtonSelected {
|
|
||||||
border: 1px solid #F0F0EE !important;
|
|
||||||
cursor: default;
|
|
||||||
}
|
|
||||||
|
|
||||||
* html a.mceButtonSelected {
|
|
||||||
border: 1px solid #6779AA !important;
|
|
||||||
background-color: #D4D5D8;
|
|
||||||
}
|
|
||||||
|
|
||||||
* html a.mceButtonNormal:hover, * html a.mceButtonSelected:hover {
|
|
||||||
border: 1px solid #0A246A !important;
|
|
||||||
cursor: default;
|
|
||||||
background-color: #B6BDD2;
|
|
||||||
}
|
|
||||||
|
|
||||||
* html .mceSelectList {
|
|
||||||
margin-top: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Menu button CSS rules */
|
/* Menu button CSS rules */
|
||||||
|
|
||||||
span.mceMenuButton img, span.mceMenuButtonSelected img {
|
span.mceMenuButton img, span.mceMenuButtonSelected img {border: 1px solid #F0F0EE; margin-left: 1px;}
|
||||||
border: 1px solid #F0F0EE;
|
span.mceMenuButtonSelected img {border: 1px solid #6779AA; background-color: #B6BDD2;}
|
||||||
margin-left: 1px;
|
span.mceMenuButtonSelected img.mceMenuButton {border: 1px solid #F0F0EE; background-color: transparent;}
|
||||||
}
|
span.mceMenuButton img.mceMenuButton, span.mceMenuButtonSelected img.mceMenuButton {border-left: 0; margin-left: 0;}
|
||||||
|
span.mceMenuButton:hover img, span.mceMenuButtonSelected:hover img {border: 1px solid #0A246A; background-color: #B6BDD2;}
|
||||||
span.mceMenuButtonSelected img {
|
span.mceMenuButton:hover img.mceMenuButton, span.mceMenuButtonSelected:hover img.mceMenuButton {border-left: 0;}
|
||||||
border: 1px solid #6779AA;
|
span.mceMenuButtonFocus img {border: 1px solid gray; border-right: 0; margin-left: 1px; background-color: #F5F4F2;}
|
||||||
background-color: #B6BDD2;
|
span.mceMenuButtonFocus img.mceMenuButton {border: 1px solid gray; border-left: 1px solid #F5F4F2; margin-left: 0;}
|
||||||
}
|
span.mceMenuHover img {border: 1px solid #0A246A; background-color: #B6BDD2;}
|
||||||
|
span.mceMenuButtonSelected.mceMenuHover img.mceMenuButton {border: 1px solid #0A246A; background-color: #B6BDD2; border-left: 0;}
|
||||||
span.mceMenuButtonSelected img.mceMenuButton {
|
|
||||||
border: 1px solid #F0F0EE;
|
|
||||||
background-color: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
span.mceMenuButton img.mceMenuButton, span.mceMenuButtonSelected img.mceMenuButton {
|
|
||||||
border-left: 0;
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
span.mceMenuButton:hover img, span.mceMenuButtonSelected:hover img {
|
|
||||||
border: 1px solid #0A246A;
|
|
||||||
background-color: #B6BDD2;
|
|
||||||
}
|
|
||||||
|
|
||||||
span.mceMenuButton:hover img.mceMenuButton, span.mceMenuButtonSelected:hover img.mceMenuButton {
|
|
||||||
border-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
span.mceMenuButtonFocus img {
|
|
||||||
border: 1px solid gray;
|
|
||||||
border-right: 0;
|
|
||||||
margin-left: 1px;
|
|
||||||
background-color: #F5F4F2;
|
|
||||||
}
|
|
||||||
|
|
||||||
span.mceMenuButtonFocus img.mceMenuButton {
|
|
||||||
border: 1px solid gray;
|
|
||||||
border-left: 1px solid #F5F4F2;
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Menu button MSIE specific rules */
|
|
||||||
|
|
||||||
* html span.mceMenuButton, * html span.mceMenuButtonFocus {
|
|
||||||
position: relative;
|
|
||||||
left: 0;
|
|
||||||
top: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
* html span.mceMenuButton img, * html span.mceMenuButtonSelected img, * html span.mceMenuButtonFocus img {
|
|
||||||
position: relative;
|
|
||||||
top: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
* html span.mceMenuHover img {
|
|
||||||
border: 1px solid #0A246A;
|
|
||||||
background-color: #B6BDD2;
|
|
||||||
}
|
|
||||||
|
|
||||||
* html span.mceMenuButtonSelected.mceMenuHover img.mceMenuButton {
|
|
||||||
border: 1px solid #0A246A;
|
|
||||||
background-color: #B6BDD2;
|
|
||||||
border-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Menu */
|
/* Menu */
|
||||||
|
|
||||||
.mceMenu {
|
.mceMenu {position: absolute; left: 0; top: 0; display: none; z-index: 100; background-color: white; border: 1px solid gray; font-weight: normal;}
|
||||||
position: absolute;
|
.mceMenu a, .mceMenuTitle, .mceMenuDisabled {display: block; width: 100%; text-decoration: none; background-color: white; font-family: Tahoma, Verdana, Arial, Helvetica; font-size: 11px; line-height: 20px; color: black;}
|
||||||
left: 0;
|
.mceMenu a:hover {background-color: #B6BDD2; color: black; text-decoration: none !important;}
|
||||||
top: 0;
|
.mceMenu span {padding-left: 10px; padding-right: 10px; display: block; line-height: 20px;}
|
||||||
display: none;
|
.mceMenuSeparator {border-bottom: 1px solid gray; background-color: gray; height: 1px;}
|
||||||
z-index: 100;
|
.mceMenuTitle span {padding-left: 5px;}
|
||||||
background-color: white;
|
.mceMenuTitle {background-color: #DDDDDD; font-weight: bold;}
|
||||||
border: 1px solid gray;
|
.mceMenuDisabled {color: gray;}
|
||||||
font-weight: normal;
|
span.mceMenuSelectedItem {background-image: url('../images/menu_check.gif'); background-repeat: no-repeat; background-position: 5px 8px; padding-left: 20px;}
|
||||||
}
|
span.mceMenuCheckItem {padding-left: 20px;}
|
||||||
|
span.mceMenuLine {display: block; position: absolute; left: 0; top: -1px; background-color: #F5F4F2; width: 30px; height: 1px; overflow: hidden; padding-left: 0; padding-right: 0;}
|
||||||
|
.mceColors table, .mceColors td {margin: 0; padding: 2px;}
|
||||||
|
a.mceMoreColors {width: 130px; margin: 0; padding: 0; margin-left: 3px; margin-bottom: 3px; text-align: center; border: 1px solid white;}
|
||||||
|
.mceColorPreview {position: absolute; left: 0; top: 0; margin-left: 3px; margin-top: 15px; width: 16px; height: 4px; background-color: red;}
|
||||||
|
a.mceMoreColors:hover {border: 1px solid #0A246A;}
|
||||||
|
.mceColors td a {width: 9px; height: 9px; overflow: hidden; border: 1px solid #808080;}
|
||||||
|
|
||||||
.mceMenu a, .mceMenuTitle, .mceMenuDisabled {
|
/* MSIE 6 specific rules */
|
||||||
display: block;
|
|
||||||
width: 100%;
|
|
||||||
text-decoration: none;
|
|
||||||
background-color: white;
|
|
||||||
font-family: Tahoma, Verdana, Arial, Helvetica;
|
|
||||||
font-size: 11px;
|
|
||||||
line-height: 20px;
|
|
||||||
color: black;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mceMenu a:hover {
|
* html a.mceButtonNormal img, * html a.mceButtonSelected img, * html a.mceButtonDisabled img {border: 0 !important; margin-top: 2px; margin-bottom: 1px;}
|
||||||
background-color: #B6BDD2;
|
* html a.mceButtonDisabled img {filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30); border: 0 !important;}
|
||||||
color: black;
|
* html a.mceButtonDisabled {border: 1px solid #F0F0EE !important;}
|
||||||
}
|
* html a.mceButtonNormal, * html a.mceButtonSelected {border: 1px solid #F0F0EE !important; cursor: default;}
|
||||||
|
* html a.mceButtonSelected {border: 1px solid #6779AA !important; background-color: #D4D5D8;}
|
||||||
|
* html a.mceButtonNormal:hover, * html a.mceButtonSelected:hover {border: 1px solid #0A246A !important; background-color: #B6BDD2; cursor: default;}
|
||||||
|
* html .mceSelectList {margin-top: 2px;}
|
||||||
|
* html span.mceMenuButton, * html span.mceMenuButtonFocus {position: relative; left: 0; top: 0;}
|
||||||
|
* html span.mceMenuButton img, * html span.mceMenuButtonSelected img, * html span.mceMenuButtonFocus img {position: relative; top: 1px;}
|
||||||
|
* html a.mceMoreColors {width: 132px;}
|
||||||
|
* html .mceColors td a {width: 10px; height: 10px;}
|
||||||
|
* html .mceColorPreview {margin-left: 2px; margin-top: 14px;}
|
||||||
|
|
||||||
.mceMenu span {
|
/* MSIE 7 specific rules */
|
||||||
padding-left: 10px;
|
|
||||||
padding-right: 10px;
|
|
||||||
display: block;
|
|
||||||
line-height: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mceMenuSeparator {
|
*:first-child+html a.mceButtonNormal img, *:first-child+html a.mceButtonSelected img, *:first-child+html a.mceButtonDisabled img {border: 0 !important; margin-top: 2px; margin-bottom: 1px;}
|
||||||
border-bottom: 1px solid gray;
|
*:first-child+html a.mceButtonDisabled img {filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30); border: 0 !important;}
|
||||||
background-color: gray;
|
*:first-child+html a.mceButtonDisabled {border: 1px solid #F0F0EE !important;}
|
||||||
height: 1px;
|
*:first-child+html a.mceButtonNormal, *:first-child+html a.mceButtonSelected {border: 1px solid #F0F0EE !important; cursor: default;}
|
||||||
}
|
*:first-child+html a.mceButtonSelected {border: 1px solid #6779AA !important; background-color: #D4D5D8;}
|
||||||
|
*:first-child+html a.mceButtonNormal:hover, *:first-child+html a.mceButtonSelected:hover {border: 1px solid #0A246A !important; background-color: #B6BDD2; cursor: default;}
|
||||||
.mceMenuTitle span {
|
*:first-child+html .mceSelectList {margin-top: 2px;}
|
||||||
padding-left: 5px;
|
*:first-child+html span.mceMenuButton, *:first-child+html span.mceMenuButtonFocus {position: relative; left: 0; top: 0;}
|
||||||
}
|
*:first-child+html span.mceMenuButton img, *:first-child+html span.mceMenuButtonSelected img, *:first-child+html span.mceMenuButtonFocus img {position: relative; top: 1px;}
|
||||||
|
*:first-child+html a.mceMoreColors {width: 132px;}
|
||||||
.mceMenuTitle {
|
*:first-child+html .mceColors td a {width: 10px; height: 10px;}
|
||||||
background-color: #DDDDDD;
|
*:first-child+html .mceColorPreview {margin: 0; padding-left: 4px; margin-top: 14px; width: 14px;}
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mceMenuDisabled {
|
|
||||||
color: gray;
|
|
||||||
}
|
|
||||||
|
|
||||||
span.mceMenuSelectedItem {
|
|
||||||
background-image: url('../images/menu_check.gif');
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-position: 5px 8px;
|
|
||||||
padding-left: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
span.mceMenuCheckItem {
|
|
||||||
padding-left: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
span.mceMenuLine {
|
|
||||||
display: block;
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
top: -1px;
|
|
||||||
background-color: #F5F4F2;
|
|
||||||
width: 30px;
|
|
||||||
height: 1px;
|
|
||||||
overflow: hidden;
|
|
||||||
padding-left: 0;
|
|
||||||
padding-right: 0;
|
|
||||||
}
|
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* $RCSfile: editor_template_src.js,v $
|
* $Id: editor_template_src.js 129 2006-10-23 09:45:17Z spocke $
|
||||||
* $Revision: 1.96 $
|
|
||||||
* $Date: 2006/04/18 13:32:52 $
|
|
||||||
*
|
*
|
||||||
* @author Moxiecode
|
* @author Moxiecode
|
||||||
* @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
|
* @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
|
||||||
@ -12,6 +10,7 @@ tinyMCE.importThemeLanguagePack('advanced');
|
|||||||
|
|
||||||
var TinyMCE_AdvancedTheme = {
|
var TinyMCE_AdvancedTheme = {
|
||||||
// Private theme fields
|
// Private theme fields
|
||||||
|
_defColors : "000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,008000,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF",
|
||||||
_autoImportCSSClasses : true,
|
_autoImportCSSClasses : true,
|
||||||
_resizer : {},
|
_resizer : {},
|
||||||
_buttons : [
|
_buttons : [
|
||||||
@ -43,25 +42,28 @@ var TinyMCE_AdvancedTheme = {
|
|||||||
['removeformat', 'removeformat.gif', 'lang_theme_removeformat_desc', 'removeformat'],
|
['removeformat', 'removeformat.gif', 'lang_theme_removeformat_desc', 'removeformat'],
|
||||||
['sub', 'sub.gif', 'lang_theme_sub_desc', 'subscript'],
|
['sub', 'sub.gif', 'lang_theme_sub_desc', 'subscript'],
|
||||||
['sup', 'sup.gif', 'lang_theme_sup_desc', 'superscript'],
|
['sup', 'sup.gif', 'lang_theme_sup_desc', 'superscript'],
|
||||||
['forecolor', 'forecolor.gif', 'lang_theme_forecolor_desc', 'mceForeColor', true],
|
['forecolor', 'forecolor.gif', 'lang_theme_forecolor_desc', 'forecolor', true],
|
||||||
['backcolor', 'backcolor.gif', 'lang_theme_backcolor_desc', 'mceBackColor', true],
|
['backcolor', 'backcolor.gif', 'lang_theme_backcolor_desc', 'HiliteColor', true],
|
||||||
['charmap', 'charmap.gif', 'lang_theme_charmap_desc', 'mceCharMap'],
|
['charmap', 'charmap.gif', 'lang_theme_charmap_desc', 'mceCharMap'],
|
||||||
['visualaid', 'visualaid.gif', 'lang_theme_visualaid_desc', 'mceToggleVisualAid'],
|
['visualaid', 'visualaid.gif', 'lang_theme_visualaid_desc', 'mceToggleVisualAid'],
|
||||||
['anchor', 'anchor.gif', 'lang_theme_anchor_desc', 'mceInsertAnchor'],
|
['anchor', 'anchor.gif', 'lang_theme_anchor_desc', 'mceInsertAnchor'],
|
||||||
['newdocument', 'newdocument.gif', 'lang_newdocument_desc', 'mceNewDocument']
|
['newdocument', 'newdocument.gif', 'lang_newdocument_desc', 'mceNewDocument']
|
||||||
],
|
],
|
||||||
|
|
||||||
_buttonMap : 'anchor,backcolor,bold,bullist,charmap,cleanup,code,copy,cut,forecolor,help,hr,image,indent,italic,justifycenter,justifyfull,justifyleft,justifyright,link,newdocument,numlist,outdent,paste,redo,removeformat,strikethrough,sub,sup,underline,undo,unlink,visualaid,advhr,ltr,rtl,emotions,flash,fullpage,fullscreen,iespell,insertdate,inserttime,pastetext,pasteword,selectall,preview,print,save,replace,search,table,cell_props,delete_col,delete_row,col_after,col_before,row_after,row_before,merge_cells,row_props,split_cells',
|
_buttonMap : 'anchor,backcolor,bold,bullist,charmap,cleanup,code,copy,cut,forecolor,help,hr,image,indent,italic,justifycenter,justifyfull,justifyleft,justifyright,link,newdocument,numlist,outdent,paste,redo,removeformat,strikethrough,sub,sup,underline,undo,unlink,visualaid,advhr,ltr,rtl,emotions,flash,fullpage,fullscreen,iespell,insertdate,inserttime,pastetext,pasteword,selectall,preview,print,save,replace,search,table,cell_props,delete_col,delete_row,col_after,col_before,row_after,row_before,merge_cells,row_props,split_cells,delete_table',
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns HTML code for the specificed control.
|
* Returns HTML code for the specificed control.
|
||||||
*/
|
*/
|
||||||
getControlHTML : function(button_name) {
|
getControlHTML : function(button_name) {
|
||||||
var i, x;
|
var i, x, but;
|
||||||
|
|
||||||
// Lookup button in button list
|
// Lookup button in button list
|
||||||
for (i=0; i<TinyMCE_AdvancedTheme._buttons.length; i++) {
|
for (i=0; i<TinyMCE_AdvancedTheme._buttons.length; i++) {
|
||||||
var but = TinyMCE_AdvancedTheme._buttons[i];
|
but = TinyMCE_AdvancedTheme._buttons[i];
|
||||||
|
|
||||||
|
if (but[0] == button_name && (button_name == "forecolor" || button_name == "backcolor"))
|
||||||
|
return tinyMCE.getMenuButtonHTML(but[0], but[2], '{$themeurl}/images/' + but[1], but[3] + "Menu", but[3], (but.length > 4 ? but[4] : false), (but.length > 5 ? but[5] : null));
|
||||||
|
|
||||||
if (but[0] == button_name)
|
if (but[0] == button_name)
|
||||||
return tinyMCE.getButtonHTML(but[0], but[2], '{$themeurl}/images/' + but[1], but[3], (but.length > 4 ? but[4] : false), (but.length > 5 ? but[5] : null));
|
return tinyMCE.getButtonHTML(but[0], but[2], '{$themeurl}/images/' + but[1], but[3], (but.length > 4 ? but[4] : false), (but.length > 5 ? but[5] : null));
|
||||||
@ -153,6 +155,18 @@ var TinyMCE_AdvancedTheme = {
|
|||||||
*/
|
*/
|
||||||
execCommand : function(editor_id, element, command, user_interface, value) {
|
execCommand : function(editor_id, element, command, user_interface, value) {
|
||||||
switch (command) {
|
switch (command) {
|
||||||
|
case 'mceHelp':
|
||||||
|
tinyMCE.openWindow({
|
||||||
|
file : 'about.htm',
|
||||||
|
width : 480,
|
||||||
|
height : 380
|
||||||
|
}, {
|
||||||
|
tinymce_version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion,
|
||||||
|
tinymce_releasedate : tinyMCE.releaseDate,
|
||||||
|
inline : "yes"
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
|
||||||
case "mceLink":
|
case "mceLink":
|
||||||
var inst = tinyMCE.getInstanceById(editor_id);
|
var inst = tinyMCE.getInstanceById(editor_id);
|
||||||
var doc = inst.getDoc();
|
var doc = inst.getDoc();
|
||||||
@ -317,41 +331,94 @@ var TinyMCE_AdvancedTheme = {
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case "mceForeColor":
|
case "forecolor":
|
||||||
var template = new Array();
|
var fcp = new TinyMCE_Layer(editor_id + '_fcPreview', false), p, img, elm;
|
||||||
var elm = tinyMCE.selectedInstance.getFocusElement();
|
|
||||||
var inputColor = tinyMCE.getAttrib(elm, "color");
|
|
||||||
|
|
||||||
if (inputColor == '')
|
TinyMCE_AdvancedTheme._hideMenus(editor_id);
|
||||||
inputColor = elm.style.color;
|
|
||||||
|
|
||||||
if (!inputColor)
|
if (!fcp.exists()) {
|
||||||
inputColor = "#000000";
|
fcp.create('div', 'mceColorPreview', document.getElementById(editor_id + '_toolbar'));
|
||||||
|
elm = fcp.getElement();
|
||||||
|
elm._editor_id = editor_id;
|
||||||
|
elm._command = "forecolor";
|
||||||
|
elm._switchId = editor_id + "_forecolor";
|
||||||
|
tinyMCE.addEvent(elm, 'click', TinyMCE_AdvancedTheme._handleMenuEvent);
|
||||||
|
tinyMCE.addEvent(elm, 'mouseover', TinyMCE_AdvancedTheme._handleMenuEvent);
|
||||||
|
tinyMCE.addEvent(elm, 'mouseout', TinyMCE_AdvancedTheme._handleMenuEvent);
|
||||||
|
}
|
||||||
|
|
||||||
template['file'] = 'color_picker.htm';
|
img = tinyMCE.selectNodes(document.getElementById(editor_id + "_forecolor"), function(n) {return n.nodeName == "IMG";})[0];
|
||||||
template['width'] = 220;
|
p = tinyMCE.getAbsPosition(img, document.getElementById(editor_id + '_toolbar'));
|
||||||
template['height'] = 190;
|
|
||||||
|
|
||||||
tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes", command : "forecolor", input_color : inputColor});
|
fcp.moveTo(p.absLeft, p.absTop);
|
||||||
|
fcp.getElement().style.backgroundColor = value != null ? value : tinyMCE.getInstanceById(editor_id).foreColor;
|
||||||
|
fcp.show();
|
||||||
|
|
||||||
|
return false;
|
||||||
|
|
||||||
|
case "forecolorMenu":
|
||||||
|
TinyMCE_AdvancedTheme._hideMenus(editor_id);
|
||||||
|
|
||||||
|
// Create color layer
|
||||||
|
var ml = new TinyMCE_Layer(editor_id + '_fcMenu');
|
||||||
|
|
||||||
|
if (!ml.exists())
|
||||||
|
ml.create('div', 'mceMenu', document.body, TinyMCE_AdvancedTheme._getColorHTML(editor_id, 'theme_advanced_text_colors', 'forecolor'));
|
||||||
|
|
||||||
|
tinyMCE.switchClass(editor_id + '_forecolor', 'mceMenuButtonFocus');
|
||||||
|
ml.moveRelativeTo(document.getElementById(editor_id + "_forecolor"), 'bl');
|
||||||
|
|
||||||
|
ml.moveBy(tinyMCE.isMSIE && !tinyMCE.isOpera ? -1 : 1, -1);
|
||||||
|
|
||||||
|
if (tinyMCE.isOpera)
|
||||||
|
ml.moveBy(0, -2);
|
||||||
|
|
||||||
|
ml.show();
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case "mceBackColor":
|
case "HiliteColor":
|
||||||
var template = new Array();
|
var bcp = new TinyMCE_Layer(editor_id + '_bcPreview', false), p, img;
|
||||||
var elm = tinyMCE.selectedInstance.getFocusElement();
|
|
||||||
var inputColor = elm.style.backgroundColor;
|
|
||||||
|
|
||||||
if (!inputColor)
|
TinyMCE_AdvancedTheme._hideMenus(editor_id);
|
||||||
inputColor = "#000000";
|
|
||||||
|
|
||||||
template['file'] = 'color_picker.htm';
|
if (!bcp.exists()) {
|
||||||
template['width'] = 220;
|
bcp.create('div', 'mceColorPreview', document.getElementById(editor_id + '_toolbar'));
|
||||||
template['height'] = 190;
|
elm = bcp.getElement();
|
||||||
|
elm._editor_id = editor_id;
|
||||||
|
elm._command = "HiliteColor";
|
||||||
|
elm._switchId = editor_id + "_backcolor";
|
||||||
|
tinyMCE.addEvent(elm, 'click', TinyMCE_AdvancedTheme._handleMenuEvent);
|
||||||
|
tinyMCE.addEvent(elm, 'mouseover', TinyMCE_AdvancedTheme._handleMenuEvent);
|
||||||
|
tinyMCE.addEvent(elm, 'mouseout', TinyMCE_AdvancedTheme._handleMenuEvent);
|
||||||
|
}
|
||||||
|
|
||||||
template['width'] += tinyMCE.getLang('lang_theme_advanced_backcolor_delta_width', 0);
|
img = tinyMCE.selectNodes(document.getElementById(editor_id + "_backcolor"), function(n) {return n.nodeName == "IMG";})[0];
|
||||||
template['height'] += tinyMCE.getLang('lang_theme_advanced_backcolor_delta_height', 0);
|
p = tinyMCE.getAbsPosition(img, document.getElementById(editor_id + '_toolbar'));
|
||||||
|
|
||||||
tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes", command : "HiliteColor", input_color : inputColor});
|
bcp.moveTo(p.absLeft, p.absTop);
|
||||||
//mceBackColor
|
bcp.getElement().style.backgroundColor = value != null ? value : tinyMCE.getInstanceById(editor_id).backColor;
|
||||||
|
bcp.show();
|
||||||
|
|
||||||
|
return false;
|
||||||
|
|
||||||
|
case "HiliteColorMenu":
|
||||||
|
TinyMCE_AdvancedTheme._hideMenus(editor_id);
|
||||||
|
|
||||||
|
// Create color layer
|
||||||
|
var ml = new TinyMCE_Layer(editor_id + '_bcMenu');
|
||||||
|
|
||||||
|
if (!ml.exists())
|
||||||
|
ml.create('div', 'mceMenu', document.body, TinyMCE_AdvancedTheme._getColorHTML(editor_id, 'theme_advanced_background_colors', 'HiliteColor'));
|
||||||
|
|
||||||
|
tinyMCE.switchClass(editor_id + '_backcolor', 'mceMenuButtonFocus');
|
||||||
|
ml.moveRelativeTo(document.getElementById(editor_id + "_backcolor"), 'bl');
|
||||||
|
|
||||||
|
ml.moveBy(tinyMCE.isMSIE && !tinyMCE.isOpera ? -1 : 1, -1);
|
||||||
|
|
||||||
|
if (tinyMCE.isOpera)
|
||||||
|
ml.moveBy(0, -2);
|
||||||
|
|
||||||
|
ml.show();
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case "mceColorPicker":
|
case "mceColorPicker":
|
||||||
@ -433,7 +500,7 @@ var TinyMCE_AdvancedTheme = {
|
|||||||
*/
|
*/
|
||||||
getEditorTemplate : function(settings, editorId) {
|
getEditorTemplate : function(settings, editorId) {
|
||||||
function removeFromArray(in_array, remove_array) {
|
function removeFromArray(in_array, remove_array) {
|
||||||
var outArray = new Array();
|
var outArray = new Array(), skip;
|
||||||
|
|
||||||
for (var i=0; i<in_array.length; i++) {
|
for (var i=0; i<in_array.length; i++) {
|
||||||
skip = false;
|
skip = false;
|
||||||
@ -530,10 +597,10 @@ var TinyMCE_AdvancedTheme = {
|
|||||||
toolbarHTML += '<a href="#" accesskey="z" onfocus="tinyMCE.getInstanceById(\'' + editorId + '\').getWin().focus();"></a>';
|
toolbarHTML += '<a href="#" accesskey="z" onfocus="tinyMCE.getInstanceById(\'' + editorId + '\').getWin().focus();"></a>';
|
||||||
|
|
||||||
// Setup template html
|
// Setup template html
|
||||||
template['html'] = '<table class="mceEditor" border="0" cellpadding="0" cellspacing="0" width="{$width}" height="{$height}" style="width:{$width}px;height:{$height}px"><tbody>';
|
template['html'] = '<table class="mceEditor" border="0" cellpadding="0" cellspacing="0" width="{$width}" height="{$height}" style="width:{$width_style};height:{$height_style}"><tbody>';
|
||||||
|
|
||||||
if (toolbarLocation == "top") {
|
if (toolbarLocation == "top") {
|
||||||
template['html'] += '<tr><td class="mceToolbarTop" align="' + toolbarAlign + '" height="1" nowrap="nowrap">' + toolbarHTML + '</td></tr>';
|
template['html'] += '<tr><td class="mceToolbarTop" align="' + toolbarAlign + '" height="1" nowrap="nowrap"><span id="' + editorId + '_toolbar" class="mceToolbarContainer">' + toolbarHTML + '</span></td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (statusbarLocation == "top") {
|
if (statusbarLocation == "top") {
|
||||||
@ -544,7 +611,7 @@ var TinyMCE_AdvancedTheme = {
|
|||||||
template['html'] += '<tr><td align="center"><span id="{$editor_id}"></span></td></tr>';
|
template['html'] += '<tr><td align="center"><span id="{$editor_id}"></span></td></tr>';
|
||||||
|
|
||||||
if (toolbarLocation == "bottom") {
|
if (toolbarLocation == "bottom") {
|
||||||
template['html'] += '<tr><td class="mceToolbarBottom" align="' + toolbarAlign + '" height="1">' + toolbarHTML + '</td></tr>';
|
template['html'] += '<tr><td class="mceToolbarBottom" align="' + toolbarAlign + '" height="1"><span id="' + editorId + '_toolbar" class="mceToolbarContainer">' + toolbarHTML + '</span></td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// External toolbar changes
|
// External toolbar changes
|
||||||
@ -615,9 +682,10 @@ var TinyMCE_AdvancedTheme = {
|
|||||||
var curAlign = tinyMCE.getParam("theme_advanced_container_"+containers[i]+"_align", defaultContainerAlign);
|
var curAlign = tinyMCE.getParam("theme_advanced_container_"+containers[i]+"_align", defaultContainerAlign);
|
||||||
var curCSS = tinyMCE.getParam("theme_advanced_container_"+containers[i]+"_class", defaultContainerCSS);
|
var curCSS = tinyMCE.getParam("theme_advanced_container_"+containers[i]+"_class", defaultContainerCSS);
|
||||||
|
|
||||||
for (var j=0; j<curContainer.length; j++) {
|
curContainer = removeFromArray(curContainer, tinyMCE.getParam("theme_advanced_disable", "", true, ','));
|
||||||
|
|
||||||
|
for (var j=0; j<curContainer.length; j++)
|
||||||
curContainerHTML += tinyMCE.getControlHTML(curContainer[j]);
|
curContainerHTML += tinyMCE.getControlHTML(curContainer[j]);
|
||||||
}
|
|
||||||
|
|
||||||
if (curContainer.length > 0) {
|
if (curContainer.length > 0) {
|
||||||
curContainerHTML += "<br />";
|
curContainerHTML += "<br />";
|
||||||
@ -664,10 +732,34 @@ var TinyMCE_AdvancedTheme = {
|
|||||||
inst.addShortcut('ctrl', 'k', 'lang_link_desc', 'mceLink');
|
inst.addShortcut('ctrl', 'k', 'lang_link_desc', 'mceLink');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_handleMenuEvent : function(e) {
|
||||||
|
var te = tinyMCE.isMSIE ? window.event.srcElement : e.target;
|
||||||
|
tinyMCE._menuButtonEvent(e.type == "mouseover" ? "over" : "out", document.getElementById(te._switchId));
|
||||||
|
|
||||||
|
if (e.type == "click")
|
||||||
|
tinyMCE.execInstanceCommand(te._editor_id, te._command);
|
||||||
|
},
|
||||||
|
|
||||||
|
_hideMenus : function(id) {
|
||||||
|
var fcml = new TinyMCE_Layer(id + '_fcMenu'), bcml = new TinyMCE_Layer(id + '_bcMenu');
|
||||||
|
|
||||||
|
if (fcml.exists() && fcml.isVisible()) {
|
||||||
|
tinyMCE.switchClass(id + '_forecolor', 'mceMenuButton');
|
||||||
|
fcml.hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bcml.exists() && bcml.isVisible()) {
|
||||||
|
tinyMCE.switchClass(id + '_backcolor', 'mceMenuButton');
|
||||||
|
bcml.hide();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Node change handler.
|
* Node change handler.
|
||||||
*/
|
*/
|
||||||
handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection, setup_content) {
|
handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection, setup_content) {
|
||||||
|
var alignNode, breakOut, classNode;
|
||||||
|
|
||||||
function selectByValue(select_elm, value, first_index) {
|
function selectByValue(select_elm, value, first_index) {
|
||||||
first_index = typeof(first_index) == "undefined" ? false : true;
|
first_index = typeof(first_index) == "undefined" ? false : true;
|
||||||
|
|
||||||
@ -702,6 +794,7 @@ var TinyMCE_AdvancedTheme = {
|
|||||||
var pathElm = document.getElementById(editor_id + "_path");
|
var pathElm = document.getElementById(editor_id + "_path");
|
||||||
var inst = tinyMCE.getInstanceById(editor_id);
|
var inst = tinyMCE.getInstanceById(editor_id);
|
||||||
var doc = inst.getDoc();
|
var doc = inst.getDoc();
|
||||||
|
TinyMCE_AdvancedTheme._hideMenus(editor_id);
|
||||||
|
|
||||||
if (pathElm) {
|
if (pathElm) {
|
||||||
// Get node path
|
// Get node path
|
||||||
@ -727,6 +820,9 @@ var TinyMCE_AdvancedTheme = {
|
|||||||
var nodeName = path[i].nodeName.toLowerCase();
|
var nodeName = path[i].nodeName.toLowerCase();
|
||||||
var nodeData = "";
|
var nodeData = "";
|
||||||
|
|
||||||
|
if (nodeName.indexOf("html:") == 0)
|
||||||
|
nodeName = nodeName.substring(5);
|
||||||
|
|
||||||
if (nodeName == "b") {
|
if (nodeName == "b") {
|
||||||
nodeName = "strong";
|
nodeName = "strong";
|
||||||
}
|
}
|
||||||
@ -781,7 +877,7 @@ var TinyMCE_AdvancedTheme = {
|
|||||||
nodeData += "src: " + src + " ";
|
nodeData += "src: " + src + " ";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getAttrib(path[i], 'href') != "") {
|
if (path[i].nodeName == 'A' && getAttrib(path[i], 'href') != "") {
|
||||||
var href = tinyMCE.getAttrib(path[i], "mce_href");
|
var href = tinyMCE.getAttrib(path[i], "mce_href");
|
||||||
|
|
||||||
if (href == "")
|
if (href == "")
|
||||||
@ -790,9 +886,10 @@ var TinyMCE_AdvancedTheme = {
|
|||||||
nodeData += "href: " + href + " ";
|
nodeData += "href: " + href + " ";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nodeName == "img" && tinyMCE.getAttrib(path[i], "class").indexOf('mceItemFlash') != -1) {
|
className = tinyMCE.getAttrib(path[i], "class");
|
||||||
nodeName = "flash";
|
if ((nodeName == "img" || nodeName == "span") && className.indexOf('mceItem') != -1) {
|
||||||
nodeData = "src: " + path[i].getAttribute('title');
|
nodeName = className.replace(/mceItem([a-z]+)/gi, '$1').toLowerCase();
|
||||||
|
nodeData = path[i].getAttribute('title');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nodeName == "a" && (anchor = tinyMCE.getAttrib(path[i], "name")) != "") {
|
if (nodeName == "a" && (anchor = tinyMCE.getAttrib(path[i], "name")) != "") {
|
||||||
@ -1027,7 +1124,7 @@ var TinyMCE_AdvancedTheme = {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case "IMG":
|
case "IMG":
|
||||||
if (getAttrib(node, 'name').indexOf('mce_') != 0) {
|
if (getAttrib(node, 'name').indexOf('mce_') != 0 && tinyMCE.getAttrib(node, 'class').indexOf('mceItem') == -1) {
|
||||||
tinyMCE.switchClass(editor_id + '_image', 'mceButtonSelected');
|
tinyMCE.switchClass(editor_id + '_image', 'mceButtonSelected');
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -1148,6 +1245,9 @@ var TinyMCE_AdvancedTheme = {
|
|||||||
inst.iframeElement.style.width = (iw + dx) + "px";
|
inst.iframeElement.style.width = (iw + dx) + "px";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Remove pesky table controls
|
||||||
|
inst.useCSS = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1255,6 +1355,29 @@ var TinyMCE_AdvancedTheme = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_getColorHTML : function(id, n, cm) {
|
||||||
|
var i, h, cl;
|
||||||
|
|
||||||
|
h = '<span class="mceMenuLine"></span>';
|
||||||
|
cl = tinyMCE.getParam(n, TinyMCE_AdvancedTheme._defColors).split(',');
|
||||||
|
|
||||||
|
h += '<table class="mceColors"><tr>';
|
||||||
|
for (i=0; i<cl.length; i++) {
|
||||||
|
c = 'tinyMCE.execInstanceCommand(\'' + id + '\', \'' + cm + '\', false, \'#' + cl[i] + '\');';
|
||||||
|
h += '<td><a href="javascript:' + c + '" style="background-color: #' + cl[i] + '" onclick="' + c + ';return false;"></a></td>';
|
||||||
|
|
||||||
|
if ((i+1) % 8 == 0)
|
||||||
|
h += '</tr><tr>';
|
||||||
|
}
|
||||||
|
|
||||||
|
h += '</tr></table>';
|
||||||
|
/*
|
||||||
|
h += '<a href="" class="mceMoreColors">More colors</a>';
|
||||||
|
*/
|
||||||
|
|
||||||
|
return h;
|
||||||
|
},
|
||||||
|
|
||||||
_insertImage : function(src, alt, border, hspace, vspace, width, height, align, title, onmouseover, onmouseout) {
|
_insertImage : function(src, alt, border, hspace, vspace, width, height, align, title, onmouseover, onmouseout) {
|
||||||
tinyMCE.execCommand('mceBeginUndoLevel');
|
tinyMCE.execCommand('mceBeginUndoLevel');
|
||||||
|
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 174 B After Width: | Height: | Size: 359 B |
Binary file not shown.
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 5.5 KiB |
Binary file not shown.
Before Width: | Height: | Size: 272 B After Width: | Height: | Size: 342 B |
@ -3,24 +3,25 @@ function saveContent() {
|
|||||||
tinyMCE.closeWindow(window);
|
tinyMCE.closeWindow(window);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fixes some charcode issues
|
|
||||||
function fixContent(html) {
|
|
||||||
/* html = html.replace(new RegExp('<(p|hr|table|tr|td|ol|ul|object|embed|li|blockquote)', 'gi'),'\n<$1');
|
|
||||||
html = html.replace(new RegExp('<\/(p|ol|ul|li|table|tr|td|blockquote|object)>', 'gi'),'</$1>\n');
|
|
||||||
html = tinyMCE.regexpReplace(html, '<br />','<br />\n','gi');
|
|
||||||
html = tinyMCE.regexpReplace(html, '\n\n','\n','gi');*/
|
|
||||||
return html;
|
|
||||||
}
|
|
||||||
|
|
||||||
function onLoadInit() {
|
function onLoadInit() {
|
||||||
tinyMCEPopup.resizeToInnerSize();
|
tinyMCEPopup.resizeToInnerSize();
|
||||||
|
|
||||||
document.forms[0].htmlSource.value = fixContent(tinyMCE.getContent(tinyMCE.getWindowArg('editor_id')));
|
// Remove Gecko spellchecking
|
||||||
|
if (tinyMCE.isGecko)
|
||||||
|
document.body.spellcheck = tinyMCE.getParam("gecko_spellcheck");
|
||||||
|
|
||||||
|
document.getElementById('htmlSource').value = tinyMCE.getContent(tinyMCE.getWindowArg('editor_id'));
|
||||||
|
|
||||||
resizeInputs();
|
resizeInputs();
|
||||||
|
|
||||||
|
if (tinyMCE.getParam("theme_advanced_source_editor_wrap", true)) {
|
||||||
|
setWrap('soft');
|
||||||
|
document.getElementById('wraped').checked = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function setWrap(val) {
|
function setWrap(val) {
|
||||||
var s = document.forms[0].htmlSource;
|
var s = document.getElementById('htmlSource');
|
||||||
|
|
||||||
s.wrap = val;
|
s.wrap = val;
|
||||||
|
|
||||||
@ -43,6 +44,8 @@ function toggleWordWrap(elm) {
|
|||||||
var wHeight=0, wWidth=0, owHeight=0, owWidth=0;
|
var wHeight=0, wWidth=0, owHeight=0, owWidth=0;
|
||||||
|
|
||||||
function resizeInputs() {
|
function resizeInputs() {
|
||||||
|
var el = document.getElementById('htmlSource');
|
||||||
|
|
||||||
if (!tinyMCE.isMSIE) {
|
if (!tinyMCE.isMSIE) {
|
||||||
wHeight = self.innerHeight-80;
|
wHeight = self.innerHeight-80;
|
||||||
wWidth = self.innerWidth-16;
|
wWidth = self.innerWidth-16;
|
||||||
@ -51,11 +54,7 @@ function resizeInputs() {
|
|||||||
wWidth = document.body.clientWidth - 16;
|
wWidth = document.body.clientWidth - 16;
|
||||||
}
|
}
|
||||||
|
|
||||||
document.forms[0].htmlSource.style.height = Math.abs(wHeight) + 'px';
|
el.style.height = Math.abs(wHeight) + 'px';
|
||||||
document.forms[0].htmlSource.style.width = Math.abs(wWidth) + 'px';
|
el.style.width = Math.abs(wWidth) + 'px';
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderWordWrap() {
|
|
||||||
if (tinyMCE.isMSIE || tinyMCE.isGecko)
|
|
||||||
document.write('<input type="checkbox" name="wraped" id="wraped" onclick="toggleWordWrap(this);" class="wordWrapCode" /><label for="wraped">{$lang_theme_code_wordwrap}</label>');
|
|
||||||
}
|
|
||||||
|
@ -38,6 +38,11 @@ theme_h3 : 'Heading 3',
|
|||||||
theme_h4 : 'Heading 4',
|
theme_h4 : 'Heading 4',
|
||||||
theme_h5 : 'Heading 5',
|
theme_h5 : 'Heading 5',
|
||||||
theme_h6 : 'Heading 6',
|
theme_h6 : 'Heading 6',
|
||||||
|
theme_blockquote : 'Blockquote',
|
||||||
|
theme_code : 'Code',
|
||||||
|
theme_samp : 'Code sample',
|
||||||
|
theme_dt : 'Definition term ',
|
||||||
|
theme_dd : 'Definition description',
|
||||||
theme_colorpicker_title : 'Select a color',
|
theme_colorpicker_title : 'Select a color',
|
||||||
theme_colorpicker_apply : 'Apply',
|
theme_colorpicker_apply : 'Apply',
|
||||||
theme_forecolor_desc : 'Select text color',
|
theme_forecolor_desc : 'Select text color',
|
||||||
@ -72,5 +77,6 @@ loaded_plugins : 'Loaded plugins',
|
|||||||
help : 'Help',
|
help : 'Help',
|
||||||
not_set : '-- Not set --',
|
not_set : '-- Not set --',
|
||||||
close : 'Close',
|
close : 'Close',
|
||||||
toolbar_focus : 'Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X'
|
toolbar_focus : 'Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X',
|
||||||
|
invalid_data : 'Error: Invalid values entered, these are marked in red.'
|
||||||
});
|
});
|
||||||
|
2103
wp-includes/js/tinymce/tiny_mce.js
vendored
2103
wp-includes/js/tinymce/tiny_mce.js
vendored
File diff suppressed because it is too large
Load Diff
448
wp-includes/js/tinymce/tiny_mce_popup.js
vendored
448
wp-includes/js/tinymce/tiny_mce_popup.js
vendored
@ -1,276 +1,286 @@
|
|||||||
|
|
||||||
|
|
||||||
// Some global instances, this will be filled later
|
// Some global instances, this will be filled later
|
||||||
var tinyMCE = null, tinyMCELang = null;
|
var tinyMCE = null, tinyMCELang = null;
|
||||||
|
|
||||||
|
|
||||||
function TinyMCE_Popup() {
|
function TinyMCE_Popup() {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
TinyMCE_Popup.prototype = {
|
||||||
|
findWin : function(w) {
|
||||||
|
var c;
|
||||||
|
|
||||||
TinyMCE_Popup.prototype.init = function() {
|
// Check parents
|
||||||
var win = window.opener ? window.opener : window.dialogArguments;
|
c = w;
|
||||||
var inst;
|
while (c && (c = c.parent) != null) {
|
||||||
|
if (typeof(c.tinyMCE) != "undefined")
|
||||||
|
return c;
|
||||||
|
}
|
||||||
|
|
||||||
if (!win) {
|
// Check openers
|
||||||
// Try parent
|
c = w;
|
||||||
win = parent.parent;
|
while (c && (c = c.opener) != null) {
|
||||||
|
if (typeof(c.tinyMCE) != "undefined")
|
||||||
|
return c;
|
||||||
|
}
|
||||||
|
|
||||||
// Try top
|
// Try top
|
||||||
if (typeof(win.tinyMCE) == "undefined")
|
if (typeof(top.tinyMCE) != "undefined")
|
||||||
win = top;
|
return top;
|
||||||
}
|
|
||||||
|
|
||||||
window.opener = win;
|
return null;
|
||||||
this.windowOpener = win;
|
},
|
||||||
this.onLoadEval = "";
|
|
||||||
|
|
||||||
// Setup parent references
|
init : function() {
|
||||||
tinyMCE = win.tinyMCE;
|
var win = window.opener ? window.opener : window.dialogArguments, c;
|
||||||
tinyMCELang = win.tinyMCELang;
|
var inst;
|
||||||
|
|
||||||
if (!tinyMCE) {
|
if (!win)
|
||||||
alert("tinyMCE object reference not found from popup.");
|
win = this.findWin(window);
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
inst = tinyMCE.selectedInstance;
|
if (!win) {
|
||||||
this.isWindow = tinyMCE.getWindowArg('mce_inside_iframe', false) == false;
|
alert("tinyMCE object reference not found from popup.");
|
||||||
this.storeSelection = (tinyMCE.isMSIE && !tinyMCE.isOpera) && !this.isWindow && tinyMCE.getWindowArg('mce_store_selection', true);
|
return;
|
||||||
|
|
||||||
if (this.isWindow)
|
|
||||||
window.focus();
|
|
||||||
|
|
||||||
// Store selection
|
|
||||||
if (this.storeSelection)
|
|
||||||
inst.selectionBookmark = inst.selection.getBookmark(true);
|
|
||||||
|
|
||||||
// Setup dir
|
|
||||||
if (tinyMCELang['lang_dir'])
|
|
||||||
document.dir = tinyMCELang['lang_dir'];
|
|
||||||
|
|
||||||
// Setup title
|
|
||||||
var re = new RegExp('{|\\\$|}', 'g');
|
|
||||||
var title = document.title.replace(re, "");
|
|
||||||
if (typeof tinyMCELang[title] != "undefined") {
|
|
||||||
var divElm = document.createElement("div");
|
|
||||||
divElm.innerHTML = tinyMCELang[title];
|
|
||||||
document.title = divElm.innerHTML;
|
|
||||||
|
|
||||||
if (tinyMCE.setWindowTitle != null)
|
|
||||||
tinyMCE.setWindowTitle(window, divElm.innerHTML);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Output Popup CSS class
|
|
||||||
document.write('<link href="' + tinyMCE.getParam("popups_css") + '" rel="stylesheet" type="text/css">');
|
|
||||||
|
|
||||||
tinyMCE.addEvent(window, "load", this.onLoad);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
TinyMCE_Popup.prototype.onLoad = function() {
|
|
||||||
var dir, i, elms, body = document.body;
|
|
||||||
|
|
||||||
body.onkeydown = function (e) {
|
|
||||||
e = e ? e : window.event;
|
|
||||||
if ( e.keyCode == 27 && !e.shiftKey && !e.controlKey && !e.altKey ) {
|
|
||||||
tinyMCE.closeWindow(window);
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (tinyMCE.getWindowArg('mce_replacevariables', true))
|
window.opener = win;
|
||||||
body.innerHTML = tinyMCE.applyTemplate(body.innerHTML, tinyMCE.windowArgs);
|
this.windowOpener = win;
|
||||||
|
this.onLoadEval = "";
|
||||||
|
|
||||||
dir = tinyMCE.selectedInstance.settings['directionality'];
|
// Setup parent references
|
||||||
if (dir == "rtl" && document.forms && document.forms.length > 0) {
|
tinyMCE = win.tinyMCE;
|
||||||
elms = document.forms[0].elements;
|
tinyMCELang = win.tinyMCELang;
|
||||||
for (i=0; i<elms.length; i++) {
|
|
||||||
if ((elms[i].type == "text" || elms[i].type == "textarea") && elms[i].getAttribute("dir") != "ltr")
|
inst = tinyMCE.selectedInstance;
|
||||||
elms[i].dir = dir;
|
this.isWindow = tinyMCE.getWindowArg('mce_inside_iframe', false) == false;
|
||||||
|
this.storeSelection = (tinyMCE.isRealIE) && !this.isWindow && tinyMCE.getWindowArg('mce_store_selection', true);
|
||||||
|
|
||||||
|
if (this.isWindow)
|
||||||
|
window.focus();
|
||||||
|
|
||||||
|
// Store selection
|
||||||
|
if (this.storeSelection)
|
||||||
|
inst.selectionBookmark = inst.selection.getBookmark(true);
|
||||||
|
|
||||||
|
// Setup dir
|
||||||
|
if (tinyMCELang['lang_dir'])
|
||||||
|
document.dir = tinyMCELang['lang_dir'];
|
||||||
|
|
||||||
|
// Setup title
|
||||||
|
var re = new RegExp('{|\\\$|}', 'g');
|
||||||
|
var title = document.title.replace(re, "");
|
||||||
|
if (typeof tinyMCELang[title] != "undefined") {
|
||||||
|
var divElm = document.createElement("div");
|
||||||
|
divElm.innerHTML = tinyMCELang[title];
|
||||||
|
document.title = divElm.innerHTML;
|
||||||
|
|
||||||
|
if (tinyMCE.setWindowTitle != null)
|
||||||
|
tinyMCE.setWindowTitle(window, divElm.innerHTML);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (body.style.display == 'none')
|
// Output Popup CSS class
|
||||||
body.style.display = 'block';
|
document.write('<link href="' + tinyMCE.getParam("popups_css") + '" rel="stylesheet" type="text/css">');
|
||||||
|
|
||||||
// Execute real onload (Opera fix)
|
if (tinyMCE.getParam("popups_css_add")) {
|
||||||
if (tinyMCEPopup.onLoadEval != "")
|
c = tinyMCE.getParam("popups_css_add");
|
||||||
eval(tinyMCEPopup.onLoadEval);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
// Is relative
|
||||||
|
if (c.indexOf('://') == -1 && c.charAt(0) != '/')
|
||||||
|
c = tinyMCE.documentBasePath + "/" + c;
|
||||||
|
|
||||||
TinyMCE_Popup.prototype.executeOnLoad = function(str) {
|
document.write('<link href="' + c + '" rel="stylesheet" type="text/css">');
|
||||||
if (tinyMCE.isOpera)
|
}
|
||||||
this.onLoadEval = str;
|
|
||||||
else
|
|
||||||
eval(str);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
tinyMCE.addEvent(window, "load", this.onLoad);
|
||||||
|
},
|
||||||
|
|
||||||
TinyMCE_Popup.prototype.resizeToInnerSize = function() {
|
onLoad : function() {
|
||||||
// Netscape 7.1 workaround
|
var dir, i, elms, body = document.body;
|
||||||
if (this.isWindow && tinyMCE.isNS71) {
|
|
||||||
window.resizeBy(0, 10);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.isWindow) {
|
if (tinyMCE.getWindowArg('mce_replacevariables', true))
|
||||||
var doc = document;
|
body.innerHTML = tinyMCE.applyTemplate(body.innerHTML, tinyMCE.windowArgs);
|
||||||
var body = doc.body;
|
|
||||||
var oldMargin, wrapper, iframe, nodes, dx, dy;
|
dir = tinyMCE.selectedInstance.settings['directionality'];
|
||||||
|
if (dir == "rtl" && document.forms && document.forms.length > 0) {
|
||||||
|
elms = document.forms[0].elements;
|
||||||
|
for (i=0; i<elms.length; i++) {
|
||||||
|
if ((elms[i].type == "text" || elms[i].type == "textarea") && elms[i].getAttribute("dir") != "ltr")
|
||||||
|
elms[i].dir = dir;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (body.style.display == 'none')
|
if (body.style.display == 'none')
|
||||||
body.style.display = 'block';
|
body.style.display = 'block';
|
||||||
|
|
||||||
// Remove margin
|
// Execute real onload (Opera fix)
|
||||||
oldMargin = body.style.margin;
|
if (tinyMCEPopup.onLoadEval != "")
|
||||||
body.style.margin = '0';
|
eval(tinyMCEPopup.onLoadEval);
|
||||||
|
},
|
||||||
|
|
||||||
// Create wrapper
|
executeOnLoad : function(str) {
|
||||||
wrapper = doc.createElement("div");
|
if (tinyMCE.isOpera)
|
||||||
wrapper.id = 'mcBodyWrapper';
|
this.onLoadEval = str;
|
||||||
wrapper.style.display = 'none';
|
else
|
||||||
wrapper.style.margin = '0';
|
eval(str);
|
||||||
|
},
|
||||||
|
|
||||||
// Wrap body elements
|
resizeToInnerSize : function() {
|
||||||
nodes = doc.body.childNodes;
|
// Netscape 7.1 workaround
|
||||||
for (var i=nodes.length-1; i>=0; i--) {
|
if (this.isWindow && tinyMCE.isNS71) {
|
||||||
if (wrapper.hasChildNodes())
|
window.resizeBy(0, 10);
|
||||||
wrapper.insertBefore(nodes[i].cloneNode(true), wrapper.firstChild);
|
return;
|
||||||
else
|
|
||||||
wrapper.appendChild(nodes[i].cloneNode(true));
|
|
||||||
|
|
||||||
nodes[i].parentNode.removeChild(nodes[i]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add wrapper
|
if (this.isWindow) {
|
||||||
doc.body.appendChild(wrapper);
|
var doc = document;
|
||||||
|
var body = doc.body;
|
||||||
|
var oldMargin, wrapper, iframe, nodes, dx, dy;
|
||||||
|
|
||||||
// Create iframe
|
if (body.style.display == 'none')
|
||||||
iframe = document.createElement("iframe");
|
body.style.display = 'block';
|
||||||
iframe.id = "mcWinIframe";
|
|
||||||
iframe.src = document.location.href.toLowerCase().indexOf('https') == -1 ? "about:blank" : tinyMCE.settings['default_document'];
|
|
||||||
iframe.width = "100%";
|
|
||||||
iframe.height = "100%";
|
|
||||||
iframe.style.margin = '0';
|
|
||||||
|
|
||||||
// Add iframe
|
// Remove margin
|
||||||
doc.body.appendChild(iframe);
|
oldMargin = body.style.margin;
|
||||||
|
body.style.margin = '0';
|
||||||
|
|
||||||
// Measure iframe
|
// Create wrapper
|
||||||
iframe = document.getElementById('mcWinIframe');
|
wrapper = doc.createElement("div");
|
||||||
dx = tinyMCE.getWindowArg('mce_width') - iframe.clientWidth;
|
wrapper.id = 'mcBodyWrapper';
|
||||||
dy = tinyMCE.getWindowArg('mce_height') - iframe.clientHeight;
|
wrapper.style.display = 'none';
|
||||||
|
wrapper.style.margin = '0';
|
||||||
|
|
||||||
// Resize window
|
// Wrap body elements
|
||||||
// tinyMCE.debug(tinyMCE.getWindowArg('mce_width') + "," + tinyMCE.getWindowArg('mce_height') + " - " + dx + "," + dy);
|
nodes = doc.body.childNodes;
|
||||||
window.resizeBy(dx, dy);
|
for (var i=nodes.length-1; i>=0; i--) {
|
||||||
|
if (wrapper.hasChildNodes())
|
||||||
|
wrapper.insertBefore(nodes[i].cloneNode(true), wrapper.firstChild);
|
||||||
|
else
|
||||||
|
wrapper.appendChild(nodes[i].cloneNode(true));
|
||||||
|
|
||||||
// Hide iframe and show wrapper
|
nodes[i].parentNode.removeChild(nodes[i]);
|
||||||
body.style.margin = oldMargin;
|
}
|
||||||
iframe.style.display = 'none';
|
|
||||||
wrapper.style.display = 'block';
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
// Add wrapper
|
||||||
|
doc.body.appendChild(wrapper);
|
||||||
|
|
||||||
TinyMCE_Popup.prototype.resizeToContent = function() {
|
// Create iframe
|
||||||
var isMSIE = (navigator.appName == "Microsoft Internet Explorer");
|
iframe = document.createElement("iframe");
|
||||||
var isOpera = (navigator.userAgent.indexOf("Opera") != -1);
|
iframe.id = "mcWinIframe";
|
||||||
|
iframe.src = document.location.href.toLowerCase().indexOf('https') == -1 ? "about:blank" : tinyMCE.settings['default_document'];
|
||||||
|
iframe.width = "100%";
|
||||||
|
iframe.height = "100%";
|
||||||
|
iframe.style.margin = '0';
|
||||||
|
|
||||||
if (isOpera)
|
// Add iframe
|
||||||
return;
|
doc.body.appendChild(iframe);
|
||||||
|
|
||||||
if (isMSIE) {
|
// Measure iframe
|
||||||
try { window.resizeTo(10, 10); } catch (e) {}
|
iframe = document.getElementById('mcWinIframe');
|
||||||
|
dx = tinyMCE.getWindowArg('mce_width') - iframe.clientWidth;
|
||||||
|
dy = tinyMCE.getWindowArg('mce_height') - iframe.clientHeight;
|
||||||
|
|
||||||
var elm = document.body;
|
// Resize window
|
||||||
var width = elm.offsetWidth;
|
// tinyMCE.debug(tinyMCE.getWindowArg('mce_width') + "," + tinyMCE.getWindowArg('mce_height') + " - " + dx + "," + dy);
|
||||||
var height = elm.offsetHeight;
|
window.resizeBy(dx, dy);
|
||||||
var dx = (elm.scrollWidth - width) + 4;
|
|
||||||
var dy = elm.scrollHeight - height;
|
|
||||||
|
|
||||||
try { window.resizeBy(dx, dy); } catch (e) {}
|
// Hide iframe and show wrapper
|
||||||
} else {
|
body.style.margin = oldMargin;
|
||||||
window.scrollBy(1000, 1000);
|
iframe.style.display = 'none';
|
||||||
if (window.scrollX > 0 || window.scrollY > 0) {
|
wrapper.style.display = 'block';
|
||||||
window.resizeBy(window.innerWidth * 2, window.innerHeight * 2);
|
|
||||||
window.sizeToContent();
|
|
||||||
window.scrollTo(0, 0);
|
|
||||||
var x = parseInt(screen.width / 2.0) - (window.outerWidth / 2.0);
|
|
||||||
var y = parseInt(screen.height / 2.0) - (window.outerHeight / 2.0);
|
|
||||||
window.moveTo(x, y);
|
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
};
|
|
||||||
|
|
||||||
|
resizeToContent : function() {
|
||||||
|
var isMSIE = (navigator.appName == "Microsoft Internet Explorer");
|
||||||
|
var isOpera = (navigator.userAgent.indexOf("Opera") != -1);
|
||||||
|
|
||||||
TinyMCE_Popup.prototype.getWindowArg = function(name, default_value) {
|
if (isOpera)
|
||||||
return tinyMCE.getWindowArg(name, default_value);
|
return;
|
||||||
};
|
|
||||||
|
|
||||||
|
if (isMSIE) {
|
||||||
|
try { window.resizeTo(10, 10); } catch (e) {}
|
||||||
|
|
||||||
TinyMCE_Popup.prototype.restoreSelection = function() {
|
var elm = document.body;
|
||||||
if (this.storeSelection) {
|
var width = elm.offsetWidth;
|
||||||
|
var height = elm.offsetHeight;
|
||||||
|
var dx = (elm.scrollWidth - width) + 4;
|
||||||
|
var dy = elm.scrollHeight - height;
|
||||||
|
|
||||||
|
try { window.resizeBy(dx, dy); } catch (e) {}
|
||||||
|
} else {
|
||||||
|
window.scrollBy(1000, 1000);
|
||||||
|
if (window.scrollX > 0 || window.scrollY > 0) {
|
||||||
|
window.resizeBy(window.innerWidth * 2, window.innerHeight * 2);
|
||||||
|
window.sizeToContent();
|
||||||
|
window.scrollTo(0, 0);
|
||||||
|
var x = parseInt(screen.width / 2.0) - (window.outerWidth / 2.0);
|
||||||
|
var y = parseInt(screen.height / 2.0) - (window.outerHeight / 2.0);
|
||||||
|
window.moveTo(x, y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
getWindowArg : function(name, default_value) {
|
||||||
|
return tinyMCE.getWindowArg(name, default_value);
|
||||||
|
},
|
||||||
|
|
||||||
|
restoreSelection : function() {
|
||||||
|
if (this.storeSelection) {
|
||||||
|
var inst = tinyMCE.selectedInstance;
|
||||||
|
|
||||||
|
inst.getWin().focus();
|
||||||
|
|
||||||
|
if (inst.selectionBookmark)
|
||||||
|
inst.selection.moveToBookmark(inst.selectionBookmark);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
execCommand : function(command, user_interface, value) {
|
||||||
var inst = tinyMCE.selectedInstance;
|
var inst = tinyMCE.selectedInstance;
|
||||||
|
|
||||||
inst.getWin().focus();
|
this.restoreSelection();
|
||||||
|
inst.execCommand(command, user_interface, value);
|
||||||
|
|
||||||
if (inst.selectionBookmark)
|
// Store selection
|
||||||
inst.selection.moveToBookmark(inst.selectionBookmark);
|
if (this.storeSelection)
|
||||||
|
inst.selectionBookmark = inst.selection.getBookmark(true);
|
||||||
|
},
|
||||||
|
|
||||||
|
close : function() {
|
||||||
|
tinyMCE.closeWindow(window);
|
||||||
|
},
|
||||||
|
|
||||||
|
pickColor : function(e, element_id) {
|
||||||
|
tinyMCE.selectedInstance.execCommand('mceColorPicker', true, {
|
||||||
|
element_id : element_id,
|
||||||
|
document : document,
|
||||||
|
window : window,
|
||||||
|
store_selection : false
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
openBrowser : function(element_id, type, option) {
|
||||||
|
var cb = tinyMCE.getParam(option, tinyMCE.getParam("file_browser_callback"));
|
||||||
|
var url = document.getElementById(element_id).value;
|
||||||
|
|
||||||
|
tinyMCE.setWindowArg("window", window);
|
||||||
|
tinyMCE.setWindowArg("document", document);
|
||||||
|
|
||||||
|
// Call to external callback
|
||||||
|
if (eval('typeof(tinyMCEPopup.windowOpener.' + cb + ')') == "undefined")
|
||||||
|
alert("Callback function: " + cb + " could not be found.");
|
||||||
|
else
|
||||||
|
eval("tinyMCEPopup.windowOpener." + cb + "(element_id, url, type, window);");
|
||||||
|
},
|
||||||
|
|
||||||
|
importClass : function(c) {
|
||||||
|
window[c] = function() {};
|
||||||
|
|
||||||
|
for (var n in window.opener[c].prototype)
|
||||||
|
window[c].prototype[n] = window.opener[c].prototype[n];
|
||||||
|
|
||||||
|
window[c].constructor = window.opener[c].constructor;
|
||||||
}
|
}
|
||||||
};
|
|
||||||
|
|
||||||
|
};
|
||||||
TinyMCE_Popup.prototype.execCommand = function(command, user_interface, value) {
|
|
||||||
var inst = tinyMCE.selectedInstance;
|
|
||||||
|
|
||||||
this.restoreSelection();
|
|
||||||
inst.execCommand(command, user_interface, value);
|
|
||||||
|
|
||||||
// Store selection
|
|
||||||
if (this.storeSelection)
|
|
||||||
inst.selectionBookmark = inst.selection.getBookmark(true);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
TinyMCE_Popup.prototype.close = function() {
|
|
||||||
tinyMCE.closeWindow(window);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
TinyMCE_Popup.prototype.pickColor = function(e, element_id) {
|
|
||||||
tinyMCE.selectedInstance.execCommand('mceColorPicker', true, {
|
|
||||||
element_id : element_id,
|
|
||||||
document : document,
|
|
||||||
window : window,
|
|
||||||
store_selection : false
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
TinyMCE_Popup.prototype.openBrowser = function(element_id, type, option) {
|
|
||||||
var cb = tinyMCE.getParam(option, tinyMCE.getParam("file_browser_callback"));
|
|
||||||
var url = document.getElementById(element_id).value;
|
|
||||||
|
|
||||||
tinyMCE.setWindowArg("window", window);
|
|
||||||
tinyMCE.setWindowArg("document", document);
|
|
||||||
|
|
||||||
// Call to external callback
|
|
||||||
if (eval('typeof(tinyMCEPopup.windowOpener.' + cb + ')') == "undefined")
|
|
||||||
alert("Callback function: " + cb + " could not be found.");
|
|
||||||
else
|
|
||||||
eval("tinyMCEPopup.windowOpener." + cb + "(element_id, url, type, window);");
|
|
||||||
};
|
|
||||||
|
|
||||||
TinyMCE_Popup.prototype.importClass = function(c) {
|
|
||||||
window[c] = function() {};
|
|
||||||
|
|
||||||
for (var n in window.opener[c].prototype)
|
|
||||||
window[c].prototype[n] = window.opener[c].prototype[n];
|
|
||||||
|
|
||||||
window[c].constructor = window.opener[c].constructor;
|
|
||||||
};
|
|
||||||
|
|
||||||
// Setup global instance
|
// Setup global instance
|
||||||
var tinyMCEPopup = new TinyMCE_Popup();
|
var tinyMCEPopup = new TinyMCE_Popup();
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* $RCSfile: form_utils.js,v $
|
* $Id: form_utils.js 43 2006-08-08 16:10:07Z spocke $
|
||||||
* $Revision: 1.10 $
|
|
||||||
* $Date: 2006/03/22 12:21:24 $
|
|
||||||
*
|
*
|
||||||
* Various form utilitiy functions.
|
* Various form utilitiy functions.
|
||||||
*
|
*
|
||||||
@ -9,18 +7,20 @@
|
|||||||
* @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
|
* @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
var themeBaseURL = tinyMCE.baseURL + '/themes/' + tinyMCE.getParam("theme");
|
||||||
|
|
||||||
function getColorPickerHTML(id, target_form_element) {
|
function getColorPickerHTML(id, target_form_element) {
|
||||||
var html = "";
|
var h = "";
|
||||||
|
|
||||||
html += '<a id="' + id + '_link" href="javascript:void(0);" onkeydown="pickColor(event,\'' + target_form_element +'\');" onmousedown="pickColor(event,\'' + target_form_element +'\');return false;">';
|
h += '<a id="' + id + '_link" href="javascript:void(0);" onkeydown="pickColor(event,\'' + target_form_element +'\');" onmousedown="pickColor(event,\'' + target_form_element +'\');return false;">';
|
||||||
html += '<img id="' + id + '" src="../../themes/' + tinyMCE.getParam("theme") + '/images/color.gif"';
|
h += '<img id="' + id + '" src="' + themeBaseURL + '/images/color.gif"';
|
||||||
html += ' onmouseover="this.className=\'mceButtonOver\'"';
|
h += ' onmouseover="this.className=\'mceButtonOver\'"';
|
||||||
html += ' onmouseout="this.className=\'mceButtonNormal\'"';
|
h += ' onmouseout="this.className=\'mceButtonNormal\'"';
|
||||||
html += ' onmousedown="this.className=\'mceButtonDown\'"';
|
h += ' onmousedown="this.className=\'mceButtonDown\'"';
|
||||||
html += ' width="20" height="16" border="0" title="' + tinyMCE.getLang('lang_browse') + '"';
|
h += ' width="20" height="16" border="0" title="' + tinyMCE.getLang('lang_browse') + '"';
|
||||||
html += ' class="mceButtonNormal" alt="' + tinyMCE.getLang('lang_browse') + '" /></a>';
|
h += ' class="mceButtonNormal" alt="' + tinyMCE.getLang('lang_browse') + '" /></a>';
|
||||||
|
|
||||||
return html;
|
return h;
|
||||||
}
|
}
|
||||||
|
|
||||||
function pickColor(e, target_form_element) {
|
function pickColor(e, target_form_element) {
|
||||||
@ -57,7 +57,7 @@ function getBrowserHTML(id, target_form_element, type, prefix) {
|
|||||||
var html = "";
|
var html = "";
|
||||||
|
|
||||||
html += '<a id="' + id + '_link" href="javascript:openBrower(\'' + id + '\',\'' + target_form_element + '\', \'' + type + '\',\'' + option + '\');" onmousedown="return false;">';
|
html += '<a id="' + id + '_link" href="javascript:openBrower(\'' + id + '\',\'' + target_form_element + '\', \'' + type + '\',\'' + option + '\');" onmousedown="return false;">';
|
||||||
html += '<img id="' + id + '" src="../../themes/' + tinyMCE.getParam("theme") + '/images/browse.gif"';
|
html += '<img id="' + id + '" src="' + themeBaseURL + '/images/browse.gif"';
|
||||||
html += ' onmouseover="this.className=\'mceButtonOver\';"';
|
html += ' onmouseover="this.className=\'mceButtonOver\';"';
|
||||||
html += ' onmouseout="this.className=\'mceButtonNormal\';"';
|
html += ' onmouseout="this.className=\'mceButtonNormal\';"';
|
||||||
html += ' onmousedown="this.className=\'mceButtonDown\';"';
|
html += ' onmousedown="this.className=\'mceButtonDown\';"';
|
||||||
@ -92,9 +92,10 @@ function selectByValue(form_obj, field_name, value, add_custom, ignore_case) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!found && add_custom && value != '') {
|
if (!found && add_custom && value != '') {
|
||||||
var option = new Option('Value: ' + value, value);
|
var option = new Option(value, value);
|
||||||
option.selected = true;
|
option.selected = true;
|
||||||
sel.options[sel.options.length] = option;
|
sel.options[sel.options.length] = option;
|
||||||
|
sel.selectedIndex = sel.options.length - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return found;
|
return found;
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* $RCSfile: mclayer.js,v $
|
* $Id: mclayer.js 18 2006-06-29 14:11:23Z spocke $
|
||||||
* $Revision: 1.2 $
|
|
||||||
* $Date: 2006/02/06 20:11:09 $
|
|
||||||
*
|
*
|
||||||
* Moxiecode floating layer script.
|
* Moxiecode floating layer script.
|
||||||
*
|
*
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* $RCSfile: mctabs.js,v $
|
* $Id: mctabs.js 18 2006-06-29 14:11:23Z spocke $
|
||||||
* $Revision: 1.2 $
|
|
||||||
* $Date: 2006/02/06 20:11:09 $
|
|
||||||
*
|
*
|
||||||
* Moxiecode DHTML Tabs script.
|
* Moxiecode DHTML Tabs script.
|
||||||
*
|
*
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* $RCSfile: validate.js,v $
|
* $Id: validate.js 65 2006-08-24 15:54:55Z spocke $
|
||||||
* $Revision: 1.3 $
|
|
||||||
* $Date: 2006/02/06 20:11:09 $
|
|
||||||
*
|
*
|
||||||
* Various form validation methods.
|
* Various form validation methods.
|
||||||
*
|
*
|
||||||
@ -9,42 +7,213 @@
|
|||||||
* @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
|
* @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function testRegExp(form_name, element_name, re) {
|
/**
|
||||||
return new RegExp(re).test(document.forms[form_name].elements[element_name].value);
|
// String validation:
|
||||||
}
|
|
||||||
|
|
||||||
function validateString(form_name, element_name) {
|
if (!Validator.isEmail('myemail'))
|
||||||
return (document.forms[form_name].elements[element_name].value.length > 0);
|
alert('Invalid email.');
|
||||||
}
|
|
||||||
|
|
||||||
function validateSelection(form_name, element_name) {
|
// Form validation:
|
||||||
return (document.forms[form_name].elements[element_name].selectedIndex > 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
function validateCheckBox(form_name, element_name) {
|
var f = document.forms['myform'];
|
||||||
return document.forms[form_name].elements[element_name].checked;
|
|
||||||
}
|
|
||||||
|
|
||||||
function validateCleanString(form_name, element_name) {
|
if (!Validator.isEmail(f.myemail))
|
||||||
return testRegExp(form_name, element_name, '^[A-Za-z0-9_]+$');
|
alert('Invalid email.');
|
||||||
}
|
*/
|
||||||
|
|
||||||
function validateEmail(form_name, element_name) {
|
var Validator = {
|
||||||
return testRegExp(form_name, element_name, '^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+@[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$');
|
isEmail : function(s) {
|
||||||
}
|
return this.test(s, '^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+@[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$');
|
||||||
|
},
|
||||||
|
|
||||||
function validateAbsUrl(form_name, element_name) {
|
isAbsUrl : function(s) {
|
||||||
return testRegExp(form_name, element_name, '^(news|telnet|nttp|file|http|ftp|https)://[-A-Za-z0-9\\.]+$');
|
return this.test(s, '^(news|telnet|nttp|file|http|ftp|https)://[-A-Za-z0-9\\.]+\\/?.*$');
|
||||||
}
|
},
|
||||||
|
|
||||||
function validateNumber(form_name, element_name, allow_blank) {
|
isSize : function(s) {
|
||||||
return (!allow_blank && value == '') ? false : testRegExp(form_name, element_name, '^-?[0-9]*\\.?[0-9]*$');
|
return this.test(s, '^[0-9]+(px|%)?$');
|
||||||
}
|
},
|
||||||
|
|
||||||
function validateSize(form_name, element_name,) {
|
isId : function(s) {
|
||||||
return testRegExp(form_name, element_name, '^[0-9]+(px|%)?$');
|
return this.test(s, '^[A-Za-z_]([A-Za-z0-9_])*$');
|
||||||
}
|
},
|
||||||
|
|
||||||
function validateID(form_name, element_name,) {
|
isEmpty : function(s) {
|
||||||
return testRegExp(form_name, element_name, '^[A-Za-z_]([A-Za-z0-9_])*$');
|
var nl, i;
|
||||||
}
|
|
||||||
|
if (s.nodeName == 'SELECT' && s.selectedIndex < 1)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if (s.type == 'checkbox' && !s.checked)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if (s.type == 'radio') {
|
||||||
|
for (i=0, nl = s.form.elements; i<nl.length; i++) {
|
||||||
|
if (nl[i].type == "radio" && nl[i].name == s.name && nl[i].checked)
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new RegExp('^\\s*$').test(s.nodeType == 1 ? s.value : s);
|
||||||
|
},
|
||||||
|
|
||||||
|
isNumber : function(s, d) {
|
||||||
|
return !isNaN(s.nodeType == 1 ? s.value : s) && (!d || !this.test(s, '^-?[0-9]*\\.[0-9]*$'));
|
||||||
|
},
|
||||||
|
|
||||||
|
test : function(s, p) {
|
||||||
|
s = s.nodeType == 1 ? s.value : s;
|
||||||
|
|
||||||
|
return s == '' || new RegExp(p).test(s);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var AutoValidator = {
|
||||||
|
settings : {
|
||||||
|
id_cls : 'id',
|
||||||
|
int_cls : 'int',
|
||||||
|
url_cls : 'url',
|
||||||
|
number_cls : 'number',
|
||||||
|
email_cls : 'email',
|
||||||
|
size_cls : 'size',
|
||||||
|
required_cls : 'required',
|
||||||
|
invalid_cls : 'invalid',
|
||||||
|
min_cls : 'min',
|
||||||
|
max_cls : 'max'
|
||||||
|
},
|
||||||
|
|
||||||
|
init : function(s) {
|
||||||
|
var n;
|
||||||
|
|
||||||
|
for (n in s)
|
||||||
|
this.settings[n] = s[n];
|
||||||
|
},
|
||||||
|
|
||||||
|
validate : function(f) {
|
||||||
|
var i, nl, s = this.settings, c = 0;
|
||||||
|
|
||||||
|
nl = this.tags(f, 'label');
|
||||||
|
for (i=0; i<nl.length; i++)
|
||||||
|
this.removeClass(nl[i], s.invalid_cls);
|
||||||
|
|
||||||
|
c += this.validateElms(f, 'input');
|
||||||
|
c += this.validateElms(f, 'select');
|
||||||
|
c += this.validateElms(f, 'textarea');
|
||||||
|
|
||||||
|
return c == 3;
|
||||||
|
},
|
||||||
|
|
||||||
|
invalidate : function(n) {
|
||||||
|
this.mark(n.form, n);
|
||||||
|
},
|
||||||
|
|
||||||
|
reset : function(e) {
|
||||||
|
var t = new Array('label', 'input', 'select', 'textarea');
|
||||||
|
var i, j, nl, s = this.settings;
|
||||||
|
|
||||||
|
if (e == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (i=0; i<t.length; i++) {
|
||||||
|
nl = this.tags(e.form ? e.form : e, t[i]);
|
||||||
|
for (j=0; j<nl.length; j++)
|
||||||
|
this.removeClass(nl[j], s.invalid_cls);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
validateElms : function(f, e) {
|
||||||
|
var nl, i, n, s = this.settings, st = true, va = Validator, v;
|
||||||
|
|
||||||
|
nl = this.tags(f, e);
|
||||||
|
for (i=0; i<nl.length; i++) {
|
||||||
|
n = nl[i];
|
||||||
|
|
||||||
|
this.removeClass(n, s.invalid_cls);
|
||||||
|
|
||||||
|
if (this.hasClass(n, s.required_cls) && va.isEmpty(n))
|
||||||
|
st = this.mark(f, n);
|
||||||
|
|
||||||
|
if (this.hasClass(n, s.number_cls) && !va.isNumber(n))
|
||||||
|
st = this.mark(f, n);
|
||||||
|
|
||||||
|
if (this.hasClass(n, s.int_cls) && !va.isNumber(n, true))
|
||||||
|
st = this.mark(f, n);
|
||||||
|
|
||||||
|
if (this.hasClass(n, s.url_cls) && !va.isAbsUrl(n))
|
||||||
|
st = this.mark(f, n);
|
||||||
|
|
||||||
|
if (this.hasClass(n, s.email_cls) && !va.isEmail(n))
|
||||||
|
st = this.mark(f, n);
|
||||||
|
|
||||||
|
if (this.hasClass(n, s.size_cls) && !va.isSize(n))
|
||||||
|
st = this.mark(f, n);
|
||||||
|
|
||||||
|
if (this.hasClass(n, s.id_cls) && !va.isId(n))
|
||||||
|
st = this.mark(f, n);
|
||||||
|
|
||||||
|
if (this.hasClass(n, s.min_cls, true)) {
|
||||||
|
v = this.getNum(n, s.min_cls);
|
||||||
|
|
||||||
|
if (isNaN(v) || parseInt(n.value) < parseInt(v))
|
||||||
|
st = this.mark(f, n);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.hasClass(n, s.max_cls, true)) {
|
||||||
|
v = this.getNum(n, s.max_cls);
|
||||||
|
|
||||||
|
if (isNaN(v) || parseInt(n.value) > parseInt(v))
|
||||||
|
st = this.mark(f, n);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return st;
|
||||||
|
},
|
||||||
|
|
||||||
|
hasClass : function(n, c, d) {
|
||||||
|
return new RegExp('\\b' + c + (d ? '[0-9]+' : '') + '\\b', 'g').test(n.className);
|
||||||
|
},
|
||||||
|
|
||||||
|
getNum : function(n, c) {
|
||||||
|
c = n.className.match(new RegExp('\\b' + c + '([0-9]+)\\b', 'g'))[0];
|
||||||
|
c = c.replace(/[^0-9]/g, '');
|
||||||
|
|
||||||
|
return c;
|
||||||
|
},
|
||||||
|
|
||||||
|
addClass : function(n, c, b) {
|
||||||
|
var o = this.removeClass(n, c);
|
||||||
|
n.className = b ? c + (o != '' ? (' ' + o) : '') : (o != '' ? (o + ' ') : '') + c;
|
||||||
|
},
|
||||||
|
|
||||||
|
removeClass : function(n, c) {
|
||||||
|
c = n.className.replace(new RegExp("(^|\\s+)" + c + "(\\s+|$)"), ' ');
|
||||||
|
return n.className = c != ' ' ? c : '';
|
||||||
|
},
|
||||||
|
|
||||||
|
tags : function(f, s) {
|
||||||
|
return f.getElementsByTagName(s);
|
||||||
|
},
|
||||||
|
|
||||||
|
mark : function(f, n) {
|
||||||
|
var s = this.settings;
|
||||||
|
|
||||||
|
this.addClass(n, s.invalid_cls);
|
||||||
|
this.markLabels(f, n, s.invalid_cls);
|
||||||
|
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
|
||||||
|
markLabels : function(f, n, ic) {
|
||||||
|
var nl, i;
|
||||||
|
|
||||||
|
nl = this.tags(f, "label");
|
||||||
|
for (i=0; i<nl.length; i++) {
|
||||||
|
if (nl[i].getAttribute("for") == n.id || nl[i].htmlFor == n.id)
|
||||||
|
this.addClass(nl[i], ic);
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
@ -15,8 +15,9 @@ class WP_Scripts {
|
|||||||
$this->add( 'sack', '/wp-includes/js/tw-sack.js', false, '1.6.1' );
|
$this->add( 'sack', '/wp-includes/js/tw-sack.js', false, '1.6.1' );
|
||||||
$this->add( 'quicktags', '/wp-includes/js/quicktags.js', false, '3517' );
|
$this->add( 'quicktags', '/wp-includes/js/quicktags.js', false, '3517' );
|
||||||
$this->add( 'colorpicker', '/wp-includes/js/colorpicker.js', false, '3517' );
|
$this->add( 'colorpicker', '/wp-includes/js/colorpicker.js', false, '3517' );
|
||||||
$this->add( 'tiny_mce', '/wp-includes/js/tinymce/tiny_mce_gzip.php', false, '09212006' );
|
$this->add( 'tiny_mce', '/wp-includes/js/tinymce/tiny_mce_gzip.php', false, '20061113' );
|
||||||
$this->add( 'wp_tiny_mce', '/wp-includes/js/tinymce/tiny_mce_config.php', array('tiny_mce'), '09212006' );
|
$mce_config = apply_filters('tiny_mce_config_url', '/wp-includes/js/tinymce/tiny_mce_config.php');
|
||||||
|
$this->add( 'wp_tiny_mce', $mce_config, array('tiny_mce'), '20061113' );
|
||||||
$this->add( 'prototype', '/wp-includes/js/prototype.js', false, '1.5.0');
|
$this->add( 'prototype', '/wp-includes/js/prototype.js', false, '1.5.0');
|
||||||
$this->add( 'autosave', '/wp-includes/js/autosave.js.php', array('prototype', 'sack'), '4206');
|
$this->add( 'autosave', '/wp-includes/js/autosave.js.php', array('prototype', 'sack'), '4206');
|
||||||
$this->add( 'wp-ajax', '/wp-includes/js/wp-ajax-js.php', array('prototype'), '4459');
|
$this->add( 'wp-ajax', '/wp-includes/js/wp-ajax-js.php', array('prototype'), '4459');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user