W.I.P. of implementation and integration of open office document editor (.odt) with file system

This commit is contained in:
Hadi Nategh 2016-07-19 18:20:08 +02:00 committed by Ralf Becker
parent 932fe1617c
commit 8434c3051f
235 changed files with 41707 additions and 4 deletions

View File

@ -52,6 +52,9 @@ function expose (widget)
// For filtering to only show things we can handle
var mime_regex = new RegExp(/(video\/(mp4|ogg|webm))|(image\/:*(?!tif|x-xcf|pdf))/);
// open office document mime type currently supported by webodf editor
var mime_odf_regex = new RegExp(/application\/vnd\.oasis\.opendocument\.text/);
// IE only supports video/mp4 mime type
if (navigator.userAgent.match(/(MSIE|Trident)/)) mime_regex.compile(/(video\/mp4)|(image\/:*(?!tif|x-xcf|pdf))/);
@ -392,7 +395,7 @@ function expose (widget)
var self=this;
// If the media type is not supported do not bind the click handler
if (!_value || typeof _value.mime != 'string' || !_value.mime.match(mime_regex,'ig') || typeof _value.download_url == 'undefined')
if (!_value || typeof _value.mime != 'string' || (!_value.mime.match(mime_regex,'ig') && !_value.mime.match(mime_odf_regex,'ig')) || typeof _value.download_url == 'undefined')
{
return;
}
@ -400,7 +403,17 @@ function expose (widget)
{
jQuery(this.node).on('click', function(event){
// Do not trigger expose view if one of the operator keys are held
if (!event.altKey && !event.ctrlKey && !event.shiftKey && !event.metaKey) self._init_blueimp_gallery(event, _value);
if (!event.altKey && !event.ctrlKey && !event.shiftKey && !event.metaKey)
{
if (_value.mime.match(mime_regex,'ig'))
{
self._init_blueimp_gallery(event, _value);
}
else if(_value.mime.match(mime_odf_regex,'ig'))
{
self._init_odf_editor (event, _value);
}
}
event.stopImmediatePropagation();
}).addClass('et2_clickable');
}
@ -601,7 +614,21 @@ function expose (widget)
nm.applyFilters({col_filter: {mime: ''}});
}
},
expose_onclosed: function (event){}
expose_onclosed: function (event){},
/**
* Initialise odf editor handler for expose mime type handling
*
* @param {type} _event
* @param {type} _value
* @returns {undefined}
*/
_init_odf_editor: function (_event, _value)
{
egw.open_link(egw.link('/index.php', {
menuaction: 'filemanager.filemanager_ui.editor',
path: _value.download_url
}), '', '800x600');
}
});
}

661
api/js/webodf/AGPL-3.0.txt Normal file
View File

@ -0,0 +1,661 @@
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<http://www.gnu.org/licenses/>.

21497
api/js/webodf/webodf-debug.js Normal file

File diff suppressed because one or more lines are too long

936
api/js/webodf/webodf.js Normal file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,220 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>JsDoc Reference - File Index</title>
<meta name="generator" content="JsDoc Toolkit" />
<style type="text/css">
/* default.css */
body
{
font: 12px "Lucida Grande", Tahoma, Arial, Helvetica, sans-serif;
width: 800px;
}
.header
{
clear: both;
background-color: #ccc;
padding: 8px;
}
h1
{
font-size: 150%;
font-weight: bold;
padding: 0;
margin: 1em 0 0 .3em;
}
hr
{
border: none 0;
border-top: 1px solid #7F8FB1;
height: 1px;
}
pre.code
{
display: block;
padding: 8px;
border: 1px dashed #ccc;
}
#index
{
margin-top: 24px;
float: left;
width: 160px;
position: absolute;
left: 8px;
background-color: #F3F3F3;
padding: 8px;
}
#content
{
margin-left: 190px;
width: 600px;
}
.classList
{
list-style-type: none;
padding: 0;
margin: 0 0 0 8px;
font-family: arial, sans-serif;
font-size: 1em;
overflow: auto;
}
.classList li
{
padding: 0;
margin: 0 0 8px 0;
}
.summaryTable { width: 100%; }
h1.classTitle
{
font-size:170%;
line-height:130%;
}
h2 { font-size: 110%; }
caption, div.sectionTitle
{
background-color: #7F8FB1;
color: #fff;
font-size:130%;
text-align: left;
padding: 2px 6px 2px 6px;
border: 1px #7F8FB1 solid;
}
div.sectionTitle { margin-bottom: 8px; }
.summaryTable thead { display: none; }
.summaryTable td
{
vertical-align: top;
padding: 4px;
border-bottom: 1px #7F8FB1 solid;
border-right: 1px #7F8FB1 solid;
}
/*col#summaryAttributes {}*/
.summaryTable td.attributes
{
border-left: 1px #7F8FB1 solid;
width: 140px;
text-align: right;
}
td.attributes, .fixedFont
{
line-height: 15px;
color: #002EBE;
font-family: "Courier New",Courier,monospace;
font-size: 13px;
}
.summaryTable td.nameDescription
{
text-align: left;
font-size: 13px;
line-height: 15px;
}
.summaryTable td.nameDescription, .description
{
line-height: 15px;
padding: 4px;
padding-left: 4px;
}
.summaryTable { margin-bottom: 8px; }
ul.inheritsList
{
list-style: square;
margin-left: 20px;
padding-left: 0;
}
.detailList {
margin-left: 20px;
line-height: 15px;
}
.detailList dt { margin-left: 20px; }
.detailList .heading
{
font-weight: bold;
padding-bottom: 6px;
margin-left: 0;
}
.light, td.attributes, .light a:link, .light a:visited
{
color: #777;
font-style: italic;
}
.fineprint
{
text-align: right;
font-size: 10px;
}
</style>
</head>
<body>
<div id="header">
</div>
<div id="index">
<div align="center"><a href="index.html">Class Index</a>
| <a href="files.html">File Index</a></div>
<hr />
<h2>Classes</h2>
<ul class="classList">
<li><i><a href="symbols/_global_.html">_global_</a></i></li>
<li><a href="symbols/TextEditor.html">TextEditor</a></li>
<li><a href="symbols/Wodo.html">Wodo</a></li>
</ul>
<hr />
</div>
<div id="content">
<h1 class="classTitle">File Index</h1>
<div>
<h2><a href="symbols/src/wodotexteditor.js.html">wodotexteditor.js</a></h2>
<dl>
</dl>
</div>
<hr />
</div>
<div class="fineprint" style="clear:both">
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blankt">JsDoc Toolkit</a> 2.4.0 on Fri Jul 15 2016 10:59:40 GMT+0200 (CEST)
</div>
</body>
</html>

View File

@ -0,0 +1,226 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>JsDoc Reference - Index</title>
<meta name="generator" content="JsDoc Toolkit" />
<style type="text/css">
/* default.css */
body
{
font: 12px "Lucida Grande", Tahoma, Arial, Helvetica, sans-serif;
width: 800px;
}
.header
{
clear: both;
background-color: #ccc;
padding: 8px;
}
h1
{
font-size: 150%;
font-weight: bold;
padding: 0;
margin: 1em 0 0 .3em;
}
hr
{
border: none 0;
border-top: 1px solid #7F8FB1;
height: 1px;
}
pre.code
{
display: block;
padding: 8px;
border: 1px dashed #ccc;
}
#index
{
margin-top: 24px;
float: left;
width: 160px;
position: absolute;
left: 8px;
background-color: #F3F3F3;
padding: 8px;
}
#content
{
margin-left: 190px;
width: 600px;
}
.classList
{
list-style-type: none;
padding: 0;
margin: 0 0 0 8px;
font-family: arial, sans-serif;
font-size: 1em;
overflow: auto;
}
.classList li
{
padding: 0;
margin: 0 0 8px 0;
}
.summaryTable { width: 100%; }
h1.classTitle
{
font-size:170%;
line-height:130%;
}
h2 { font-size: 110%; }
caption, div.sectionTitle
{
background-color: #7F8FB1;
color: #fff;
font-size:130%;
text-align: left;
padding: 2px 6px 2px 6px;
border: 1px #7F8FB1 solid;
}
div.sectionTitle { margin-bottom: 8px; }
.summaryTable thead { display: none; }
.summaryTable td
{
vertical-align: top;
padding: 4px;
border-bottom: 1px #7F8FB1 solid;
border-right: 1px #7F8FB1 solid;
}
/*col#summaryAttributes {}*/
.summaryTable td.attributes
{
border-left: 1px #7F8FB1 solid;
width: 140px;
text-align: right;
}
td.attributes, .fixedFont
{
line-height: 15px;
color: #002EBE;
font-family: "Courier New",Courier,monospace;
font-size: 13px;
}
.summaryTable td.nameDescription
{
text-align: left;
font-size: 13px;
line-height: 15px;
}
.summaryTable td.nameDescription, .description
{
line-height: 15px;
padding: 4px;
padding-left: 4px;
}
.summaryTable { margin-bottom: 8px; }
ul.inheritsList
{
list-style: square;
margin-left: 20px;
padding-left: 0;
}
.detailList {
margin-left: 20px;
line-height: 15px;
}
.detailList dt { margin-left: 20px; }
.detailList .heading
{
font-weight: bold;
padding-bottom: 6px;
margin-left: 0;
}
.light, td.attributes, .light a:link, .light a:visited
{
color: #777;
font-style: italic;
}
.fineprint
{
text-align: right;
font-size: 10px;
}
</style>
</head>
<body>
<div id="header">
</div>
<div id="index">
<div align="center"><a href="index.html">Class Index</a>
| <a href="files.html">File Index</a></div>
<hr />
<h2>Classes</h2>
<ul class="classList">
<li><i><a href="symbols/_global_.html">_global_</a></i></li>
<li><a href="symbols/TextEditor.html">TextEditor</a></li>
<li><a href="symbols/Wodo.html">Wodo</a></li>
</ul>
<hr />
</div>
<div id="content">
<h1 class="classTitle">Class Index</h1>
<div>
<h2><a href="symbols/_global_.html">_global_</a></h2>
</div>
<hr />
<div>
<h2><a href="symbols/TextEditor.html">TextEditor</a></h2>
</div>
<hr />
<div>
<h2><a href="symbols/Wodo.html">Wodo</a></h2>
</div>
<hr />
</div>
<div class="fineprint" style="clear:both">
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blankt">JsDoc Toolkit</a> 2.4.0 on Fri Jul 15 2016 10:59:40 GMT+0200 (CEST)
</div>
</body>
</html>

View File

@ -0,0 +1,989 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="generator" content="JsDoc Toolkit" />
<title>JsDoc Reference - TextEditor</title>
<style type="text/css">
/* default.css */
body
{
font: 12px "Lucida Grande", Tahoma, Arial, Helvetica, sans-serif;
width: 800px;
}
.header
{
clear: both;
background-color: #ccc;
padding: 8px;
}
h1
{
font-size: 150%;
font-weight: bold;
padding: 0;
margin: 1em 0 0 .3em;
}
hr
{
border: none 0;
border-top: 1px solid #7F8FB1;
height: 1px;
}
pre.code
{
display: block;
padding: 8px;
border: 1px dashed #ccc;
}
#index
{
margin-top: 24px;
float: left;
width: 160px;
position: absolute;
left: 8px;
background-color: #F3F3F3;
padding: 8px;
}
#content
{
margin-left: 190px;
width: 600px;
}
.classList
{
list-style-type: none;
padding: 0;
margin: 0 0 0 8px;
font-family: arial, sans-serif;
font-size: 1em;
overflow: auto;
}
.classList li
{
padding: 0;
margin: 0 0 8px 0;
}
.summaryTable { width: 100%; }
h1.classTitle
{
font-size:170%;
line-height:130%;
}
h2 { font-size: 110%; }
caption, div.sectionTitle
{
background-color: #7F8FB1;
color: #fff;
font-size:130%;
text-align: left;
padding: 2px 6px 2px 6px;
border: 1px #7F8FB1 solid;
}
div.sectionTitle { margin-bottom: 8px; }
.summaryTable thead { display: none; }
.summaryTable td
{
vertical-align: top;
padding: 4px;
border-bottom: 1px #7F8FB1 solid;
border-right: 1px #7F8FB1 solid;
}
/*col#summaryAttributes {}*/
.summaryTable td.attributes
{
border-left: 1px #7F8FB1 solid;
width: 140px;
text-align: right;
}
td.attributes, .fixedFont
{
line-height: 15px;
color: #002EBE;
font-family: "Courier New",Courier,monospace;
font-size: 13px;
}
.summaryTable td.nameDescription
{
text-align: left;
font-size: 13px;
line-height: 15px;
}
.summaryTable td.nameDescription, .description
{
line-height: 15px;
padding: 4px;
padding-left: 4px;
}
.summaryTable { margin-bottom: 8px; }
ul.inheritsList
{
list-style: square;
margin-left: 20px;
padding-left: 0;
}
.detailList {
margin-left: 20px;
line-height: 15px;
}
.detailList dt { margin-left: 20px; }
.detailList .heading
{
font-weight: bold;
padding-bottom: 6px;
margin-left: 0;
}
.light, td.attributes, .light a:link, .light a:visited
{
color: #777;
font-style: italic;
}
.fineprint
{
text-align: right;
font-size: 10px;
}
</style>
</head>
<body>
<!-- ============================== header ================================= -->
<!-- begin static/header.html -->
<div id="header">
</div>
<!-- end static/header.html -->
<!-- ============================== classes index ============================ -->
<div id="index">
<!-- begin publish.classesIndex -->
<div align="center"><a href="../index.html">Class Index</a>
| <a href="../files.html">File Index</a></div>
<hr />
<h2>Classes</h2>
<ul class="classList">
<li><i><a href="../symbols/_global_.html">_global_</a></i></li>
<li><a href="../symbols/TextEditor.html">TextEditor</a></li>
<li><a href="../symbols/Wodo.html">Wodo</a></li>
</ul>
<hr />
<!-- end publish.classesIndex -->
</div>
<div id="content">
<!-- ============================== class title ============================ -->
<h1 class="classTitle">
Class TextEditor
</h1>
<!-- ============================== class summary ========================== -->
<p class="description">
<br /><i>Defined in: </i> <a href="../symbols/src/wodotexteditor.js.html">wodotexteditor.js</a>.
</p>
<!-- ============================== constructor summary ==================== -->
<table class="summaryTable" cellspacing="0" summary="A summary of the constructor documented in the class TextEditor.">
<caption>Class Summary</caption>
<thead>
<tr>
<th scope="col">Constructor Attributes</th>
<th scope="col">Constructor Name and Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="attributes">&nbsp;</td>
<td class="nameDescription" >
<div class="fixedFont">
<b><a href="../symbols/TextEditor.html#constructor">TextEditor</a></b>(mainContainerElementId, editorOptions)
</div>
<div class="description"></div>
</td>
</tr>
</tbody>
</table>
<!-- ============================== properties summary ===================== -->
<!-- ============================== methods summary ======================== -->
<table class="summaryTable" cellspacing="0" summary="A summary of the methods documented in the class TextEditor.">
<caption>Method Summary</caption>
<thead>
<tr>
<th scope="col">Method Attributes</th>
<th scope="col">Method Name and Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="attributes">&nbsp;</td>
<td class="nameDescription">
<div class="fixedFont"><b><a href="../symbols/TextEditor.html#addEventListener">addEventListener</a></b>(eventId, callback)
</div>
<div class="description">Registers a callback which should be called if the given event happens.</div>
</td>
</tr>
<tr>
<td class="attributes">&nbsp;</td>
<td class="nameDescription">
<div class="fixedFont"><b><a href="../symbols/TextEditor.html#closeDocument">closeDocument</a></b>(callback)
</div>
<div class="description">Closes the document, and does cleanup.</div>
</td>
</tr>
<tr>
<td class="attributes">&nbsp;</td>
<td class="nameDescription">
<div class="fixedFont"><b><a href="../symbols/TextEditor.html#destroy">destroy</a></b>(callback)
</div>
<div class="description">Destructs the editor object completely.</div>
</td>
</tr>
<tr>
<td class="attributes">&nbsp;</td>
<td class="nameDescription">
<div class="fixedFont"><b><a href="../symbols/TextEditor.html#getDocumentAsByteArray">getDocumentAsByteArray</a></b>(callback)
</div>
<div class="description"></div>
</td>
</tr>
<tr>
<td class="attributes">&nbsp;</td>
<td class="nameDescription">
<div class="fixedFont"><b><a href="../symbols/TextEditor.html#getMetadata">getMetadata</a></b>(property)
</div>
<div class="description">Returns the value of the requested document metadata field.</div>
</td>
</tr>
<tr>
<td class="attributes">&nbsp;</td>
<td class="nameDescription">
<div class="fixedFont"><b><a href="../symbols/TextEditor.html#getUserData">getUserData</a></b>()
</div>
<div class="description">Returns the data set for the person that is editing the document.</div>
</td>
</tr>
<tr>
<td class="attributes">&nbsp;</td>
<td class="nameDescription">
<div class="fixedFont"><b><a href="../symbols/TextEditor.html#isDocumentModified">isDocumentModified</a></b>()
</div>
<div class="description">Returns if the current state of the document matches the unmodified state.</div>
</td>
</tr>
<tr>
<td class="attributes">&nbsp;</td>
<td class="nameDescription">
<div class="fixedFont"><b><a href="../symbols/TextEditor.html#openDocumentFromUrl">openDocumentFromUrl</a></b>(docUrl, callback)
</div>
<div class="description">Loads an ODT document into the editor.</div>
</td>
</tr>
<tr>
<td class="attributes">&nbsp;</td>
<td class="nameDescription">
<div class="fixedFont"><b><a href="../symbols/TextEditor.html#removeEventListener">removeEventListener</a></b>(eventId, callback)
</div>
<div class="description">Unregisters a callback for the given event.</div>
</td>
</tr>
<tr>
<td class="attributes">&nbsp;</td>
<td class="nameDescription">
<div class="fixedFont"><b><a href="../symbols/TextEditor.html#setDocumentModified">setDocumentModified</a></b>(modified)
</div>
<div class="description">Sets the current state of the document to be either the unmodified state
or a modified state.</div>
</td>
</tr>
<tr>
<td class="attributes">&nbsp;</td>
<td class="nameDescription">
<div class="fixedFont"><b><a href="../symbols/TextEditor.html#setMetadata">setMetadata</a></b>(setProperties, removedProperties)
</div>
<div class="description">Sets the metadata fields from the given properties map.</div>
</td>
</tr>
<tr>
<td class="attributes">&nbsp;</td>
<td class="nameDescription">
<div class="fixedFont"><b><a href="../symbols/TextEditor.html#setUserData">setUserData</a></b>(data)
</div>
<div class="description">Sets the data for the person that is editing the document.</div>
</td>
</tr>
</tbody>
</table>
<!-- ============================== events summary ======================== -->
<!-- ============================== constructor details ==================== -->
<div class="details"><a name="constructor"> </a>
<div class="sectionTitle">
Class Detail
</div>
<div class="fixedFont">
<b>TextEditor</b>(mainContainerElementId, editorOptions)
</div>
<div class="description">
</div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{!string}</span> <b>mainContainerElementId</b>
</dt>
<dd></dd>
<dt>
<span class="light fixedFont">{!Object.<!string|!*>}</span> <b>editorOptions</b>
</dt>
<dd></dd>
</dl>
</div>
<!-- ============================== field details ========================== -->
<!-- ============================== method details ========================= -->
<div class="sectionTitle">
Method Detail
</div>
<a name="addEventListener"> </a>
<div class="fixedFont">
<span class="light">{undefined}</span>
<b>addEventListener</b>(eventId, callback)
</div>
<div class="description">
Registers a callback which should be called if the given event happens.
</div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{!string}</span> <b>eventId</b>
</dt>
<dd></dd>
<dt>
<span class="light fixedFont">{!Function}</span> <b>callback</b>
</dt>
<dd></dd>
</dl>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dd><span class="light fixedFont">{undefined}</span> </dd>
</dl>
<hr />
<a name="closeDocument"> </a>
<div class="fixedFont">
<span class="light">{undefined}</span>
<b>closeDocument</b>(callback)
</div>
<div class="description">
Closes the document, and does cleanup.
</div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{!function(!Error=):undefined}</span> <b>callback</b>
</dt>
<dd>Called once the document has been closed, passes an error object in case of error</dd>
</dl>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dd><span class="light fixedFont">{undefined}</span> </dd>
</dl>
<hr />
<a name="destroy"> </a>
<div class="fixedFont">
<span class="light">{undefined}</span>
<b>destroy</b>(callback)
</div>
<div class="description">
Destructs the editor object completely.
</div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{!function(!Error=):undefined}</span> <b>callback</b>
</dt>
<dd>Called once the destruction has been completed, passes an error object in case of error</dd>
</dl>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dd><span class="light fixedFont">{undefined}</span> </dd>
</dl>
<hr />
<a name="getDocumentAsByteArray"> </a>
<div class="fixedFont">
<span class="light">{undefined}</span>
<b>getDocumentAsByteArray</b>(callback)
</div>
<div class="description">
</div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{!function(err:?Error|file:!Uint8Array=):undefined}</span> <b>callback</b>
</dt>
<dd>Called with the current document as ODT file as bytearray, passes an error object in case of error</dd>
</dl>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dd><span class="light fixedFont">{undefined}</span> </dd>
</dl>
<hr />
<a name="getMetadata"> </a>
<div class="fixedFont">
<span class="light">{?string}</span>
<b>getMetadata</b>(property)
</div>
<div class="description">
Returns the value of the requested document metadata field.
</div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{!string}</span> <b>property</b>
</dt>
<dd>A namespace-prefixed field name, for example
dc:creator</dd>
</dl>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dd><span class="light fixedFont">{?string}</span> </dd>
</dl>
<hr />
<a name="getUserData"> </a>
<div class="fixedFont">
<span class="light">{!Object.<!string|!string>}</span>
<b>getUserData</b>()
</div>
<div class="description">
Returns the data set for the person that is editing the document.
</div>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dd><span class="light fixedFont">{!Object.<!string|!string>}</span> </dd>
</dl>
<hr />
<a name="isDocumentModified"> </a>
<div class="fixedFont">
<span class="light">{!boolean}</span>
<b>isDocumentModified</b>()
</div>
<div class="description">
Returns if the current state of the document matches the unmodified state.
</div>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dd><span class="light fixedFont">{!boolean}</span> </dd>
</dl>
<hr />
<a name="openDocumentFromUrl"> </a>
<div class="fixedFont">
<span class="light">{undefined}</span>
<b>openDocumentFromUrl</b>(docUrl, callback)
</div>
<div class="description">
Loads an ODT document into the editor.
</div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{!string}</span> <b>docUrl</b>
</dt>
<dd>url from which the ODT document can be loaded</dd>
<dt>
<span class="light fixedFont">{!function(!Error=):undefined}</span> <b>callback</b>
</dt>
<dd>Called once the document has been opened, passes an error object in case of error</dd>
</dl>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dd><span class="light fixedFont">{undefined}</span> </dd>
</dl>
<hr />
<a name="removeEventListener"> </a>
<div class="fixedFont">
<span class="light">{undefined}</span>
<b>removeEventListener</b>(eventId, callback)
</div>
<div class="description">
Unregisters a callback for the given event.
</div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{!string}</span> <b>eventId</b>
</dt>
<dd></dd>
<dt>
<span class="light fixedFont">{!Function}</span> <b>callback</b>
</dt>
<dd></dd>
</dl>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dd><span class="light fixedFont">{undefined}</span> </dd>
</dl>
<hr />
<a name="setDocumentModified"> </a>
<div class="fixedFont">
<span class="light">{undefined}</span>
<b>setDocumentModified</b>(modified)
</div>
<div class="description">
Sets the current state of the document to be either the unmodified state
or a modified state.
If @p modified is @true and the current state was already a modified state,
this call has no effect and also does not remove the unmodified flag
from the state which has it set.
</div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{!boolean}</span> <b>modified</b>
</dt>
<dd></dd>
</dl>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dd><span class="light fixedFont">{undefined}</span> </dd>
</dl>
<hr />
<a name="setMetadata"> </a>
<div class="fixedFont">
<span class="light">{undefined}</span>
<b>setMetadata</b>(setProperties, removedProperties)
</div>
<div class="description">
Sets the metadata fields from the given properties map.
Avoid setting certain fields since they are automatically set:
dc:creator
dc:date
meta:editing-cycles
The following properties are never used and will be removed for semantic
consistency from the document:
meta:editing-duration
meta:document-statistic
Setting any of the above mentioned fields using this method will have no effect.
</div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{?Object.<!string|!string>}</span> <b>setProperties</b>
</dt>
<dd>A flat object that is a string->string map of field name -> value.</dd>
<dt>
<span class="light fixedFont">{?Array.<!string>}</span> <b>removedProperties</b>
</dt>
<dd>An array of metadata field names (prefixed).</dd>
</dl>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dd><span class="light fixedFont">{undefined}</span> </dd>
</dl>
<hr />
<a name="setUserData"> </a>
<div class="fixedFont">
<span class="light">{undefined}</span>
<b>setUserData</b>(data)
</div>
<div class="description">
Sets the data for the person that is editing the document.
The supported fields are:
"fullName": the full name of the editing person
"color": color to use for the user specific UI elements
</div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{?Object.<!string|!string>|undefined}</span> <b>data</b>
</dt>
<dd></dd>
</dl>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dd><span class="light fixedFont">{undefined}</span> </dd>
</dl>
<!-- ============================== event details ========================= -->
<hr />
</div>
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Fri Jul 15 2016 10:59:40 GMT+0200 (CEST)
</div>
</body>
</html>

View File

@ -0,0 +1,687 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="generator" content="JsDoc Toolkit" />
<title>JsDoc Reference - Wodo</title>
<style type="text/css">
/* default.css */
body
{
font: 12px "Lucida Grande", Tahoma, Arial, Helvetica, sans-serif;
width: 800px;
}
.header
{
clear: both;
background-color: #ccc;
padding: 8px;
}
h1
{
font-size: 150%;
font-weight: bold;
padding: 0;
margin: 1em 0 0 .3em;
}
hr
{
border: none 0;
border-top: 1px solid #7F8FB1;
height: 1px;
}
pre.code
{
display: block;
padding: 8px;
border: 1px dashed #ccc;
}
#index
{
margin-top: 24px;
float: left;
width: 160px;
position: absolute;
left: 8px;
background-color: #F3F3F3;
padding: 8px;
}
#content
{
margin-left: 190px;
width: 600px;
}
.classList
{
list-style-type: none;
padding: 0;
margin: 0 0 0 8px;
font-family: arial, sans-serif;
font-size: 1em;
overflow: auto;
}
.classList li
{
padding: 0;
margin: 0 0 8px 0;
}
.summaryTable { width: 100%; }
h1.classTitle
{
font-size:170%;
line-height:130%;
}
h2 { font-size: 110%; }
caption, div.sectionTitle
{
background-color: #7F8FB1;
color: #fff;
font-size:130%;
text-align: left;
padding: 2px 6px 2px 6px;
border: 1px #7F8FB1 solid;
}
div.sectionTitle { margin-bottom: 8px; }
.summaryTable thead { display: none; }
.summaryTable td
{
vertical-align: top;
padding: 4px;
border-bottom: 1px #7F8FB1 solid;
border-right: 1px #7F8FB1 solid;
}
/*col#summaryAttributes {}*/
.summaryTable td.attributes
{
border-left: 1px #7F8FB1 solid;
width: 140px;
text-align: right;
}
td.attributes, .fixedFont
{
line-height: 15px;
color: #002EBE;
font-family: "Courier New",Courier,monospace;
font-size: 13px;
}
.summaryTable td.nameDescription
{
text-align: left;
font-size: 13px;
line-height: 15px;
}
.summaryTable td.nameDescription, .description
{
line-height: 15px;
padding: 4px;
padding-left: 4px;
}
.summaryTable { margin-bottom: 8px; }
ul.inheritsList
{
list-style: square;
margin-left: 20px;
padding-left: 0;
}
.detailList {
margin-left: 20px;
line-height: 15px;
}
.detailList dt { margin-left: 20px; }
.detailList .heading
{
font-weight: bold;
padding-bottom: 6px;
margin-left: 0;
}
.light, td.attributes, .light a:link, .light a:visited
{
color: #777;
font-style: italic;
}
.fineprint
{
text-align: right;
font-size: 10px;
}
</style>
</head>
<body>
<!-- ============================== header ================================= -->
<!-- begin static/header.html -->
<div id="header">
</div>
<!-- end static/header.html -->
<!-- ============================== classes index ============================ -->
<div id="index">
<!-- begin publish.classesIndex -->
<div align="center"><a href="../index.html">Class Index</a>
| <a href="../files.html">File Index</a></div>
<hr />
<h2>Classes</h2>
<ul class="classList">
<li><i><a href="../symbols/_global_.html">_global_</a></i></li>
<li><a href="../symbols/TextEditor.html">TextEditor</a></li>
<li><a href="../symbols/Wodo.html">Wodo</a></li>
</ul>
<hr />
<!-- end publish.classesIndex -->
</div>
<div id="content">
<!-- ============================== class title ============================ -->
<h1 class="classTitle">
Namespace Wodo
</h1>
<!-- ============================== class summary ========================== -->
<p class="description">
<br /><i>Defined in: </i> <a href="../symbols/src/wodotexteditor.js.html">wodotexteditor.js</a>.
</p>
<!-- ============================== constructor summary ==================== -->
<table class="summaryTable" cellspacing="0" summary="A summary of the constructor documented in the class Wodo.">
<caption>Namespace Summary</caption>
<thead>
<tr>
<th scope="col">Constructor Attributes</th>
<th scope="col">Constructor Name and Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="attributes">&nbsp;</td>
<td class="nameDescription" >
<div class="fixedFont">
<b><a href="../symbols/Wodo.html#constructor">Wodo</a></b>
</div>
<div class="description">Namespace of the Wodo.TextEditor</div>
</td>
</tr>
</tbody>
</table>
<!-- ============================== properties summary ===================== -->
<table class="summaryTable" cellspacing="0" summary="A summary of the fields documented in the class Wodo.">
<caption>Field Summary</caption>
<thead>
<tr>
<th scope="col">Field Attributes</th>
<th scope="col">Field Name and Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="attributes">&nbsp;</td>
<td class="nameDescription">
<div class="fixedFont">
<b><a href="../symbols/Wodo.html#EVENT_DOCUMENTMODIFIEDCHANGED">EVENT_DOCUMENTMODIFIEDCHANGED</a></b>
</div>
<div class="description">Id of event if documentModified state changes</div>
</td>
</tr>
<tr>
<td class="attributes">&nbsp;</td>
<td class="nameDescription">
<div class="fixedFont">
<b><a href="../symbols/Wodo.html#EVENT_METADATACHANGED">EVENT_METADATACHANGED</a></b>
</div>
<div class="description">Id of event if metadata changes</div>
</td>
</tr>
<tr>
<td class="attributes">&nbsp;</td>
<td class="nameDescription">
<div class="fixedFont">
<b><a href="../symbols/Wodo.html#EVENT_UNKNOWNERROR">EVENT_UNKNOWNERROR</a></b>
</div>
<div class="description">Id of event for an unkown error</div>
</td>
</tr>
<tr>
<td class="attributes">&nbsp;</td>
<td class="nameDescription">
<div class="fixedFont">
<b><a href="../symbols/Wodo.html#MODUS_FULLEDITING">MODUS_FULLEDITING</a></b>
</div>
<div class="description">Id of full editing modus</div>
</td>
</tr>
<tr>
<td class="attributes">&nbsp;</td>
<td class="nameDescription">
<div class="fixedFont">
<b><a href="../symbols/Wodo.html#MODUS_REVIEW">MODUS_REVIEW</a></b>
</div>
<div class="description">Id of review modus</div>
</td>
</tr>
</tbody>
</table>
<!-- ============================== methods summary ======================== -->
<table class="summaryTable" cellspacing="0" summary="A summary of the methods documented in the class Wodo.">
<caption>Method Summary</caption>
<thead>
<tr>
<th scope="col">Method Attributes</th>
<th scope="col">Method Name and Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="attributes">&nbsp;</td>
<td class="nameDescription">
<div class="fixedFont"><b><a href="../symbols/Wodo.html#createTextEditor">createTextEditor</a></b>(editorContainerElementId, editorOptions, onEditorCreated)
</div>
<div class="description">Creates a text editor object and returns it on success in the passed callback.</div>
</td>
</tr>
</tbody>
</table>
<!-- ============================== events summary ======================== -->
<!-- ============================== constructor details ==================== -->
<div class="details"><a name="constructor"> </a>
<div class="sectionTitle">
Namespace Detail
</div>
<div class="fixedFont">
<b>Wodo</b>
</div>
<div class="description">
Namespace of the Wodo.TextEditor
</div>
</div>
<!-- ============================== field details ========================== -->
<div class="sectionTitle">
Field Detail
</div>
<a name="EVENT_DOCUMENTMODIFIEDCHANGED"> </a>
<div class="fixedFont">
<b>EVENT_DOCUMENTMODIFIEDCHANGED</b>
</div>
<div class="description">
Id of event if documentModified state changes
</div>
<hr />
<a name="EVENT_METADATACHANGED"> </a>
<div class="fixedFont">
<b>EVENT_METADATACHANGED</b>
</div>
<div class="description">
Id of event if metadata changes
</div>
<hr />
<a name="EVENT_UNKNOWNERROR"> </a>
<div class="fixedFont">
<b>EVENT_UNKNOWNERROR</b>
</div>
<div class="description">
Id of event for an unkown error
</div>
<hr />
<a name="MODUS_FULLEDITING"> </a>
<div class="fixedFont">
<b>MODUS_FULLEDITING</b>
</div>
<div class="description">
Id of full editing modus
</div>
<hr />
<a name="MODUS_REVIEW"> </a>
<div class="fixedFont">
<b>MODUS_REVIEW</b>
</div>
<div class="description">
Id of review modus
</div>
<!-- ============================== method details ========================= -->
<div class="sectionTitle">
Method Detail
</div>
<a name="createTextEditor"> </a>
<div class="fixedFont">
<span class="light">{undefined}</span>
<b>createTextEditor</b>(editorContainerElementId, editorOptions, onEditorCreated)
</div>
<div class="description">
Creates a text editor object and returns it on success in the passed callback.
</div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{!string}</span> <b>editorContainerElementId</b>
</dt>
<dd>id of the existing div element which will contain the editor (should be empty before)</dd>
<dt>
<b>editorOptions</b>
</dt>
<dd>options to configure the features of the editor. All entries are optional</dd>
<dt>
<b>editorOptions.modus</b>
<i>Optional, Default: Wodo.MODUS_FULLEDITING</i>
</dt>
<dd>set the editing modus. Current options: Wodo.MODUS_FULLEDITING, Wodo.MODUS_REVIEW</dd>
<dt>
<b>editorOptions.loadCallback</b>
<i>Optional</i>
</dt>
<dd>parameter-less callback method, adds a "Load" button to the toolbar which triggers this method</dd>
<dt>
<b>editorOptions.saveCallback</b>
<i>Optional</i>
</dt>
<dd>parameter-less callback method, adds a "Save" button to the toolbar which triggers this method</dd>
<dt>
<b>editorOptions.saveAsCallback</b>
<i>Optional</i>
</dt>
<dd>parameter-less callback method, adds a "Save as" button to the toolbar which triggers this method</dd>
<dt>
<b>editorOptions.downloadCallback</b>
<i>Optional</i>
</dt>
<dd>parameter-less callback method, adds a "Download" button to the right of the toolbar which triggers this method</dd>
<dt>
<b>editorOptions.closeCallback</b>
<i>Optional</i>
</dt>
<dd>parameter-less callback method, adds a "Save" button to the toolbar which triggers this method</dd>
<dt>
<b>editorOptions.allFeaturesEnabled</b>
<i>Optional, Default: false</i>
</dt>
<dd>if set to 'true', switches the default for all features from 'false' to 'true'</dd>
<dt>
<b>editorOptions.directTextStylingEnabled</b>
<i>Optional, Default: false</i>
</dt>
<dd>if set to 'true', enables the direct styling of text (e.g. bold/italic or font)</dd>
<dt>
<b>editorOptions.directParagraphStylingEnabled</b>
<i>Optional, Default: false</i>
</dt>
<dd>if set to 'true', enables the direct styling of paragraphs (e.g. indentation or alignement)</dd>
<dt>
<b>editorOptions.paragraphStyleSelectingEnabled</b>
<i>Optional, Default: false</i>
</dt>
<dd>if set to 'true', enables setting of defined paragraph styles to paragraphs</dd>
<dt>
<b>editorOptions.paragraphStyleEditingEnabled</b>
<i>Optional, Default: false</i>
</dt>
<dd>if set to 'true', enables the editing of defined paragraph styles</dd>
<dt>
<b>editorOptions.imageEditingEnabled</b>
<i>Optional, Default: false</i>
</dt>
<dd>if set to 'true', enables the insertion of images</dd>
<dt>
<b>editorOptions.hyperlinkEditingEnabled</b>
<i>Optional, Default: false</i>
</dt>
<dd>if set to 'true', enables the editing of hyperlinks</dd>
<dt>
<b>editorOptions.annotationsEnabled</b>
<i>Optional, Default: false</i>
</dt>
<dd>if set to 'true', enables the display and the editing of annotations</dd>
<dt>
<b>editorOptions.undoRedoEnabled</b>
<i>Optional, Default: false</i>
</dt>
<dd>if set to 'true', enables the Undo and Redo of editing actions</dd>
<dt>
<b>editorOptions.zoomingEnabled</b>
<i>Optional, Default: false</i>
</dt>
<dd>if set to 'true', enables the zooming tool</dd>
<dt>
<b>editorOptions.userData</b>
<i>Optional</i>
</dt>
<dd>data about the user editing the document</dd>
<dt>
<b>editorOptions.userData.fullName</b>
<i>Optional</i>
</dt>
<dd>full name of the user, used for annotations and in the metadata of the document</dd>
<dt>
<b>editorOptions.userData.color</b>
<i>Optional, Default: "black"</i>
</dt>
<dd>color to use for any user related indicators like cursor or annotations</dd>
<dt>
<span class="light fixedFont">{!function(err:?Error|editor:!TextEditor=):undefined}</span> <b>onEditorCreated</b>
</dt>
<dd></dd>
</dl>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dd><span class="light fixedFont">{undefined}</span> </dd>
</dl>
<!-- ============================== event details ========================= -->
<hr />
</div>
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Fri Jul 15 2016 10:59:40 GMT+0200 (CEST)
</div>
</body>
</html>

View File

@ -0,0 +1,253 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="generator" content="JsDoc Toolkit" />
<title>JsDoc Reference - _global_</title>
<style type="text/css">
/* default.css */
body
{
font: 12px "Lucida Grande", Tahoma, Arial, Helvetica, sans-serif;
width: 800px;
}
.header
{
clear: both;
background-color: #ccc;
padding: 8px;
}
h1
{
font-size: 150%;
font-weight: bold;
padding: 0;
margin: 1em 0 0 .3em;
}
hr
{
border: none 0;
border-top: 1px solid #7F8FB1;
height: 1px;
}
pre.code
{
display: block;
padding: 8px;
border: 1px dashed #ccc;
}
#index
{
margin-top: 24px;
float: left;
width: 160px;
position: absolute;
left: 8px;
background-color: #F3F3F3;
padding: 8px;
}
#content
{
margin-left: 190px;
width: 600px;
}
.classList
{
list-style-type: none;
padding: 0;
margin: 0 0 0 8px;
font-family: arial, sans-serif;
font-size: 1em;
overflow: auto;
}
.classList li
{
padding: 0;
margin: 0 0 8px 0;
}
.summaryTable { width: 100%; }
h1.classTitle
{
font-size:170%;
line-height:130%;
}
h2 { font-size: 110%; }
caption, div.sectionTitle
{
background-color: #7F8FB1;
color: #fff;
font-size:130%;
text-align: left;
padding: 2px 6px 2px 6px;
border: 1px #7F8FB1 solid;
}
div.sectionTitle { margin-bottom: 8px; }
.summaryTable thead { display: none; }
.summaryTable td
{
vertical-align: top;
padding: 4px;
border-bottom: 1px #7F8FB1 solid;
border-right: 1px #7F8FB1 solid;
}
/*col#summaryAttributes {}*/
.summaryTable td.attributes
{
border-left: 1px #7F8FB1 solid;
width: 140px;
text-align: right;
}
td.attributes, .fixedFont
{
line-height: 15px;
color: #002EBE;
font-family: "Courier New",Courier,monospace;
font-size: 13px;
}
.summaryTable td.nameDescription
{
text-align: left;
font-size: 13px;
line-height: 15px;
}
.summaryTable td.nameDescription, .description
{
line-height: 15px;
padding: 4px;
padding-left: 4px;
}
.summaryTable { margin-bottom: 8px; }
ul.inheritsList
{
list-style: square;
margin-left: 20px;
padding-left: 0;
}
.detailList {
margin-left: 20px;
line-height: 15px;
}
.detailList dt { margin-left: 20px; }
.detailList .heading
{
font-weight: bold;
padding-bottom: 6px;
margin-left: 0;
}
.light, td.attributes, .light a:link, .light a:visited
{
color: #777;
font-style: italic;
}
.fineprint
{
text-align: right;
font-size: 10px;
}
</style>
</head>
<body>
<!-- ============================== header ================================= -->
<!-- begin static/header.html -->
<div id="header">
</div>
<!-- end static/header.html -->
<!-- ============================== classes index ============================ -->
<div id="index">
<!-- begin publish.classesIndex -->
<div align="center"><a href="../index.html">Class Index</a>
| <a href="../files.html">File Index</a></div>
<hr />
<h2>Classes</h2>
<ul class="classList">
<li><i><a href="../symbols/_global_.html">_global_</a></i></li>
<li><a href="../symbols/TextEditor.html">TextEditor</a></li>
<li><a href="../symbols/Wodo.html">Wodo</a></li>
</ul>
<hr />
<!-- end publish.classesIndex -->
</div>
<div id="content">
<!-- ============================== class title ============================ -->
<h1 class="classTitle">
Built-In Namespace _global_
</h1>
<!-- ============================== class summary ========================== -->
<p class="description">
</p>
<!-- ============================== constructor summary ==================== -->
<!-- ============================== properties summary ===================== -->
<!-- ============================== methods summary ======================== -->
<!-- ============================== events summary ======================== -->
<!-- ============================== constructor details ==================== -->
<!-- ============================== field details ========================== -->
<!-- ============================== method details ========================= -->
<!-- ============================== event details ========================= -->
<hr />
</div>
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Fri Jul 15 2016 10:59:40 GMT+0200 (CEST)
</div>
</body>
</html>

View File

@ -0,0 +1,865 @@
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
.KEYW {color: #933;}
.COMM {color: #bbb; font-style: italic;}
.NUMB {color: #393;}
.STRN {color: #393;}
.REGX {color: #339;}
.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
</style></head><body><pre><span class='line'> 1</span> <span class="COMM">/**
<span class='line'> 2</span> * Copyright (C) 2014 KO GmbH &lt;copyright@kogmbh.com>
<span class='line'> 3</span> *
<span class='line'> 4</span> * @licstart
<span class='line'> 5</span> * This file is part of WebODF.
<span class='line'> 6</span> *
<span class='line'> 7</span> * WebODF is free software: you can redistribute it and/or modify it
<span class='line'> 8</span> * under the terms of the GNU Affero General Public License (GNU AGPL)
<span class='line'> 9</span> * as published by the Free Software Foundation, either version 3 of
<span class='line'> 10</span> * the License, or (at your option) any later version.
<span class='line'> 11</span> *
<span class='line'> 12</span> * WebODF is distributed in the hope that it will be useful, but
<span class='line'> 13</span> * WITHOUT ANY WARRANTY; without even the implied warranty of
<span class='line'> 14</span> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
<span class='line'> 15</span> * GNU Affero General Public License for more details.
<span class='line'> 16</span> *
<span class='line'> 17</span> * You should have received a copy of the GNU Affero General Public License
<span class='line'> 18</span> * along with WebODF. If not, see &lt;http://www.gnu.org/licenses/>.
<span class='line'> 19</span> * @licend
<span class='line'> 20</span> *
<span class='line'> 21</span> * @source: http://www.webodf.org/
<span class='line'> 22</span> * @source: https://github.com/kogmbh/WebODF/
<span class='line'> 23</span> */</span><span class="WHIT">
<span class='line'> 24</span>
<span class='line'> 25</span> </span><span class="COMM">/*global window, document, alert, navigator, require, dojo, runtime, core, gui, ops, odf, WodoFromSource*/</span><span class="WHIT">
<span class='line'> 26</span>
<span class='line'> 27</span> </span><span class="COMM">/**
<span class='line'> 28</span> * Namespace of the Wodo.TextEditor
<span class='line'> 29</span> * @namespace
<span class='line'> 30</span> * @name Wodo
<span class='line'> 31</span> */</span><span class="WHIT">
<span class='line'> 32</span> </span><span class="NAME">window.Wodo</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">window.Wodo</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 33</span> </span><span class="WHIT"> </span><span class="STRN">"use strict"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 34</span>
<span class='line'> 35</span> </span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">getInstallationPath</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 36</span> </span><span class="WHIT"> </span><span class="COMM">/**
<span class='line'> 37</span> * Sees to get the url of this script on top of the stack trace.
<span class='line'> 38</span> * @param {!string|undefined} stack
<span class='line'> 39</span> * @return {!string|undefined}
<span class='line'> 40</span> */</span><span class="WHIT">
<span class='line'> 41</span> </span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">getScriptUrlFromStack</span><span class="PUNC">(</span><span class="NAME">stack</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 42</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">url</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">matches</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 43</span>
<span class='line'> 44</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">stack</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">"string"</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">stack</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 45</span> </span><span class="WHIT"> </span><span class="COMM">/*jslint regexp: true*/</span><span class="WHIT">
<span class='line'> 46</span> </span><span class="WHIT"> </span><span class="NAME">matches</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">stack.match</span><span class="PUNC">(</span><span class="REGX">/((?:http[s]?|file):\/\/[\/]?.+?\/[^:\)]*?)(?::\d+)(?::\d+)?/</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 47</span> </span><span class="WHIT"> </span><span class="COMM">/*jslint regexp: false*/</span><span class="WHIT">
<span class='line'> 48</span> </span><span class="WHIT"> </span><span class="NAME">url</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">matches</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">matches</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 49</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 50</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">url</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">"string"</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">url</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 51</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">url</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 52</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 53</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 54</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 55</span>
<span class='line'> 56</span> </span><span class="WHIT"> </span><span class="COMM">/**
<span class='line'> 57</span> * Tries by various tricks to get the url of this script.
<span class='line'> 58</span> * To be called if document.currentScript is not supported
<span class='line'> 59</span> * @return {!string|undefined}
<span class='line'> 60</span> */</span><span class="WHIT">
<span class='line'> 61</span> </span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">getCurrentScriptElementSrcByTricks</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 62</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">scriptElements</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">document.getElementsByTagName</span><span class="PUNC">(</span><span class="STRN">"script"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 63</span>
<span class='line'> 64</span> </span><span class="WHIT"> </span><span class="COMM">// if there is only one script, it must be this</span><span class="WHIT">
<span class='line'> 65</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">scriptElements.length</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 66</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">scriptElements</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">src</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 67</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 68</span>
<span class='line'> 69</span> </span><span class="WHIT"> </span><span class="COMM">// otherwise get it from the stacktrace</span><span class="WHIT">
<span class='line'> 70</span> </span><span class="WHIT"> </span><span class="KEYW">try</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 71</span> </span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 72</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">catch</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">err</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 73</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">getScriptUrlFromStack</span><span class="PUNC">(</span><span class="NAME">err.stack</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 74</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 75</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 76</span>
<span class='line'> 77</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">path</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"."</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">scriptElementSrc</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 78</span> </span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">pathname</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">pos</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 79</span>
<span class='line'> 80</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">document.currentScript</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">document.currentScript.src</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 81</span> </span><span class="WHIT"> </span><span class="NAME">scriptElementSrc</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">document.currentScript.src</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 82</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 83</span> </span><span class="WHIT"> </span><span class="NAME">scriptElementSrc</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">getCurrentScriptElementSrcByTricks</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 84</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 85</span>
<span class='line'> 86</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">scriptElementSrc</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 87</span> </span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">document.createElement</span><span class="PUNC">(</span><span class="STRN">'a'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 88</span> </span><span class="WHIT"> </span><span class="NAME">a.href</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">scriptElementSrc</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 89</span> </span><span class="WHIT"> </span><span class="NAME">pathname</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">a.pathname</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 90</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">pathname.charAt</span><span class="PUNC">(</span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="STRN">"/"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 91</span> </span><span class="WHIT"> </span><span class="COMM">// Various versions of Internet Explorer seems to neglect the leading slash under some conditions</span><span class="WHIT">
<span class='line'> 92</span> </span><span class="WHIT"> </span><span class="COMM">// (not when watching it with the dev tools of course!). This was confirmed in IE10 + IE11</span><span class="WHIT">
<span class='line'> 93</span> </span><span class="WHIT"> </span><span class="NAME">pathname</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"/"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">pathname</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 94</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 95</span>
<span class='line'> 96</span> </span><span class="WHIT"> </span><span class="NAME">pos</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">pathname.lastIndexOf</span><span class="PUNC">(</span><span class="STRN">"/"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 97</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">pos</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 98</span> </span><span class="WHIT"> </span><span class="NAME">path</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">pathname.substr</span><span class="PUNC">(</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">pos</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 99</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>100</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>101</span> </span><span class="WHIT"> </span><span class="NAME">alert</span><span class="PUNC">(</span><span class="STRN">"Could not estimate installation path of the Wodo.TextEditor."</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>102</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>103</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">path</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>104</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>105</span>
<span class='line'>106</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="COMM">/** @inner @const
<span class='line'>107</span> @type{!string} */</span><span class="WHIT">
<span class='line'>108</span> </span><span class="WHIT"> </span><span class="NAME">installationPath</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">getInstallationPath</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>109</span> </span><span class="WHIT"> </span><span class="COMM">/** @inner @type{!boolean} */</span><span class="WHIT">
<span class='line'>110</span> </span><span class="WHIT"> </span><span class="NAME">isInitalized</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>111</span> </span><span class="WHIT"> </span><span class="COMM">/** @inner @type{!Array.&lt;!function():undefined>} */</span><span class="WHIT">
<span class='line'>112</span> </span><span class="WHIT"> </span><span class="NAME">pendingInstanceCreationCalls</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>113</span> </span><span class="WHIT"> </span><span class="COMM">/** @inner @type{!number} */</span><span class="WHIT">
<span class='line'>114</span> </span><span class="WHIT"> </span><span class="NAME">instanceCounter</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>115</span> </span><span class="WHIT"> </span><span class="COMM">// TODO: avatar image url needs base-url setting.</span><span class="WHIT">
<span class='line'>116</span> </span><span class="WHIT"> </span><span class="COMM">// so far Wodo itself does not have a setup call,</span><span class="WHIT">
<span class='line'>117</span> </span><span class="WHIT"> </span><span class="COMM">// but then the avatar is also not used yet here</span><span class="WHIT">
<span class='line'>118</span> </span><span class="WHIT"> </span><span class="NAME">defaultUserData</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>119</span> </span><span class="WHIT"> </span><span class="NAME">fullName</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">""</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>120</span> </span><span class="WHIT"> </span><span class="NAME">color</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"black"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>121</span> </span><span class="WHIT"> </span><span class="NAME">imageUrl</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"avatar-joe.png"</span><span class="WHIT">
<span class='line'>122</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>123</span> </span><span class="WHIT"> </span><span class="COMM">/** @inner @const
<span class='line'>124</span> @type{!Array.&lt;!string>} */</span><span class="WHIT">
<span class='line'>125</span> </span><span class="WHIT"> </span><span class="NAME">userDataFieldNames</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"fullName"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"color"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"imageUrl"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>126</span> </span><span class="WHIT"> </span><span class="COMM">/** @inner @const
<span class='line'>127</span> @type{!string} */</span><span class="WHIT">
<span class='line'>128</span> </span><span class="WHIT"> </span><span class="NAME">memberId</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"localuser"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>129</span> </span><span class="WHIT"> </span><span class="COMM">// constructors</span><span class="WHIT">
<span class='line'>130</span> </span><span class="WHIT"> </span><span class="NAME">BorderContainer</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">ContentPane</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">FullWindowZoomHelper</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">EditorSession</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">Tools</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>131</span> </span><span class="WHIT"> </span><span class="COMM">/** @inner @const
<span class='line'>132</span> @type{!string} */</span><span class="WHIT">
<span class='line'>133</span> </span><span class="WHIT"> </span><span class="NAME">MODUS_FULLEDITING</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"fullediting"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>134</span> </span><span class="WHIT"> </span><span class="COMM">/** @inner @const
<span class='line'>135</span> @type{!string} */</span><span class="WHIT">
<span class='line'>136</span> </span><span class="WHIT"> </span><span class="NAME">MODUS_REVIEW</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"review"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>137</span> </span><span class="WHIT"> </span><span class="COMM">/** @inner @const
<span class='line'>138</span> @type{!string} */</span><span class="WHIT">
<span class='line'>139</span> </span><span class="WHIT"> </span><span class="NAME">EVENT_UNKNOWNERROR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"unknownError"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>140</span> </span><span class="WHIT"> </span><span class="COMM">/** @inner @const
<span class='line'>141</span> @type {!string} */</span><span class="WHIT">
<span class='line'>142</span> </span><span class="WHIT"> </span><span class="NAME">EVENT_DOCUMENTMODIFIEDCHANGED</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"documentModifiedChanged"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>143</span> </span><span class="WHIT"> </span><span class="COMM">/** @inner @const
<span class='line'>144</span> @type {!string} */</span><span class="WHIT">
<span class='line'>145</span> </span><span class="WHIT"> </span><span class="NAME">EVENT_METADATACHANGED</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"metadataChanged"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>146</span>
<span class='line'>147</span> </span><span class="WHIT"> </span><span class="NAME">window.dojoConfig</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>148</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">WebODFEditorDojoLocale</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"C"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>149</span>
<span class='line'>150</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">navigator</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">navigator.language</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">navigator.language.match</span><span class="PUNC">(</span><span class="REGX">/^(de)/</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>151</span> </span><span class="WHIT"> </span><span class="NAME">WebODFEditorDojoLocale</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">navigator.language.substr</span><span class="PUNC">(</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>152</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>153</span>
<span class='line'>154</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>155</span> </span><span class="WHIT"> </span><span class="NAME">locale</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">WebODFEditorDojoLocale</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>156</span> </span><span class="WHIT"> </span><span class="NAME">paths</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>157</span> </span><span class="WHIT"> </span><span class="STRN">"webodf/editor"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">installationPath</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>158</span> </span><span class="WHIT"> </span><span class="STRN">"dijit"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">installationPath</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"/dijit"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>159</span> </span><span class="WHIT"> </span><span class="STRN">"dojox"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">installationPath</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"/dojox"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>160</span> </span><span class="WHIT"> </span><span class="STRN">"dojo"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">installationPath</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"/dojo"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>161</span> </span><span class="WHIT"> </span><span class="STRN">"resources"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">installationPath</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"/resources"</span><span class="WHIT">
<span class='line'>162</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>163</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>164</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>165</span>
<span class='line'>166</span> </span><span class="WHIT"> </span><span class="COMM">/**
<span class='line'>167</span> * @return {undefined}
<span class='line'>168</span> */</span><span class="WHIT">
<span class='line'>169</span> </span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">initTextEditor</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>170</span> </span><span class="WHIT"> </span><span class="NAME">require</span><span class="PUNC">(</span><span class="PUNC">[</span><span class="WHIT">
<span class='line'>171</span> </span><span class="WHIT"> </span><span class="STRN">"dijit/layout/BorderContainer"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>172</span> </span><span class="WHIT"> </span><span class="STRN">"dijit/layout/ContentPane"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>173</span> </span><span class="WHIT"> </span><span class="STRN">"webodf/editor/FullWindowZoomHelper"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>174</span> </span><span class="WHIT"> </span><span class="STRN">"webodf/editor/EditorSession"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>175</span> </span><span class="WHIT"> </span><span class="STRN">"webodf/editor/Tools"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>176</span> </span><span class="WHIT"> </span><span class="STRN">"webodf/editor/Translator"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>177</span> </span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">BC</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">CP</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">FWZH</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">ES</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">T</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">Translator</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>178</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">locale</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">navigator.language</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="STRN">"en-US"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>179</span> </span><span class="WHIT"> </span><span class="NAME">editorBase</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">dojo.config</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">dojo.config.paths</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">dojo.config.paths</span><span class="PUNC">[</span><span class="STRN">"webodf/editor"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>180</span> </span><span class="WHIT"> </span><span class="NAME">translationsDir</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">editorBase</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'/translations'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>181</span> </span><span class="WHIT"> </span><span class="NAME">t</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>182</span>
<span class='line'>183</span> </span><span class="WHIT"> </span><span class="NAME">BorderContainer</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">BC</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>184</span> </span><span class="WHIT"> </span><span class="NAME">ContentPane</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">CP</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>185</span> </span><span class="WHIT"> </span><span class="NAME">FullWindowZoomHelper</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">FWZH</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>186</span> </span><span class="WHIT"> </span><span class="NAME">EditorSession</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">ES</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>187</span> </span><span class="WHIT"> </span><span class="NAME">Tools</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">T</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>188</span>
<span class='line'>189</span> </span><span class="WHIT"> </span><span class="COMM">// TODO: locale cannot be set by the user, also different for different editors</span><span class="WHIT">
<span class='line'>190</span> </span><span class="WHIT"> </span><span class="NAME">t</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Translator</span><span class="PUNC">(</span><span class="NAME">translationsDir</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">locale</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">editorTranslator</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>191</span> </span><span class="WHIT"> </span><span class="NAME">runtime.setTranslator</span><span class="PUNC">(</span><span class="NAME">editorTranslator.translate</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>192</span> </span><span class="WHIT"> </span><span class="COMM">// Extend runtime with a convenient translation function</span><span class="WHIT">
<span class='line'>193</span> </span><span class="WHIT"> </span><span class="NAME">runtime.translateContent</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">node</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>194</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>195</span> </span><span class="WHIT"> </span><span class="NAME">element</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>196</span> </span><span class="WHIT"> </span><span class="NAME">tag</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>197</span> </span><span class="WHIT"> </span><span class="NAME">placeholder</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>198</span> </span><span class="WHIT"> </span><span class="NAME">translatable</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">node.querySelectorAll</span><span class="PUNC">(</span><span class="STRN">"*[text-i18n]"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>199</span>
<span class='line'>200</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">translatable.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>201</span> </span><span class="WHIT"> </span><span class="NAME">element</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">translatable</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>202</span> </span><span class="WHIT"> </span><span class="NAME">tag</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">element.localName</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>203</span> </span><span class="WHIT"> </span><span class="NAME">placeholder</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">element.getAttribute</span><span class="PUNC">(</span><span class="STRN">'text-i18n'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>204</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">tag</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">"label"</span><span class="WHIT">
<span class='line'>205</span> </span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">tag</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">"span"</span><span class="WHIT">
<span class='line'>206</span> </span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="REGX">/h\d/i</span><span class="PUNC">.</span><span class="NAME">test</span><span class="PUNC">(</span><span class="NAME">tag</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>207</span> </span><span class="WHIT"> </span><span class="NAME">element.textContent</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">runtime.tr</span><span class="PUNC">(</span><span class="NAME">placeholder</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>208</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>209</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>210</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>211</span>
<span class='line'>212</span> </span><span class="WHIT"> </span><span class="NAME">defaultUserData.fullName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">runtime.tr</span><span class="PUNC">(</span><span class="STRN">"Unknown Author"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>213</span>
<span class='line'>214</span> </span><span class="WHIT"> </span><span class="NAME">isInitalized</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>215</span> </span><span class="WHIT"> </span><span class="NAME">pendingInstanceCreationCalls.forEach</span><span class="PUNC">(</span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">create</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">create</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>216</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>217</span>
<span class='line'>218</span> </span><span class="WHIT"> </span><span class="COMM">// only done to make jslint see the var used</span><span class="WHIT">
<span class='line'>219</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">t</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>220</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>221</span> </span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>222</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>223</span>
<span class='line'>224</span> </span><span class="WHIT"> </span><span class="COMM">/**
<span class='line'>225</span> * Creates a new record with userdata, and for all official fields
<span class='line'>226</span> * copies over the value from the original or, if not present there,
<span class='line'>227</span> * sets it to the default value.
<span class='line'>228</span> * @param {?Object.&lt;!string,!string>|undefined} original, defaults to {}
<span class='line'>229</span> * @return {!Object.&lt;!string,!string>}
<span class='line'>230</span> */</span><span class="WHIT">
<span class='line'>231</span> </span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">cloneUserData</span><span class="PUNC">(</span><span class="NAME">original</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>232</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">result</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>233</span>
<span class='line'>234</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">original</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>235</span> </span><span class="WHIT"> </span><span class="NAME">original</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>236</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>237</span>
<span class='line'>238</span> </span><span class="WHIT"> </span><span class="NAME">userDataFieldNames.forEach</span><span class="PUNC">(</span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">fieldName</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>239</span> </span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">[</span><span class="NAME">fieldName</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">original</span><span class="PUNC">[</span><span class="NAME">fieldName</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">defaultUserData</span><span class="PUNC">[</span><span class="NAME">fieldName</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>240</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>241</span>
<span class='line'>242</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>243</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>244</span>
<span class='line'>245</span> </span><span class="WHIT"> </span><span class="COMM">/**
<span class='line'>246</span> * @name TextEditor
<span class='line'>247</span> * @constructor
<span class='line'>248</span> * @param {!string} mainContainerElementId
<span class='line'>249</span> * @param {!Object.&lt;!string,!*>} editorOptions
<span class='line'>250</span> */</span><span class="WHIT">
<span class='line'>251</span> </span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">TextEditor</span><span class="PUNC">(</span><span class="NAME">mainContainerElementId</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">editorOptions</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>252</span> </span><span class="WHIT"> </span><span class="NAME">instanceCounter</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">instanceCounter</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>253</span>
<span class='line'>254</span> </span><span class="WHIT"> </span><span class="COMM">/**
<span class='line'>255</span> * Returns true if either all features are wanted and this one is not explicitely disabled
<span class='line'>256</span> * or if not all features are wanted by default and it is explicitely enabled
<span class='line'>257</span> * @param {?boolean|undefined} isFeatureEnabled explicit flag which enables a feature
<span class='line'>258</span> * @return {!boolean}
<span class='line'>259</span> */</span><span class="WHIT">
<span class='line'>260</span> </span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">isEnabled</span><span class="PUNC">(</span><span class="NAME">isFeatureEnabled</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>261</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">editorOptions.allFeaturesEnabled</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">isFeatureEnabled</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">isFeatureEnabled</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>262</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>263</span>
<span class='line'>264</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">userData</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>265</span> </span><span class="WHIT"> </span><span class="COMM">//</span><span class="WHIT">
<span class='line'>266</span> </span><span class="WHIT"> </span><span class="NAME">mainContainerElement</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">document.getElementById</span><span class="PUNC">(</span><span class="NAME">mainContainerElementId</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>267</span> </span><span class="WHIT"> </span><span class="NAME">canvasElement</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>268</span> </span><span class="WHIT"> </span><span class="NAME">canvasContainerElement</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>269</span> </span><span class="WHIT"> </span><span class="NAME">toolbarElement</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>270</span> </span><span class="WHIT"> </span><span class="NAME">toolbarContainerElement</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="COMM">// needed because dijit toolbar overwrites direct classList</span><span class="WHIT">
<span class='line'>271</span> </span><span class="WHIT"> </span><span class="NAME">editorElement</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>272</span> </span><span class="WHIT"> </span><span class="COMM">/** @inner @const
<span class='line'>273</span> @type{!string} */</span><span class="WHIT">
<span class='line'>274</span> </span><span class="WHIT"> </span><span class="NAME">canvasElementId</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"webodfeditor-canvas"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">instanceCounter</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>275</span> </span><span class="WHIT"> </span><span class="COMM">/** @inner @const
<span class='line'>276</span> @type{!string} */</span><span class="WHIT">
<span class='line'>277</span> </span><span class="WHIT"> </span><span class="NAME">canvasContainerElementId</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"webodfeditor-canvascontainer"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">instanceCounter</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>278</span> </span><span class="WHIT"> </span><span class="COMM">/** @inner @const
<span class='line'>279</span> @type{!string} */</span><span class="WHIT">
<span class='line'>280</span> </span><span class="WHIT"> </span><span class="NAME">toolbarElementId</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"webodfeditor-toolbar"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">instanceCounter</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>281</span> </span><span class="WHIT"> </span><span class="COMM">/** @inner @const
<span class='line'>282</span> @type{!string} */</span><span class="WHIT">
<span class='line'>283</span> </span><span class="WHIT"> </span><span class="NAME">editorElementId</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"webodfeditor-editor"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">instanceCounter</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>284</span> </span><span class="WHIT"> </span><span class="COMM">//</span><span class="WHIT">
<span class='line'>285</span> </span><span class="WHIT"> </span><span class="NAME">fullWindowZoomHelper</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>286</span> </span><span class="WHIT"> </span><span class="COMM">//</span><span class="WHIT">
<span class='line'>287</span> </span><span class="WHIT"> </span><span class="NAME">mainContainer</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>288</span> </span><span class="WHIT"> </span><span class="NAME">tools</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>289</span> </span><span class="WHIT"> </span><span class="NAME">odfCanvas</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>290</span> </span><span class="WHIT"> </span><span class="COMM">//</span><span class="WHIT">
<span class='line'>291</span> </span><span class="WHIT"> </span><span class="NAME">editorSession</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>292</span> </span><span class="WHIT"> </span><span class="NAME">session</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>293</span> </span><span class="WHIT"> </span><span class="COMM">//</span><span class="WHIT">
<span class='line'>294</span> </span><span class="WHIT"> </span><span class="NAME">loadOdtFile</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">editorOptions.loadCallback</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>295</span> </span><span class="WHIT"> </span><span class="NAME">saveOdtFile</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">editorOptions.saveCallback</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>296</span> </span><span class="WHIT"> </span><span class="NAME">saveAsOdtFile</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">editorOptions.saveAsCallback</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>297</span> </span><span class="WHIT"> </span><span class="NAME">downloadOdtFile</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">editorOptions.downloadCallback</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>298</span> </span><span class="WHIT"> </span><span class="NAME">close</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">editorOptions.closeCallback</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>299</span> </span><span class="WHIT"> </span><span class="COMM">//</span><span class="WHIT">
<span class='line'>300</span> </span><span class="WHIT"> </span><span class="NAME">reviewModeEnabled</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">editorOptions.modus</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">MODUS_REVIEW</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>301</span> </span><span class="WHIT"> </span><span class="NAME">directTextStylingEnabled</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">isEnabled</span><span class="PUNC">(</span><span class="NAME">editorOptions.directTextStylingEnabled</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>302</span> </span><span class="WHIT"> </span><span class="NAME">directParagraphStylingEnabled</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">isEnabled</span><span class="PUNC">(</span><span class="NAME">editorOptions.directParagraphStylingEnabled</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>303</span> </span><span class="WHIT"> </span><span class="NAME">paragraphStyleSelectingEnabled</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">reviewModeEnabled</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">isEnabled</span><span class="PUNC">(</span><span class="NAME">editorOptions.paragraphStyleSelectingEnabled</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>304</span> </span><span class="WHIT"> </span><span class="NAME">paragraphStyleEditingEnabled</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">reviewModeEnabled</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">isEnabled</span><span class="PUNC">(</span><span class="NAME">editorOptions.paragraphStyleEditingEnabled</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>305</span> </span><span class="WHIT"> </span><span class="NAME">imageEditingEnabled</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">reviewModeEnabled</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">isEnabled</span><span class="PUNC">(</span><span class="NAME">editorOptions.imageEditingEnabled</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>306</span> </span><span class="WHIT"> </span><span class="NAME">hyperlinkEditingEnabled</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">isEnabled</span><span class="PUNC">(</span><span class="NAME">editorOptions.hyperlinkEditingEnabled</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>307</span> </span><span class="WHIT"> </span><span class="NAME">annotationsEnabled</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">reviewModeEnabled</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">isEnabled</span><span class="PUNC">(</span><span class="NAME">editorOptions.annotationsEnabled</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>308</span> </span><span class="WHIT"> </span><span class="NAME">undoRedoEnabled</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">isEnabled</span><span class="PUNC">(</span><span class="NAME">editorOptions.undoRedoEnabled</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>309</span> </span><span class="WHIT"> </span><span class="NAME">zoomingEnabled</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">isEnabled</span><span class="PUNC">(</span><span class="NAME">editorOptions.zoomingEnabled</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>310</span> </span><span class="WHIT"> </span><span class="COMM">//</span><span class="WHIT">
<span class='line'>311</span> </span><span class="WHIT"> </span><span class="NAME">pendingMemberId</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>312</span> </span><span class="WHIT"> </span><span class="NAME">pendingEditorReadyCallback</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>313</span> </span><span class="WHIT"> </span><span class="COMM">//</span><span class="WHIT">
<span class='line'>314</span> </span><span class="WHIT"> </span><span class="NAME">eventNotifier</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">core.EventNotifier</span><span class="PUNC">(</span><span class="PUNC">[</span><span class="WHIT">
<span class='line'>315</span> </span><span class="WHIT"> </span><span class="NAME">EVENT_UNKNOWNERROR</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>316</span> </span><span class="WHIT"> </span><span class="NAME">EVENT_DOCUMENTMODIFIEDCHANGED</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>317</span> </span><span class="WHIT"> </span><span class="NAME">EVENT_METADATACHANGED</span><span class="WHIT">
<span class='line'>318</span> </span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>319</span>
<span class='line'>320</span> </span><span class="WHIT"> </span><span class="NAME">runtime.assert</span><span class="PUNC">(</span><span class="NAME">Boolean</span><span class="PUNC">(</span><span class="NAME">mainContainerElement</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"No id of an existing element passed to Wodo.createTextEditor(): "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">mainContainerElementId</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>321</span>
<span class='line'>322</span> </span><span class="WHIT"> </span><span class="COMM">/**
<span class='line'>323</span> * @param {!Object} changes
<span class='line'>324</span> * @return {undefined}
<span class='line'>325</span> */</span><span class="WHIT">
<span class='line'>326</span> </span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">relayMetadataSignal</span><span class="PUNC">(</span><span class="NAME">changes</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>327</span> </span><span class="WHIT"> </span><span class="NAME">eventNotifier.emit</span><span class="PUNC">(</span><span class="NAME">EVENT_METADATACHANGED</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">changes</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>328</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>329</span>
<span class='line'>330</span> </span><span class="WHIT"> </span><span class="COMM">/**
<span class='line'>331</span> * @param {!Object} changes
<span class='line'>332</span> * @return {undefined}
<span class='line'>333</span> */</span><span class="WHIT">
<span class='line'>334</span> </span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">relayModifiedSignal</span><span class="PUNC">(</span><span class="NAME">modified</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>335</span> </span><span class="WHIT"> </span><span class="NAME">eventNotifier.emit</span><span class="PUNC">(</span><span class="NAME">EVENT_DOCUMENTMODIFIEDCHANGED</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">modified</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>336</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>337</span>
<span class='line'>338</span> </span><span class="WHIT"> </span><span class="COMM">/**
<span class='line'>339</span> * @return {undefined}
<span class='line'>340</span> */</span><span class="WHIT">
<span class='line'>341</span> </span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">createSession</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>342</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">viewOptions</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>343</span> </span><span class="WHIT"> </span><span class="NAME">editInfoMarkersInitiallyVisible</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>344</span> </span><span class="WHIT"> </span><span class="NAME">caretAvatarsInitiallyVisible</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>345</span> </span><span class="WHIT"> </span><span class="NAME">caretBlinksOnRangeSelect</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="WHIT">
<span class='line'>346</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>347</span>
<span class='line'>348</span> </span><span class="WHIT"> </span><span class="COMM">// create session around loaded document</span><span class="WHIT">
<span class='line'>349</span> </span><span class="WHIT"> </span><span class="NAME">session</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">ops.Session</span><span class="PUNC">(</span><span class="NAME">odfCanvas</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>350</span> </span><span class="WHIT"> </span><span class="NAME">editorSession</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">EditorSession</span><span class="PUNC">(</span><span class="NAME">session</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">pendingMemberId</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>351</span> </span><span class="WHIT"> </span><span class="NAME">viewOptions</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">viewOptions</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>352</span> </span><span class="WHIT"> </span><span class="NAME">directTextStylingEnabled</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">directTextStylingEnabled</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>353</span> </span><span class="WHIT"> </span><span class="NAME">directParagraphStylingEnabled</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">directParagraphStylingEnabled</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>354</span> </span><span class="WHIT"> </span><span class="NAME">paragraphStyleSelectingEnabled</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">paragraphStyleSelectingEnabled</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>355</span> </span><span class="WHIT"> </span><span class="NAME">paragraphStyleEditingEnabled</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">paragraphStyleEditingEnabled</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>356</span> </span><span class="WHIT"> </span><span class="NAME">imageEditingEnabled</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">imageEditingEnabled</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>357</span> </span><span class="WHIT"> </span><span class="NAME">hyperlinkEditingEnabled</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">hyperlinkEditingEnabled</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>358</span> </span><span class="WHIT"> </span><span class="NAME">annotationsEnabled</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">annotationsEnabled</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>359</span> </span><span class="WHIT"> </span><span class="NAME">zoomingEnabled</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">zoomingEnabled</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>360</span> </span><span class="WHIT"> </span><span class="NAME">reviewModeEnabled</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">reviewModeEnabled</span><span class="WHIT">
<span class='line'>361</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>362</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">undoRedoEnabled</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>363</span> </span><span class="WHIT"> </span><span class="NAME">editorSession.sessionController.setUndoManager</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">gui.TrivialUndoManager</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>364</span> </span><span class="WHIT"> </span><span class="NAME">editorSession.sessionController.getUndoManager</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">subscribe</span><span class="PUNC">(</span><span class="NAME">gui.UndoManager.signalDocumentModifiedChanged</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">relayModifiedSignal</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>365</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>366</span>
<span class='line'>367</span> </span><span class="WHIT"> </span><span class="COMM">// Relay any metadata changes to the Editor's consumer as an event</span><span class="WHIT">
<span class='line'>368</span> </span><span class="WHIT"> </span><span class="NAME">editorSession.sessionController.getMetadataController</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">subscribe</span><span class="PUNC">(</span><span class="NAME">gui.MetadataController.signalMetadataChanged</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">relayMetadataSignal</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>369</span>
<span class='line'>370</span> </span><span class="WHIT"> </span><span class="COMM">// and report back to caller</span><span class="WHIT">
<span class='line'>371</span> </span><span class="WHIT"> </span><span class="NAME">pendingEditorReadyCallback</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>372</span> </span><span class="WHIT"> </span><span class="COMM">// reset</span><span class="WHIT">
<span class='line'>373</span> </span><span class="WHIT"> </span><span class="NAME">pendingEditorReadyCallback</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>374</span> </span><span class="WHIT"> </span><span class="NAME">pendingMemberId</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>375</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>376</span>
<span class='line'>377</span> </span><span class="WHIT"> </span><span class="COMM">/**
<span class='line'>378</span> * @return {undefined}
<span class='line'>379</span> */</span><span class="WHIT">
<span class='line'>380</span> </span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">startEditing</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>381</span> </span><span class="WHIT"> </span><span class="NAME">runtime.assert</span><span class="PUNC">(</span><span class="NAME">editorSession</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"editorSession should exist here."</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>382</span>
<span class='line'>383</span> </span><span class="WHIT"> </span><span class="NAME">tools.setEditorSession</span><span class="PUNC">(</span><span class="NAME">editorSession</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>384</span> </span><span class="WHIT"> </span><span class="NAME">editorSession.sessionController.insertLocalCursor</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>385</span> </span><span class="WHIT"> </span><span class="NAME">editorSession.sessionController.startEditing</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>386</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>387</span>
<span class='line'>388</span> </span><span class="WHIT"> </span><span class="COMM">/**
<span class='line'>389</span> * @return {undefined}
<span class='line'>390</span> */</span><span class="WHIT">
<span class='line'>391</span> </span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">endEditing</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>392</span> </span><span class="WHIT"> </span><span class="NAME">runtime.assert</span><span class="PUNC">(</span><span class="NAME">editorSession</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"editorSession should exist here."</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>393</span>
<span class='line'>394</span> </span><span class="WHIT"> </span><span class="NAME">tools.setEditorSession</span><span class="PUNC">(</span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>395</span> </span><span class="WHIT"> </span><span class="NAME">editorSession.sessionController.endEditing</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>396</span> </span><span class="WHIT"> </span><span class="NAME">editorSession.sessionController.removeLocalCursor</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>397</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>398</span>
<span class='line'>399</span> </span><span class="WHIT"> </span><span class="COMM">/**
<span class='line'>400</span> * Loads an ODT document into the editor.
<span class='line'>401</span> * @name TextEditor#openDocumentFromUrl
<span class='line'>402</span> * @function
<span class='line'>403</span> * @param {!string} docUrl url from which the ODT document can be loaded
<span class='line'>404</span> * @param {!function(!Error=):undefined} callback Called once the document has been opened, passes an error object in case of error
<span class='line'>405</span> * @return {undefined}
<span class='line'>406</span> */</span><span class="WHIT">
<span class='line'>407</span> </span><span class="WHIT"> </span><span class="NAME">this.openDocumentFromUrl</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">docUrl</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">editorReadyCallback</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>408</span> </span><span class="WHIT"> </span><span class="NAME">runtime.assert</span><span class="PUNC">(</span><span class="NAME">docUrl</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"document should be defined here."</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>409</span> </span><span class="WHIT"> </span><span class="NAME">runtime.assert</span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">pendingEditorReadyCallback</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"pendingEditorReadyCallback should not exist here."</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>410</span> </span><span class="WHIT"> </span><span class="NAME">runtime.assert</span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">editorSession</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"editorSession should not exist here."</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>411</span> </span><span class="WHIT"> </span><span class="NAME">runtime.assert</span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">session</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"session should not exist here."</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>412</span>
<span class='line'>413</span> </span><span class="WHIT"> </span><span class="NAME">pendingMemberId</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">memberId</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>414</span> </span><span class="WHIT"> </span><span class="NAME">pendingEditorReadyCallback</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>415</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">op</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">ops.OpAddMember</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>416</span> </span><span class="WHIT"> </span><span class="NAME">op.init</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>417</span> </span><span class="WHIT"> </span><span class="NAME">memberid</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">memberId</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>418</span> </span><span class="WHIT"> </span><span class="NAME">setProperties</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">userData</span><span class="WHIT">
<span class='line'>419</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>420</span> </span><span class="WHIT"> </span><span class="NAME">session.enqueue</span><span class="PUNC">(</span><span class="PUNC">[</span><span class="NAME">op</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>421</span> </span><span class="WHIT"> </span><span class="NAME">startEditing</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>422</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">editorReadyCallback</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>423</span> </span><span class="WHIT"> </span><span class="NAME">editorReadyCallback</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>424</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>425</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>426</span>
<span class='line'>427</span> </span><span class="WHIT"> </span><span class="NAME">odfCanvas.load</span><span class="PUNC">(</span><span class="NAME">docUrl</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>428</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>429</span>
<span class='line'>430</span> </span><span class="WHIT"> </span><span class="COMM">/**
<span class='line'>431</span> * Closes the document, and does cleanup.
<span class='line'>432</span> * @name TextEditor#closeDocument
<span class='line'>433</span> * @function
<span class='line'>434</span> * @param {!function(!Error=):undefined} callback Called once the document has been closed, passes an error object in case of error
<span class='line'>435</span> * @return {undefined}
<span class='line'>436</span> */</span><span class="WHIT">
<span class='line'>437</span> </span><span class="WHIT"> </span><span class="NAME">this.closeDocument</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">callback</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>438</span> </span><span class="WHIT"> </span><span class="NAME">runtime.assert</span><span class="PUNC">(</span><span class="NAME">session</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"session should exist here."</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>439</span>
<span class='line'>440</span> </span><span class="WHIT"> </span><span class="NAME">endEditing</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>441</span>
<span class='line'>442</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">op</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">ops.OpRemoveMember</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>443</span> </span><span class="WHIT"> </span><span class="NAME">op.init</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>444</span> </span><span class="WHIT"> </span><span class="NAME">memberid</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">memberId</span><span class="WHIT">
<span class='line'>445</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>446</span> </span><span class="WHIT"> </span><span class="NAME">session.enqueue</span><span class="PUNC">(</span><span class="PUNC">[</span><span class="NAME">op</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>447</span>
<span class='line'>448</span> </span><span class="WHIT"> </span><span class="NAME">session.close</span><span class="PUNC">(</span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">err</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>449</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">err</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>450</span> </span><span class="WHIT"> </span><span class="NAME">callback</span><span class="PUNC">(</span><span class="NAME">err</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>451</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>452</span> </span><span class="WHIT"> </span><span class="NAME">editorSession.sessionController.getMetadataController</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">unsubscribe</span><span class="PUNC">(</span><span class="NAME">gui.MetadataController.signalMetadataChanged</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">relayMetadataSignal</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>453</span> </span><span class="WHIT"> </span><span class="NAME">editorSession.destroy</span><span class="PUNC">(</span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">err</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>454</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">err</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>455</span> </span><span class="WHIT"> </span><span class="NAME">callback</span><span class="PUNC">(</span><span class="NAME">err</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>456</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>457</span> </span><span class="WHIT"> </span><span class="NAME">editorSession</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>458</span> </span><span class="WHIT"> </span><span class="NAME">session.destroy</span><span class="PUNC">(</span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">err</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>459</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">err</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>460</span> </span><span class="WHIT"> </span><span class="NAME">callback</span><span class="PUNC">(</span><span class="NAME">err</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>461</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>462</span> </span><span class="WHIT"> </span><span class="NAME">session</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>463</span> </span><span class="WHIT"> </span><span class="NAME">callback</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>464</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>465</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>466</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>467</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>468</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>469</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>470</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>471</span>
<span class='line'>472</span> </span><span class="WHIT"> </span><span class="COMM">/**
<span class='line'>473</span> * @name TextEditor#getDocumentAsByteArray
<span class='line'>474</span> * @function
<span class='line'>475</span> * @param {!function(err:?Error, file:!Uint8Array=):undefined} callback Called with the current document as ODT file as bytearray, passes an error object in case of error
<span class='line'>476</span> * @return {undefined}
<span class='line'>477</span> */</span><span class="WHIT">
<span class='line'>478</span> </span><span class="WHIT"> </span><span class="NAME">this.getDocumentAsByteArray</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">callback</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>479</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">odfContainer</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">odfCanvas.odfContainer</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>480</span>
<span class='line'>481</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">odfContainer</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>482</span> </span><span class="WHIT"> </span><span class="NAME">odfContainer.createByteArray</span><span class="PUNC">(</span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">ba</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>483</span> </span><span class="WHIT"> </span><span class="NAME">callback</span><span class="PUNC">(</span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">ba</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>484</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">errorString</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>485</span> </span><span class="WHIT"> </span><span class="NAME">callback</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="NAME">errorString</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="STRN">"Could not create bytearray from OdfContainer."</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>486</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>487</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>488</span> </span><span class="WHIT"> </span><span class="NAME">callback</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"No odfContainer set!"</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>489</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>490</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>491</span>
<span class='line'>492</span> </span><span class="WHIT"> </span><span class="COMM">/**
<span class='line'>493</span> * Sets the metadata fields from the given properties map.
<span class='line'>494</span> * Avoid setting certain fields since they are automatically set:
<span class='line'>495</span> * dc:creator
<span class='line'>496</span> * dc:date
<span class='line'>497</span> * meta:editing-cycles
<span class='line'>498</span> *
<span class='line'>499</span> * The following properties are never used and will be removed for semantic
<span class='line'>500</span> * consistency from the document:
<span class='line'>501</span> * meta:editing-duration
<span class='line'>502</span> * meta:document-statistic
<span class='line'>503</span> *
<span class='line'>504</span> * Setting any of the above mentioned fields using this method will have no effect.
<span class='line'>505</span> *
<span class='line'>506</span> * @name TextEditor#setMetadata
<span class='line'>507</span> * @function
<span class='line'>508</span> * @param {?Object.&lt;!string, !string>} setProperties A flat object that is a string->string map of field name -> value.
<span class='line'>509</span> * @param {?Array.&lt;!string>} removedProperties An array of metadata field names (prefixed).
<span class='line'>510</span> * @return {undefined}
<span class='line'>511</span> */</span><span class="WHIT">
<span class='line'>512</span> </span><span class="WHIT"> </span><span class="NAME">this.setMetadata</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">setProperties</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">removedProperties</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>513</span> </span><span class="WHIT"> </span><span class="NAME">runtime.assert</span><span class="PUNC">(</span><span class="NAME">editorSession</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"editorSession should exist here."</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>514</span>
<span class='line'>515</span> </span><span class="WHIT"> </span><span class="NAME">editorSession.sessionController.getMetadataController</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">setMetadata</span><span class="PUNC">(</span><span class="NAME">setProperties</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">removedProperties</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>516</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>517</span>
<span class='line'>518</span> </span><span class="WHIT"> </span><span class="COMM">/**
<span class='line'>519</span> * Returns the value of the requested document metadata field.
<span class='line'>520</span> * @name TextEditor#getMetadata
<span class='line'>521</span> * @function
<span class='line'>522</span> * @param {!string} property A namespace-prefixed field name, for example
<span class='line'>523</span> * dc:creator
<span class='line'>524</span> * @return {?string}
<span class='line'>525</span> */</span><span class="WHIT">
<span class='line'>526</span> </span><span class="WHIT"> </span><span class="NAME">this.getMetadata</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">property</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>527</span> </span><span class="WHIT"> </span><span class="NAME">runtime.assert</span><span class="PUNC">(</span><span class="NAME">editorSession</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"editorSession should exist here."</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>528</span>
<span class='line'>529</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">editorSession.sessionController.getMetadataController</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">getMetadata</span><span class="PUNC">(</span><span class="NAME">property</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>530</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>531</span>
<span class='line'>532</span> </span><span class="WHIT"> </span><span class="COMM">/**
<span class='line'>533</span> * Sets the data for the person that is editing the document.
<span class='line'>534</span> * The supported fields are:
<span class='line'>535</span> * "fullName": the full name of the editing person
<span class='line'>536</span> * "color": color to use for the user specific UI elements
<span class='line'>537</span> * @name TextEditor#setUserData
<span class='line'>538</span> * @function
<span class='line'>539</span> * @param {?Object.&lt;!string,!string>|undefined} data
<span class='line'>540</span> * @return {undefined}
<span class='line'>541</span> */</span><span class="WHIT">
<span class='line'>542</span> </span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">setUserData</span><span class="PUNC">(</span><span class="NAME">data</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>543</span> </span><span class="WHIT"> </span><span class="NAME">userData</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">cloneUserData</span><span class="PUNC">(</span><span class="NAME">data</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>544</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>545</span> </span><span class="WHIT"> </span><span class="NAME">this.setUserData</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">setUserData</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>546</span>
<span class='line'>547</span> </span><span class="WHIT"> </span><span class="COMM">/**
<span class='line'>548</span> * Returns the data set for the person that is editing the document.
<span class='line'>549</span> * @name TextEditor#getUserData
<span class='line'>550</span> * @function
<span class='line'>551</span> * @return {!Object.&lt;!string,!string>}
<span class='line'>552</span> */</span><span class="WHIT">
<span class='line'>553</span> </span><span class="WHIT"> </span><span class="NAME">this.getUserData</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>554</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">cloneUserData</span><span class="PUNC">(</span><span class="NAME">userData</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>555</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>556</span>
<span class='line'>557</span> </span><span class="WHIT"> </span><span class="COMM">/**
<span class='line'>558</span> * Sets the current state of the document to be either the unmodified state
<span class='line'>559</span> * or a modified state.
<span class='line'>560</span> * If @p modified is @true and the current state was already a modified state,
<span class='line'>561</span> * this call has no effect and also does not remove the unmodified flag
<span class='line'>562</span> * from the state which has it set.
<span class='line'>563</span> *
<span class='line'>564</span> * @name TextEditor#setDocumentModified
<span class='line'>565</span> * @function
<span class='line'>566</span> * @param {!boolean} modified
<span class='line'>567</span> * @return {undefined}
<span class='line'>568</span> */</span><span class="WHIT">
<span class='line'>569</span> </span><span class="WHIT"> </span><span class="NAME">this.setDocumentModified</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">modified</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>570</span> </span><span class="WHIT"> </span><span class="NAME">runtime.assert</span><span class="PUNC">(</span><span class="NAME">editorSession</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"editorSession should exist here."</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>571</span>
<span class='line'>572</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">undoRedoEnabled</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>573</span> </span><span class="WHIT"> </span><span class="NAME">editorSession.sessionController.getUndoManager</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">setDocumentModified</span><span class="PUNC">(</span><span class="NAME">modified</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>574</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>575</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>576</span>
<span class='line'>577</span> </span><span class="WHIT"> </span><span class="COMM">/**
<span class='line'>578</span> * Returns if the current state of the document matches the unmodified state.
<span class='line'>579</span> * @name TextEditor#isDocumentModified
<span class='line'>580</span> * @function
<span class='line'>581</span> * @return {!boolean}
<span class='line'>582</span> */</span><span class="WHIT">
<span class='line'>583</span> </span><span class="WHIT"> </span><span class="NAME">this.isDocumentModified</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>584</span> </span><span class="WHIT"> </span><span class="NAME">runtime.assert</span><span class="PUNC">(</span><span class="NAME">editorSession</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"editorSession should exist here."</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>585</span>
<span class='line'>586</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">undoRedoEnabled</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>587</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">editorSession.sessionController.getUndoManager</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">isDocumentModified</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>588</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>589</span>
<span class='line'>590</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>591</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>592</span>
<span class='line'>593</span> </span><span class="WHIT"> </span><span class="COMM">/**
<span class='line'>594</span> * @return {undefined}
<span class='line'>595</span> */</span><span class="WHIT">
<span class='line'>596</span> </span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">setFocusToOdfCanvas</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>597</span> </span><span class="WHIT"> </span><span class="NAME">editorSession.sessionController.getEventManager</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">focus</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>598</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>599</span>
<span class='line'>600</span> </span><span class="WHIT"> </span><span class="COMM">/**
<span class='line'>601</span> * @param {!function(!Error=):undefined} callback passes an error object in case of error
<span class='line'>602</span> * @return {undefined}
<span class='line'>603</span> */</span><span class="WHIT">
<span class='line'>604</span> </span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">destroyInternal</span><span class="PUNC">(</span><span class="NAME">callback</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>605</span> </span><span class="WHIT"> </span><span class="NAME">mainContainerElement.removeChild</span><span class="PUNC">(</span><span class="NAME">editorElement</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>606</span>
<span class='line'>607</span> </span><span class="WHIT"> </span><span class="NAME">callback</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>608</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>609</span>
<span class='line'>610</span> </span><span class="WHIT"> </span><span class="COMM">/**
<span class='line'>611</span> * Destructs the editor object completely.
<span class='line'>612</span> * @name TextEditor#destroy
<span class='line'>613</span> * @function
<span class='line'>614</span> * @param {!function(!Error=):undefined} callback Called once the destruction has been completed, passes an error object in case of error
<span class='line'>615</span> * @return {undefined}
<span class='line'>616</span> */</span><span class="WHIT">
<span class='line'>617</span> </span><span class="WHIT"> </span><span class="NAME">this.destroy</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">callback</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>618</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">destroyCallbacks</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>619</span>
<span class='line'>620</span> </span><span class="WHIT"> </span><span class="COMM">// TODO: decide if some forced close should be done here instead of enforcing proper API usage</span><span class="WHIT">
<span class='line'>621</span> </span><span class="WHIT"> </span><span class="NAME">runtime.assert</span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">session</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"session should not exist here."</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>622</span>
<span class='line'>623</span> </span><span class="WHIT"> </span><span class="COMM">// TODO: investigate what else needs to be done</span><span class="WHIT">
<span class='line'>624</span> </span><span class="WHIT"> </span><span class="NAME">mainContainer.destroyRecursive</span><span class="PUNC">(</span><span class="KEYW">true</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>625</span>
<span class='line'>626</span> </span><span class="WHIT"> </span><span class="NAME">destroyCallbacks</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">destroyCallbacks.concat</span><span class="PUNC">(</span><span class="PUNC">[</span><span class="WHIT">
<span class='line'>627</span> </span><span class="WHIT"> </span><span class="NAME">fullWindowZoomHelper.destroy</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>628</span> </span><span class="WHIT"> </span><span class="NAME">tools.destroy</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>629</span> </span><span class="WHIT"> </span><span class="NAME">odfCanvas.destroy</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>630</span> </span><span class="WHIT"> </span><span class="NAME">destroyInternal</span><span class="WHIT">
<span class='line'>631</span> </span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>632</span>
<span class='line'>633</span> </span><span class="WHIT"> </span><span class="NAME">core.Async.destroyAll</span><span class="PUNC">(</span><span class="NAME">destroyCallbacks</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">callback</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>634</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>635</span>
<span class='line'>636</span> </span><span class="WHIT"> </span><span class="COMM">// TODO:</span><span class="WHIT">
<span class='line'>637</span> </span><span class="WHIT"> </span><span class="COMM">// this.openDocumentFromByteArray = openDocumentFromByteArray; see also https://github.com/kogmbh/WebODF/issues/375</span><span class="WHIT">
<span class='line'>638</span> </span><span class="WHIT"> </span><span class="COMM">// setReadOnly: setReadOnly,</span><span class="WHIT">
<span class='line'>639</span>
<span class='line'>640</span> </span><span class="WHIT"> </span><span class="COMM">/**
<span class='line'>641</span> * Registers a callback which should be called if the given event happens.
<span class='line'>642</span> * @name TextEditor#addEventListener
<span class='line'>643</span> * @function
<span class='line'>644</span> * @param {!string} eventId
<span class='line'>645</span> * @param {!Function} callback
<span class='line'>646</span> * @return {undefined}
<span class='line'>647</span> */</span><span class="WHIT">
<span class='line'>648</span> </span><span class="WHIT"> </span><span class="NAME">this.addEventListener</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">eventNotifier.subscribe</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>649</span> </span><span class="WHIT"> </span><span class="COMM">/**
<span class='line'>650</span> * Unregisters a callback for the given event.
<span class='line'>651</span> * @name TextEditor#removeEventListener
<span class='line'>652</span> * @function
<span class='line'>653</span> * @param {!string} eventId
<span class='line'>654</span> * @param {!Function} callback
<span class='line'>655</span> * @return {undefined}
<span class='line'>656</span> */</span><span class="WHIT">
<span class='line'>657</span> </span><span class="WHIT"> </span><span class="NAME">this.removeEventListener</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">eventNotifier.unsubscribe</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>658</span>
<span class='line'>659</span>
<span class='line'>660</span> </span><span class="WHIT"> </span><span class="COMM">/**
<span class='line'>661</span> * @return {undefined}
<span class='line'>662</span> */</span><span class="WHIT">
<span class='line'>663</span> </span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">init</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>664</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">editorPane</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>665</span> </span><span class="WHIT"> </span><span class="COMM">/** @inner @const
<span class='line'>666</span> @type{!string} */</span><span class="WHIT">
<span class='line'>667</span> </span><span class="WHIT"> </span><span class="NAME">documentns</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">document.documentElement.namespaceURI</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>668</span>
<span class='line'>669</span> </span><span class="WHIT"> </span><span class="COMM">/**
<span class='line'>670</span> * @param {!string} tagLocalName
<span class='line'>671</span> * @param {!string|undefined} id
<span class='line'>672</span> * @param {!string} className
<span class='line'>673</span> * @return {!Element}
<span class='line'>674</span> */</span><span class="WHIT">
<span class='line'>675</span> </span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">createElement</span><span class="PUNC">(</span><span class="NAME">tagLocalName</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">id</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">className</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>676</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">element</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>677</span> </span><span class="WHIT"> </span><span class="NAME">element</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">document.createElementNS</span><span class="PUNC">(</span><span class="NAME">documentns</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">tagLocalName</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>678</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">id</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>679</span> </span><span class="WHIT"> </span><span class="NAME">element.id</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">id</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>680</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>681</span> </span><span class="WHIT"> </span><span class="NAME">element.classList.add</span><span class="PUNC">(</span><span class="NAME">className</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>682</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">element</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>683</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>684</span>
<span class='line'>685</span> </span><span class="WHIT"> </span><span class="COMM">// create needed tree structure</span><span class="WHIT">
<span class='line'>686</span> </span><span class="WHIT"> </span><span class="NAME">canvasElement</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">createElement</span><span class="PUNC">(</span><span class="STRN">'div'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">canvasElementId</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"webodfeditor-canvas"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>687</span> </span><span class="WHIT"> </span><span class="NAME">canvasContainerElement</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">createElement</span><span class="PUNC">(</span><span class="STRN">'div'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">canvasContainerElementId</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"webodfeditor-canvascontainer"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>688</span> </span><span class="WHIT"> </span><span class="NAME">toolbarElement</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">createElement</span><span class="PUNC">(</span><span class="STRN">'span'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">toolbarElementId</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"webodfeditor-toolbar"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>689</span> </span><span class="WHIT"> </span><span class="NAME">toolbarContainerElement</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">createElement</span><span class="PUNC">(</span><span class="STRN">'span'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"webodfeditor-toolbarcontainer"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>690</span> </span><span class="WHIT"> </span><span class="NAME">editorElement</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">createElement</span><span class="PUNC">(</span><span class="STRN">'div'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">editorElementId</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"webodfeditor-editor"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>691</span>
<span class='line'>692</span> </span><span class="WHIT"> </span><span class="COMM">// put into tree</span><span class="WHIT">
<span class='line'>693</span> </span><span class="WHIT"> </span><span class="NAME">canvasContainerElement.appendChild</span><span class="PUNC">(</span><span class="NAME">canvasElement</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>694</span> </span><span class="WHIT"> </span><span class="NAME">toolbarContainerElement.appendChild</span><span class="PUNC">(</span><span class="NAME">toolbarElement</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>695</span> </span><span class="WHIT"> </span><span class="NAME">editorElement.appendChild</span><span class="PUNC">(</span><span class="NAME">toolbarContainerElement</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>696</span> </span><span class="WHIT"> </span><span class="NAME">editorElement.appendChild</span><span class="PUNC">(</span><span class="NAME">canvasContainerElement</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>697</span> </span><span class="WHIT"> </span><span class="NAME">mainContainerElement.appendChild</span><span class="PUNC">(</span><span class="NAME">editorElement</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>698</span>
<span class='line'>699</span> </span><span class="WHIT"> </span><span class="COMM">// style all elements with Dojo's claro.</span><span class="WHIT">
<span class='line'>700</span> </span><span class="WHIT"> </span><span class="COMM">// Not nice to do this on body, but then there is no other way known</span><span class="WHIT">
<span class='line'>701</span> </span><span class="WHIT"> </span><span class="COMM">// to style also all dialogs, which are attached directly to body</span><span class="WHIT">
<span class='line'>702</span> </span><span class="WHIT"> </span><span class="NAME">document.body.classList.add</span><span class="PUNC">(</span><span class="STRN">"claro"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>703</span>
<span class='line'>704</span> </span><span class="WHIT"> </span><span class="COMM">// prevent browser translation service messing up internal address system</span><span class="WHIT">
<span class='line'>705</span> </span><span class="WHIT"> </span><span class="COMM">// TODO: this should be done more centrally, but where exactly?</span><span class="WHIT">
<span class='line'>706</span> </span><span class="WHIT"> </span><span class="NAME">canvasElement.setAttribute</span><span class="PUNC">(</span><span class="STRN">"translate"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"no"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>707</span> </span><span class="WHIT"> </span><span class="NAME">canvasElement.classList.add</span><span class="PUNC">(</span><span class="STRN">"notranslate"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>708</span>
<span class='line'>709</span> </span><span class="WHIT"> </span><span class="COMM">// create widgets</span><span class="WHIT">
<span class='line'>710</span> </span><span class="WHIT"> </span><span class="NAME">mainContainer</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">BorderContainer</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">mainContainerElementId</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>711</span>
<span class='line'>712</span> </span><span class="WHIT"> </span><span class="NAME">editorPane</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">ContentPane</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>713</span> </span><span class="WHIT"> </span><span class="NAME">region</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'center'</span><span class="WHIT">
<span class='line'>714</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">editorElementId</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>715</span> </span><span class="WHIT"> </span><span class="NAME">mainContainer.addChild</span><span class="PUNC">(</span><span class="NAME">editorPane</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>716</span>
<span class='line'>717</span> </span><span class="WHIT"> </span><span class="NAME">mainContainer.startup</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>718</span>
<span class='line'>719</span> </span><span class="WHIT"> </span><span class="NAME">tools</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Tools</span><span class="PUNC">(</span><span class="NAME">toolbarElementId</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>720</span> </span><span class="WHIT"> </span><span class="NAME">onToolDone</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">setFocusToOdfCanvas</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>721</span> </span><span class="WHIT"> </span><span class="NAME">loadOdtFile</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">loadOdtFile</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>722</span> </span><span class="WHIT"> </span><span class="NAME">saveOdtFile</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">saveOdtFile</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>723</span> </span><span class="WHIT"> </span><span class="NAME">saveAsOdtFile</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">saveAsOdtFile</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>724</span> </span><span class="WHIT"> </span><span class="NAME">downloadOdtFile</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">downloadOdtFile</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>725</span> </span><span class="WHIT"> </span><span class="NAME">close</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">close</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>726</span> </span><span class="WHIT"> </span><span class="NAME">directTextStylingEnabled</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">directTextStylingEnabled</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>727</span> </span><span class="WHIT"> </span><span class="NAME">directParagraphStylingEnabled</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">directParagraphStylingEnabled</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>728</span> </span><span class="WHIT"> </span><span class="NAME">paragraphStyleSelectingEnabled</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">paragraphStyleSelectingEnabled</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>729</span> </span><span class="WHIT"> </span><span class="NAME">paragraphStyleEditingEnabled</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">paragraphStyleEditingEnabled</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>730</span> </span><span class="WHIT"> </span><span class="NAME">imageInsertingEnabled</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">imageEditingEnabled</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>731</span> </span><span class="WHIT"> </span><span class="NAME">hyperlinkEditingEnabled</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">hyperlinkEditingEnabled</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>732</span> </span><span class="WHIT"> </span><span class="NAME">annotationsEnabled</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">annotationsEnabled</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>733</span> </span><span class="WHIT"> </span><span class="NAME">undoRedoEnabled</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">undoRedoEnabled</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>734</span> </span><span class="WHIT"> </span><span class="NAME">zoomingEnabled</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">zoomingEnabled</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>735</span> </span><span class="WHIT"> </span><span class="NAME">aboutEnabled</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="WHIT">
<span class='line'>736</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>737</span>
<span class='line'>738</span> </span><span class="WHIT"> </span><span class="NAME">odfCanvas</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">odf.OdfCanvas</span><span class="PUNC">(</span><span class="NAME">canvasElement</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>739</span> </span><span class="WHIT"> </span><span class="NAME">odfCanvas.enableAnnotations</span><span class="PUNC">(</span><span class="NAME">annotationsEnabled</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>740</span>
<span class='line'>741</span> </span><span class="WHIT"> </span><span class="NAME">odfCanvas.addListener</span><span class="PUNC">(</span><span class="STRN">"statereadychange"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">createSession</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>742</span>
<span class='line'>743</span> </span><span class="WHIT"> </span><span class="NAME">fullWindowZoomHelper</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">FullWindowZoomHelper</span><span class="PUNC">(</span><span class="NAME">toolbarContainerElement</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">canvasContainerElement</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>744</span>
<span class='line'>745</span> </span><span class="WHIT"> </span><span class="NAME">setUserData</span><span class="PUNC">(</span><span class="NAME">editorOptions.userData</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>746</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>747</span>
<span class='line'>748</span> </span><span class="WHIT"> </span><span class="NAME">init</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>749</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>750</span>
<span class='line'>751</span> </span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">loadDojoAndStuff</span><span class="PUNC">(</span><span class="NAME">callback</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>752</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">head</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">document.getElementsByTagName</span><span class="PUNC">(</span><span class="STRN">"head"</span><span class="PUNC">)</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>753</span> </span><span class="WHIT"> </span><span class="NAME">frag</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">document.createDocumentFragment</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>754</span> </span><span class="WHIT"> </span><span class="NAME">link</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>755</span> </span><span class="WHIT"> </span><span class="NAME">script</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>756</span>
<span class='line'>757</span> </span><span class="WHIT"> </span><span class="COMM">// append two link and two script elements to the header</span><span class="WHIT">
<span class='line'>758</span> </span><span class="WHIT"> </span><span class="NAME">link</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">document.createElement</span><span class="PUNC">(</span><span class="STRN">"link"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>759</span> </span><span class="WHIT"> </span><span class="NAME">link.rel</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"stylesheet"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>760</span> </span><span class="WHIT"> </span><span class="NAME">link.href</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">installationPath</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"/app/resources/app.css"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>761</span> </span><span class="WHIT"> </span><span class="NAME">link.type</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"text/css"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>762</span> </span><span class="WHIT"> </span><span class="NAME">link.async</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>763</span> </span><span class="WHIT"> </span><span class="NAME">frag.appendChild</span><span class="PUNC">(</span><span class="NAME">link</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>764</span> </span><span class="WHIT"> </span><span class="NAME">link</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">document.createElement</span><span class="PUNC">(</span><span class="STRN">"link"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>765</span> </span><span class="WHIT"> </span><span class="NAME">link.rel</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"stylesheet"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>766</span> </span><span class="WHIT"> </span><span class="NAME">link.href</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">installationPath</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"/wodotexteditor.css"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>767</span> </span><span class="WHIT"> </span><span class="NAME">link.type</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"text/css"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>768</span> </span><span class="WHIT"> </span><span class="NAME">link.async</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>769</span> </span><span class="WHIT"> </span><span class="NAME">frag.appendChild</span><span class="PUNC">(</span><span class="NAME">link</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>770</span> </span><span class="WHIT"> </span><span class="NAME">script</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">document.createElement</span><span class="PUNC">(</span><span class="STRN">"script"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>771</span> </span><span class="WHIT"> </span><span class="NAME">script.src</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">installationPath</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"/dojo-amalgamation.js"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>772</span> </span><span class="WHIT"> </span><span class="NAME">script</span><span class="PUNC">[</span><span class="STRN">"data-dojo-config"</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"async: true"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>773</span> </span><span class="WHIT"> </span><span class="NAME">script.charset</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"utf-8"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>774</span> </span><span class="WHIT"> </span><span class="NAME">script.type</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"text/javascript"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>775</span> </span><span class="WHIT"> </span><span class="NAME">script.async</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>776</span> </span><span class="WHIT"> </span><span class="NAME">frag.appendChild</span><span class="PUNC">(</span><span class="NAME">script</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>777</span> </span><span class="WHIT"> </span><span class="NAME">script</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">document.createElement</span><span class="PUNC">(</span><span class="STRN">"script"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>778</span> </span><span class="WHIT"> </span><span class="NAME">script.src</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">installationPath</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"/webodf.js"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>779</span> </span><span class="WHIT"> </span><span class="NAME">script.charset</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"utf-8"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>780</span> </span><span class="WHIT"> </span><span class="NAME">script.type</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"text/javascript"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>781</span> </span><span class="WHIT"> </span><span class="NAME">script.async</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>782</span> </span><span class="WHIT"> </span><span class="NAME">script.onload</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">callback</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>783</span> </span><span class="WHIT"> </span><span class="NAME">frag.appendChild</span><span class="PUNC">(</span><span class="NAME">script</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>784</span> </span><span class="WHIT"> </span><span class="NAME">head.appendChild</span><span class="PUNC">(</span><span class="NAME">frag</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>785</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>786</span>
<span class='line'>787</span> </span><span class="WHIT"> </span><span class="COMM">/**
<span class='line'>788</span> * Creates a text editor object and returns it on success in the passed callback.
<span class='line'>789</span> * @name Wodo#createTextEditor
<span class='line'>790</span> * @function
<span class='line'>791</span> * @param {!string} editorContainerElementId id of the existing div element which will contain the editor (should be empty before)
<span class='line'>792</span> * @param editorOptions options to configure the features of the editor. All entries are optional
<span class='line'>793</span> * @param [editorOptions.modus=Wodo.MODUS_FULLEDITING] set the editing modus. Current options: Wodo.MODUS_FULLEDITING, Wodo.MODUS_REVIEW
<span class='line'>794</span> * @param [editorOptions.loadCallback] parameter-less callback method, adds a "Load" button to the toolbar which triggers this method
<span class='line'>795</span> * @param [editorOptions.saveCallback] parameter-less callback method, adds a "Save" button to the toolbar which triggers this method
<span class='line'>796</span> * @param [editorOptions.saveAsCallback] parameter-less callback method, adds a "Save as" button to the toolbar which triggers this method
<span class='line'>797</span> * @param [editorOptions.downloadCallback] parameter-less callback method, adds a "Download" button to the right of the toolbar which triggers this method
<span class='line'>798</span> * @param [editorOptions.closeCallback] parameter-less callback method, adds a "Save" button to the toolbar which triggers this method
<span class='line'>799</span> * @param [editorOptions.allFeaturesEnabled=false] if set to 'true', switches the default for all features from 'false' to 'true'
<span class='line'>800</span> * @param [editorOptions.directTextStylingEnabled=false] if set to 'true', enables the direct styling of text (e.g. bold/italic or font)
<span class='line'>801</span> * @param [editorOptions.directParagraphStylingEnabled=false] if set to 'true', enables the direct styling of paragraphs (e.g. indentation or alignement)
<span class='line'>802</span> * @param [editorOptions.paragraphStyleSelectingEnabled=false] if set to 'true', enables setting of defined paragraph styles to paragraphs
<span class='line'>803</span> * @param [editorOptions.paragraphStyleEditingEnabled=false] if set to 'true', enables the editing of defined paragraph styles
<span class='line'>804</span> * @param [editorOptions.imageEditingEnabled=false] if set to 'true', enables the insertion of images
<span class='line'>805</span> * @param [editorOptions.hyperlinkEditingEnabled=false] if set to 'true', enables the editing of hyperlinks
<span class='line'>806</span> * @param [editorOptions.annotationsEnabled=false] if set to 'true', enables the display and the editing of annotations
<span class='line'>807</span> * @param [editorOptions.undoRedoEnabled=false] if set to 'true', enables the Undo and Redo of editing actions
<span class='line'>808</span> * @param [editorOptions.zoomingEnabled=false] if set to 'true', enables the zooming tool
<span class='line'>809</span> * @param [editorOptions.userData] data about the user editing the document
<span class='line'>810</span> * @param [editorOptions.userData.fullName] full name of the user, used for annotations and in the metadata of the document
<span class='line'>811</span> * @param [editorOptions.userData.color="black"] color to use for any user related indicators like cursor or annotations
<span class='line'>812</span> * @param {!function(err:?Error, editor:!TextEditor=):undefined} onEditorCreated
<span class='line'>813</span> * @return {undefined}
<span class='line'>814</span> */</span><span class="WHIT">
<span class='line'>815</span> </span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">createTextEditor</span><span class="PUNC">(</span><span class="NAME">editorContainerElementId</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">editorOptions</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">onEditorCreated</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>816</span> </span><span class="WHIT"> </span><span class="COMM">/**
<span class='line'>817</span> * @return {undefined}
<span class='line'>818</span> */</span><span class="WHIT">
<span class='line'>819</span> </span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">create</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>820</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">editor</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">TextEditor</span><span class="PUNC">(</span><span class="NAME">editorContainerElementId</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">editorOptions</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>821</span> </span><span class="WHIT"> </span><span class="NAME">onEditorCreated</span><span class="PUNC">(</span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">editor</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>822</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>823</span>
<span class='line'>824</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">isInitalized</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>825</span> </span><span class="WHIT"> </span><span class="NAME">pendingInstanceCreationCalls.push</span><span class="PUNC">(</span><span class="NAME">create</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>826</span> </span><span class="WHIT"> </span><span class="COMM">// first request?</span><span class="WHIT">
<span class='line'>827</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">pendingInstanceCreationCalls.length</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>828</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">String</span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">WodoFromSource</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">"undefined"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>829</span> </span><span class="WHIT"> </span><span class="NAME">loadDojoAndStuff</span><span class="PUNC">(</span><span class="NAME">initTextEditor</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>830</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>831</span> </span><span class="WHIT"> </span><span class="NAME">initTextEditor</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>832</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>833</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>834</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>835</span> </span><span class="WHIT"> </span><span class="NAME">create</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>836</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>837</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>838</span>
<span class='line'>839</span>
<span class='line'>840</span> </span><span class="WHIT"> </span><span class="COMM">/**
<span class='line'>841</span> * @lends Wodo#
<span class='line'>842</span> */</span><span class="WHIT">
<span class='line'>843</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>844</span> </span><span class="WHIT"> </span><span class="NAME">createTextEditor</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">createTextEditor</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>845</span> </span><span class="WHIT"> </span><span class="COMM">// flags</span><span class="WHIT">
<span class='line'>846</span> </span><span class="WHIT"> </span><span class="COMM">/** Id of full editing modus */</span><span class="WHIT">
<span class='line'>847</span> </span><span class="WHIT"> </span><span class="NAME">MODUS_FULLEDITING</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">MODUS_FULLEDITING</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>848</span> </span><span class="WHIT"> </span><span class="COMM">/** Id of review modus */</span><span class="WHIT">
<span class='line'>849</span> </span><span class="WHIT"> </span><span class="NAME">MODUS_REVIEW</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">MODUS_REVIEW</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>850</span> </span><span class="WHIT"> </span><span class="COMM">/** Id of event for an unkown error */</span><span class="WHIT">
<span class='line'>851</span> </span><span class="WHIT"> </span><span class="NAME">EVENT_UNKNOWNERROR</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">EVENT_UNKNOWNERROR</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>852</span> </span><span class="WHIT"> </span><span class="COMM">/** Id of event if documentModified state changes */</span><span class="WHIT">
<span class='line'>853</span> </span><span class="WHIT"> </span><span class="NAME">EVENT_DOCUMENTMODIFIEDCHANGED</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">EVENT_DOCUMENTMODIFIEDCHANGED</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>854</span> </span><span class="WHIT"> </span><span class="COMM">/** Id of event if metadata changes */</span><span class="WHIT">
<span class='line'>855</span> </span><span class="WHIT"> </span><span class="NAME">EVENT_METADATACHANGED</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">EVENT_METADATACHANGED</span><span class="WHIT">
<span class='line'>856</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>857</span> </span><span class="PUNC">}</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>858</span> </span></pre></body></html>

View File

@ -0,0 +1,659 @@
/**
* Copyright (C) 2013 KO GmbH <copyright@kogmbh.com>
*
* @licstart
* This file is part of WebODF.
*
* WebODF is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License (GNU AGPL)
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version.
*
* WebODF 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with WebODF. If not, see <http://www.gnu.org/licenses/>.
* @licend
*
* @source: http://www.webodf.org/
* @source: https://github.com/kogmbh/WebODF/
*/
/*global runtime, define, document, core, odf, gui, ops*/
define("webodf/editor/EditorSession", [
"dojo/text!resources/fonts/fonts.css"
], function (fontsCSS) { // fontsCSS is retrieved as a string, using dojo's text retrieval AMD plugin
"use strict";
runtime.loadClass("core.Async");
runtime.loadClass("core.DomUtils");
runtime.loadClass("odf.OdfUtils");
runtime.loadClass("ops.OdtDocument");
runtime.loadClass("ops.OdtStepsTranslator");
runtime.loadClass("ops.Session");
runtime.loadClass("odf.Namespaces");
runtime.loadClass("odf.OdfCanvas");
runtime.loadClass("odf.OdfUtils");
runtime.loadClass("gui.CaretManager");
runtime.loadClass("gui.Caret");
runtime.loadClass("gui.OdfFieldView");
runtime.loadClass("gui.SessionController");
runtime.loadClass("gui.SessionView");
runtime.loadClass("gui.HyperlinkTooltipView");
runtime.loadClass("gui.TrivialUndoManager");
runtime.loadClass("gui.SvgSelectionView");
runtime.loadClass("gui.SelectionViewManager");
runtime.loadClass("core.EventNotifier");
runtime.loadClass("gui.ShadowCursor");
runtime.loadClass("gui.CommonConstraints");
/**
* Instantiate a new editor session attached to an existing operation session
* @constructor
* @implements {core.EventSource}
* @param {!ops.Session} session
* @param {!string} localMemberId
* @param {{viewOptions:gui.SessionViewOptions,directParagraphStylingEnabled:boolean,annotationsEnabled:boolean}} config
*/
var EditorSession = function EditorSession(session, localMemberId, config) {
var self = this,
currentParagraphNode = null,
currentCommonStyleName = null,
currentStyleName = null,
caretManager,
selectionViewManager,
hyperlinkTooltipView,
odtDocument = session.getOdtDocument(),
textns = odf.Namespaces.textns,
fontStyles = document.createElement('style'),
formatting = odtDocument.getFormatting(),
domUtils = core.DomUtils,
odfUtils = odf.OdfUtils,
odfFieldView,
eventNotifier = new core.EventNotifier([
EditorSession.signalMemberAdded,
EditorSession.signalMemberUpdated,
EditorSession.signalMemberRemoved,
EditorSession.signalCursorAdded,
EditorSession.signalCursorMoved,
EditorSession.signalCursorRemoved,
EditorSession.signalParagraphChanged,
EditorSession.signalCommonStyleCreated,
EditorSession.signalCommonStyleDeleted,
EditorSession.signalParagraphStyleModified,
EditorSession.signalUndoStackChanged]),
shadowCursor = new gui.ShadowCursor(odtDocument),
sessionConstraints,
/**@const*/
NEXT = core.StepDirection.NEXT;
/**
* @return {Array.<!string>}
*/
function getAvailableFonts() {
var availableFonts, regex, matches;
availableFonts = {};
/*jslint regexp: true*/
regex = /font-family *: *(?:\'([^']*)\'|\"([^"]*)\")/gm;
/*jslint regexp: false*/
matches = regex.exec(fontsCSS);
while (matches) {
availableFonts[matches[1] || matches[2]] = 1;
matches = regex.exec(fontsCSS);
}
availableFonts = Object.keys(availableFonts);
return availableFonts;
}
function checkParagraphStyleName() {
var newStyleName,
newCommonStyleName;
newStyleName = currentParagraphNode.getAttributeNS(textns, 'style-name');
if (newStyleName !== currentStyleName) {
currentStyleName = newStyleName;
// check if common style is still the same
newCommonStyleName = formatting.getFirstCommonParentStyleNameOrSelf(newStyleName);
if (!newCommonStyleName) {
// Default style, empty-string name
currentCommonStyleName = newStyleName = currentStyleName = "";
self.emit(EditorSession.signalParagraphChanged, {
type: 'style',
node: currentParagraphNode,
styleName: currentCommonStyleName
});
return;
}
// a common style
if (newCommonStyleName !== currentCommonStyleName) {
currentCommonStyleName = newCommonStyleName;
self.emit(EditorSession.signalParagraphChanged, {
type: 'style',
node: currentParagraphNode,
styleName: currentCommonStyleName
});
}
}
}
/**
* Creates a NCName from the passed string
* @param {!string} name
* @return {!string}
*/
function createNCName(name) {
var letter,
result = "",
i;
// encode
for (i = 0; i < name.length; i += 1) {
letter = name[i];
// simple approach, can be improved to not skip other allowed chars
if (letter.match(/[a-zA-Z0-9.-_]/) !== null) {
result += letter;
} else {
result += "_" + letter.charCodeAt(0).toString(16) + "_";
}
}
// ensure leading char is from proper range
if (result.match(/^[a-zA-Z_]/) === null) {
result = "_" + result;
}
return result;
}
function uniqueParagraphStyleNCName(name) {
var result,
i = 0,
ncMemberId = createNCName(localMemberId),
ncName = createNCName(name);
// create default paragraph style
// localMemberId is used to avoid id conflicts with ids created by other members
result = ncName + "_" + ncMemberId;
// then loop until result is really unique
while (formatting.hasParagraphStyle(result)) {
result = ncName + "_" + i + "_" + ncMemberId;
i += 1;
}
return result;
}
function trackCursor(cursor) {
var node;
node = odfUtils.getParagraphElement(cursor.getNode());
if (!node) {
return;
}
currentParagraphNode = node;
checkParagraphStyleName();
}
function trackCurrentParagraph(info) {
var cursor = odtDocument.getCursor(localMemberId),
range = cursor && cursor.getSelectedRange(),
paragraphRange = odtDocument.getDOMDocument().createRange();
paragraphRange.selectNode(info.paragraphElement);
if ((range && domUtils.rangesIntersect(range, paragraphRange)) || info.paragraphElement === currentParagraphNode) {
self.emit(EditorSession.signalParagraphChanged, info);
checkParagraphStyleName();
}
paragraphRange.detach();
}
function onMemberAdded(member) {
self.emit(EditorSession.signalMemberAdded, member.getMemberId());
}
function onMemberUpdated(member) {
self.emit(EditorSession.signalMemberUpdated, member.getMemberId());
}
function onMemberRemoved(memberId) {
self.emit(EditorSession.signalMemberRemoved, memberId);
}
function onCursorAdded(cursor) {
self.emit(EditorSession.signalCursorAdded, cursor.getMemberId());
trackCursor(cursor);
}
function onCursorRemoved(memberId) {
self.emit(EditorSession.signalCursorRemoved, memberId);
}
function onCursorMoved(cursor) {
// Emit 'cursorMoved' only when *I* am moving the cursor, not the other users
if (cursor.getMemberId() === localMemberId) {
self.emit(EditorSession.signalCursorMoved, cursor);
trackCursor(cursor);
}
}
function onStyleCreated(newStyleName) {
self.emit(EditorSession.signalCommonStyleCreated, newStyleName);
}
function onStyleDeleted(styleName) {
self.emit(EditorSession.signalCommonStyleDeleted, styleName);
}
function onParagraphStyleModified(styleName) {
self.emit(EditorSession.signalParagraphStyleModified, styleName);
}
/**
* Call all subscribers for the given event with the specified argument
* @param {!string} eventid
* @param {Object} args
*/
this.emit = function (eventid, args) {
eventNotifier.emit(eventid, args);
};
/**
* Subscribe to a given event with a callback
* @param {!string} eventid
* @param {!Function} cb
*/
this.subscribe = function (eventid, cb) {
eventNotifier.subscribe(eventid, cb);
};
/**
* @param {!string} eventid
* @param {!Function} cb
* @return {undefined}
*/
this.unsubscribe = function (eventid, cb) {
eventNotifier.unsubscribe(eventid, cb);
};
this.getCursorPosition = function () {
return odtDocument.getCursorPosition(localMemberId);
};
this.getCursorSelection = function () {
return odtDocument.getCursorSelection(localMemberId);
};
this.getOdfCanvas = function () {
return odtDocument.getOdfCanvas();
};
this.getCurrentParagraph = function () {
return currentParagraphNode;
};
this.getAvailableParagraphStyles = function () {
return formatting.getAvailableParagraphStyles();
};
this.getCurrentParagraphStyle = function () {
return currentCommonStyleName;
};
/**
* Applies the paragraph style with the given
* style name to all the paragraphs within
* the cursor selection.
* @param {!string} styleName
* @return {undefined}
*/
this.setCurrentParagraphStyle = function (styleName) {
var range = odtDocument.getCursor(localMemberId).getSelectedRange(),
paragraphs = odfUtils.getParagraphElements(range),
opQueue = [];
paragraphs.forEach(function (paragraph) {
var paragraphStartPoint = odtDocument.convertDomPointToCursorStep(paragraph, 0, NEXT),
paragraphStyleName = paragraph.getAttributeNS(odf.Namespaces.textns, "style-name"),
opSetParagraphStyle;
if (paragraphStyleName !== styleName) {
opSetParagraphStyle = new ops.OpSetParagraphStyle();
opSetParagraphStyle.init({
memberid: localMemberId,
styleName: styleName,
position: paragraphStartPoint
});
opQueue.push(opSetParagraphStyle);
}
});
if (opQueue.length > 0) {
session.enqueue(opQueue);
}
};
this.insertTable = function (initialRows, initialColumns, tableStyleName, tableColumnStyleName, tableCellStyleMatrix) {
var op = new ops.OpInsertTable();
op.init({
memberid: localMemberId,
position: self.getCursorPosition(),
initialRows: initialRows,
initialColumns: initialColumns,
tableStyleName: tableStyleName,
tableColumnStyleName: tableColumnStyleName,
tableCellStyleMatrix: tableCellStyleMatrix
});
session.enqueue([op]);
};
/**
* Takes a style name and returns the corresponding paragraph style
* element. If the style name is an empty string, the default style
* is returned.
* @param {!string} styleName
* @return {?Element}
*/
function getParagraphStyleElement(styleName) {
return (styleName === "")
? formatting.getDefaultStyleElement('paragraph')
: formatting.getStyleElement(styleName, 'paragraph');
}
this.getParagraphStyleElement = getParagraphStyleElement;
/**
* Returns if the style is used anywhere in the document
* @param {!Element} styleElement
* @return {boolean}
*/
this.isStyleUsed = function (styleElement) {
return formatting.isStyleUsed(styleElement);
};
/**
* Returns the attributes of a given paragraph style name
* (with inheritance). If the name is an empty string,
* the attributes of the default style are returned.
* @param {!string} styleName
* @return {?odf.Formatting.StyleData}
*/
this.getParagraphStyleAttributes = function (styleName) {
var styleNode = getParagraphStyleElement(styleName),
includeSystemDefault = styleName === "";
if (styleNode) {
return formatting.getInheritedStyleAttributes(styleNode, includeSystemDefault);
}
return null;
};
/**
* Creates and enqueues a paragraph-style cloning operation.
* Returns the created id for the new style.
* @param {!string} styleName id of the style to update
* @param {!{paragraphProperties,textProperties}} setProperties properties which are set
* @param {!{paragraphPropertyNames,textPropertyNames}=} removedProperties properties which are removed
* @return {undefined}
*/
this.updateParagraphStyle = function (styleName, setProperties, removedProperties) {
var op;
op = new ops.OpUpdateParagraphStyle();
op.init({
memberid: localMemberId,
styleName: styleName,
setProperties: setProperties,
removedProperties: (!removedProperties) ? {} : removedProperties
});
session.enqueue([op]);
};
/**
* Creates and enqueues a paragraph-style cloning operation.
* Returns the created id for the new style.
* @param {!string} styleName id of the style to clone
* @param {!string} newStyleDisplayName display name of the new style
* @return {!string}
*/
this.cloneParagraphStyle = function (styleName, newStyleDisplayName) {
var newStyleName = uniqueParagraphStyleNCName(newStyleDisplayName),
styleNode = getParagraphStyleElement(styleName),
op, setProperties, attributes, i;
setProperties = formatting.getStyleAttributes(styleNode);
// copy any attributes directly on the style
attributes = styleNode.attributes;
for (i = 0; i < attributes.length; i += 1) {
// skip...
// * style:display-name -> not copied, set to new string below
// * style:name -> not copied, set from op by styleName property
// * style:family -> "paragraph" always, set by op
if (!/^(style:display-name|style:name|style:family)/.test(attributes[i].name)) {
setProperties[attributes[i].name] = attributes[i].value;
}
}
setProperties['style:display-name'] = newStyleDisplayName;
op = new ops.OpAddStyle();
op.init({
memberid: localMemberId,
styleName: newStyleName,
styleFamily: 'paragraph',
setProperties: setProperties
});
session.enqueue([op]);
return newStyleName;
};
this.deleteStyle = function (styleName) {
var op;
op = new ops.OpRemoveStyle();
op.init({
memberid: localMemberId,
styleName: styleName,
styleFamily: 'paragraph'
});
session.enqueue([op]);
};
/**
* Returns an array of the declared fonts in the ODF document,
* with 'duplicates' like Arial1, Arial2, etc removed. The alphabetically
* first font name for any given family is kept.
* The elements of the array are objects containing the font's name and
* the family.
* @return {Array.<!Object>}
*/
this.getDeclaredFonts = function () {
var fontMap = formatting.getFontMap(),
usedFamilies = [],
array = [],
sortedNames,
key,
value,
i;
// Sort all the keys in the font map alphabetically
sortedNames = Object.keys(fontMap);
sortedNames.sort();
for (i = 0; i < sortedNames.length; i += 1) {
key = sortedNames[i];
value = fontMap[key];
// Use the font declaration only if the family is not already used.
// Therefore we are able to discard the alphabetic successors of the first
// font name.
if (usedFamilies.indexOf(value) === -1) {
array.push({
name: key,
family: value
});
if (value) {
usedFamilies.push(value);
}
}
}
return array;
};
this.getSelectedHyperlinks = function () {
var cursor = odtDocument.getCursor(localMemberId);
// no own cursor yet/currently added?
if (!cursor) {
return [];
}
return odfUtils.getHyperlinkElements(cursor.getSelectedRange());
};
this.getSelectedRange = function () {
var cursor = odtDocument.getCursor(localMemberId);
return cursor && cursor.getSelectedRange();
};
function undoStackModified(e) {
self.emit(EditorSession.signalUndoStackChanged, e);
}
this.undo = function () {
self.sessionController.undo();
};
this.redo = function () {
self.sessionController.redo();
};
/**
* @param {!string} memberId
* @return {?ops.Member}
*/
this.getMember = function (memberId) {
return odtDocument.getMember(memberId);
};
/**
* @param {!function(!Object=)} callback passing an error object in case of error
* @return {undefined}
*/
function destroy(callback) {
var head = document.getElementsByTagName('head')[0],
eventManager = self.sessionController.getEventManager();
head.removeChild(fontStyles);
odtDocument.unsubscribe(ops.Document.signalMemberAdded, onMemberAdded);
odtDocument.unsubscribe(ops.Document.signalMemberUpdated, onMemberUpdated);
odtDocument.unsubscribe(ops.Document.signalMemberRemoved, onMemberRemoved);
odtDocument.unsubscribe(ops.Document.signalCursorAdded, onCursorAdded);
odtDocument.unsubscribe(ops.Document.signalCursorRemoved, onCursorRemoved);
odtDocument.unsubscribe(ops.Document.signalCursorMoved, onCursorMoved);
odtDocument.unsubscribe(ops.OdtDocument.signalCommonStyleCreated, onStyleCreated);
odtDocument.unsubscribe(ops.OdtDocument.signalCommonStyleDeleted, onStyleDeleted);
odtDocument.unsubscribe(ops.OdtDocument.signalParagraphStyleModified, onParagraphStyleModified);
odtDocument.unsubscribe(ops.OdtDocument.signalParagraphChanged, trackCurrentParagraph);
odtDocument.unsubscribe(ops.OdtDocument.signalUndoStackChanged, undoStackModified);
eventManager.unsubscribe("mousemove", hyperlinkTooltipView.showTooltip);
eventManager.unsubscribe("mouseout", hyperlinkTooltipView.hideTooltip);
delete self.sessionView;
delete self.sessionController;
callback();
}
/**
* @param {!function(!Error=)} callback passing an error object in case of error
* @return {undefined}
*/
this.destroy = function(callback) {
var cleanup = [
self.sessionView.destroy,
caretManager.destroy,
selectionViewManager.destroy,
self.sessionController.destroy,
hyperlinkTooltipView.destroy,
odfFieldView.destroy,
destroy
];
core.Async.destroyAll(cleanup, callback);
};
function init() {
var head = document.getElementsByTagName('head')[0],
odfCanvas = session.getOdtDocument().getOdfCanvas(),
eventManager;
// TODO: fonts.css should be rather done by odfCanvas, or?
fontStyles.type = 'text/css';
fontStyles.media = 'screen, print, handheld, projection';
fontStyles.appendChild(document.createTextNode(fontsCSS));
head.appendChild(fontStyles);
odfFieldView = new gui.OdfFieldView(odfCanvas);
odfFieldView.showFieldHighlight();
self.sessionController = new gui.SessionController(session, localMemberId, shadowCursor, {
annotationsEnabled: config.annotationsEnabled,
directTextStylingEnabled: config.directTextStylingEnabled,
directParagraphStylingEnabled: config.directParagraphStylingEnabled
});
sessionConstraints = self.sessionController.getSessionConstraints();
eventManager = self.sessionController.getEventManager();
hyperlinkTooltipView = new gui.HyperlinkTooltipView(odfCanvas,
self.sessionController.getHyperlinkClickHandler().getModifier);
eventManager.subscribe("mousemove", hyperlinkTooltipView.showTooltip);
eventManager.subscribe("mouseout", hyperlinkTooltipView.hideTooltip);
caretManager = new gui.CaretManager(self.sessionController, odfCanvas.getViewport());
selectionViewManager = new gui.SelectionViewManager(gui.SvgSelectionView);
self.sessionView = new gui.SessionView(config.viewOptions, localMemberId, session, sessionConstraints, caretManager, selectionViewManager);
self.availableFonts = getAvailableFonts();
selectionViewManager.registerCursor(shadowCursor, true);
// Session Constraints can be applied once the controllers are instantiated.
if (config.reviewModeEnabled) {
// Disallow deleting other authors' annotations.
sessionConstraints.setState(gui.CommonConstraints.EDIT.ANNOTATIONS.ONLY_DELETE_OWN, true);
sessionConstraints.setState(gui.CommonConstraints.EDIT.REVIEW_MODE, true);
}
// Custom signals, that make sense in the Editor context. We do not want to expose webodf's ops signals to random bits of the editor UI.
odtDocument.subscribe(ops.Document.signalMemberAdded, onMemberAdded);
odtDocument.subscribe(ops.Document.signalMemberUpdated, onMemberUpdated);
odtDocument.subscribe(ops.Document.signalMemberRemoved, onMemberRemoved);
odtDocument.subscribe(ops.Document.signalCursorAdded, onCursorAdded);
odtDocument.subscribe(ops.Document.signalCursorRemoved, onCursorRemoved);
odtDocument.subscribe(ops.Document.signalCursorMoved, onCursorMoved);
odtDocument.subscribe(ops.OdtDocument.signalCommonStyleCreated, onStyleCreated);
odtDocument.subscribe(ops.OdtDocument.signalCommonStyleDeleted, onStyleDeleted);
odtDocument.subscribe(ops.OdtDocument.signalParagraphStyleModified, onParagraphStyleModified);
odtDocument.subscribe(ops.OdtDocument.signalParagraphChanged, trackCurrentParagraph);
odtDocument.subscribe(ops.OdtDocument.signalUndoStackChanged, undoStackModified);
}
init();
};
/**@const*/EditorSession.signalMemberAdded = "memberAdded";
/**@const*/EditorSession.signalMemberUpdated = "memberUpdated";
/**@const*/EditorSession.signalMemberRemoved = "memberRemoved";
/**@const*/EditorSession.signalCursorAdded = "cursorAdded";
/**@const*/EditorSession.signalCursorRemoved = "cursorRemoved";
/**@const*/EditorSession.signalCursorMoved = "cursorMoved";
/**@const*/EditorSession.signalParagraphChanged = "paragraphChanged";
/**@const*/EditorSession.signalCommonStyleCreated = "styleCreated";
/**@const*/EditorSession.signalCommonStyleDeleted = "styleDeleted";
/**@const*/EditorSession.signalParagraphStyleModified = "paragraphStyleModified";
/**@const*/EditorSession.signalUndoStackChanged = "signalUndoStackChanged";
return EditorSession;
});

View File

@ -0,0 +1,83 @@
/**
* Copyright (C) 2014 KO GmbH <copyright@kogmbh.com>
*
* @licstart
* This file is part of WebODF.
*
* WebODF is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License (GNU AGPL)
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version.
*
* WebODF 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with WebODF. If not, see <http://www.gnu.org/licenses/>.
* @licend
*
* @source: http://www.webodf.org/
* @source: https://github.com/kogmbh/WebODF/
*/
/*global define, document, window */
define("webodf/editor/FullWindowZoomHelper", [], function () {
"use strict";
// fullscreen pinch-zoom adaption
var FullWindowZoomHelper = function FullWindowZoomHelper(toolbarContainerElement, canvasContainerElement) {
function translateToolbar() {
var y = document.body.scrollTop;
toolbarContainerElement.style.WebkitTransformOrigin = "center top";
toolbarContainerElement.style.WebkitTransform = 'translateY(' + y + 'px)';
}
function repositionContainer() {
canvasContainerElement.style.top = toolbarContainerElement.getBoundingClientRect().height + 'px';
}
this.destroy = function (callback) {
window.removeEventListener('scroll', translateToolbar);
window.removeEventListener('focusout', translateToolbar);
window.removeEventListener('touchmove', translateToolbar);
window.removeEventListener('resize', repositionContainer);
callback();
};
function init() {
var metaElement, toolbarStyle;
// prevent any zooming on the window TODO: do not overwrite any other existing content of viewport metadata
metaElement = document.createElement("meta");
metaElement.setAttribute("name", "viewport");
metaElement.setAttribute("content", "width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0");
document.head.appendChild(metaElement);
// set the toolbar absolute and fixed to top
toolbarStyle = toolbarContainerElement.style;
toolbarStyle.top = 0;
toolbarStyle.left = 0;
toolbarStyle.right = 0;
toolbarStyle.position = "absolute";
toolbarStyle.zIndex = 5;
toolbarStyle.boxShadow = "0 1px 5px rgba(0, 0, 0, 0.25)";
repositionContainer();
window.addEventListener('scroll', translateToolbar);
window.addEventListener('focusout', translateToolbar);
window.addEventListener('touchmove', translateToolbar);
window.addEventListener('resize', repositionContainer);
}
init();
};
return FullWindowZoomHelper;
});

View File

@ -0,0 +1,317 @@
/**
* Copyright (C) 2013 KO GmbH <copyright@kogmbh.com>
*
* @licstart
* This file is part of WebODF.
*
* WebODF is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License (GNU AGPL)
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version.
*
* WebODF 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with WebODF. If not, see <http://www.gnu.org/licenses/>.
* @licend
*
* @source: http://www.webodf.org/
* @source: https://github.com/kogmbh/WebODF/
*/
/*global window, define, require, document, dijit, dojo, runtime, ops*/
define("webodf/editor/Tools", [
"dojo/ready",
"dijit/MenuItem",
"dijit/DropDownMenu",
"dijit/form/Button",
"dijit/form/DropDownButton",
"dijit/Toolbar",
"webodf/editor/widgets/paragraphAlignment",
"webodf/editor/widgets/simpleStyles",
"webodf/editor/widgets/undoRedoMenu",
"webodf/editor/widgets/toolbarWidgets/currentStyle",
"webodf/editor/widgets/annotation",
"webodf/editor/widgets/editHyperlinks",
"webodf/editor/widgets/imageInserter",
"webodf/editor/widgets/paragraphStylesDialog",
"webodf/editor/widgets/zoomSlider",
"webodf/editor/widgets/aboutDialog",
"webodf/editor/EditorSession"],
function (ready, MenuItem, DropDownMenu, Button, DropDownButton, Toolbar, ParagraphAlignment, SimpleStyles, UndoRedoMenu, CurrentStyle, AnnotationControl, EditHyperlinks, ImageInserter, ParagraphStylesDialog, ZoomSlider, AboutDialog, EditorSession) {
"use strict";
return function Tools(toolbarElementId, args) {
var tr = runtime.tr,
onToolDone = args.onToolDone,
loadOdtFile = args.loadOdtFile,
saveOdtFile = args.saveOdtFile,
saveAsOdtFile = args.saveAsOdtFile,
downloadOdtFile = args.downloadOdtFile,
close = args.close,
toolbar,
loadButton, saveButton, closeButton, aboutButton,
saveAsButton, downloadButton,
formatDropDownMenu, formatMenuButton,
paragraphStylesMenuItem, paragraphStylesDialog,
editorSession,
aboutDialog,
sessionSubscribers = [];
function placeAndStartUpWidget(widget) {
widget.placeAt(toolbar);
widget.startup();
}
/**
* Creates a tool and installs it, if the enabled flag is set to true.
* Only supports tool classes whose constructor has a single argument which
* is a callback to pass the created widget object to.
* @param {!function(new:Object, function(!Object):undefined)} Tool constructor method of the tool
* @param {!boolean} enabled
* @param {!Object|undefined=} config
* @return {?Object}
*/
function createTool(Tool, enabled, config) {
var tool = null;
if (enabled) {
if (config) {
tool = new Tool(config, placeAndStartUpWidget);
} else {
tool = new Tool(placeAndStartUpWidget);
}
sessionSubscribers.push(tool);
tool.onToolDone = onToolDone;
tool.setEditorSession(editorSession);
}
return tool;
}
function handleCursorMoved(cursor) {
var disabled = cursor.getSelectionType() === ops.OdtCursor.RegionSelection;
if (formatMenuButton) {
formatMenuButton.setAttribute('disabled', disabled);
}
}
function setEditorSession(session) {
if (editorSession) {
editorSession.unsubscribe(EditorSession.signalCursorMoved, handleCursorMoved);
}
editorSession = session;
if (editorSession) {
editorSession.subscribe(EditorSession.signalCursorMoved, handleCursorMoved);
}
sessionSubscribers.forEach(function (subscriber) {
subscriber.setEditorSession(editorSession);
});
[saveButton, saveAsButton, downloadButton, closeButton, formatMenuButton].forEach(function (button) {
if (button) {
button.setAttribute('disabled', !editorSession);
}
});
}
this.setEditorSession = setEditorSession;
/**
* @param {!function(!Error=)} callback, passing an error object in case of error
* @return {undefined}
*/
this.destroy = function (callback) {
// TODO:
// 1. We don't want to use `document`
// 2. We would like to avoid deleting all widgets
// under document.body because this might interfere with
// other apps that use the editor not-in-an-iframe,
// but dojo always puts its dialogs below the body,
// so this works for now. Perhaps will be obsoleted
// once we move to a better widget toolkit
var widgets = dijit.findWidgets(document.body);
dojo.forEach(widgets, function(w) {
w.destroyRecursive(false);
});
callback();
};
// init
ready(function () {
toolbar = new Toolbar({}, toolbarElementId);
// About
if (args.aboutEnabled) {
aboutButton = new Button({
label: tr('About WebODF Text Editor'),
showLabel: false,
iconClass: 'webodfeditor-dijitWebODFIcon'
});
aboutDialog = new AboutDialog(function (dialog) {
aboutButton.onClick = function () {
dialog.startup();
dialog.show();
};
});
aboutDialog.onToolDone = onToolDone;
aboutButton.placeAt(toolbar);
}
// Load
if (loadOdtFile) {
loadButton = new Button({
label: tr('Open'),
showLabel: false,
iconClass: 'dijitIcon dijitIconFolderOpen',
onClick: function () {
loadOdtFile();
}
});
loadButton.placeAt(toolbar);
}
// Save
if (saveOdtFile) {
saveButton = new Button({
label: tr('Save'),
showLabel: false,
disabled: true,
iconClass: 'dijitEditorIcon dijitEditorIconSave',
onClick: function () {
saveOdtFile();
onToolDone();
}
});
saveButton.placeAt(toolbar);
}
// SaveAs
if (saveAsOdtFile) {
saveAsButton = new Button({
label: tr('Save as...'),
showLabel: false,
disabled: true,
iconClass: 'webodfeditor-dijitSaveAsIcon',
onClick: function () {
saveAsOdtFile();
onToolDone();
}
});
saveAsButton.placeAt(toolbar);
}
// Download
if (downloadOdtFile) {
downloadButton = new Button({
label: tr('Download'),
showLabel: true,
disabled: true,
style: {
float: 'right'
},
onClick: function () {
downloadOdtFile();
onToolDone();
}
});
downloadButton.placeAt(toolbar);
}
// Format menu
if (args.paragraphStyleEditingEnabled) {
formatDropDownMenu = new DropDownMenu({});
paragraphStylesMenuItem = new MenuItem({
label: tr("Paragraph...")
});
formatDropDownMenu.addChild(paragraphStylesMenuItem);
paragraphStylesDialog = new ParagraphStylesDialog(function (dialog) {
paragraphStylesMenuItem.onClick = function () {
if (editorSession) {
dialog.startup();
dialog.show();
}
};
});
sessionSubscribers.push(paragraphStylesDialog);
paragraphStylesDialog.onToolDone = onToolDone;
formatMenuButton = new DropDownButton({
dropDown: formatDropDownMenu,
disabled: true,
label: tr('Format'),
iconClass: "dijitIconEditTask"
});
formatMenuButton.placeAt(toolbar);
}
// Undo/Redo
createTool(UndoRedoMenu, args.undoRedoEnabled);
// Add annotation
createTool(AnnotationControl, args.annotationsEnabled);
// Simple Style Selector [B, I, U, S]
createTool(SimpleStyles, args.directTextStylingEnabled);
// Paragraph direct alignment buttons
createTool(ParagraphAlignment, args.directParagraphStylingEnabled);
// Paragraph Style Selector
createTool(CurrentStyle, args.paragraphStyleSelectingEnabled);
// Zoom Level Selector
createTool(ZoomSlider, args.zoomingEnabled);
// hyper links
createTool(EditHyperlinks, args.hyperlinkEditingEnabled);
// image insertion
createTool(ImageInserter, args.imageInsertingEnabled);
// close button
if (close) {
closeButton = new Button({
label: tr('Close'),
showLabel: false,
disabled: true,
iconClass: 'dijitEditorIcon dijitEditorIconCancel',
style: {
float: 'right'
},
onClick: function () {
close();
}
});
closeButton.placeAt(toolbar);
}
// This is an internal hook for debugging/testing.
// Yes, you discovered something interesting. But:
// Do NOT rely on it, it will not be supported and can and will change in any version.
// It is not officially documented for a reason. A real plugin system is only on the wishlist
// so far, please file your suggestions/needs at the official WebODF issue system.
// You have been warned.
if (window.wodo_plugins) {
window.wodo_plugins.forEach(function (plugin) {
runtime.log("Creating plugin: "+plugin.id);
require([plugin.id], function (Plugin) {
runtime.log("Creating as tool now: "+plugin.id);
createTool(Plugin, true, plugin.config);
});
});
}
setEditorSession(editorSession);
});
};
});

View File

@ -0,0 +1,81 @@
/**
* Copyright (C) 2013 KO GmbH <copyright@kogmbh.com>
*
* @licstart
* This file is part of WebODF.
*
* WebODF is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License (GNU AGPL)
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version.
*
* WebODF 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with WebODF. If not, see <http://www.gnu.org/licenses/>.
* @licend
*
* @source: http://www.webodf.org/
* @source: https://github.com/kogmbh/WebODF/
*/
/*global define, runtime, XMLHttpRequest */
define("webodf/editor/Translator", [], function () {
"use strict";
return function Translator(translationsPath, locale, callback) {
var self = this,
dictionary = {};
function translate(key) {
return dictionary[key];
}
function setLocale(newLocale, cb) {
// TODO: Add smarter locale resolution at some point
if (newLocale.split('-')[0] === "de" || newLocale.split('_')[0] === "de") {
newLocale = "de-DE";
} else if (newLocale.split('-')[0] === "nl" || newLocale.split('_')[0] === "nl") {
newLocale = "nl-NL";
} else if (newLocale.split('-')[0] === "fr" || newLocale.split('_')[0] === "fr") {
newLocale = "fr-FR";
} else if (newLocale.split('-')[0] === "it" || newLocale.split('_')[0] === "it") {
newLocale = "it-IT";
} else if (newLocale.split('-')[0] === "eu" || newLocale.split('_')[0] === "eu") {
newLocale = "eu";
} else if (newLocale.split('-')[0] === "en" || newLocale.split('_')[0] === "en") {
newLocale = "en-US";
} else {
newLocale = "en-US";
}
var xhr = new XMLHttpRequest(),
path = translationsPath + '/' + newLocale + ".json";
xhr.open("GET", path);
xhr.onload = function () {
if (xhr.status === 200) {// HTTP OK
dictionary = JSON.parse(xhr.response);
locale = newLocale;
}
cb();
};
xhr.send(null);
}
function getLocale() {
return locale;
}
this.translate = translate;
this.getLocale = getLocale;
function init() {
setLocale(locale, function () {
callback(self);
});
}
init();
};
});

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

@ -0,0 +1 @@
.dijitIconSave,.dijitIconPrint,.dijitIconCut,.dijitIconCopy,.dijitIconClear,.dijitIconDelete,.dijitIconUndo,.dijitIconEdit,.dijitIconNewTask,.dijitIconEditTask,.dijitIconEditProperty,.dijitIconTask,.dijitIconFilter,.dijitIconConfigure,.dijitIconSearch,.dijitIconApplication,.dijitIconBookmark,.dijitIconChart,.dijitIconConnector,.dijitIconDatabase,.dijitIconDocuments,.dijitIconMail,.dijitLeaf,.dijitIconFile,.dijitIconFunction,.dijitIconKey,.dijitIconPackage,.dijitIconSample,.dijitIconTable,.dijitIconUsers,.dijitFolderClosed,.dijitIconFolderClosed,.dijitFolderOpened,.dijitIconFolderOpen,.dijitIconError {background-image: url('images/commonIconsObjActEnabled.png'); width: 16px; height: 16px;}.dj_ie6 .dijitIconSave,.dj_ie6 .dijitIconPrint,.dj_ie6 .dijitIconCut,.dj_ie6 .dijitIconCopy,.dj_ie6 .dijitIconClear,.dj_ie6 .dijitIconDelete,.dj_ie6 .dijitIconUndo,.dj_ie6 .dijitIconEdit,.dj_ie6 .dijitIconNewTask,.dj_ie6 .dijitIconEditTask,.dj_ie6 .dijitIconEditProperty,.dj_ie6 .dijitIconTask,.dj_ie6 .dijitIconFilter,.dj_ie6 .dijitIconConfigure,.dj_ie6 .dijitIconSearch,.dj_ie6 .dijitIconApplication,.dj_ie6 .dijitIconBookmark,.dj_ie6 .dijitIconChart,.dj_ie6 .dijitIconConnector,.dj_ie6 .dijitIconDatabase,.dj_ie6 .dijitIconDocuments,.dj_ie6 .dijitIconMail,.dj_ie6 .dijitLeaf,.dj_ie6 .dijitIconFile,.dj_ie6 .dijitIconFunction,.dj_ie6 .dijitIconKey,.dj_ie6 .dijitIconPackage,.dj_ie6 .dijitIconSample,.dj_ie6 .dijitIconTable,.dj_ie6 .dijitIconUsers,.dj_ie6 .dijitFolderClosed,.dj_ie6 .dijitIconFolderClosed,.dj_ie6 .dijitFolderOpened,.dj_ie6 .dijitIconFolderOpen,.dj_ie6 .dijitIconError {background-image: url('images/commonIconsObjActEnabled8bit.png');}.dijitDisabled .dijitIconSave,.dijitDisabled .dijitIconPrint,.dijitDisabled .dijitIconCut,.dijitDisabled .dijitIconCopy,.dijitDisabled .dijitIconClear,.dijitDisabled .dijitIconDelete,.dijitDisabled .dijitIconUndo,.dijitDisabled .dijitIconEdit,.dijitDisabled .dijitIconNewTask,.dijitDisabled .dijitIconEditTask,.dijitDisabled .dijitIconEditProperty,.dijitDisabled .dijitIconTask,.dijitDisabled .dijitIconFilter,.dijitDisabled .dijitIconConfigure,.dijitDisabled .dijitIconSearch,.dijitDisabled .dijitIconApplication,.dijitDisabled .dijitIconBookmark,.dijitDisabled .dijitIconChart,.dijitDisabled .dijitIconConnector,.dijitDisabled .dijitIconDatabase,.dijitDisabled .dijitIconDocuments,.dijitDisabled .dijitIconMail,.dijitDisabled .dijitLeaf,.dijitDisabled .dijitIconFile,.dijitDisabled .dijitIconFunction,.dijitDisabled .dijitIconKey,.dijitDisabled .dijitIconPackage,.dijitDisabled .dijitIconSample,.dijitDisabled .dijitIconTable,.dijitDisabled .dijitIconUsers,.dijitDisabled .dijitFolderClosed,.dijitDisabled .dijitIconFolderClosed,.dijitDisabled .dijitFolderOpened,.dijitDisabled .dijitIconFolderOpen,.dijitDisabled .dijitIconError {background-image: url('images/commonIconsObjActDisabled.png');}.dijitIconSave {background-position: 0;}.dijitIconPrint {background-position: -16px;}.dijitIconCut {background-position: -32px;}.dijitIconCopy {background-position: -48px;}.dijitIconClear {background-position: -64px;}.dijitIconDelete {background-position: -80px;}.dijitIconUndo {background-position: -96px;}.dijitIconEdit {background-position: -112px;}.dijitIconNewTask {background-position: -128px;}.dijitIconEditTask {background-position: -144px;}.dijitIconEditProperty {background-position: -160px;}.dijitIconTask {background-position: -176px;}.dijitIconFilter {background-position: -192px;}.dijitIconConfigure {background-position: -208px;}.dijitIconSearch {background-position: -224px;}.dijitIconError {background-position: -496px;} .dijitIconApplication {background-position: -240px;}.dijitIconBookmark {background-position: -256px;}.dijitIconChart {background-position: -272px;}.dijitIconConnector {background-position: -288px;}.dijitIconDatabase {background-position: -304px;}.dijitIconDocuments {background-position: -320px;}.dijitIconMail {background-position: -336px;}.dijitIconFile, .dijitLeaf {background-position: -352px;}.dijitIconFunction {background-position: -368px;}.dijitIconKey {background-position: -384px;}.dijitIconPackage{background-position: -400px;}.dijitIconSample {background-position: -416px;}.dijitIconTable {background-position: -432px;}.dijitIconUsers {background-position: -448px;}.dijitIconFolderClosed, .dijitFolderClosed {background-position: -464px;}.dijitIconFolderOpen, .dijitFolderOpened {background-position: -480px;}.dijitIconLoading {background:url('images/loadingAnimation_rtl.gif') no-repeat; height: 20px; width: 20px;}

View File

@ -0,0 +1 @@
.dijitRtl .dijitIconSave,.dijitRtl .dijitIconPrint,.dijitRtl .dijitIconCut,.dijitRtl .dijitIconCopy,.dijitRtl .dijitIconClear,.dijitRtl .dijitIconDelete,.dijitRtl .dijitIconUndo,.dijitRtl .dijitIconEdit,.dijitRtl .dijitIconNewTask,.dijitRtl .dijitIconEditTask,.dijitRtl .dijitIconEditProperty,.dijitRtl .dijitIconTask,.dijitRtl .dijitIconFilter,.dijitRtl .dijitIconConfigure,.dijitRtl .dijitIconSearch,.dijitRtl .dijitIconApplication,.dijitRtl .dijitIconBookmark,.dijitRtl .dijitIconChart,.dijitRtl .dijitIconConnector,.dijitRtl .dijitIconDatabase,.dijitRtl .dijitIconDocuments,.dijitRtl .dijitIconMail,.dijitRtl .dijitLeaf,.dijitRtl .dijitIconFile,.dijitRtl .dijitIconFunction,.dijitRtl .dijitIconKey,.dijitRtl .dijitIconPackage,.dijitRtl .dijitIconSample,.dijitRtl .dijitIconTable,.dijitRtl .dijitIconUsers,.dijitRtl .dijitFolderClosed,.dijitRtl .dijitIconFolderClosed,.dijitRtl .dijitFolderOpened,.dijitRtl .dijitIconFolderOpen,.dijitRtl .dijitIconError {background-image: url('images/commonIconsObjActEnabled_rtl.png'); width: 16px; height: 16px;}.dj_ie6 .dijitRtl .dijitIconSave,.dj_ie6 .dijitRtl .dijitIconPrint,.dj_ie6 .dijitRtl .dijitIconCut,.dj_ie6 .dijitRtl .dijitIconCopy,.dj_ie6 .dijitRtl .dijitIconClear,.dj_ie6 .dijitRtl .dijitIconDelete,.dj_ie6 .dijitRtl .dijitIconUndo,.dj_ie6 .dijitRtl .dijitIconEdit,.dj_ie6 .dijitRtl .dijitIconNewTask,.dj_ie6 .dijitRtl .dijitIconEditTask,.dj_ie6 .dijitRtl .dijitIconEditProperty,.dj_ie6 .dijitRtl .dijitIconTask,.dj_ie6 .dijitRtl .dijitIconFilter,.dj_ie6 .dijitRtl .dijitIconConfigure,.dj_ie6 .dijitRtl .dijitIconSearch,.dj_ie6 .dijitRtl .dijitIconApplication,.dj_ie6 .dijitRtl .dijitIconBookmark,.dj_ie6 .dijitRtl .dijitIconChart,.dj_ie6 .dijitRtl .dijitIconConnector,.dj_ie6 .dijitRtl .dijitIconDatabase,.dj_ie6 .dijitRtl .dijitIconDocuments,.dj_ie6 .dijitRtl .dijitIconMail,.dj_ie6 .dijitRtl .dijitLeaf,.dj_ie6 .dijitRtl .dijitIconFile,.dj_ie6 .dijitRtl .dijitIconFunction,.dj_ie6 .dijitRtl .dijitIconKey,.dj_ie6 .dijitRtl .dijitIconPackage,.dj_ie6 .dijitRtl .dijitIconSample,.dj_ie6 .dijitRtl .dijitIconTable,.dj_ie6 .dijitRtl .dijitIconUsers,.dj_ie6 .dijitRtl .dijitFolderClosed,.dj_ie6 .dijitRtl .dijitIconFolderClosed,.dj_ie6 .dijitRtl .dijitFolderOpened,.dj_ie6 .dijitRtl .dijitIconFolderOpen,.dj_ie6 .dijitRtl .dijitIconError {background-image: url('images/commonIconsObjActEnabled8bit_rtl.png');}.dijitRtl .dijitDisabled .dijitIconSave,.dijitRtl .dijitDisabled .dijitIconPrint,.dijitRtl .dijitDisabled .dijitIconCut,.dijitRtl .dijitDisabled .dijitIconCopy,.dijitRtl .dijitDisabled .dijitIconClear,.dijitRtl .dijitDisabled .dijitIconDelete,.dijitRtl .dijitDisabled .dijitIconUndo,.dijitRtl .dijitDisabled .dijitIconEdit,.dijitRtl .dijitDisabled .dijitIconNewTask,.dijitRtl .dijitDisabled .dijitIconEditTask,.dijitRtl .dijitDisabled .dijitIconEditProperty,.dijitRtl .dijitDisabled .dijitIconTask,.dijitRtl .dijitDisabled .dijitIconFilter,.dijitRtl .dijitDisabled .dijitIconConfigure,.dijitRtl .dijitDisabled .dijitIconSearch,.dijitRtl .dijitDisabled .dijitIconApplication,.dijitRtl .dijitDisabled .dijitIconBookmark,.dijitRtl .dijitDisabled .dijitIconChart,.dijitRtl .dijitDisabled .dijitIconConnector,.dijitRtl .dijitDisabled .dijitIconDatabase,.dijitRtl .dijitDisabled .dijitIconDocuments,.dijitRtl .dijitDisabled .dijitIconMail,.dijitRtl .dijitDisabled .dijitLeaf,.dijitRtl .dijitDisabled .dijitIconFile,.dijitRtl .dijitDisabled .dijitIconFunction,.dijitRtl .dijitDisabled .dijitIconKey,.dijitRtl .dijitDisabled .dijitIconPackage,.dijitRtl .dijitDisabled .dijitIconSample,.dijitRtl .dijitDisabled .dijitIconTable,.dijitRtl .dijitDisabled .dijitIconUsers,.dijitRtl .dijitDisabled .dijitFolderClosed,.dijitRtl .dijitDisabled .dijitIconFolderClosed,.dijitRtl .dijitDisabled .dijitFolderOpened,.dijitRtl .dijitDisabled .dijitIconFolderOpen,.dijitRtl .dijitDisabled .dijitIconError {background-image: url('images/commonIconsObjActDisabled_rtl.png');}

View File

@ -0,0 +1 @@
.dijitEditorIcon {background-image: url('images/editorIconsEnabled.png'); background-repeat: no-repeat; width: 18px; height: 18px; text-align: center;}.dijitDisabled .dijitEditorIcon {background-image: url('images/editorIconsDisabled.png');}.dijitEditorIconSep {background-position: 0;}.dijitEditorIconSave {background-position: -18px;}.dijitEditorIconPrint {background-position: -36px;}.dijitEditorIconCut {background-position: -54px;}.dijitEditorIconCopy {background-position: -72px;}.dijitEditorIconPaste {background-position: -90px;}.dijitEditorIconDelete {background-position: -108px;}.dijitEditorIconCancel {background-position: -126px;}.dijitEditorIconUndo {background-position: -144px;}.dijitEditorIconRedo {background-position: -162px;}.dijitEditorIconSelectAll {background-position: -180px;}.dijitEditorIconBold {background-position: -198px;}.dijitEditorIconItalic {background-position: -216px;}.dijitEditorIconUnderline {background-position: -234px;}.dijitEditorIconStrikethrough {background-position: -252px;}.dijitEditorIconSuperscript {background-position: -270px;}.dijitEditorIconSubscript {background-position: -288px;}.dijitEditorIconJustifyCenter {background-position: -306px;}.dijitEditorIconJustifyFull {background-position: -324px;}.dijitEditorIconJustifyLeft {background-position: -342px;}.dijitEditorIconJustifyRight {background-position: -360px;}.dijitEditorIconIndent {background-position: -378px;}.dijitEditorIconOutdent {background-position: -396px;}.dijitEditorIconListBulletIndent {background-position: -414px;}.dijitEditorIconListBulletOutdent {background-position: -432px;}.dijitEditorIconListNumIndent {background-position: -450px;}.dijitEditorIconListNumOutdent {background-position: -468px;}.dijitEditorIconTabIndent {background-position: -486px;}.dijitEditorIconLeftToRight {background-position: -504px;}.dijitEditorIconRightToLeft, .dijitEditorIconToggleDir {background-position: -522px;}.dijitEditorIconBackColor {background-position: -540px;}.dijitEditorIconForeColor {background-position: -558px;}.dijitEditorIconHiliteColor {background-position: -576px;}.dijitEditorIconNewPage {background-position: -594px;}.dijitEditorIconInsertImage {background-position: -612px;}.dijitEditorIconInsertTable {background-position: -630px;}.dijitEditorIconSpace {background-position: -648px;}.dijitEditorIconInsertHorizontalRule {background-position: -666px;}.dijitEditorIconInsertOrderedList {background-position: -684px;}.dijitEditorIconInsertUnorderedList {background-position: -702px;}.dijitEditorIconCreateLink {background-position: -720px;}.dijitEditorIconUnlink {background-position: -738px;}.dijitEditorIconViewSource {background-position: -756px;}.dijitEditorIconRemoveFormat {background-position: -774px;}.dijitEditorIconFullScreen {background-position: -792px;}.dijitEditorIconWikiword {background-position: -810px;}

View File

@ -0,0 +1 @@
.dijitEditorRtl .dijitEditorIcon {background-image: url('images/editorIconsEnabled_rtl.png');}.dijitEditorRtlDisabled .dijitEditorIcon {background-image: url('images/editorIconsDisabled_rtl.png');}.dijitToolbarRtl .dijitToolbarSeparator {background-image: url('images/editorIconsEnabled_rtl.png');}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1,3 @@
This folder contains images used by all themes when in "high-contrast" mode.
If you think you need to put something here, please talk to Becky or Bill first.

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 808 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@ -0,0 +1,290 @@
/* Calendar
*
* Styling Calendar mainly includes:
*
* 1. Calendar container
* .dijitCalendar - main container
* .dijitCalendarHover / .dijitCalendarActive - states e.g. hover,active
*
* 2. Month
* .dijitCalendarMonthContainer
* .dijitCalendarMonthLabel
* .dijitCalendarDecrease / .dijitCalendarDecrease - icons for switching to previous/next month
* .dijitCalendarArrowActive .dijitCalendarDecrease - states e.g. hover,active
*
* 3. Date
* .dijitCalendarDayLabelTemplate - week day column header e.g. S M T W T F S
* .dijitCalendarDateTemplate - date label wrapper
* .dijitCalendarPreviousMonth .dijitCalendarDateLabel - special labels for previous or next month
* .dijitCalendarSelectedDate .dijitCalendarDateLabel - styles for selected date
* .dijitCalendarDisabledDate .dijitCalendarDateLabel - styles for disabled date
* .dijitCalendarActiveDate .dijitCalendarDateLabel - states e.g. hover,active
*
* 4. Year
* .dijitCalendarYearContainer
* .dijitCalendarYearLabel
* .dijitCalendarPreviousYear /.dijitCalendarNextYear
* .dijitCalendarNextYearHover / .dijitCalendarPreviousYearHover - states e.g. hover,active
*
* 5. Dropdown Month Menu
* .dijitCalendarMonthMenu - menu container
* .dijitCalendarMonthMenu .dijitCalendarMonthLabel - month label in menu item
* .dijitCalendarMonthMenu .dijitCalendarMonthLabelHover - menu item hover state
*/
.claro .dijitCalendar {
border: solid 1px #b5bcc7;
border-collapse: separate;
-moz-border-radius: 4px;
border-radius: 4px;
background-color: #cfe5fa;
background-image: url("images/calendar.png");
background-repeat: repeat-x;
background-image: -moz-linear-gradient(#ffffff 0px, rgba(255, 255, 255, 0.4) 2px, rgba(255, 255, 255, 0) 100%);
background-image: -webkit-linear-gradient(#ffffff 0px, rgba(255, 255, 255, 0.4) 2px, rgba(255, 255, 255, 0) 100%);
background-image: -o-linear-gradient(#ffffff 0px, rgba(255, 255, 255, 0.4) 2px, rgba(255, 255, 255, 0) 100%);
background-image: -ms-linear-gradient(#ffffff 0px, rgba(255, 255, 255, 0.4) 2px, rgba(255, 255, 255, 0) 100%);
text-align: center;
padding: 6px 5px 3px 5px;
}
.dj_ie6 .claro .dijitCalendar {
background-image: none;
}
.claro .dijitCalendar img {
border: none;
}
.claro .dijitCalendarHover,
.claro .dijitCalendar:hover,
.claro .dijitCalendarActive {
/* treat dijitCalendarActive like hover since there's
* no concept of clicking a Calendar as a whole (although you can click things inside the calendar)
*/
background-color: #abd6ff;
border: solid 1px #759dc0;
}
.claro .dijitCalendarMonthContainer th {
text-align: center;
padding-bottom: 4px;
vertical-align: middle;
}
.claro .dijitCalendarMonthLabel {
color: #000;
font-size: 1.091em;
padding: 0 4px;
}
/* next/previous month arrows */
.claro .dijitCalendarIncrementControl {
width: 18px;
height: 16px;
background-image: url("images/calendarArrows.png");
background-repeat: no-repeat;
}
.dj_ie6 .claro .dijitCalendarIncrementControl {
background-image: url("images/calendarArrows8bit.png");
}
.claro .dijitCalendarIncrease {
background-position: -18px 0;
}
.claro .dijitCalendarArrowHover .dijitCalendarDecrease,
.claro .dijitCalendarArrow:hover .dijitCalendarDecrease {
background-position: -36px 0;
}
.claro .dijitCalendarArrowHover .dijitCalendarIncrease,
.claro .dijitCalendarArrow:hover .dijitCalendarIncrease {
background-position: -55px 0;
}
.claro .dijitCalendarArrowActive .dijitCalendarDecrease,
.claro .dijitCalendarArrow:active .dijitCalendarDecrease {
background-position: -72px 0;
}
.claro .dijitCalendarArrowActive .dijitCalendarIncrease,
.claro .dijitCalendarArrow:active .dijitCalendarIncrease {
background-position: -91px 0;
}
.claro .dijitA11ySideArrow {
/* text +/- labels instead of arrow icons, for high contrast mode */
display: none;
}
.claro .dijitCalendarDayLabelTemplate {
padding-bottom: 0;
text-align: center;
border-bottom: 1px solid #b5bcc7;
padding: 0 3px 2px;
}
.claro .dijitCalendarDayLabel {
padding: 0 4px 0 4px;
font-weight: bold;
font-size: 0.909em;
text-align: center;
color: #000;
}
.claro .dijitCalendarDateTemplate {
background-color: #fff;
border-bottom: 1px solid #d3d3d3;
padding-top: 0;
font-size: 0.909em;
font-family: Arial;
font-weight: bold;
letter-spacing: .05em;
text-align: center;
color: #000;
}
.dj_ie6 .claro .dijitCalendarDateTemplate {
background-image: none;
}
.claro .dijitCalendarPreviousMonth,
.claro .dijitCalendarNextMonth {
background-color: #e5f2fe;
background-image: none;
border-bottom: solid 1px #d3d3d3;
/* todo: redundant with above .dijitCalendarDateTemplate rule */
}
.claro .dijitCalendarDateTemplate .dijitCalendarDateLabel {
text-decoration: none;
display: block;
padding: 3px 5px 3px 4px;
border: solid 1px #fff;
/* intentionally matches background-color, no visible border until hover/selection */
background-color: rgba(171, 212, 251, 0);
/* transparent causes black-flash animation problem on webkit */
-webkit-transition-property: background-color, border;
-moz-transition-property: background-color, border;
transition-property: background-color, border;
-webkit-transition-duration: 0.35s;
-moz-transition-duration: 0.35s;
transition-duration: 0.35s;
}
.claro .dijitCalendarPreviousMonth .dijitCalendarDateLabel,
.claro .dijitCalendarNextMonth .dijitCalendarDateLabel {
color: #759dc0;
border-color: #e5f2fe;
/* intentionally matches background-color, no visible border until hover/selection */
}
.claro .dijitCalendarYearContainer {
vertical-align: middle;
}
.claro .dijitCalendarYearControl {
padding: 1px 2px 2px 2px;
}
.claro .dijitCalendarYearLabel {
padding: 2px 0 0 0;
margin: 0;
font-size: 1.17em;
}
.claro .dijitCalendarYearLabel span {
/* trying to center next/current/previous year vertically, doesn't work on IE6/7 though */
vertical-align: middle;
}
.claro .dijitCalendarSelectedYear {
padding: 0 3px;
}
.claro .dijitCalendarNextYear,
.claro .dijitCalendarPreviousYear {
padding: 1px 6px 1px 6px;
font-size: 0.909em;
}
.claro .dijitCalendarSelectedYear {
font-size: 1.091em;
color: #000;
}
/* End Normal Calendar Style */
/* Hovered Calendar Style */
.claro .dijitCalendarHoveredDate .dijitCalendarDateLabel,
.claro .dijitCalendarEnabledDate:hover .dijitCalendarDateLabel {
background-color: #abd6ff;
border: solid 1px #759dc0;
color: #000;
-webkit-transition-duration: 0.2s;
-moz-transition-duration: 0.2s;
transition-duration: 0.2s;
}
.claro .dijitCalendarNextYearHover,
.claro .dijitCalendarNextYear:hover,
.claro .dijitCalendarPreviousYearHover,
.claro .dijitCalendarPreviousYear:hover {
color: #000;
border: solid 1px #fff;
padding: 0 5px 0 5px;
/* reduced by 1 to make room for border */
background-color: #e5f2fe;
}
/* End Hovered Calendar Style */
/* Active Calendar Style */
.claro .dijitCalendarNextYearActive,
.claro .dijitCalendarNextYear:active .claro .dijitCalendarPreviousYearActive,
.claro .dijitCalendarPreviousYear:active {
border: solid 1px #759dc0;
padding: 0 5px 0 5px;
/* reduced by 1 to make room for border */
background-color: #7dbdfa;
}
.claro .dijitCalendarActiveDate .dijitCalendarDateLabel,
.claro .dijitCalendarEnabledDate:active .dijitCalendarDateLabel {
background-color: #7dbdfa;
border: solid 1px #fff;
-webkit-transition-duration: 0.1s;
-moz-transition-duration: 0.1s;
transition-duration: 0.1s;
}
.dj_ie6 .claro .dijitCalendarActiveDate .dijitCalendarDateLabel {
background-image: none;
}
/* End Active Calendar Style */
/* Selected Calendar Style */
.claro .dijitCalendarSelectedDate .dijitCalendarDateLabel {
color: #000;
background-color: #abd6ff;
border-color: #759dc0;
}
/* End Selected Calendar Style */
/* Disabled Calendar Style*/
.claro .dijitCalendarDisabledDate .dijitCalendarDateLabel {
color: #818181;
text-decoration: line-through;
}
/* End Disabled Calendar Style */
/* Styling for month DropDownButton */
.claro .dijitCalendar .dijitDropDownButton {
margin: 0;
}
.claro .dijitCalendar .dijitButtonText {
padding: 1px 0 3px;
margin-right: -4px;
}
.claro .dijitCalendar .dijitDropDownButton .dijitButtonNode {
padding: 0 3px 0 2px;
border: solid 1px #b5bcc7;
-webkit-box-shadow: 0 0 0 rgba(0, 0, 0, 0);
-moz-box-shadow: 0 0 0 rgba(0, 0, 0, 0);
box-shadow: 0 0 0 rgba(0, 0, 0, 0);
background-color: transparent;
background-image: none;
}
.claro .dijitCalendar .dijitDropDownButtonHover .dijitButtonNode,
.claro .dijitCalendar .dijitDropDownButton:hover .dijitButtonNode {
background-color: #e5f2fe;
border: solid 1px #fff;
}
/* Styling for month drop down list */
.claro .dijitCalendarMonthMenu {
border-color: #759dc0;
background-color: #fff;
text-align: center;
background-image: none;
}
.claro .dijitCalendarMonthMenu .dijitCalendarMonthLabel {
border-top: solid 1px #fff;
/* intentionally invisible until hover */
border-bottom: solid 1px #fff;
padding: 2px 0;
}
.claro .dijitCalendarMonthMenu .dijitCalendarMonthLabelHover,
.claro .dijitCalendarMonthMenu .dijitCalendarMonthLabel:hover {
border-color: #759dc0;
border-width: 1px 0;
background-color: #abd6ff;
background-image: -moz-linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0));
background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0));
background-image: -o-linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0));
background-image: -ms-linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0));
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr= #ffffff , endColorstr= #abd6ff );
}

View File

@ -0,0 +1,277 @@
/* Calendar
*
* Styling Calendar mainly includes:
*
* 1. Calendar container
* .dijitCalendar - main container
* .dijitCalendarHover / .dijitCalendarActive - states e.g. hover,active
*
* 2. Month
* .dijitCalendarMonthContainer
* .dijitCalendarMonthLabel
* .dijitCalendarDecrease / .dijitCalendarDecrease - icons for switching to previous/next month
* .dijitCalendarArrowActive .dijitCalendarDecrease - states e.g. hover,active
*
* 3. Date
* .dijitCalendarDayLabelTemplate - week day column header e.g. S M T W T F S
* .dijitCalendarDateTemplate - date label wrapper
* .dijitCalendarPreviousMonth .dijitCalendarDateLabel - special labels for previous or next month
* .dijitCalendarSelectedDate .dijitCalendarDateLabel - styles for selected date
* .dijitCalendarDisabledDate .dijitCalendarDateLabel - styles for disabled date
* .dijitCalendarActiveDate .dijitCalendarDateLabel - states e.g. hover,active
*
* 4. Year
* .dijitCalendarYearContainer
* .dijitCalendarYearLabel
* .dijitCalendarPreviousYear /.dijitCalendarNextYear
* .dijitCalendarNextYearHover / .dijitCalendarPreviousYearHover - states e.g. hover,active
*
* 5. Dropdown Month Menu
* .dijitCalendarMonthMenu - menu container
* .dijitCalendarMonthMenu .dijitCalendarMonthLabel - month label in menu item
* .dijitCalendarMonthMenu .dijitCalendarMonthLabelHover - menu item hover state
*/
@import "variables";
.claro .dijitCalendar {
border: solid 1px @border-color;
border-collapse: separate; // in case user CSS has set border-collapse: collapse for tables
.border-radius(4px);
// Background color and alpha-gradient
background-color: @calendar-background-color;
background-image: url("images/calendar.png"); // fallback for browsers that don't support CSS gradients
background-repeat: repeat-x; // so bottom of calendar isn't affected by gradient image repeating
.alpha-white-gradient(1, 0px, 0.4, 2px, 0, 100%);
text-align:center;
padding:6px 5px 3px 5px;
}
.dj_ie6 .claro .dijitCalendar {
background-image:none; // because on IE6 background-image overrides background-color
}
.claro .dijitCalendar img {
border:none;
}
.claro .dijitCalendarHover, .claro .dijitCalendar:hover,
.claro .dijitCalendarActive {
/* treat dijitCalendarActive like hover since there's
* no concept of clicking a Calendar as a whole (although you can click things inside the calendar)
*/
background-color: @hovered-background-color;
border:solid 1px @hovered-border-color;
}
.claro .dijitCalendarMonthContainer th {
text-align:center;
padding-bottom:4px;
vertical-align:middle;
}
.claro .dijitCalendarMonthLabel {
color: @text-color;
font-size: 1.091em;
padding: 0 4px;
}
/* next/previous month arrows */
.claro .dijitCalendarIncrementControl {
width:18px;
height:16px;
background-image: url(@image-calendar-arrows);
background-repeat: no-repeat;
}
.dj_ie6 .claro .dijitCalendarIncrementControl {
background-image: url(@image-calendar-arrows-ie6);
}
.claro .dijitCalendarIncrease {
background-position:-18px 0;
}
.claro .dijitCalendarArrowHover .dijitCalendarDecrease,
.claro .dijitCalendarArrow:hover .dijitCalendarDecrease {
background-position:-36px 0;
}
.claro .dijitCalendarArrowHover .dijitCalendarIncrease,
.claro .dijitCalendarArrow:hover .dijitCalendarIncrease {
background-position:-55px 0;
}
.claro .dijitCalendarArrowActive .dijitCalendarDecrease,
.claro .dijitCalendarArrow:active .dijitCalendarDecrease {
background-position:-72px 0;
}
.claro .dijitCalendarArrowActive .dijitCalendarIncrease,
.claro .dijitCalendarArrow:active .dijitCalendarIncrease {
background-position:-91px 0;
}
.claro .dijitA11ySideArrow {
/* text +/- labels instead of arrow icons, for high contrast mode */
display: none;
}
.claro .dijitCalendarDayLabelTemplate {
padding-bottom:0;
text-align:center;
border-bottom:1px solid @border-color;
padding:0 3px 2px;
}
.claro .dijitCalendarDayLabel {
padding:0 4px 0 4px;
font-weight:bold;
font-size:0.909em;
text-align:center;
color: @text-color;
}
.claro .dijitCalendarDateTemplate {
text-align:center;
background-color:@calendar-currentmonth-background-color;
border-bottom: 1px solid @minor-border-color;
padding-top:0;
font-size:0.909em;
font-family: Arial;
font-weight:bold;
letter-spacing:.05em;
text-align:center;
color: @text-color;
}
.dj_ie6 .claro .dijitCalendarDateTemplate {
background-image: none;
}
.claro .dijitCalendarPreviousMonth,
.claro .dijitCalendarNextMonth {
background-color: @calendar-adjacentmonth-background-color;
background-image:none;
border-bottom:solid 1px @minor-border-color; /* todo: redundant with above .dijitCalendarDateTemplate rule */
}
.claro .dijitCalendarDateTemplate .dijitCalendarDateLabel {
text-decoration:none;
display:block;
padding:3px 5px 3px 4px;
border:solid 1px @calendar-currentmonth-background-color; /* intentionally matches background-color, no visible border until hover/selection */
background-color:rgba(171,212,251,0); /* transparent causes black-flash animation problem on webkit */
.transition-property(background-color, border);
.transition-duration(.35s);
}
.claro .dijitCalendarPreviousMonth .dijitCalendarDateLabel,
.claro .dijitCalendarNextMonth .dijitCalendarDateLabel{
color: @calendar-adjacentmonth-text-color;
border-color: @calendar-adjacentmonth-background-color; /* intentionally matches background-color, no visible border until hover/selection */
}
.claro .dijitCalendarYearContainer {
vertical-align:middle;
}
.claro .dijitCalendarYearControl {
padding: 1px 2px 2px 2px;
}
.claro .dijitCalendarYearLabel {
padding: 2px 0 0 0;
margin: 0;
font-size: 1.17em;
}
.claro .dijitCalendarYearLabel span {
/* trying to center next/current/previous year vertically, doesn't work on IE6/7 though */
vertical-align:middle;
}
.claro .dijitCalendarSelectedYear {
padding:0 3px;
}
.claro .dijitCalendarNextYear,
.claro .dijitCalendarPreviousYear {
padding: 1px 6px 1px 6px;
font-size:0.909em;
}
.claro .dijitCalendarSelectedYear {
font-size:1.091em;
color:@selected-text-color;
}
/* End Normal Calendar Style */
/* Hovered Calendar Style */
.claro .dijitCalendarHoveredDate .dijitCalendarDateLabel,
.claro .dijitCalendarEnabledDate:hover .dijitCalendarDateLabel {
background-color:@hovered-background-color;
border:solid 1px @hovered-border-color;
color:@hovered-text-color;
.transition-duration(.2s);
}
.claro .dijitCalendarNextYearHover, .claro .dijitCalendarNextYear:hover,
.claro .dijitCalendarPreviousYearHover, .claro .dijitCalendarPreviousYear:hover {
color:@hovered-text-color;
border:solid 1px @calendar-button-hovered-border-color;
padding: 0 5px 0 5px; /* reduced by 1 to make room for border */
background-color: @calendar-button-hovered-background-color;
}
/* End Hovered Calendar Style */
/* Active Calendar Style */
.claro .dijitCalendarNextYearActive, .claro .dijitCalendarNextYear:active
.claro .dijitCalendarPreviousYearActive, .claro .dijitCalendarPreviousYear:active {
border: solid 1px @calendar-button-pressed-border-color;
padding: 0 5px 0 5px; /* reduced by 1 to make room for border */
background-color:@calendar-button-pressed-background-color;
}
.claro .dijitCalendarActiveDate .dijitCalendarDateLabel,
.claro .dijitCalendarEnabledDate:active .dijitCalendarDateLabel {
background-color: @calendar-date-pressed-background-color;
border:solid 1px @calendar-date-pressed-border-color;
.transition-duration(.1s);
}
.dj_ie6 .claro .dijitCalendarActiveDate .dijitCalendarDateLabel {
background-image:none;
}
/* End Active Calendar Style */
/* Selected Calendar Style */
.claro .dijitCalendarSelectedDate .dijitCalendarDateLabel {
color:@selected-text-color;
background-color: @calendar-date-selected-background-color;
border-color: @calendar-date-selected-border-color;
}
/* End Selected Calendar Style */
/* Disabled Calendar Style*/
.claro .dijitCalendarDisabledDate .dijitCalendarDateLabel {
color: @disabled-text-color;
text-decoration:line-through;
}
/* End Disabled Calendar Style */
/* Styling for month DropDownButton */
.claro .dijitCalendar .dijitDropDownButton {
margin: 0;
}
.claro .dijitCalendar .dijitButtonText {
padding: 1px 0 3px;
margin-right:-4px;
}
.claro .dijitCalendar .dijitDropDownButton .dijitButtonNode {
padding: 0 3px 0 2px;
border:solid 1px @border-color;
.box-shadow(0 0 0 rgba(0,0,0,0));
// Override background settings from vanilla .dijitButtonNode. We want to inherit background of Calendar.
background-color: transparent;
background-image: none;
}
.claro .dijitCalendar .dijitDropDownButtonHover .dijitButtonNode,
.claro .dijitCalendar .dijitDropDownButton:hover .dijitButtonNode {
background-color: @calendar-button-hovered-background-color;
border:solid 1px @calendar-button-hovered-border-color;
}
/* Styling for month drop down list */
.claro .dijitCalendarMonthMenu {
border-color: @popup-border-color;
background-color: @menu-background-color;
text-align:center;
background-image: none;
}
.claro .dijitCalendarMonthMenu .dijitCalendarMonthLabel {
border-top: solid 1px @menu-background-color; /* intentionally invisible until hover */
border-bottom: solid 1px @menu-background-color;
padding: 2px 0;
}
.claro .dijitCalendarMonthMenu .dijitCalendarMonthLabelHover,
.claro .dijitCalendarMonthMenu .dijitCalendarMonthLabel:hover {
border-color: @hovered-border-color;
border-width:1px 0;
.gradient-and-filter(@hovered-background-color, 70, 0);
}

View File

@ -0,0 +1,18 @@
.claro .dijitCalendarRtl .dijitCalendarIncrease {
background-position: 0 0;
}
.claro .dijitCalendarRtl .dijitCalendarDecrease {
background-position: -18px 0;
}
.claro .dijitCalendarRtl .dijitCalendarArrowHover .dijitCalendarIncrease {
background-position: -36px 0;
}
.claro .dijitCalendarRtl .dijitCalendarArrowHover .dijitCalendarDecrease {
background-position: -55px 0;
}
.claro .dijitCalendarRtl .dijitCalendarArrowActive .dijitCalendarIncrease {
background-position: -72px 0;
}
.claro .dijitCalendarRtl .dijitCalendarArrowActive .dijitCalendarDecrease {
background-position: -91px 0;
}

View File

@ -0,0 +1,19 @@
.claro .dijitCalendarRtl .dijitCalendarIncrease{
background-position: 0 0;
}
.claro .dijitCalendarRtl .dijitCalendarDecrease {
background-position: -18px 0;
}
.claro .dijitCalendarRtl .dijitCalendarArrowHover .dijitCalendarIncrease {
background-position: -36px 0;
}
.claro .dijitCalendarRtl .dijitCalendarArrowHover .dijitCalendarDecrease {
background-position: -55px 0;
}
.claro .dijitCalendarRtl .dijitCalendarArrowActive .dijitCalendarIncrease {
background-position: -72px 0;
}
.claro .dijitCalendarRtl .dijitCalendarArrowActive .dijitCalendarDecrease {
background-position: -91px 0;
}

View File

@ -0,0 +1,41 @@
/* ColorPalette
*
* Styling of the ColorPalette consists of the following:
*
* 1. the whole color palette
* .dijitColorPalette - for outline, border, and background color of the whole color palette
* Note: outline does not work for IE
*
* 2. the color swatch
* .dijitColorPalette .dijitPaletteImg
* transparent (but clickable) <img> node inside of each <td>, overlaying the color swatch.
* displays border around a color swatch
*
* 3. hovered swatch
* .dijitColorPalette .dijitPaletteCell:hover .dijitPaletteImg
* the hovered state of the color swatch - adds border
*
* 4. active and selected swatch
* .dijitColorPalette .dijitPaletteCell:active .dijitPaletteImg
* .dijitColorPalette .dijitPaletteCellSelected .dijitPaletteImg
* adds border for active or selected state
*/
.claro .dijitColorPalette {
border: 1px solid #b5bcc7;
background: #fff;
-moz-border-radius: 0;
border-radius: 0;
}
.claro .dijitColorPalette .dijitPaletteImg {
/* transparent (but clickable) <img> node inside of each <td>, overlaying the color swatch.
* displays border around a color swatch
* overrides border color in dijit.css */
border: 1px solid #d3d3d3;
}
.claro .dijitColorPalette .dijitPaletteCell:hover .dijitPaletteImg {
border: 1px solid #000;
}
.claro .dijitColorPalette .dijitPaletteCell:active .dijitPaletteImg,
.claro .dijitColorPalette .dijitPaletteTable .dijitPaletteCellSelected .dijitPaletteImg {
border: 2px solid #000;
}

View File

@ -0,0 +1,44 @@
/* ColorPalette
*
* Styling of the ColorPalette consists of the following:
*
* 1. the whole color palette
* .dijitColorPalette - for outline, border, and background color of the whole color palette
* Note: outline does not work for IE
*
* 2. the color swatch
* .dijitColorPalette .dijitPaletteImg
* transparent (but clickable) <img> node inside of each <td>, overlaying the color swatch.
* displays border around a color swatch
*
* 3. hovered swatch
* .dijitColorPalette .dijitPaletteCell:hover .dijitPaletteImg
* the hovered state of the color swatch - adds border
*
* 4. active and selected swatch
* .dijitColorPalette .dijitPaletteCell:active .dijitPaletteImg
* .dijitColorPalette .dijitPaletteCellSelected .dijitPaletteImg
* adds border for active or selected state
*/
@import "variables";
.claro .dijitColorPalette {
border: 1px solid @border-color;
background: @colorpalette-background-color;
.border-radius(0);
}
.claro .dijitColorPalette .dijitPaletteImg {
/* transparent (but clickable) <img> node inside of each <td>, overlaying the color swatch.
* displays border around a color swatch
* overrides border color in dijit.css */
border: 1px solid @minor-border-color;
}
.claro .dijitColorPalette .dijitPaletteCell:hover .dijitPaletteImg {
border: 1px solid @swatch-hovered-border-color;
}
.claro .dijitColorPalette .dijitPaletteCell:active .dijitPaletteImg,
.claro .dijitColorPalette .dijitPaletteTable .dijitPaletteCellSelected .dijitPaletteImg {
border: 2px solid @swatch-selected-border-color;
}

View File

@ -0,0 +1,98 @@
/* ========= Styling rules to affect widgets ========= */
.claro .dijitPopup {
-webkit-box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25);
-moz-box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25);
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25);
}
.claro .dijitTooltipDialogPopup {
/* exception popups: do not use a shadow on these because they aren't rectangular */
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
}
/* The highlight is shown in the ComboBox menu. TODO: move to form/Common.less */
.claro .dijitComboBoxHighlightMatch {
background-color: #abd6ff;
}
.claro .dijitFocusedLabel {
/* for checkboxes or radio buttons, hatch border around the corresponding label, to indicate focus */
outline: 1px dotted #494949;
}
/* Drag and Drop*/
.claro .dojoDndItem {
border-color: rgba(0, 0, 0, 0);
-webkit-transition-duration: 0.25s;
-moz-transition-duration: 0.25s;
transition-duration: 0.25s;
-webkit-transition-property: background-color, border-color;
-moz-transition-property: background-color, border-color;
transition-property: background-color, border-color;
}
.claro .dojoDndItemOver {
background-color: #abd6ff;
background-image: url("images/standardGradient.png");
background-repeat: repeat-x;
background-image: -moz-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
background-image: -o-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
background-image: -ms-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
_background-image: none;
padding: 1px;
border: solid 1px #759dc0;
color: #000;
}
.claro .dojoDndItemAnchor,
.claro .dojoDndItemSelected {
background-color: #cfe5fa;
background-image: url("images/standardGradient.png");
background-repeat: repeat-x;
background-image: -moz-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
background-image: -o-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
background-image: -ms-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
_background-image: none;
padding: 1px;
border: solid 1px #759dc0;
color: #000;
}
.claro .dojoDndItemBefore,
.claro .dojoDndItemAfter {
border-color: #759dc0;
}
.claro table.dojoDndAvatar {
border: 1px solid #b5bcc7;
border-collapse: collapse;
background-color: #fff;
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.claro .dojoDndAvatarHeader td {
height: 20px;
padding-left: 21px;
}
.claro.dojoDndMove .dojoDndAvatarHeader,
.claro.dojoDndCopy .dojoDndAvatarHeader {
background-image: url("images/dnd.png");
background-repeat: no-repeat;
background-position: 2px -122px;
}
.claro .dojoDndAvatarItem td {
padding: 5px;
}
.claro.dojoDndMove .dojoDndAvatarHeader {
background-color: #f58383;
background-position: 2px -103px;
}
.claro.dojoDndCopy .dojoDndAvatarHeader {
background-color: #f58383;
background-position: 2px -68px;
}
.claro.dojoDndMove .dojoDndAvatarCanDrop .dojoDndAvatarHeader {
background-color: #97e68d;
background-position: 2px -33px;
}
.claro.dojoDndCopy .dojoDndAvatarCanDrop .dojoDndAvatarHeader {
background-color: #97e68d;
background-position: 2px 2px;
}

View File

@ -0,0 +1,86 @@
/* ========= Styling rules to affect widgets ========= */
@import "variables";
.claro .dijitPopup {
.box-shadow(0 1px 5px rgba(0,0,0,0.25));
}
.claro .dijitTooltipDialogPopup {
/* exception popups: do not use a shadow on these because they aren't rectangular */
.box-shadow(none);
}
/* The highlight is shown in the ComboBox menu. TODO: move to form/Common.less */
.claro .dijitComboBoxHighlightMatch {
background-color: @select-matchedtext-background-color;
}
.claro .dijitFocusedLabel {
/* for checkboxes or radio buttons, hatch border around the corresponding label, to indicate focus */
outline: 1px dotted @focus-outline-color;
}
/* Drag and Drop*/
.claro .dojoDndItem {
border-color: rgba(0,0,0,0); // rgba() instead of none to prevent flash on hover fade-in
.transition-duration(.25s);
.transition-property(background-color, border-color)
}
.claro .dojoDndItemOver {
// Hovered item. Matches dijitTreeRowHover.
background-color:@hovered-background-color;
.standard-gradient;
padding: 1px; // reduce from 2px in dijit.css
border:solid 1px @hovered-border-color;
color:@hovered-text-color;
}
.claro .dojoDndItemAnchor,
.claro .dojoDndItemSelected {
// Selected items(s). Matches dijitTreeRowSelected.
background-color:@selected-background-color;
.standard-gradient;
padding: 1px; // reduce from 2px in dijit.css
border:solid 1px @selected-border-color;
color:@selected-text-color;
}
.claro .dojoDndItemBefore,
.claro .dojoDndItemAfter {
// line to indicate that user is dropping before/after this dojoDndItem
border-color: @dnd-dropseparator-color;
}
.claro table.dojoDndAvatar {
border: 1px solid @border-color;
border-collapse: collapse;
background-color: @dnd-avatar-background-color;
.box-shadow(0 1px 3px rgba(0, 0, 0, .25));
}
.claro .dojoDndAvatarHeader td {
height: 20px;
padding-left:21px;
}
.claro.dojoDndMove .dojoDndAvatarHeader, .claro.dojoDndCopy .dojoDndAvatarHeader {
background-image: url(@image-dnd);
background-repeat: no-repeat;
background-position:2px -122px;
}
.claro .dojoDndAvatarItem td {
padding: 5px;
}
.claro.dojoDndMove .dojoDndAvatarHeader {
background-color: @dnd-avatar-header-background-color;
background-position:2px -103px;
}
.claro.dojoDndCopy .dojoDndAvatarHeader {
background-color: @dnd-avatar-header-background-color;
background-position:2px -68px;
}
.claro.dojoDndMove .dojoDndAvatarCanDrop .dojoDndAvatarHeader {
background-color: @dnd-avatar-candrop-header-background-color;
background-position:2px -33px;
}
.claro.dojoDndCopy .dojoDndAvatarCanDrop .dojoDndAvatarHeader {
background-color: @dnd-avatar-candrop-header-background-color;
background-position:2px 2px;
}

View File

@ -0,0 +1,205 @@
/* Dialog
*
* Styling Dialog includes two sections: Dialog and Tooltip & TooltipDialog
*
* Dialog:
* 1. Dialog (default styling):
* .dijitDialog - styles for dialog's bounding box
*
* 2. Dialog title
* .dijitDialogTitleBar - styles for the title container at the top of dialog
* .dijitDialogTitle - the text container in dialog title
*
* 3. Dialog content
* .dijitDialogPaneContent - main container for content area and action bar
* .dijitDialogPaneContentArea - styles for content container
*
* 4. Dialog action bar
* .dijitDialogPaneActionBar - styles for action buttons lie at the bottom of dialog pane content
*
* 5. Dialog underlay
* .dijitDialogUnderlay - div under the dialog which used for separate dialog and page content
*
*
* Tooltip & TooltipDialog:
* 1. tooltip content container:
* .dijitTooltipContainer - tooltip content container
*
* 2. tooltip connector:
* .dijitTooltipConnector - tooltip anchor includes 4 direction(up, down, left, right)
*/
.claro .dijitDialog {
border: 1px solid #759dc0;
-webkit-box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25);
-moz-box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25);
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25);
}
.claro .dijitDialogPaneContent {
background: #fff repeat-x top left;
border-top: 1px solid #759dc0;
padding: 10px 8px;
position: relative;
}
.claro .dijitDialogPaneContentArea {
/* trick to get action bar (gray bar at bottom with OK/cancel buttons) to span from
* left to right but still indent dialog content
*/
margin: -10px -8px;
padding: 10px 8px;
}
.claro .dijitDialogPaneActionBar {
/* gray bar at bottom of dialog with OK/Cancel buttons */
background-color: #efefef;
padding: 3px 5px 2px 7px;
text-align: right;
border-top: 1px solid #d3d3d3;
margin: 10px -8px -10px;
}
.claro .dijitTooltipDialog .dijitDialogPaneActionBar {
-webkit-border-bottom-right-radius: 4px;
-webkit-border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
border-bottom-left-radius: 4px;
-moz-border-radius-bottomright: 4px;
-moz-border-radius-bottomleft: 4px;
margin: 10px -10px -8px;
}
.claro .dijitDialogPaneActionBar .dijitButton {
float: none;
}
.claro .dijitDialogTitleBar {
/* outer container for the titlebar of the dialog */
border: 1px solid #fff;
border-top: none;
background-color: #abd6ff;
background-image: url("images/standardGradient.png");
background-repeat: repeat-x;
background-image: -moz-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
background-image: -o-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
background-image: -ms-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
_background-image: none;
padding: 5px 7px 4px 7px;
}
.claro .dijitDialogTitle {
/* typography and styling of the dialog title */
padding: 0 1px;
font-size: 1.091em;
color: #000;
}
.claro .dijitDialogCloseIcon {
/* the default close icon for the dialog */
background: url("images/dialogCloseIcon.png");
background-repeat: no-repeat;
position: absolute;
right: 5px;
height: 15px;
width: 21px;
}
.dj_ie6 .claro .dijitDialogCloseIcon {
background-image: url("images/dialogCloseIcon8bit.png");
}
.claro .dijitDialogCloseIconHover {
background-position: -21px;
}
.claro .dijitDialogCloseIconActive {
background-position: -42px;
}
/* Tooltip and TooltipDialog */
.claro .dijitTooltip,
.claro .dijitTooltipDialog {
/* the outermost dom node, holding the connector and container */
background: transparent;
/* make the area on the sides of the arrow transparent */
}
.dijitTooltipBelow {
/* leave room for arrow above content */
padding-top: 13px;
padding-left: 3px;
padding-right: 3px;
}
.dijitTooltipAbove {
/* leave room for arrow below content */
padding-bottom: 13px;
padding-left: 3px;
padding-right: 3px;
}
.claro .dijitTooltipContainer {
/* the part with the text */
background-color: #fff;
background-image: -moz-linear-gradient(bottom, rgba(207, 229, 250, 0.1) 0px, #fff 10px);
background-image: -webkit-linear-gradient(bottom, rgba(207, 229, 250, 0.1) 0px, #fff 10px);
background-image: -o-linear-gradient(bottom, rgba(207, 229, 250, 0.1) 0px, #fff 10px);
background-image: -ms-linear-gradient(bottom, rgba(207, 229, 250, 0.1) 0px, #fff 10px);
background-position: bottom;
border: 1px solid #759dc0;
padding: 6px 8px;
-moz-border-radius: 4px;
border-radius: 4px;
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
font-size: 1em;
color: #000;
}
.claro .dijitTooltipConnector {
/* the arrow piece */
border: 0;
z-index: 2;
background-image: url("images/tooltip.png");
background-repeat: no-repeat;
width: 16px;
height: 14px;
}
.dj_ie6 .claro .dijitTooltipConnector {
background-image: url("images/tooltip8bit.png");
}
.claro .dijitTooltipABRight .dijitTooltipConnector {
/* above or below tooltip, but the arrow appears on the right,
and the right edges of target and tooltip are aligned rather than the left */
left: auto !important;
right: 3px;
}
.claro .dijitTooltipBelow .dijitTooltipConnector {
/* the arrow piece for tooltips below an element */
top: 0;
left: 3px;
background-position: -31px 0;
width: 16px;
height: 14px;
}
.claro .dijitTooltipAbove .dijitTooltipConnector {
/* the arrow piece for tooltips above an element */
bottom: 0;
left: 3px;
background-position: -15px 0;
width: 16px;
height: 14px;
}
.dj_ie7 .claro .dijitTooltipAbove .dijitTooltipConnector,
.dj_ie6 .claro .dijitTooltipAbove .dijitTooltipConnector {
bottom: -1px;
}
.claro .dijitTooltipLeft {
padding-right: 14px;
}
.claro .dijitTooltipLeft .dijitTooltipConnector {
/* the arrow piece for tooltips to the left of an element, bottom borders aligned */
right: 0;
background-position: 0 0;
width: 16px;
height: 14px;
}
.claro .dijitTooltipRight {
padding-left: 14px;
}
.claro .dijitTooltipRight .dijitTooltipConnector {
/* the arrow piece for tooltips to the right of an element, bottom borders aligned */
left: 0;
background-position: -48px 0;
width: 16px;
height: 14px;
}
.claro .dijitDialogUnderlay {
background: #fff;
}

View File

@ -0,0 +1,209 @@
/* Dialog
*
* Styling Dialog includes two sections: Dialog and Tooltip & TooltipDialog
*
* Dialog:
* 1. Dialog (default styling):
* .dijitDialog - styles for dialog's bounding box
*
* 2. Dialog title
* .dijitDialogTitleBar - styles for the title container at the top of dialog
* .dijitDialogTitle - the text container in dialog title
*
* 3. Dialog content
* .dijitDialogPaneContent - main container for content area and action bar
* .dijitDialogPaneContentArea - styles for content container
*
* 4. Dialog action bar
* .dijitDialogPaneActionBar - styles for action buttons lie at the bottom of dialog pane content
*
* 5. Dialog underlay
* .dijitDialogUnderlay - div under the dialog which used for separate dialog and page content
*
*
* Tooltip & TooltipDialog:
* 1. tooltip content container:
* .dijitTooltipContainer - tooltip content container
*
* 2. tooltip connector:
* .dijitTooltipConnector - tooltip anchor includes 4 direction(up, down, left, right)
*/
@import "variables";
.claro .dijitDialog {
border: 1px solid @popup-border-color;
.box-shadow(0 1px 5px rgba(0,0,0,0.25));
}
.claro .dijitDialogPaneContent {
background: @pane-background-color repeat-x top left;
border-top: 1px solid @popup-border-color;
padding:10px 8px;
position: relative;
}
.claro .dijitDialogPaneContentArea {
/* trick to get action bar (gray bar at bottom with OK/cancel buttons) to span from
* left to right but still indent dialog content
*/
margin: -10px -8px;
padding: 10px 8px;
}
.claro .dijitDialogPaneActionBar {
/* gray bar at bottom of dialog with OK/Cancel buttons */
background-color: @bar-background-color;
padding: 3px 5px 2px 7px;
text-align: right;
border-top: 1px solid @minor-border-color;
margin: 10px -8px -10px;
}
.claro .dijitTooltipDialog .dijitDialogPaneActionBar {
-webkit-border-bottom-right-radius: 4px;
-webkit-border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
border-bottom-left-radius: 4px;
-moz-border-radius-bottomright: 4px;
-moz-border-radius-bottomleft: 4px;
margin: 10px -10px -8px;
}
.claro .dijitDialogPaneActionBar .dijitButton {
float: none;
}
.claro .dijitDialogTitleBar {
/* outer container for the titlebar of the dialog */
border: 1px solid @dialog-titlebar-border-color;
border-top:none;
background-color: @dialog-titlebar-background-color;
.standard-gradient;
padding: 5px 7px 4px 7px;
}
.claro .dijitDialogTitle {
/* typography and styling of the dialog title */
padding: 0 1px;
font-size:1.091em;
color: @text-color;
}
.claro .dijitDialogCloseIcon {
/* the default close icon for the dialog */
background: url(@image-dialog-close);
background-repeat:no-repeat;
position: absolute;
right: 5px;
height: 15px;
width: 21px;
}
.dj_ie6 .claro .dijitDialogCloseIcon {
background-image: url(@image-dialog-close-ie6);
}
.claro .dijitDialogCloseIconHover {
background-position:-21px;
}
.claro .dijitDialogCloseIconActive {
background-position:-42px;
}
/* Tooltip and TooltipDialog */
.claro .dijitTooltip,
.claro .dijitTooltipDialog {
/* the outermost dom node, holding the connector and container */
background: transparent; /* make the area on the sides of the arrow transparent */
}
.dijitTooltipBelow {
/* leave room for arrow above content */
padding-top: 13px;
padding-left:3px;
padding-right:3px;
}
.dijitTooltipAbove {
/* leave room for arrow below content */
padding-bottom: 13px;
padding-left:3px;
padding-right:3px;
}
.claro .dijitTooltipContainer {
/* the part with the text */
background-color:@popup-background-color;
.linear-gradient(bottom, @tooltip-gradient-color 0px, @popup-background-color 10px);
background-position:bottom;
border:1px solid @popup-border-color;
padding:6px 8px;
.border-radius(4px);
.box-shadow(0 1px 3px rgba(0,0,0,0.25));
font-size: 1em;
color: @text-color;
}
.claro .dijitTooltipConnector {
/* the arrow piece */
border: 0;
z-index: 2;
background-image:url(@image-tooltip);
background-repeat:no-repeat;
width:16px;
height:14px;
}
.dj_ie6 .claro .dijitTooltipConnector {
background-image:url(@image-tooltip-ie6);
}
.claro .dijitTooltipABRight .dijitTooltipConnector {
/* above or below tooltip, but the arrow appears on the right,
and the right edges of target and tooltip are aligned rather than the left */
left: auto !important;
right: 3px;
}
.claro .dijitTooltipBelow .dijitTooltipConnector {
/* the arrow piece for tooltips below an element */
top: 0;
left: 3px;
background-position:-31px 0;
width:16px;
height:14px;
}
.claro .dijitTooltipAbove .dijitTooltipConnector {
/* the arrow piece for tooltips above an element */
bottom: 0;
left: 3px;
background-position:-15px 0;
width:16px;
height:14px;
}
.dj_ie7 .claro .dijitTooltipAbove .dijitTooltipConnector,
.dj_ie6 .claro .dijitTooltipAbove .dijitTooltipConnector {
bottom: -1px;
}
.claro .dijitTooltipLeft {
padding-right: 14px;
}
.claro .dijitTooltipLeft .dijitTooltipConnector {
/* the arrow piece for tooltips to the left of an element, bottom borders aligned */
right: 0;
background-position:0 0;
width:16px;
height:14px;
}
.claro .dijitTooltipRight {
padding-left: 14px;
}
.claro .dijitTooltipRight .dijitTooltipConnector {
/* the arrow piece for tooltips to the right of an element, bottom borders aligned */
left: 0;
background-position:-48px 0;
width:16px;
height:14px;
}
.claro .dijitDialogUnderlay {
background: @dialog-underlay-color;
}

View File

@ -0,0 +1,9 @@
/* Dialog */
.claro .dijitDialogRtl .dijitDialogCloseIcon {
right: auto;
left: 5px;
}
.claro .dijitDialogRtl .dijitDialogPaneActionBar {
text-align: left;
padding: 3px 7px 2px 5px;
}

View File

@ -0,0 +1,13 @@
/* Dialog */
@import "variables";
.claro .dijitDialogRtl .dijitDialogCloseIcon {
right: auto;
left: 5px;
}
.claro .dijitDialogRtl .dijitDialogPaneActionBar {
text-align: left;
padding: 3px 7px 2px 5px;
}

View File

@ -0,0 +1,55 @@
/* Editor
*
* Styling Editor means styling the Editor inside iframe container (dijitEditorIFrameContainer)
*
* 1. Editor iframe container (default styling):
* .dijitEditorIFrameContainer - normal state styles: background-color, border, padding
*
* 2. hovered Editor iframe container (ie, mouse hover on editor)
* .dijitEditorHover .dijitEditorIFrameContainer/dijitEditorIFrame - styles when mouse hover on the container
*
* 3. focused Editor iframe container (ie, mouse focus on the editor pane)
* .dijitEditorFocused .dijitEditorIFrameContainer/dijitEditorIFrame - styles when container focused
*
* 3. disabled Editor iframe container
* .dijitEditorDisabled - editor's inner iframe container disable status styles: background, border
*/
.claro .dijitEditorIFrameContainer {
padding: 3px 3px 1px 10px;
}
.claro .dijitEditorIFrame {
background-color: #fff;
}
.claro .dijitEditor {
border: 1px solid #b5bcc7;
}
.claro .dijitEditor .dijitEditorIFrameContainer {
background-color: #fff;
background-repeat: repeat-x;
}
.claro .dijitEditorHover .dijitEditorIFrameContainer,
.claro .dijitEditorHover .dijitEditorIFrameContainer .dijitEditorIFrame {
background-color: #e5f2fe;
}
.claro .dijitEditorFocused .dijitEditorIFrameContainer,
.claro .dijitEditorFocused .dijitEditorIFrameContainer .dijitEditorIFrame {
background-color: #fff;
}
.claro .dijitEditorHover .dijitEditorIFrameContainer,
.claro .dijitEditorFocused .dijitEditorIFrameContainer {
background-image: -moz-linear-gradient(rgba(127, 127, 127, 0.2) 0%, rgba(127, 127, 127, 0) 2px);
background-image: -webkit-linear-gradient(rgba(127, 127, 127, 0.2) 0%, rgba(127, 127, 127, 0) 2px);
background-image: -o-linear-gradient(rgba(127, 127, 127, 0.2) 0%, rgba(127, 127, 127, 0) 2px);
background-image: -ms-linear-gradient(rgba(127, 127, 127, 0.2) 0%, rgba(127, 127, 127, 0) 2px);
}
/* Disabled */
.claro .dijitEditorDisabled {
border: 1px solid #d3d3d3;
color: #818181;
}
.claro .dijitDisabled .dijitEditorIFrame,
.claro .dijitDisabled .dijitEditorIFrameContainer,
.claro .dijitDisabled .dijitEditorIFrameContainer .dijitEditorIFrame {
background-color: #efefef;
background-image: none;
}

View File

@ -0,0 +1,57 @@
/* Editor
*
* Styling Editor means styling the Editor inside iframe container (dijitEditorIFrameContainer)
*
* 1. Editor iframe container (default styling):
* .dijitEditorIFrameContainer - normal state styles: background-color, border, padding
*
* 2. hovered Editor iframe container (ie, mouse hover on editor)
* .dijitEditorHover .dijitEditorIFrameContainer/dijitEditorIFrame - styles when mouse hover on the container
*
* 3. focused Editor iframe container (ie, mouse focus on the editor pane)
* .dijitEditorFocused .dijitEditorIFrameContainer/dijitEditorIFrame - styles when container focused
*
* 3. disabled Editor iframe container
* .dijitEditorDisabled - editor's inner iframe container disable status styles: background, border
*/
@import "variables";
.claro .dijitEditorIFrameContainer{
padding:3px 3px 1px 10px;
}
.claro .dijitEditorIFrame {
background-color: @textbox-background-color;
}
.claro .dijitEditor {
border: 1px solid @border-color;
}
.claro .dijitEditor .dijitEditorIFrameContainer{
background-color: @textbox-background-color;
background-repeat:repeat-x;
}
.claro .dijitEditorHover .dijitEditorIFrameContainer,
.claro .dijitEditorHover .dijitEditorIFrameContainer .dijitEditorIFrame{
background-color: @textbox-hovered-background-color;
}
.claro .dijitEditorFocused .dijitEditorIFrameContainer,
.claro .dijitEditorFocused .dijitEditorIFrameContainer .dijitEditorIFrame{
background-color: @textbox-focused-background-color;
}
.claro .dijitEditorHover .dijitEditorIFrameContainer,
.claro .dijitEditorFocused .dijitEditorIFrameContainer {
.textbox-background-image;
}
/* Disabled */
.claro .dijitEditorDisabled {
border: 1px solid @disabled-border-color;
color: @disabled-text-color;
}
.claro .dijitDisabled .dijitEditorIFrame,
.claro .dijitDisabled .dijitEditorIFrameContainer,
.claro .dijitDisabled .dijitEditorIFrameContainer .dijitEditorIFrame {
background-color: @textbox-disabled-background-color;
background-image: none;
}

View File

@ -0,0 +1,4 @@
/* Editor */
.claro .dijitEditorRtl .dijitEditorIFrameContainer {
padding: 3px 10px 1px 3px;
}

View File

@ -0,0 +1,9 @@
/* Editor */
@import "variables";
.claro .dijitEditorRtl .dijitEditorIFrameContainer{
padding:3px 10px 1px 3px;
}

View File

@ -0,0 +1,20 @@
/* InlineEditBox
*
* Styling InlineEditBox mainly includes:
*
* 1. Normal state
* .dijitInlineEditBoxDisplayMode - for border
*
* 2. Hover state
* .dijitInlineEditBoxDisplayModeHover - for border and background color
*/
.claro .dijitInlineEditBoxDisplayMode {
border: 1px solid transparent;
}
.claro .dijitInlineEditBoxDisplayModeHover {
background-color: #e5f2fe;
border: solid 1px #759dc0;
}
.dj_ie6 .claro .dijitInlineEditBoxDisplayMode {
border: none;
}

View File

@ -0,0 +1,25 @@
/* InlineEditBox
*
* Styling InlineEditBox mainly includes:
*
* 1. Normal state
* .dijitInlineEditBoxDisplayMode - for border
*
* 2. Hover state
* .dijitInlineEditBoxDisplayModeHover - for border and background color
*/
@import "variables";
.claro .dijitInlineEditBoxDisplayMode {
border: 1px solid transparent;
}
.claro .dijitInlineEditBoxDisplayModeHover {
background-color: @textbox-hovered-background-color;
border: solid 1px @hovered-border-color;
}
.dj_ie6 .claro .dijitInlineEditBoxDisplayMode {
border: none;
}

View File

@ -0,0 +1,183 @@
/* Menu
There are three areas of styling for the Menu:
1. The menu
There are three types of menus:
i) Context Menu
ii) Drop down Menu
iii) Navigation Menu
All three types of menus are affected by the .dijitMenu class in which you can set the background-color, padding and border
.dijitMenu affects the drop down menu in TimeTextBox, Calendar, ComboBox and FilteringSelect
.dijitMenuTable - for padding - also affects Select widget
2. The menu bar
.dijitMenuBar - for border, margins, padding, background-color of the menu bar
.dijitMenuBar .dijitMenuItem - for padding, text color of menu items in the menu bar (overrides .dijitMenuItem)
3. Menu items - items in the menu.
.dijitMenuItem - for color
.dijitMenuItemHover, .dijitMenuItemSelected - for background-color, border, text color, padding of a menu item or menubar item that has been hovered over or selected
.dijitMenuItemActive - for background-color of an active (mousedown) menu item
td.dijitMenuItemIconCell - for padding around a menu item's icon
td.dijitMenuItemLabel - for padding around a menu item's label
.dijitMenuSeparatorTop - for border, top border, of the separator
.dijitMenuSeparatorBottom - for bottom margin of the separator
Styles specific to ComboBox and FilteringSelect widgets:
.dijitComboBoxMenu .dijitMenuItem - for padding and border of a menu item in a ComboBox or FilteringSelect widget's menu
.dijitComboBoxMenu .dijitMenuItemSelected- for text color, background-color and border of a menu item in a ComboBox or FilteringSelect widget's menu
*/
.claro .dijitMenuBar {
border: 1px solid #b5bcc7;
margin: 0;
padding: 0;
background-color: #efefef;
background-image: url("images/standardGradient.png");
background-repeat: repeat-x;
background-image: -moz-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
background-image: -o-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
background-image: -ms-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
_background-image: none;
}
.claro .dijitMenu {
background-color: #fff;
border: 1px solid #759dc0;
/* so adjoining borders of MenuBar/ComboBox and Menu overlap, avoiding double border */
margin: -1px 0;
}
.dj_ie6 .claro .dijitMenu {
margin: 0;
/* above -1px makes top/bottom borders disappear on IE6 */
}
.claro .dijitMenuItem {
color: #000;
}
.claro .dijitMenuBar .dijitMenuItem {
padding: 6px 10px 7px;
margin: -1px;
}
.claro .dijitMenuBar .dijitMenuItemHover,
.claro .dijitMenuBar .dijitMenuItemSelected {
border: solid 1px #759dc0;
padding: 5px 9px 6px;
}
/* this prevents jiggling upon hover of a menu item */
.claro .dijitMenuTable {
border-collapse: separate;
border-spacing: 0 0;
padding: 0;
}
.claro .dijitMenuItem td {
padding: 1px;
}
/* hover over a MenuItem or MenuBarItem */
.claro .dijitSelectMenu .dijitMenuItemHover td,
.claro .dijitSelectMenu .dijitMenuItemSelected td,
.claro .dijitMenuItemHover,
.claro .dijitMenuItemSelected {
background-color: #abd6ff;
background-image: url("images/standardGradient.png");
background-repeat: repeat-x;
background-image: -moz-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
background-image: -o-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
background-image: -ms-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
_background-image: none;
}
.claro .dijitMenuItemActive {
background-image: url("images/activeGradient.png");
background-repeat: repeat-x;
background-image: -moz-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%);
background-image: -webkit-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%);
background-image: -o-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%);
background-image: -ms-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%);
_background-image: none;
}
.dj_ie .claro .dijitMenuActive .dijitMenuItemHover,
.dj_ie .claro .dijitMenuActive .dijitMenuItemSelected,
.dj_ie .claro .dijitMenuPassive .dijitMenuItemHover,
.dj_ie .claro .dijitMenuPassive .dijitMenuItemSelected {
padding-top: 6px;
padding-bottom: 5px;
margin-top: -3px;
}
.claro td.dijitMenuItemIconCell {
padding: 2px;
margin: 0 0 0 4px;
}
.claro td.dijitMenuItemLabel {
padding-top: 5px;
padding-bottom: 5px;
}
.claro .dijitMenuExpand {
width: 7px;
height: 7px;
background-image: url("images/spriteArrows.png");
background-position: -14px 0;
margin-right: 3px;
}
.claro .dijitMenuItemDisabled .dijitMenuItemIconCell {
opacity: 1;
}
.claro .dijitMenuSeparatorTop {
height: auto;
margin-top: 1px;
/* prevents spacing above/below separator */
border-bottom: 1px solid #b5bcc7;
}
.claro .dijitMenuSeparatorBottom {
height: auto;
margin-bottom: 1px;
}
/* the checked menu item */
.claro .dijitCheckedMenuItemIconChar {
display: none;
}
.claro .dijitCheckedMenuItemIcon {
background-image: url("form/images/checkboxRadioButtonStates.png");
background-repeat: no-repeat;
background-position: -15px 50%;
width: 15px;
height: 16px;
}
.dj_ie6 .claro .dijitCheckedMenuItemIcon {
background-image: url("form/images/checkboxAndRadioButtons_IE6.png");
}
.claro .dijitCheckedMenuItemChecked .dijitCheckedMenuItemIcon {
background-position: 0 50%;
}
/*ComboBox Menu*/
.claro .dijitComboBoxMenu {
margin-left: 0;
background-image: none;
}
.claro .dijitSelectMenu .dijitMenuItem td,
.claro .dijitComboBoxMenu .dijitMenuItem {
padding: 2px;
border-width: 1px 0 1px 0;
border-style: solid;
border-color: #fff;
}
.claro .dijitSelectMenu .dijitMenuItemSelected td,
.claro .dijitComboBoxMenu .dijitMenuItemSelected {
color: #000;
border-color: #759dc0;
background-color: #abd6ff;
}
.claro .dijitSelectMenu .dijitMenuItemHover td,
.claro .dijitComboBoxMenu .dijitMenuItemHover {
color: #000000;
border-color: #769dc0;
background-color: #abd6ff;
}
.claro .dijitComboBoxMenuActive .dijitMenuItemSelected {
background-color: #7dbdfa;
/* TODO: why is this a different color than normal .dijitMenuItemSelected? */
}
.claro .dijitMenuPreviousButton,
.claro .dijitMenuNextButton {
font-style: italic;
}

View File

@ -0,0 +1,179 @@
/* Menu
There are three areas of styling for the Menu:
1. The menu
There are three types of menus:
i) Context Menu
ii) Drop down Menu
iii) Navigation Menu
All three types of menus are affected by the .dijitMenu class in which you can set the background-color, padding and border
.dijitMenu affects the drop down menu in TimeTextBox, Calendar, ComboBox and FilteringSelect
.dijitMenuTable - for padding - also affects Select widget
2. The menu bar
.dijitMenuBar - for border, margins, padding, background-color of the menu bar
.dijitMenuBar .dijitMenuItem - for padding, text color of menu items in the menu bar (overrides .dijitMenuItem)
3. Menu items - items in the menu.
.dijitMenuItem - for color
.dijitMenuItemHover, .dijitMenuItemSelected - for background-color, border, text color, padding of a menu item or menubar item that has been hovered over or selected
.dijitMenuItemActive - for background-color of an active (mousedown) menu item
td.dijitMenuItemIconCell - for padding around a menu item's icon
td.dijitMenuItemLabel - for padding around a menu item's label
.dijitMenuSeparatorTop - for border, top border, of the separator
.dijitMenuSeparatorBottom - for bottom margin of the separator
Styles specific to ComboBox and FilteringSelect widgets:
.dijitComboBoxMenu .dijitMenuItem - for padding and border of a menu item in a ComboBox or FilteringSelect widget's menu
.dijitComboBoxMenu .dijitMenuItemSelected- for text color, background-color and border of a menu item in a ComboBox or FilteringSelect widget's menu
*/
@import "variables";
.claro .dijitMenuBar {
border: 1px solid @border-color;
margin: 0;
padding: 0;
background-color: @bar-background-color;
.standard-gradient;
}
.claro .dijitMenu {
background-color:@menu-background-color;
border: 1px solid @popup-border-color;
/* so adjoining borders of MenuBar/ComboBox and Menu overlap, avoiding double border */
margin: -1px 0;
}
.dj_ie6 .claro .dijitMenu {
margin: 0; /* above -1px makes top/bottom borders disappear on IE6 */
}
.claro .dijitMenuItem {
color: @text-color;
}
.claro .dijitMenuBar .dijitMenuItem {
padding: 6px 10px 7px;
margin:-1px;
}
.claro .dijitMenuBar .dijitMenuItemHover,
.claro .dijitMenuBar .dijitMenuItemSelected {
// on hover or selection of MenuBar item, add border and reduce padding to compensate
border:solid 1px @hovered-border-color;
padding: 5px 9px 6px;
}
/* this prevents jiggling upon hover of a menu item */
.claro .dijitMenuTable {
border-collapse:separate;
border-spacing:0 0;
padding:0;
}
.claro .dijitMenuItem td{
padding:1px;
}
/* hover over a MenuItem or MenuBarItem */
.claro .dijitSelectMenu .dijitMenuItemHover td,
.claro .dijitSelectMenu .dijitMenuItemSelected td,
.claro .dijitMenuItemHover,
.claro .dijitMenuItemSelected {
// note: seems like the selected MenuItem should use @pressed-background-color
// and .active-gradient, but claro didn't to that
background-color: @hovered-background-color;
.standard-gradient;
}
.claro .dijitMenuItemActive {
// todo: seems like the selected MenuItem should come here
// todo: seems like should use @pressed-background-color
.active-gradient;
}
.dj_ie .claro .dijitMenuActive .dijitMenuItemHover,
.dj_ie .claro .dijitMenuActive .dijitMenuItemSelected,
.dj_ie .claro .dijitMenuPassive .dijitMenuItemHover,
.dj_ie .claro .dijitMenuPassive .dijitMenuItemSelected {
// Selectivity set to override ComboBox rules below.
// If this rule isn't present, on IE6 hovering an item in the ComboBox drop down causes two
// items to be highlighted (except when hovering the first item in the list)
padding-top: 6px;
padding-bottom: 5px;
margin-top: -3px;
}
.claro td.dijitMenuItemIconCell {
padding: 2px;
margin: 0 0 0 4px;
}
.claro td.dijitMenuItemLabel {
padding-top: 5px;
padding-bottom: 5px;
}
.claro .dijitMenuExpand {
width: 7px;
height: 7px;
background-image: url(@image-arrow-sprite);
background-position: -14px 0;
margin-right:3px;
}
.claro .dijitMenuItemDisabled .dijitMenuItemIconCell {
opacity:1;
}
.claro .dijitMenuSeparatorTop {
height: auto;
margin-top:1px; /* prevents spacing above/below separator */
border-bottom: 1px solid @border-color
}
.claro .dijitMenuSeparatorBottom{
height: auto;
margin-bottom:1px;
}
/* the checked menu item */
.claro .dijitCheckedMenuItemIconChar {
display: none;
}
.claro .dijitCheckedMenuItemIcon {
background-image: url(@image-form-checkbox-and-radios);
background-repeat:no-repeat;
background-position: -15px 50%;
width:15px;
height:16px;
}
.dj_ie6 .claro .dijitCheckedMenuItemIcon {
background-image: url(@image-form-checkbox-and-radios-ie6);
}
.claro .dijitCheckedMenuItemChecked .dijitCheckedMenuItemIcon {
background-position: 0 50%;
}
/*ComboBox Menu*/
.claro .dijitComboBoxMenu {
margin-left:0;
background-image: none;
}
.claro .dijitSelectMenu .dijitMenuItem td,
.claro .dijitComboBoxMenu .dijitMenuItem {
padding: @textbox-padding; // Make drop down menu text line up with text in <input>.
border-width:1px 0 1px 0;
border-style:solid;
border-color: @select-dropdownitem-background-color;
}
.claro .dijitSelectMenu .dijitMenuItemSelected td,
.claro .dijitComboBoxMenu .dijitMenuItemSelected {
color:@selected-text-color;
border-color:@hovered-border-color;
background-color:@hovered-background-color;
}
.claro .dijitSelectMenu .dijitMenuItemHover td,
.claro .dijitComboBoxMenu .dijitMenuItemHover {
color: #000000;
border-color: #769dc0;
background-color: #abd6ff;
}
.claro .dijitComboBoxMenuActive .dijitMenuItemSelected {
background-color: @select-dropdownitem-hovered-background-color; /* TODO: why is this a different color than normal .dijitMenuItemSelected? */
}
.claro .dijitMenuPreviousButton, .claro .dijitMenuNextButton {
font-style: italic;
}

View File

@ -0,0 +1,8 @@
.claro .dijitMenuItemRtl .dijitMenuExpand {
background-position: -7px 0;
margin-right: 0;
margin-left: 3px;
}
.claro .dijitMenuItemRtl .dijitMenuItemIcon {
margin: 0 4px 0 0;
}

View File

@ -0,0 +1,11 @@
@import "variables";
.claro .dijitMenuItemRtl .dijitMenuExpand {
background-position: -7px 0;
margin-right: 0;
margin-left: 3px;
}
.claro .dijitMenuItemRtl .dijitMenuItemIcon {
margin:0 4px 0 0;
}

View File

@ -0,0 +1,66 @@
/* ProgressBar
*
* Styling of the ProgressBar consists of the following:
*
* 1. the base progress bar
* .dijitProgressBar - sets margins for the progress bar
*
* 2. the empty bar
* .dijitProgressBarEmpty - sets background img and color for bar or parts of bar that are not finished yet
* Also sets border color for whole bar
*
* 3. tile mode
* .dijitProgressBarTile
* inner container for finished portion when in 'tile' (image) mode
*
* 4. full bar mode
* .dijitProgressBarFull
* adds border to right side of the filled portion of bar
*
* 5. text for label of bar
* .dijitProgressBarLabel - sets text color, which must contrast with both the "Empty" and "Full" parts.
*
* 6. indeterminate mode
* .dijitProgressBarIndeterminate .dijitProgressBarTile
* sets animated gif for the progress bar in 'indeterminate' mode
*/
.claro .dijitProgressBar {
margin: 2px 0 2px 0;
}
.claro .dijitProgressBarEmpty {
/* outer container and background of the bar that's not finished yet*/
background-color: #fff;
border-color: #759dc0;
}
.claro .dijitProgressBarTile {
/* inner container for finished portion when in 'tile' (image) mode */
background-color: #abd6ff;
background-image: url("images/progressBarFull.png");
background-repeat: repeat-x;
background-image: -moz-linear-gradient(rgba(255, 255, 255, 0.93) 0px, rgba(255, 255, 255, 0.41) 1px, rgba(255, 255, 255, 0.7) 2px, rgba(255, 255, 255, 0) 100%);
background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.93) 0px, rgba(255, 255, 255, 0.41) 1px, rgba(255, 255, 255, 0.7) 2px, rgba(255, 255, 255, 0) 100%);
background-image: -o-linear-gradient(rgba(255, 255, 255, 0.93) 0px, rgba(255, 255, 255, 0.41) 1px, rgba(255, 255, 255, 0.7) 2px, rgba(255, 255, 255, 0) 100%);
background-image: -ms-linear-gradient(rgba(255, 255, 255, 0.93) 0px, rgba(255, 255, 255, 0.41) 1px, rgba(255, 255, 255, 0.7) 2px, rgba(255, 255, 255, 0) 100%);
background-attachment: scroll;
}
.dj_ie6 .claro .dijitProgressBarTile {
background-image: none;
}
.claro .dijitProgressBarFull {
border-right: 1px solid #759dc0;
-webkit-transition-property: width;
-moz-transition-property: width;
transition-property: width;
-webkit-transition-duration: 0.25s;
-moz-transition-duration: 0.25s;
transition-duration: 0.25s;
}
.claro .dijitProgressBarLabel {
/* Set to a color that contrasts with both the "Empty" and "Full" parts. */
color: #000;
}
.claro .dijitProgressBarIndeterminate .dijitProgressBarTile {
/* use an animated gif for the progress bar in 'indeterminate' mode;
background-color won't appear unless user has turned off background images */
background: #efefef url("images/progressBarAnim.gif") repeat-x top;
}

View File

@ -0,0 +1,64 @@
/* ProgressBar
*
* Styling of the ProgressBar consists of the following:
*
* 1. the base progress bar
* .dijitProgressBar - sets margins for the progress bar
*
* 2. the empty bar
* .dijitProgressBarEmpty - sets background img and color for bar or parts of bar that are not finished yet
* Also sets border color for whole bar
*
* 3. tile mode
* .dijitProgressBarTile
* inner container for finished portion when in 'tile' (image) mode
*
* 4. full bar mode
* .dijitProgressBarFull
* adds border to right side of the filled portion of bar
*
* 5. text for label of bar
* .dijitProgressBarLabel - sets text color, which must contrast with both the "Empty" and "Full" parts.
*
* 6. indeterminate mode
* .dijitProgressBarIndeterminate .dijitProgressBarTile
* sets animated gif for the progress bar in 'indeterminate' mode
*/
@import "variables";
.claro .dijitProgressBar {
margin:2px 0 2px 0;
}
.claro .dijitProgressBarEmpty {
/* outer container and background of the bar that's not finished yet*/
background-color: @progressbar-empty-background-color;
border-color: @progressbar-border-color;
}
.claro .dijitProgressBarTile {
/* inner container for finished portion when in 'tile' (image) mode */
background-color: @progressbar-full-background-color;
// gradient background using CSS gradient, with fallback to image for IE
background-image: url("images/progressBarFull.png");
background-repeat: repeat-x;
.alpha-white-gradient(0.93,0px, 0.41,1px, 0.7,2px, 0,100%);
background-attachment: scroll; // override strange "fixed" setting from dijit.css
}
.dj_ie6 .claro .dijitProgressBarTile {
background-image: none;
}
.claro .dijitProgressBarFull {
border-right:1px solid @progressbar-border-color;
.transition-property(width);
.transition-duration(.25s);
}
.claro .dijitProgressBarLabel {
/* Set to a color that contrasts with both the "Empty" and "Full" parts. */
color: @progressbar-text-color;
}
.claro .dijitProgressBarIndeterminate .dijitProgressBarTile {
/* use an animated gif for the progress bar in 'indeterminate' mode;
background-color won't appear unless user has turned off background images */
background: @bar-background-color url(@image-progressbar-anim) repeat-x top;
}

View File

@ -0,0 +1,11 @@
These are "less" files that compile into the CSS of claro.
1. Install node from http://nodejs.org/#download
2. To compile all the files:
$ cd dijit/themes/claro
$ node compile.js
See http://lesscss.org/ and https://github.com/cloudhead/less.js/ for more information.

View File

@ -0,0 +1,127 @@
/* Time Picker
*
* Styling the Time Picker consists of the following:
*
* 1. minor time values
* .dijitTimePickerTick - set text color, size, background color of minor values
* .dijitTimePickerTickHover - set hover style of minor time values
* dijitTimePickerTickSelected - set selected style of minor time values
*
* 2. major time values - 1:00, 2:00, times on the hour
* set text color, size, background color, left/right margins for "zoom" affect
* .dijitTimePickerMarkerHover - to set hover style of major time values
* .dijitTimePickerMarkerSelected - set selected style of major time values
*
* 3. up and down arrow buttons
* .dijitTimePicker .dijitButtonNode - background-color, border
* .dijitTimePicker .dijitUpArrowHover, .dijitTimePicker .dijitDownArrowHover - set background-color for hover state
*
* Other classes provide the fundamental structure of the TimePicker and should not be modified.
*/
/* override Button.css */
.claro .dijitTimePicker .dijitButtonNode {
padding: 0 0;
-moz-border-radius: 0;
border-radius: 0;
}
.claro .dijitTimePicker {
border: 1px #b5bcc7 solid;
border-top: none;
border-bottom: none;
background-color: #fff;
/* TODO: useless? Appears to be overridden by settings on individual elements */
}
.claro .dijitTimePickerItem {
/* dijitTimePickerItem refers to both Tick's (minor values like 2:15, 2:30, 2:45) and Marker's (major values like 2PM, 3PM) */
background-image: url("images/standardGradient.png");
background-repeat: repeat-x;
background-image: -moz-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
background-image: -o-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
background-image: -ms-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
_background-image: none;
border-top: solid 1px #b5bcc7;
border-bottom: solid 1px #b5bcc7;
margin-right: -1px;
margin-left: -1px;
margin-top: -1px;
}
.claro .dijitTimePickerTick {
/* minor value */
color: #818181;
background-color: #efefef;
font-size: 0.818em;
}
.claro .dijitTimePickerMarker {
/* major value - 1:00, 2:00, times on the hour */
background-color: #e5f2fe;
font-size: 1em;
white-space: nowrap;
}
.claro .dijitTimePickerTickHover,
.claro .dijitTimePickerMarkerHover,
.claro .dijitTimePickerMarkerSelected,
.claro .dijitTimePickerTickSelected {
background-color: #7dbdfa;
border: solid 1px #b5bcc7;
margin-left: -7px;
margin-right: -7px;
color: #000;
}
.claro .dijitTimePickerMarkerSelected,
.claro .dijitTimePickerTickSelected {
font-size: 1em;
}
.dj_ie .claro .dijitTimePickerTickHover,
.dj_ie .claro .dijitTimePickerMarkerHover,
.dj_ie .claro .dijitTimePickerMarkerSelected,
.dj_ie .claro .dijitTimePickerTickSelected {
width: 114%;
}
.dj_ie6 .claro .dijitTimePickerTickHover,
.dj_ie6 .claro .dijitTimePickerMarkerHover,
.dj_ie6 .claro .dijitTimePickerMarkerSelected,
.dj_ie6 .claro .dijitTimePickerTickSelected {
position: relative;
/* creates widening of element */
zoom: 1;
/* creates widening of element */
}
.claro .dijitTimePickerTick .dijitTimePickerItemInner {
padding: 1px;
margin: 0;
}
.claro .dijitTimePicker .dijitButtonNode {
border-left: none;
border-right: none;
border-color: #b5bcc7;
background-color: #efefef;
background-image: url("images/standardGradient.png");
background-repeat: repeat-x;
background-image: -moz-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
background-image: -o-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
background-image: -ms-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
_background-image: none;
}
.claro .dijitTimePicker .dijitArrowButtonInner {
height: 100%;
/* hack claro.button.css */
background-image: url("form/images/commonFormArrows.png");
background-repeat: no-repeat;
background-position: -140px 45%;
}
.claro .dijitTimePicker .dijitDownArrowButton .dijitArrowButtonInner {
background-position: -35px 45%;
}
/* hover */
.claro .dijitTimePicker .dijitUpArrowHover,
.claro .dijitTimePicker .dijitDownArrowHover {
background-color: #abd6ff;
}
.claro .dijitTimePicker .dijitUpArrowHover .dijitArrowButtonInner {
background-position: -175px 45%;
}
.claro .dijitTimePicker .dijitDownArrowHover .dijitArrowButtonInner {
background-position: -70px 45%;
}

View File

@ -0,0 +1,115 @@
/* Time Picker
*
* Styling the Time Picker consists of the following:
*
* 1. minor time values
* .dijitTimePickerTick - set text color, size, background color of minor values
* .dijitTimePickerTickHover - set hover style of minor time values
* dijitTimePickerTickSelected - set selected style of minor time values
*
* 2. major time values - 1:00, 2:00, times on the hour
* set text color, size, background color, left/right margins for "zoom" affect
* .dijitTimePickerMarkerHover - to set hover style of major time values
* .dijitTimePickerMarkerSelected - set selected style of major time values
*
* 3. up and down arrow buttons
* .dijitTimePicker .dijitButtonNode - background-color, border
* .dijitTimePicker .dijitUpArrowHover, .dijitTimePicker .dijitDownArrowHover - set background-color for hover state
*
* Other classes provide the fundamental structure of the TimePicker and should not be modified.
*/
@import "variables";
/* override Button.css */
.claro .dijitTimePicker .dijitButtonNode {
padding: 0 0;
.border-radius(0);
}
.claro .dijitTimePicker{
border:1px @border-color solid;
border-top:none;
border-bottom:none;
background-color:#fff; /* TODO: useless? Appears to be overridden by settings on individual elements */
}
.claro .dijitTimePickerItem{
/* dijitTimePickerItem refers to both Tick's (minor values like 2:15, 2:30, 2:45) and Marker's (major values like 2PM, 3PM) */
.standard-gradient;
border-top:solid 1px @border-color;
border-bottom:solid 1px @border-color;
margin-right:-1px;
margin-left:-1px;
margin-top:-1px;
}
.claro .dijitTimePickerTick {
/* minor value */
color:@timepicker-minorvalue-text-color;
background-color:@timepicker-minorvalue-background-color;
font-size:0.818em;
}
.claro .dijitTimePickerMarker {
/* major value - 1:00, 2:00, times on the hour */
background-color: @timepicker-majorvalue-background-color;
font-size: 1em;
white-space: nowrap;
}
.claro .dijitTimePickerTickHover,
.claro .dijitTimePickerMarkerHover,
.claro .dijitTimePickerMarkerSelected,
.claro .dijitTimePickerTickSelected {
background-color: @timepicker-value-hovered-background-color;
border:solid 1px @border-color;
margin-left:-7px;
margin-right:-7px;
color:@timepicker-value-hovered-text-color;
}
.claro .dijitTimePickerMarkerSelected,
.claro .dijitTimePickerTickSelected {
font-size: 1em;
}
.dj_ie .claro .dijitTimePickerTickHover,
.dj_ie .claro .dijitTimePickerMarkerHover,
.dj_ie .claro .dijitTimePickerMarkerSelected,
.dj_ie .claro .dijitTimePickerTickSelected {
width: 114%;
}
.dj_ie6 .claro .dijitTimePickerTickHover,
.dj_ie6 .claro .dijitTimePickerMarkerHover,
.dj_ie6 .claro .dijitTimePickerMarkerSelected,
.dj_ie6 .claro .dijitTimePickerTickSelected {
position: relative; /* creates widening of element */
zoom: 1; /* creates widening of element */
}
.claro .dijitTimePickerTick .dijitTimePickerItemInner {
padding:1px;
margin:0;
}
.claro .dijitTimePicker .dijitButtonNode {
border-left:none;
border-right:none;
border-color:@border-color;
background-color: @unselected-background-color;
.standard-gradient;
}
.claro .dijitTimePicker .dijitArrowButtonInner{
height: 100%; /* hack claro.button.css */
background-image: url(@image-form-common-arrows);
background-repeat: no-repeat;
background-position:-140px 45%;
}
.claro .dijitTimePicker .dijitDownArrowButton .dijitArrowButtonInner{
background-position:-35px 45%;
}
/* hover */
.claro .dijitTimePicker .dijitUpArrowHover,
.claro .dijitTimePicker .dijitDownArrowHover {
background-color: @timepicker-arrow-hovered-background-color;
}
.claro .dijitTimePicker .dijitUpArrowHover .dijitArrowButtonInner {
background-position:-175px 45%;
}
.claro .dijitTimePicker .dijitDownArrowHover .dijitArrowButtonInner {
background-position:-70px 45%;
}
// TODO: should have active rule, for clicking a .dijitTimePickerItem

View File

@ -0,0 +1,9 @@
/* TimePicker */
.dj_ie .claro .dijitTimePickerRtl .dijitTimePickerTickHover,
.dj_ie .claro .dijitTimePickerRtl .dijitTimePickerMarkerHover,
.dj_ie .claro .dijitTimePickerRtl .dijitTimePickerMarkerSelected,
.dj_ie .claro .dijitTimePickerRtl .dijitTimePickerTickSelected {
margin-left: -6px;
margin-right: -8px;
width: 114%;
}

View File

@ -0,0 +1,12 @@
/* TimePicker */
@import "variables";
.dj_ie .claro .dijitTimePickerRtl .dijitTimePickerTickHover,
.dj_ie .claro .dijitTimePickerRtl .dijitTimePickerMarkerHover,
.dj_ie .claro .dijitTimePickerRtl .dijitTimePickerMarkerSelected,
.dj_ie .claro .dijitTimePickerRtl .dijitTimePickerTickSelected {
margin-left:-6px;
margin-right:-8px;
width: 114%;
}

View File

@ -0,0 +1,79 @@
/* TitlePane
*
* Styling TitlePane means styling the TitlePane title and its content container (dijitTitlePane)
*
* TitlePane title:
* 1. TitlePane title (default styling):
* .dijitTitlePaneTitle - TitlePane's title div style: background-color, border
*
* 2. hovered TitlePane title (ie, mouse hover on a title bar)
* .dijitTitlePaneTitleHover - styles when mouse hover on the title div
*
* 3. active TitlePane title (ie, mouse down on a title bar)
* .dijitTitlePaneTitleActive - styles when mouse down on the title div
*
*
* TitlePane Content Container:
* 1. outer/inner container:
* .dijitTitlePaneContentOuter / dijitTitlePaneContentInner - styles for the content outer div
*/
.claro .dijitTitlePaneTitle {
background-color: #efefef;
background-image: url("images/standardGradient.png");
background-repeat: repeat-x;
background-image: -moz-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
background-image: -o-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
background-image: -ms-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
_background-image: none;
border: 1px solid #b5bcc7;
padding: 0 7px 3px 7px;
min-height: 17px;
}
.claro .dijitTitlePaneTitleHover {
background-color: #abd6ff;
border-color: #759dc0;
}
.claro .dijitTitlePaneTitleActive {
background-color: #7dbdfa;
border-color: #759dc0;
background-image: url("images/activeGradient.png");
background-repeat: repeat-x;
background-image: -moz-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%);
background-image: -webkit-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%);
background-image: -o-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%);
background-image: -ms-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%);
_background-image: none;
}
.claro .dijitTitlePaneTitleFocus {
margin-top: 3px;
padding-bottom: 2px;
}
.claro .dijitTitlePane .dijitArrowNode {
background-image: url("images/spriteArrows.png");
background-repeat: no-repeat;
height: 8px;
width: 7px;
}
.claro .dijitTitlePane .dijitOpen .dijitArrowNode {
background-position: 0 0;
}
.claro .dijitTitlePane .dijitClosed .dijitArrowNode {
background-position: -14px 0;
}
.claro .dijitTitlePane .dijitTitlePaneTextNode {
color: #000;
}
.claro .dijitTitlePaneContentOuter {
background: #fff;
border: 1px solid #b5bcc7;
border-top: none;
}
.claro .dijitTitlePaneContentInner {
padding: 10px;
}
.claro .dijitTitlePaneTextNode {
margin-left: 4px;
margin-right: 4px;
vertical-align: text-top;
}

View File

@ -0,0 +1,70 @@
/* TitlePane
*
* Styling TitlePane means styling the TitlePane title and its content container (dijitTitlePane)
*
* TitlePane title:
* 1. TitlePane title (default styling):
* .dijitTitlePaneTitle - TitlePane's title div style: background-color, border
*
* 2. hovered TitlePane title (ie, mouse hover on a title bar)
* .dijitTitlePaneTitleHover - styles when mouse hover on the title div
*
* 3. active TitlePane title (ie, mouse down on a title bar)
* .dijitTitlePaneTitleActive - styles when mouse down on the title div
*
*
* TitlePane Content Container:
* 1. outer/inner container:
* .dijitTitlePaneContentOuter / dijitTitlePaneContentInner - styles for the content outer div
*/
@import "variables";
.claro .dijitTitlePaneTitle {
background-color: @unselected-background-color; // TODO: Mailed Jason, shouldn't this toggle to @selected-background-color when pane opened?
.standard-gradient;
border:1px solid @border-color;
padding: 0 7px 3px 7px;
min-height:17px;
}
.claro .dijitTitlePaneTitleHover {
background-color: @hovered-background-color;
border-color: @hovered-border-color;
}
.claro .dijitTitlePaneTitleActive {
background-color: @pressed-background-color;
border-color: @pressed-border-color;
.active-gradient;
}
.claro .dijitTitlePaneTitleFocus {
margin-top:3px;
padding-bottom:2px;
}
.claro .dijitTitlePane .dijitArrowNode {
background-image: url(@image-arrow-sprite);
background-repeat: no-repeat;
height: 8px;
width: 7px;
}
.claro .dijitTitlePane .dijitOpen .dijitArrowNode {
background-position: 0 0;
}
.claro .dijitTitlePane .dijitClosed .dijitArrowNode {
background-position: -14px 0;
}
.claro .dijitTitlePane .dijitTitlePaneTextNode {
color:@text-color;
}
.claro .dijitTitlePaneContentOuter {
background: @pane-background-color;
border:1px solid @border-color;
border-top:none;
}
.claro .dijitTitlePaneContentInner {
padding:10px;
}
.claro .dijitTitlePaneTextNode {
margin-left: 4px;
margin-right: 4px;
vertical-align:text-top;
}

View File

@ -0,0 +1,4 @@
/* TitlePane */
.claro .dijitTitlePaneRtl .dijitClosed .dijitArrowNode {
background-position: -7px 0;
}

View File

@ -0,0 +1,7 @@
/* TitlePane */
@import "variables";
.claro .dijitTitlePaneRtl .dijitClosed .dijitArrowNode {
background-position: -7px 0;
}

View File

@ -0,0 +1,201 @@
/* Toolbar
*
* Styling Toolbar means styling the toolbar container and the widget inside toolbar (dijitToolbar)
*
* 1. toolbar (default styling):
* .dijitToolbar - styles for outer container
*
* 2. widget inside toolbar
* .dijitToolbar .dijitButtonNode - Button widget
* .dijitComboButton - ComboButton widget
* .dijitDropDownButton - DropDownButton widget
* .dijitToggleButton - ToggleButton widget
*
* 3. hovered widget inside toolbar (ie, mouse hover on the widget inside)
* .dijitToolbar .dijitButtonNodeHover - styles for hovered Button widget
*
* 4. actived widget inside toolbar (ie, mouse down on the widget inside)
* .dijitToolbar .dijitButtonNodeActive - mouse down on Button widget
*/
.claro .dijitToolbar {
border-bottom: 1px solid #b5bcc7;
background-color: #efefef;
background-image: url("images/standardGradient.png");
background-repeat: repeat-x;
background-image: -moz-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
background-image: -o-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
background-image: -ms-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
_background-image: none;
padding: 2px 0 2px 4px;
zoom: 1;
}
.claro .dijitToolbar label {
padding: 0 3px 0 6px;
}
/** override claro/form/Button.css, and also ComboBox down arrow **/
.claro .dijitToolbar .dijitButton .dijitButtonNode,
.claro .dijitToolbar .dijitDropDownButton .dijitButtonNode,
.claro .dijitToolbar .dijitComboButton .dijitButtonNode,
.claro .dijitToolbar .dijitToggleButton .dijitButtonNode,
.claro .dijitToolbar .dijitComboBox .dijitButtonNode {
border-width: 0;
/* on hover/active, border-->1px, padding-->1px */
padding: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
-webkit-transition-property: background-color;
-moz-transition-property: background-color;
transition-property: background-color;
-webkit-transition-duration: 0.3s;
-moz-transition-duration: 0.3s;
transition-duration: 0.3s;
background-color: rgba(171, 214, 255, 0);
background-image: none;
/* cancel gradient for normal buttons, we don't want any gradient besides toolbar's on non-hovered buttons */
}
.dj_ie .claro .dijitToolbar .dijitButton .dijitButtonNode,
.dj_ie .claro .dijitToolbar .dijitDropDownButton .dijitButtonNode,
.dj_ie .claro .dijitToolbar .dijitComboButton .dijitButtonNode,
.dj_ie .claro .dijitToolbar .dijitToggleButton .dijitButtonNode,
.dj_ie .claro .dijitToolbar .dijitComboBox .dijitButtonNode {
background-color: transparent;
/* for IE, which doesn't understand rgba(...) */
}
/* hover status */
.dj_ie .claro .dijitToolbar .dijitButtonHover .dijitButtonNode,
.dj_ie .claro .dijitToolbar .dijitDropDownButtonHover .dijitButtonNode,
.dj_ie .claro .dijitToolbar .dijitComboButton .dijitButtonNodeHover,
.dj_ie .claro .dijitToolbar .dijitComboButton .dijitDownArrowButtonHover,
.dj_ie .claro .dijitToolbar .dijitToggleButtonHover .dijitButtonNode {
/* button should still turn blue on hover, so need to override .dj_ie rules above */
background-color: #abd6ff;
}
/* active status */
.dj_ie .claro .dijitToolbar .dijitButtonActive .dijitButtonNode,
.dj_ie .claro .dijitToolbar .dijitDropDownButtonActive .dijitButtonNode,
.dj_ie .claro .dijitToolbar .dijitComboButtonActive .dijitButtonNode,
.dj_ie .claro .dijitToolbar .dijitToggleButtonActive .dijitButtonNode {
/* button should still turn blue on press, so need to override .dj_ie rules above */
background-color: #abd6ff;
}
.claro .dijitToolbar .dijitComboButton .dijitStretch {
/* no rounded border on side adjacent to arrow */
-moz-border-radius: 2px 0 0 2px;
border-radius: 2px 0 0 2px;
}
.claro .dijitToolbar .dijitComboButton .dijitArrowButton {
/* no rounded border on side adjacent to button */
-moz-border-radius: 0 2px 2px 0;
border-radius: 0 2px 2px 0;
}
.claro .dijitToolbar .dijitComboBox .dijitButtonNode {
padding: 0;
}
/* hover status */
.claro .dijitToolbar .dijitButtonHover .dijitButtonNode,
.claro .dijitToolbar .dijitDropDownButtonHover .dijitButtonNode,
.claro .dijitToolbar .dijitToggleButtonHover .dijitButtonNode,
.claro .dijitToolbar .dijitComboButtonHover .dijitButtonNode {
border-width: 1px;
background-color: #abd6ff;
background-image: url("images/standardGradient.png");
background-repeat: repeat-x;
background-image: -moz-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
background-image: -o-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
background-image: -ms-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
_background-image: none;
padding: 1px;
}
.claro .dijitToolbar .dijitComboButtonHover .dijitButtonNode,
.claro .dijitToolbar .dijitComboButtonHover .dijitDownArrowButton {
background-color: #f3ffff;
}
.claro .dijitToolbar .dijitComboButtonHover .dijitButtonNodeHover,
.claro .dijitToolbar .dijitComboButtonHover .dijitDownArrowButtonHover {
background-color: #abd6ff;
}
/* active status */
.claro .dijitToolbar .dijitButtonActive .dijitButtonNode,
.claro .dijitToolbar .dijitDropDownButtonActive .dijitButtonNode,
.claro .dijitToolbar .dijitToggleButtonActive .dijitButtonNode {
border-width: 1px;
background-color: #7dbdfa;
background-image: url("images/activeGradient.png");
background-repeat: repeat-x;
background-image: -moz-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%);
background-image: -webkit-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%);
background-image: -o-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%);
background-image: -ms-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%);
_background-image: none;
padding: 1px;
}
.claro .dijitToolbar .dijitComboButtonActive {
-webkit-transition-duration: 0.2s;
-moz-transition-duration: 0.2s;
transition-duration: 0.2s;
border-width: 1px;
padding: 0;
}
.claro .dijitToolbar .dijitComboButtonActive .dijitButtonNode,
.claro .dijitToolbar .dijitComboButtonActive .dijitDownArrowButton {
background-color: #f3ffff;
padding: 2px;
}
.claro .dijitToolbar .dijitComboButtonActive .dijitButtonNodeActive {
background-color: #7dbdfa;
background-image: url("images/activeGradient.png");
background-repeat: repeat-x;
background-image: -moz-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%);
background-image: -webkit-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%);
background-image: -o-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%);
background-image: -ms-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%);
_background-image: none;
}
.claro .dijitToolbar .dijitComboButtonActive .dijitDownArrowButtonActive {
background-color: #7dbdfa;
background-image: url("images/activeGradient.png");
background-repeat: repeat-x;
background-image: -moz-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%);
background-image: -webkit-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%);
background-image: -o-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%);
background-image: -ms-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%);
_background-image: none;
}
/* Avoid double border between button and arrow */
.claro .dijitToolbar .dijitComboButtonHover .dijitDownArrowButton,
.claro .dijitToolbar .dijitComboButtonActive .dijitDownArrowButton {
border-left-width: 0;
}
.claro .dijitToolbar .dijitComboButtonHover .dijitDownArrowButton {
padding-left: 2px;
/* since there's no left border, don't reduce from 2px --> 1px */
}
/* toggle button checked status */
.claro .dijitToolbar .dijitToggleButtonChecked .dijitButtonNode {
margin: 0;
/* remove margin and add a border */
border-width: 1px;
border-style: solid;
background-image: none;
border-color: #759dc0;
background-color: #fff;
padding: 1px;
}
.claro .dijitToolbarSeparator {
/* separator icon in the editor sprite */
background: url("../../icons/images/editorIconsEnabled.png");
}
/* Toolbar inside of disabled Editor */
.claro .dijitDisabled .dijitToolbar {
background: none;
background-color: #efefef;
border-bottom: 1px solid #d3d3d3;
}
.claro .dijitToolbar .dijitComboBoxDisabled .dijitArrowButtonInner {
background-position: 0 50%;
}

View File

@ -0,0 +1,173 @@
/* Toolbar
*
* Styling Toolbar means styling the toolbar container and the widget inside toolbar (dijitToolbar)
*
* 1. toolbar (default styling):
* .dijitToolbar - styles for outer container
*
* 2. widget inside toolbar
* .dijitToolbar .dijitButtonNode - Button widget
* .dijitComboButton - ComboButton widget
* .dijitDropDownButton - DropDownButton widget
* .dijitToggleButton - ToggleButton widget
*
* 3. hovered widget inside toolbar (ie, mouse hover on the widget inside)
* .dijitToolbar .dijitButtonNodeHover - styles for hovered Button widget
*
* 4. actived widget inside toolbar (ie, mouse down on the widget inside)
* .dijitToolbar .dijitButtonNodeActive - mouse down on Button widget
*/
@import "variables";
.claro .dijitToolbar {
border-bottom: 1px solid @border-color;
background-color: @bar-background-color;
.standard-gradient;
padding: 2px 0 2px 4px;
zoom: 1;
}
.claro .dijitToolbar label {
padding: 0 3px 0 6px;
}
/** override claro/form/Button.css, and also ComboBox down arrow **/
.claro .dijitToolbar .dijitButton .dijitButtonNode,
.claro .dijitToolbar .dijitDropDownButton .dijitButtonNode,
.claro .dijitToolbar .dijitComboButton .dijitButtonNode,
.claro .dijitToolbar .dijitToggleButton .dijitButtonNode,
.claro .dijitToolbar .dijitComboBox .dijitButtonNode {
border-width: 0; /* on hover/active, border-->1px, padding-->1px */
padding: 2px;
.border-radius(@toolbar-button-border-radius);
.box-shadow(none);
.transition-property(background-color);
.transition-duration(.3s);
background-color:rgba(171,214,255,0);
background-image: none; /* cancel gradient for normal buttons, we don't want any gradient besides toolbar's on non-hovered buttons */
}
.dj_ie .claro .dijitToolbar .dijitButton .dijitButtonNode,
.dj_ie .claro .dijitToolbar .dijitDropDownButton .dijitButtonNode,
.dj_ie .claro .dijitToolbar .dijitComboButton .dijitButtonNode,
.dj_ie .claro .dijitToolbar .dijitToggleButton .dijitButtonNode,
.dj_ie .claro .dijitToolbar .dijitComboBox .dijitButtonNode {
background-color: transparent; /* for IE, which doesn't understand rgba(...) */
}
/* hover status */
.dj_ie .claro .dijitToolbar .dijitButtonHover .dijitButtonNode,
.dj_ie .claro .dijitToolbar .dijitDropDownButtonHover .dijitButtonNode,
.dj_ie .claro .dijitToolbar .dijitComboButton .dijitButtonNodeHover,
.dj_ie .claro .dijitToolbar .dijitComboButton .dijitDownArrowButtonHover,
.dj_ie .claro .dijitToolbar .dijitToggleButtonHover .dijitButtonNode {
/* button should still turn blue on hover, so need to override .dj_ie rules above */
background-color: @button-hovered-background-color;
}
/* active status */
.dj_ie .claro .dijitToolbar .dijitButtonActive .dijitButtonNode,
.dj_ie .claro .dijitToolbar .dijitDropDownButtonActive .dijitButtonNode,
.dj_ie .claro .dijitToolbar .dijitComboButtonActive .dijitButtonNode,
.dj_ie .claro .dijitToolbar .dijitToggleButtonActive .dijitButtonNode {
/* button should still turn blue on press, so need to override .dj_ie rules above */
background-color: @button-pressed-background-color;
}
.claro .dijitToolbar .dijitComboButton .dijitStretch {
/* no rounded border on side adjacent to arrow */
.border-radius(@toolbar-button-border-radius 0 0 @toolbar-button-border-radius);
}
.claro .dijitToolbar .dijitComboButton .dijitArrowButton {
/* no rounded border on side adjacent to button */
.border-radius(0 @toolbar-button-border-radius @toolbar-button-border-radius 0);
}
.claro .dijitToolbar .dijitComboBox .dijitButtonNode {
padding: 0;
}
/* hover status */
.claro .dijitToolbar .dijitButtonHover .dijitButtonNode,
.claro .dijitToolbar .dijitDropDownButtonHover .dijitButtonNode,
.claro .dijitToolbar .dijitToggleButtonHover .dijitButtonNode,
.claro .dijitToolbar .dijitComboButtonHover .dijitButtonNode {
border-width:1px;
background-color: @hovered-background-color;
.standard-gradient;
padding: 1px;
}
.claro .dijitToolbar .dijitComboButtonHover .dijitButtonNode,
.claro .dijitToolbar .dijitComboButtonHover .dijitDownArrowButton {
background-color: @toolbar-combobutton-hovered-unhoveredsection-background-color;
}
.claro .dijitToolbar .dijitComboButtonHover .dijitButtonNodeHover,
.claro .dijitToolbar .dijitComboButtonHover .dijitDownArrowButtonHover {
background-color: @hovered-background-color;
}
/* active status */
.claro .dijitToolbar .dijitButtonActive .dijitButtonNode,
.claro .dijitToolbar .dijitDropDownButtonActive .dijitButtonNode,
.claro .dijitToolbar .dijitToggleButtonActive .dijitButtonNode {
border-width: 1px;
background-color:@pressed-background-color;
.active-gradient;
padding: 1px;
}
.claro .dijitToolbar .dijitComboButtonActive {
.transition-duration(.2s);
border-width: 1px;
padding: 0;
}
.claro .dijitToolbar .dijitComboButtonActive .dijitButtonNode,
.claro .dijitToolbar .dijitComboButtonActive .dijitDownArrowButton {
background-color: @toolbar-combobutton-hovered-unhoveredsection-background-color;
padding: 2px;
}
.claro .dijitToolbar .dijitComboButtonActive .dijitButtonNodeActive {
background-color: @pressed-background-color;
.active-gradient;
}
.claro .dijitToolbar .dijitComboButtonActive .dijitDownArrowButtonActive {
background-color: @pressed-background-color;
.active-gradient;
}
/* Avoid double border between button and arrow */
.claro .dijitToolbar .dijitComboButtonHover .dijitDownArrowButton,
.claro .dijitToolbar .dijitComboButtonActive .dijitDownArrowButton {
border-left-width: 0;
}
.claro .dijitToolbar .dijitComboButtonHover .dijitDownArrowButton {
padding-left: 2px; /* since there's no left border, don't reduce from 2px --> 1px */
}
/* toggle button checked status */
.claro .dijitToolbar .dijitToggleButtonChecked .dijitButtonNode {
margin: 0; /* remove margin and add a border */
border-width: 1px;
border-style: solid;
background-image: none;
border-color: @selected-border-color;
background-color: @toolbar-button-checked-background-color;
padding: 1px;
}
.claro .dijitToolbarSeparator {
/* separator icon in the editor sprite */
background: url(@image-editor-icons-enabled);
}
/* Toolbar inside of disabled Editor */
.claro .dijitDisabled .dijitToolbar {
background:none;
background-color:@disabled-background-color;
border-bottom: 1px solid @disabled-border-color;
}
.claro .dijitToolbar .dijitComboBoxDisabled .dijitArrowButtonInner {
background-position:0 50%;
}

View File

@ -0,0 +1,29 @@
/* Toolbar RTL */
/* Repeated rules from Toolbar.css to override rule from Button_rtl.css, which is loaded after Toolbar.css */
.claro .dijitToolbar .dijitComboButtonRtl .dijitButtonNode {
border-width: 0;
padding: 2px;
}
.claro .dijitToolbar .dijitComboButtonRtlHover .dijitButtonNode,
.claro .dijitToolbar .dijitComboButtonRtlActive .dijitButtonNode {
border-width: 1px;
padding: 1px;
}
.claro .dijitToolbar .dijitComboButtonRtl .dijitStretch {
/* no rounded border on side adjacent to arrow */
-moz-border-radius: 0 2px 2px 0;
border-radius: 0 2px 2px 0;
}
.claro .dijitToolbar .dijitComboButtonRtl .dijitArrowButton {
/* no rounded border on side adjacent to button */
-moz-border-radius: 2px 0 0 2px;
border-radius: 2px 0 0 2px;
}
.claro .dijitToolbar .dijitComboButtonRtlHover .dijitArrowButton,
.claro .dijitToolbar .dijitComboButtonRtlActive .dijitArrowButton {
/* border between button and arrow */
border-left-width: 1px;
border-right-width: 0;
padding-left: 1px;
padding-right: 2px;
}

View File

@ -0,0 +1,32 @@
/* Toolbar RTL */
@import "variables";
/* Repeated rules from Toolbar.css to override rule from Button_rtl.css, which is loaded after Toolbar.css */
.claro .dijitToolbar .dijitComboButtonRtl .dijitButtonNode {
border-width: 0;
padding: 2px;
}
.claro .dijitToolbar .dijitComboButtonRtlHover .dijitButtonNode,
.claro .dijitToolbar .dijitComboButtonRtlActive .dijitButtonNode {
border-width: 1px;
padding: 1px;
}
.claro .dijitToolbar .dijitComboButtonRtl .dijitStretch {
/* no rounded border on side adjacent to arrow */
.border-radius(0 2px 2px 0);
}
.claro .dijitToolbar .dijitComboButtonRtl .dijitArrowButton {
/* no rounded border on side adjacent to button */
.border-radius(2px 0 0 2px);
}
.claro .dijitToolbar .dijitComboButtonRtlHover .dijitArrowButton,
.claro .dijitToolbar .dijitComboButtonRtlActive .dijitArrowButton {
/* border between button and arrow */
border-left-width: 1px;
border-right-width: 0;
padding-left: 1px;
padding-right: 2px;
}

View File

@ -0,0 +1,143 @@
/* Tree
*
* Styling Tree mostly means styling the TreeRow (dijitTreeRow)
* There are 4 basic states to style:
*
* Tree Row:
* 1. tree row (default styling):
* .dijitTreeRow - styles for each row of the tree
*
* 2. hovered tree row (mouse hover on a tree row)
* .dijitTreeRowHover - styles when mouse over on one row
*
* 3. active tree row (mouse down on a tree row)
* .dijitTreeRowActive - styles when mouse down on one row
*
* 4. selected tree row
* dijitTreeRowSelected - style when the row has been selected
*
* Tree Expando:
* dijitTreeExpando - the expando at the left of the text of each tree row
*
* Drag and Drop on TreeNodes: (insert line on dijitTreeContent node so it'll aligned w/ target element)
* .dijitTreeNode .dojoDndItemBefore/.dojoDndItemAfter - use border style simulate a separate line
*/
.claro .dijitTreeNode {
zoom: 1;
/* force layout on IE (TODO: may not be needed anymore) */
}
.claro .dijitTreeIsRoot {
background-image: none;
}
/* Styling for basic tree node (unhovered, unselected)
* Also use this styling when dropping between items on the tree (in other words, don't
* use hover effect)
*/
.claro .dijitTreeRow,
.claro .dijitTreeNode .dojoDndItemBefore,
.claro .dijitTreeNode .dojoDndItemAfter {
/* so insert line shows up on IE when dropping after a target element */
padding: 4px 0 2px 0;
background-color: none;
background-color: transparent;
background-color: rgba(171, 214, 255, 0);
background-position: 0 0;
background-repeat: repeat-x;
border: solid 0 transparent;
color: #000;
-webkit-transition-property: background-color, border-color;
-moz-transition-property: background-color, border-color;
transition-property: background-color, border-color;
-webkit-transition-duration: 0.25s;
-moz-transition-duration: 0.25s;
transition-duration: 0.25s;
-webkit-transition-timing-function: ease-out;
-moz-transition-timing-function: ease-out;
transition-timing-function: ease-out;
}
.claro .dijitTreeRowSelected {
background-color: #cfe5fa;
background-image: url("images/standardGradient.png");
background-repeat: repeat-x;
background-image: -moz-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
background-image: -o-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
background-image: -ms-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
_background-image: none;
padding: 3px 0 1px;
border-color: #759dc0;
border-width: 1px 0;
color: #000;
}
.claro .dijitTreeRowHover {
background-color: #abd6ff;
background-image: url("images/standardGradient.png");
background-repeat: repeat-x;
background-image: -moz-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
background-image: -o-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
background-image: -ms-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
_background-image: none;
padding: 3px 0 1px;
border-color: #759dc0;
border-width: 1px 0;
color: #000;
-webkit-transition-duration: 0.25s;
-moz-transition-duration: 0.25s;
transition-duration: 0.25s;
}
.claro .dijitTreeRowActive {
background-color: #7dbdfa;
background-image: url("images/activeGradient.png");
background-repeat: repeat-x;
background-image: -moz-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%);
background-image: -webkit-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%);
background-image: -o-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%);
background-image: -ms-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%);
_background-image: none;
padding: 3px 0 1px;
border-color: #759dc0;
border-width: 1px 0;
color: #000;
}
.claro .dijitTreeRowFocused {
background-repeat: repeat;
}
/* expando (open/closed) icon */
.claro .dijitTreeExpando {
background-image: url("images/treeExpandImages.png");
width: 16px;
height: 16px;
background-position: -35px 0;
/* for dijitTreeExpandoOpened */
}
.dj_ie6 .claro .dijitTreeExpando {
background-image: url("images/treeExpandImages8bit.png");
}
.claro .dijitTreeRowHover .dijitTreeExpandoOpened {
background-position: -53px 0;
}
.claro .dijitTreeExpandoClosed {
background-position: 1px 0;
}
.claro .dijitTreeRowHover .dijitTreeExpandoClosed {
background-position: -17px 0;
}
.claro .dijitTreeExpandoLeaf,
.dj_ie6 .claro .dijitTreeExpandoLeaf {
background-image: none;
}
.claro .dijitTreeExpandoLoading {
background-image: url("images/loadingAnimation.gif");
}
/* Drag and Drop on TreeNodes
* Put insert line on dijitTreeContent node so it's aligned w/
* (ie, indented equally with) target element, even
* though dijitTreeRowNode is the actual "drag object"
*/
.claro .dijitTreeNode .dojoDndItemBefore .dijitTreeContent {
border-top: 2px solid #759dc0;
}
.claro .dijitTreeNode .dojoDndItemAfter .dijitTreeContent {
border-bottom: 2px solid #759dc0;
}

View File

@ -0,0 +1,127 @@
/* Tree
*
* Styling Tree mostly means styling the TreeRow (dijitTreeRow)
* There are 4 basic states to style:
*
* Tree Row:
* 1. tree row (default styling):
* .dijitTreeRow - styles for each row of the tree
*
* 2. hovered tree row (mouse hover on a tree row)
* .dijitTreeRowHover - styles when mouse over on one row
*
* 3. active tree row (mouse down on a tree row)
* .dijitTreeRowActive - styles when mouse down on one row
*
* 4. selected tree row
* dijitTreeRowSelected - style when the row has been selected
*
* Tree Expando:
* dijitTreeExpando - the expando at the left of the text of each tree row
*
* Drag and Drop on TreeNodes: (insert line on dijitTreeContent node so it'll aligned w/ target element)
* .dijitTreeNode .dojoDndItemBefore/.dojoDndItemAfter - use border style simulate a separate line
*/
@import "variables";
.claro .dijitTreeNode {
zoom: 1; /* force layout on IE (TODO: may not be needed anymore) */
}
.claro .dijitTreeIsRoot {
background-image: none;
}
/* Styling for basic tree node (unhovered, unselected)
* Also use this styling when dropping between items on the tree (in other words, don't
* use hover effect)
*/
.claro .dijitTreeRow,
.claro .dijitTreeNode .dojoDndItemBefore,
.claro .dijitTreeNode .dojoDndItemAfter {
/* so insert line shows up on IE when dropping after a target element */
padding: 4px 0 2px 0;
background-color: none; // IE6 doesn't understand rgba() or transparent below
background-color: transparent; // IE8 doesn't understand rgba() below
background-color: rgba(171,214,255,0); // rgba() instead of transparent to prevent flash on hover fade-in
background-position:0 0;
background-repeat:repeat-x;
border: solid 0 transparent;
color: @text-color;
.transition-property(background-color, border-color);
.transition-duration(.25s);
.transition-timing-function(ease-out);
}
.claro .dijitTreeRowSelected {
background-color: @selected-background-color;
.standard-gradient;
padding: 3px 0 1px;
border-color: @selected-border-color;
border-width: 1px 0;
color: @selected-text-color;
}
.claro .dijitTreeRowHover {
background-color: @hovered-background-color;
.standard-gradient;
padding: 3px 0 1px;
border-color: @hovered-border-color;
border-width: 1px 0;
color: @hovered-text-color;
.transition-duration(.25s);
}
.claro .dijitTreeRowActive {
background-color:@pressed-background-color;
.active-gradient;
padding: 3px 0 1px;
border-color: @pressed-border-color;
border-width: 1px 0;
color: @selected-text-color;
}
.claro .dijitTreeRowFocused {
background-repeat: repeat;
}
/* expando (open/closed) icon */
.claro .dijitTreeExpando {
background-image: url(@image-tree-expand);
width: 16px;
height: 16px;
background-position: -35px 0; /* for dijitTreeExpandoOpened */
}
.dj_ie6 .claro .dijitTreeExpando {
background-image: url(@image-tree-expand-ie6);
}
.claro .dijitTreeRowHover .dijitTreeExpandoOpened {
background-position: -53px 0;
}
.claro .dijitTreeExpandoClosed {
background-position: 1px 0;
}
.claro .dijitTreeRowHover .dijitTreeExpandoClosed {
background-position: -17px 0;
}
.claro .dijitTreeExpandoLeaf,
.dj_ie6 .claro .dijitTreeExpandoLeaf {
background-image:none;
}
.claro .dijitTreeExpandoLoading {
background-image: url(@image-loading-animation);
}
/* Drag and Drop on TreeNodes
* Put insert line on dijitTreeContent node so it's aligned w/
* (ie, indented equally with) target element, even
* though dijitTreeRowNode is the actual "drag object"
*/
.claro .dijitTreeNode .dojoDndItemBefore .dijitTreeContent {
border-top: 2px solid @dnd-dropseparator-color; // TODO: normal separator is just 1px, why is this 2px?
}
.claro .dijitTreeNode .dojoDndItemAfter .dijitTreeContent {
border-bottom: 2px solid @dnd-dropseparator-color; // TODO: normal separator is just 1px, why is this 2px?
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,52 @@
// Script to process all the less files and convert them to CSS files
// Run from themes/dijit/claro like:
//
// $ node compile.js
var fs = require('fs'), // file system access
path = require('path'), // get directory from file name
less = require('../../../util/less'); // less processor
var options = {
compress: false,
optimization: 1,
silent: false
};
var allFiles = [].concat(
fs.readdirSync("."),
fs.readdirSync("form").map(function(fname){ return "form/"+fname; }),
fs.readdirSync("layout").map(function(fname){ return "layout/"+fname; })
),
lessFiles = allFiles.filter(function(name){ return name && name != "variables.less" && /\.less$/.test(name); });
lessFiles.forEach(function(fname){
console.log("=== " + fname);
fs.readFile(fname, 'utf-8', function(e, data){
if(e){
console.error("lessc: " + e.message);
process.exit(1);
}
new(less.Parser)({
paths: [path.dirname(fname)],
optimization: options.optimization,
filename: fname
}).parse(data, function(err, tree){
if(err){
less.writeError(err, options);
process.exit(1);
}else{
try{
var css = tree.toCSS({ compress: options.compress }),
outputFname = fname.replace('.less', '.css');
var fd = fs.openSync(outputFname, "w");
fs.writeSync(fd, css, 0, "utf8");
}catch(e){
less.writeError(e, options);
process.exit(2);
}
}
});
});
});

View File

@ -0,0 +1,43 @@
/* ======= Styling for the document itself (overriding dojo.css) ======== */
@import url("../../../dojo/resources/dojo.css");
.claro {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: .688em;
color: #131313;
}
/* Headings */
.claro h1 {
font-size: 1.545em;
margin-bottom: 0.727em;
}
.claro h2 {
font-size: 1.364em;
line-height: 1.455em;
margin-top: 1em;
margin-bottom: 0.60em;
font-weight: normal;
}
.claro h3,
.claro h4,
.claro h5,
.claro h6 {
font-size: 1.091em;
font-weight: normal;
}
/* paragraphs, quotes and lists */
.claro p {
line-height: 1.3em;
}
/* pre and code */
.claro pre,
.claro code {
font-family: inherit;
background-color: #efefef;
border: 1px solid #d3d3d3;
}
/* tables */
.claro table.dojoTabular thead,
.claro table.dojoTabular tfoot {
background-color: #efefef;
border: 1px solid #d3d3d3;
}

View File

@ -0,0 +1,45 @@
/* ======= Styling for the document itself (overriding dojo.css) ======== */
@import "variables";
@import url("../../../dojo/resources/dojo.css");
.claro {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: .688em;
color: @document-text-color;
}
/* Headings */
.claro h1 {
font-size: 1.545em;
margin-bottom:0.727em;
}
.claro h2 {
font-size: 1.364em;
line-height: 1.455em;
margin-top:1em;
margin-bottom:0.60em;
font-weight: normal;
}
.claro h3, .claro h4, .claro h5, .claro h6 {
font-size:1.091em;
font-weight: normal;
}
/* paragraphs, quotes and lists */
.claro p {
line-height: 1.3em;
}
/* pre and code */
.claro pre, .claro code {
font-family:inherit;
background-color: @document-shadedsection-background-color;
border: 1px solid @document-border-color;
}
/* tables */
.claro table.dojoTabular thead, .claro table.dojoTabular tfoot {
background-color: @document-shadedsection-background-color;
border: 1px solid @document-border-color;
}

View File

@ -0,0 +1,164 @@
/* Button | DropDownButton | ComboButton | ToggleButton
*
* Styling Buttons mainly includes:
*
* 1. Containers
* .dijitButton
* .dijitDropDownButton
* .dijitComboButton
* .dijitButtonNode - common button/arrow wrapper shared across all three button types
*
* 2. Button text
* .dijitButtonText
*
* 3. Arrows - only for DropDownButton and ComboButton
* There are total four directions arrows - down, left, right, up:
* .dijitArrowButtonInner - down arrow by default
* .dijitLeftArrowButton .dijitArrowButtonInner - left arrow
* .dijitRightArrowButton .dijitArrowButtonInner - right arrow
* .dijitUpArrowButton .dijitArrowButtonInner - up arrow
*
* 4. States - Hover, Active, Disabled, e.g.
* .dijitButtonHover .dijitButtonNode
* .dijitButtonActive .dijitButtonNode
* .dijitButtonDisabled .dijitButtonNode
*
* .dijitDisabled .dijitArrowButtonInner - disabled arrow states
*/
.claro .dijitButtonNode {
/* rules for dijit.form.*Button widgets and arrow nodes on ComboBox, Spinner etc. */
-webkit-transition-property: background-color;
-moz-transition-property: background-color;
transition-property: background-color;
-webkit-transition-duration: 0.3s;
-moz-transition-duration: 0.3s;
transition-duration: 0.3s;
}
.claro .dijitButton .dijitButtonNode,
.claro .dijitDropDownButton .dijitButtonNode,
.claro .dijitComboButton .dijitButtonNode,
.claro .dijitToggleButton .dijitButtonNode {
/* rules for the dijit.form.*Button widgets (see also ComboButton section below) */
border: 1px solid #759dc0;
padding: 2px 4px 4px 4px;
color: #000;
-moz-border-radius: 4px;
border-radius: 4px;
-webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
-moz-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
background-color: #bcd8f4;
background-image: url("images/buttonEnabled.png");
background-repeat: repeat-x;
background-image: -moz-linear-gradient(#ffffff 0px, rgba(255, 255, 255, 0) 3px, rgba(255, 255, 255, 0.75) 100%);
background-image: -webkit-linear-gradient(#ffffff 0px, rgba(255, 255, 255, 0) 3px, rgba(255, 255, 255, 0.75) 100%);
background-image: -o-linear-gradient(#ffffff 0px, rgba(255, 255, 255, 0) 3px, rgba(255, 255, 255, 0.75) 100%);
background-image: -ms-linear-gradient(#ffffff 0px, rgba(255, 255, 255, 0) 3px, rgba(255, 255, 255, 0.75) 100%);
_background-image: none;
}
.claro .dijitComboButton .dijitArrowButton {
border-left-width: 0;
padding: 4px 2px 4px 2px;
/* TODO: still needed? */
}
/*arrow styles for down/up/left/right directions*/
.claro .dijitArrowButtonInner {
width: 15px;
height: 15px;
margin: 0 auto;
background-image: url("../form/images/buttonArrows.png");
background-repeat: no-repeat;
background-position: -51px 53%;
}
.claro .dijitLeftArrowButton .dijitArrowButtonInner {
background-position: -77px 53%;
}
.claro .dijitRightArrowButton .dijitArrowButtonInner {
background-position: -26px 53%;
}
.claro .dijitUpArrowButton .dijitArrowButtonInner {
background-position: 0 53%;
}
.claro .dijitDisabled .dijitArrowButtonInner {
background-position: -151px 53%;
}
.claro .dijitDisabled .dijitLeftArrowButton .dijitArrowButtonInner {
background-position: -177px 53%;
}
.claro .dijitDisabled .dijitRightArrowButton .dijitArrowButtonInner {
background-position: -126px 53%;
}
.claro .dijitDisabled .dijitUpArrowButton .dijitArrowButtonInner {
background-position: -100px 53%;
}
.claro .dijitButtonText {
padding: 0 0.3em;
text-align: center;
}
/* hover status */
.claro .dijitButtonHover .dijitButtonNode,
.claro .dijitDropDownButtonHover .dijitButtonNode,
.claro .dijitComboButton .dijitButtonNodeHover,
.claro .dijitComboButton .dijitDownArrowButtonHover,
.claro .dijitToggleButtonHover .dijitButtonNode {
background-color: #86bdf2;
color: #000;
-webkit-transition-duration: 0.2s;
-moz-transition-duration: 0.2s;
transition-duration: 0.2s;
}
/* active, checked status */
.claro .dijitButtonActive .dijitButtonNode,
.claro .dijitDropDownButtonActive .dijitButtonNode,
.claro .dijitComboButtonActive .dijitButtonNode,
.claro .dijitToggleButtonActive .dijitButtonNode,
.claro .dijitToggleButtonChecked .dijitButtonNode {
background-color: #86bdf2;
-webkit-box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.2);
-moz-box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.2);
box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.2);
-webkit-transition-duration: 0.1s;
-moz-transition-duration: 0.1s;
transition-duration: 0.1s;
}
/* disabled status */
.claro .dijitButtonDisabled,
.claro .dijitDropDownButtonDisabled,
.claro .dijitComboButtonDisabled,
.claro .dijitToggleButtonDisabled {
background-image: none;
outline: none;
}
.claro .dijitButtonDisabled .dijitButtonNode,
.claro .dijitDropDownButtonDisabled .dijitButtonNode,
.claro .dijitComboButtonDisabled .dijitButtonNode,
.claro .dijitToggleButtonDisabled .dijitButtonNode {
background-color: #efefef;
border: solid 1px #d3d3d3;
color: #818181;
-webkit-box-shadow: 0 0 0 rgba(0, 0, 0, 0);
-moz-box-shadow: 0 0 0 rgba(0, 0, 0, 0);
box-shadow: 0 0 0 rgba(0, 0, 0, 0);
background-image: url("images/buttonDisabled.png");
background-image: -moz-linear-gradient(#ffffff 0%, rgba(255, 255, 255, 0) 40%);
background-image: -webkit-linear-gradient(#ffffff 0%, rgba(255, 255, 255, 0) 40%);
background-image: -o-linear-gradient(#ffffff 0%, rgba(255, 255, 255, 0) 40%);
background-image: -ms-linear-gradient(#ffffff 0%, rgba(255, 255, 255, 0) 40%);
_background-image: none;
}
.claro .dijitComboButtonDisabled .dijitArrowButton {
border-left-width: 0;
}
/* for ComboButton */
.claro table.dijitComboButton {
border-collapse: separate;
/* override dijit.css so that ComboBox rounded corners work */
}
.claro .dijitComboButton .dijitStretch {
-moz-border-radius: 4px 0 0 4px;
border-radius: 4px 0 0 4px;
}
.claro .dijitComboButton .dijitArrowButton {
-moz-border-radius: 0 4px 4px 0;
border-radius: 0 4px 4px 0;
}

View File

@ -0,0 +1,164 @@
/* Button | DropDownButton | ComboButton | ToggleButton
*
* Styling Buttons mainly includes:
*
* 1. Containers
* .dijitButton
* .dijitDropDownButton
* .dijitComboButton
* .dijitButtonNode - common button/arrow wrapper shared across all three button types
*
* 2. Button text
* .dijitButtonText
*
* 3. Arrows - only for DropDownButton and ComboButton
* There are total four directions arrows - down, left, right, up:
* .dijitArrowButtonInner - down arrow by default
* .dijitLeftArrowButton .dijitArrowButtonInner - left arrow
* .dijitRightArrowButton .dijitArrowButtonInner - right arrow
* .dijitUpArrowButton .dijitArrowButtonInner - up arrow
*
* 4. States - Hover, Active, Disabled, e.g.
* .dijitButtonHover .dijitButtonNode
* .dijitButtonActive .dijitButtonNode
* .dijitButtonDisabled .dijitButtonNode
*
* .dijitDisabled .dijitArrowButtonInner - disabled arrow states
*/
@import "../variables";
.claro .dijitButtonNode {
/* rules for dijit.form.*Button widgets and arrow nodes on ComboBox, Spinner etc. */
.transition-property(background-color);
.transition-duration(.3s);
}
.claro .dijitButton .dijitButtonNode,
.claro .dijitDropDownButton .dijitButtonNode,
.claro .dijitComboButton .dijitButtonNode,
.claro .dijitToggleButton .dijitButtonNode {
/* rules for the dijit.form.*Button widgets (see also ComboButton section below) */
border: 1px solid @button-border-color;
padding: 2px 4px 4px 4px;
color: @text-color;
.border-radius(@button-border-radius);
.box-shadow(0 1px 1px rgba(0,0,0,0.15));
background-color: desaturate(darken(@button-background-color, 10), 20);
// Alpha transparency layer to add gradient to above background color.
// Use CSS gradient with fallback to image for IE.
background-image: url("images/buttonEnabled.png");
background-repeat: repeat-x;
.alpha-white-gradient(1, 0px, 0, 3px, 0.75, 100%);
_background-image: none; // IE6 can't handle background-color and background-image at once.
}
.claro .dijitComboButton .dijitArrowButton {
border-left-width: 0;
padding: 4px 2px 4px 2px; /* TODO: still needed? */
}
/*arrow styles for down/up/left/right directions*/
.claro .dijitArrowButtonInner {
width: 15px;
height: 15px;
margin: 0 auto;
background-image:url("../@{image-form-button-arrows}");
background-repeat:no-repeat;
background-position:-51px 53%;
}
.claro .dijitLeftArrowButton .dijitArrowButtonInner {
background-position: -77px 53%;
}
.claro .dijitRightArrowButton .dijitArrowButtonInner {
background-position: -26px 53%;
}
.claro .dijitUpArrowButton .dijitArrowButtonInner {
background-position: 0 53%;
}
.claro .dijitDisabled .dijitArrowButtonInner {
background-position: -151px 53%;
}
.claro .dijitDisabled .dijitLeftArrowButton .dijitArrowButtonInner {
background-position: -177px 53%;
}
.claro .dijitDisabled .dijitRightArrowButton .dijitArrowButtonInner {
background-position: -126px 53%;
}
.claro .dijitDisabled .dijitUpArrowButton .dijitArrowButtonInner {
background-position: -100px 53%;
}
.claro .dijitButtonText {
padding: 0 0.3em;
text-align: center;
}
/* hover status */
.claro .dijitButtonHover .dijitButtonNode,
.claro .dijitDropDownButtonHover .dijitButtonNode,
.claro .dijitComboButton .dijitButtonNodeHover,
.claro .dijitComboButton .dijitDownArrowButtonHover,
.claro .dijitToggleButtonHover .dijitButtonNode {
background-color: desaturate(darken(@button-hovered-background-color, 10), 20);
color:@text-color;
.transition-duration(.2s);
}
/* active, checked status */
.claro .dijitButtonActive .dijitButtonNode,
.claro .dijitDropDownButtonActive .dijitButtonNode,
.claro .dijitComboButtonActive .dijitButtonNode,
.claro .dijitToggleButtonActive .dijitButtonNode,
.claro .dijitToggleButtonChecked .dijitButtonNode {
background-color: desaturate(darken(@button-pressed-background-color, 10), 20);
.box-shadow(inset 0px 1px 1px rgba(0, 0, 0, 0.2));
.transition-duration(.1s);
}
/* disabled status */
.claro .dijitButtonDisabled,
.claro .dijitDropDownButtonDisabled,
.claro .dijitComboButtonDisabled,
.claro .dijitToggleButtonDisabled {
background-image: none;
outline: none;
}
.claro .dijitButtonDisabled .dijitButtonNode,
.claro .dijitDropDownButtonDisabled .dijitButtonNode,
.claro .dijitComboButtonDisabled .dijitButtonNode,
.claro .dijitToggleButtonDisabled .dijitButtonNode {
background-color: @disabled-background-color;
border: solid 1px @disabled-border-color;
color: @disabled-text-color;
.box-shadow(0 0 0 rgba(0,0,0,0));
// Change the gradient from light to dark.
// Again using CSS gradient with fallback to image for IE.
background-image: url("images/buttonDisabled.png");
.alpha-white-gradient(1, 0%, 0, 40%);
_background-image: none; // IE6 can't handle background-color and background-image at once.
}
.claro .dijitComboButtonDisabled .dijitArrowButton{
border-left-width: 0;
}
/* for ComboButton */
.claro table.dijitComboButton {
border-collapse: separate; /* override dijit.css so that ComboBox rounded corners work */
}
.claro .dijitComboButton .dijitStretch {
.border-radius(@button-border-radius 0 0 @button-border-radius);
}
.claro .dijitComboButton .dijitArrowButton {
.border-radius(0 @button-border-radius @button-border-radius 0);
}

View File

@ -0,0 +1,13 @@
/* Combo Button */
.claro .dijitComboButtonRtl .dijitStretch {
-moz-border-radius: 0 4px 4px 0;
border-radius: 0 4px 4px 0;
}
.claro .dijitComboButtonRtl .dijitArrowButton {
-moz-border-radius: 4px 0 0 4px;
border-radius: 4px 0 0 4px;
padding: 3px 0 4px;
border-left-width: 1px;
border-right-width: 0;
}
/* End Combo Button */

View File

@ -0,0 +1,16 @@
@import "../variables";
/* Combo Button */
.claro .dijitComboButtonRtl .dijitStretch {
.border-radius(0 @button-border-radius @button-border-radius 0);
}
.claro .dijitComboButtonRtl .dijitArrowButton {
.border-radius(@button-border-radius 0 0 @button-border-radius);
padding:3px 0 4px;
border-left-width: 1px;
border-right-width: 0;
}
/* End Combo Button */

View File

@ -0,0 +1,67 @@
/* CheckBox
*
* Styling CheckBox mainly includes:
*
* 1. Containers
* .dijitCheckBox|.dijitCheckBoxIcon - for border, padding, width|height and background image
*
* 2. CheckBox within ToggleButton
* .dijitToggleButton|.dijitToggleButtonChecked .* - for background image
*
* 3. Checked state
* .dijitCheckBoxChecked - for checked background-color|image
* .dijitToggleButtonChecked - for border, background-color|image, display and width|height
*
* 4. Hover state
* .dijitCheckBoxHover|.dijitCheckBoxCheckedHover - for background image
*
* 5. Disabled state
* .dijitCheckBoxDisabled|.dijitCheckBoxCheckedDisabled - for background image
*/
.claro .dijitToggleButton .dijitCheckBoxIcon {
background-image: url("../images/checkmarkNoBorder.png");
}
.dj_ie6 .claro .dijitToggleButton .dijitCheckBoxIcon {
background-image: url("../images/checkmarkNoBorder.gif");
}
.claro .dijitCheckBox,
.claro .dijitCheckBoxIcon {
background-image: url("../form/images/checkboxRadioButtonStates.png");
/* checkbox sprite image */
background-repeat: no-repeat;
width: 15px;
height: 16px;
margin: 0 2px 0 0;
padding: 0;
}
.dj_ie6 .claro .dijitCheckBox,
.dj_ie6 .claro .dijitCheckBoxIcon {
background-image: url("../form/images/checkboxAndRadioButtons_IE6.png");
/* checkbox sprite image */
}
.claro .dijitCheckBox,
.claro .dijitToggleButton .dijitCheckBoxIcon {
/* unchecked */
background-position: -15px;
}
.claro .dijitCheckBoxChecked,
.claro .dijitToggleButtonChecked .dijitCheckBoxIcon {
/* checked */
background-position: 0;
}
.claro .dijitCheckBoxDisabled {
/* disabled */
background-position: -75px;
}
.claro .dijitCheckBoxCheckedDisabled {
/* disabled but checked */
background-position: -60px;
}
.claro .dijitCheckBoxHover {
/* hovering over an unchecked enabled checkbox */
background-position: -45px;
}
.claro .dijitCheckBoxCheckedHover {
/* hovering over an checked enabled checkbox */
background-position: -30px;
}

View File

@ -0,0 +1,79 @@
/* CheckBox
*
* Styling CheckBox mainly includes:
*
* 1. Containers
* .dijitCheckBox|.dijitCheckBoxIcon - for border, padding, width|height and background image
*
* 2. CheckBox within ToggleButton
* .dijitToggleButton|.dijitToggleButtonChecked .* - for background image
*
* 3. Checked state
* .dijitCheckBoxChecked - for checked background-color|image
* .dijitToggleButtonChecked - for border, background-color|image, display and width|height
*
* 4. Hover state
* .dijitCheckBoxHover|.dijitCheckBoxCheckedHover - for background image
*
* 5. Disabled state
* .dijitCheckBoxDisabled|.dijitCheckBoxCheckedDisabled - for background image
*/
@import "../variables";
.claro .dijitToggleButton .dijitCheckBoxIcon {
background-image: url("../@{image-checkmark}");
}
.dj_ie6 .claro .dijitToggleButton .dijitCheckBoxIcon {
background-image: url("../@{image-checkmark-ie6}");
}
.claro .dijitCheckBox,
.claro .dijitCheckBoxIcon /* inside a toggle button */ {
background-image: url("../@{image-form-checkbox-and-radios}"); /* checkbox sprite image */
background-repeat: no-repeat;
width: 15px;
height: 16px;
margin: 0 2px 0 0;
padding: 0;
}
.dj_ie6 .claro .dijitCheckBox,
.dj_ie6 .claro .dijitCheckBoxIcon /* inside a toggle button */ {
background-image: url("../@{image-form-checkbox-and-radios-ie6}"); /* checkbox sprite image */
}
.claro .dijitCheckBox,
.claro .dijitToggleButton .dijitCheckBoxIcon {
/* unchecked */
background-position: -15px;
}
.claro .dijitCheckBoxChecked,
.claro .dijitToggleButtonChecked .dijitCheckBoxIcon {
/* checked */
background-position: -0;
}
.claro .dijitCheckBoxDisabled {
/* disabled */
background-position: -75px;
}
.claro .dijitCheckBoxCheckedDisabled {
/* disabled but checked */
background-position: -60px;
}
.claro .dijitCheckBoxHover {
/* hovering over an unchecked enabled checkbox */
background-position: -45px;
}
.claro .dijitCheckBoxCheckedHover {
/* hovering over an checked enabled checkbox */
background-position: -30px;
}

View File

@ -0,0 +1,220 @@
/* claro/form/Common.css */
/*========================= common css =========================*/
/* 'dijitTextBox' refers to 'dijit(TextBox|DateTextBox|CurrencyTextBox|...)' */
.claro .dijitTextBox,
.claro .dijitInputInner {
color: #000;
}
.claro .dijitValidationTextBoxError .dijitValidationContainer {
background-color: #d46464;
background-image: url("../form/images/error.png");
background-position: top center;
border: solid #d46464 0;
width: 9px;
}
.claro .dijitTextBoxError .dijitValidationContainer {
border-left-width: 1px;
}
.claro .dijitValidationTextBoxError .dijitValidationIcon {
width: 0;
background-color: transparent !important;
/* so the INPUT doesn't obscure the border in rtl+a11y */
}
/* Padding for the input area of TextBox based widgets, and corresponding padding for the
* down arrow button and the placeholder. placeholder is explicitly listed because
* dijitPlaceHolder is absolutely positioned, so padding set on dijitInputField
* won't affect it
*/
.claro .dijitTextArea,
.claro .dijitInputField .dijitPlaceHolder {
padding: 2px;
}
.claro .dijitSelect .dijitInputField,
.claro .dijitTextBox .dijitInputField {
padding: 1px 2px;
}
.dj_gecko .claro .dijitTextBox .dijitInputInner,
.dj_webkit .claro .dijitTextBox .dijitInputInner {
padding: 1px;
}
.claro .dijitSelect,
.claro .dijitSelect .dijitButtonContents,
.claro .dijitTextBox,
.claro .dijitTextBox .dijitButtonNode {
/* color for (outer) border on *TextBox widgets, and border between input and buttons on ComboBox and Spinner */
border-color: #b5bcc7;
-webkit-transition-property: background-color, border;
-moz-transition-property: background-color, border;
transition-property: background-color, border;
-webkit-transition-duration: 0.35s;
-moz-transition-duration: 0.35s;
transition-duration: 0.35s;
}
.claro .dijitSelect,
.claro .dijitTextBox {
background-color: #fff;
}
/* hover */
.claro .dijitSelectHover,
.claro .dijitSelectHover .dijitButtonContents,
.claro .dijitTextBoxHover,
.claro .dijitTextBoxHover .dijitButtonNode {
border-color: #759dc0;
-webkit-transition-duration: 0.25s;
-moz-transition-duration: 0.25s;
transition-duration: 0.25s;
}
.claro .dijitTextBoxHover {
background-color: #e5f2fe;
background-image: -moz-linear-gradient(rgba(127, 127, 127, 0.2) 0%, rgba(127, 127, 127, 0) 2px);
background-image: -webkit-linear-gradient(rgba(127, 127, 127, 0.2) 0%, rgba(127, 127, 127, 0) 2px);
background-image: -o-linear-gradient(rgba(127, 127, 127, 0.2) 0%, rgba(127, 127, 127, 0) 2px);
background-image: -ms-linear-gradient(rgba(127, 127, 127, 0.2) 0%, rgba(127, 127, 127, 0) 2px);
}
/* error state */
.claro .dijitSelectError,
.claro .dijitSelectError .dijitButtonContents,
.claro .dijitTextBoxError,
.claro .dijitTextBoxError .dijitButtonNode {
border-color: #d46464;
}
/* focused state */
.claro .dijitSelectFocused,
.claro .dijitSelectFocused .dijitButtonContents,
.claro .dijitTextBoxFocused,
.claro .dijitTextBoxFocused .dijitButtonNode {
border-color: #759dc0;
-webkit-transition-duration: 0.1s;
-moz-transition-duration: 0.1s;
transition-duration: 0.1s;
}
.claro .dijitTextBoxFocused {
background-color: #fff;
background-image: -moz-linear-gradient(rgba(127, 127, 127, 0.2) 0%, rgba(127, 127, 127, 0) 2px);
background-image: -webkit-linear-gradient(rgba(127, 127, 127, 0.2) 0%, rgba(127, 127, 127, 0) 2px);
background-image: -o-linear-gradient(rgba(127, 127, 127, 0.2) 0%, rgba(127, 127, 127, 0) 2px);
background-image: -ms-linear-gradient(rgba(127, 127, 127, 0.2) 0%, rgba(127, 127, 127, 0) 2px);
}
.claro .dijitTextBoxFocused .dijitInputContainer {
background: #fff;
}
.claro .dijitSelectErrorFocused,
.claro .dijitSelectErrorFocused .dijitButtonContents,
.claro .dijitTextBoxErrorFocused,
.claro .dijitTextBoxErrorFocused .dijitButtonNode {
border-color: #ce5050;
}
/* disabled state */
.claro .dijitSelectDisabled,
.claro .dijitSelectDisabled .dijitButtonContents,
.claro .dijitTextBoxDisabled,
.claro .dijitTextBoxDisabled .dijitButtonNode {
border-color: #d3d3d3;
}
.claro .dijitSelectDisabled,
.claro .dijitTextBoxDisabled,
.claro .dijitTextBoxDisabled .dijitInputContainer {
background-color: #efefef;
background-image: none;
}
.claro .dijitSelectDisabled,
.claro .dijitTextBoxDisabled,
.claro .dijitTextBoxDisabled .dijitInputInner {
color: #818181;
}
.dj_webkit .claro .dijitDisabled input {
/* because WebKit lightens disabled input/textarea no matter what color you specify */
color: #757575;
}
.dj_webkit .claro textarea.dijitTextAreaDisabled {
/* because WebKit lightens disabled input/textarea no matter what color you specify */
color: #1b1b1b;
}
/*========================= for special widgets =========================*/
/* Input boxes with an arrow (for a drop down) */
.claro .dijitSelect .dijitArrowButtonInner,
.claro .dijitComboBox .dijitArrowButtonInner {
background-image: url("../form/images/commonFormArrows.png");
background-position: -35px 53%;
background-repeat: no-repeat;
margin: 0;
width: 16px;
}
.claro .dijitComboBox .dijitArrowButtonInner {
border: 1px solid #fff;
}
.claro .dijitToolbar .dijitComboBox .dijitArrowButtonInner {
border: none;
}
.claro .dijitToolbar .dijitComboBox .dijitArrowButtonInner {
border: none;
}
/* Add 1px vertical padding to the <input> where user types and the validation icon,
to match the 1px border on arrow button */
.claro .dijitSelectLabel,
.claro .dijitTextBox .dijitInputInner,
.claro .dijitValidationTextBox .dijitValidationContainer {
padding: 1px 0;
}
.claro .dijitComboBox .dijitButtonNode {
background-color: #efefef;
background-image: url("../images/standardGradient.png");
background-repeat: repeat-x;
background-image: -moz-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
background-image: -o-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
background-image: -ms-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
_background-image: none;
}
/* Arrow "hover" effect:
* The arrow button should change color whenever the mouse is in a position such that clicking it
* will toggle the drop down. That's either (1) anywhere over the ComboBox or (2) over the arrow
* button, depending on the openOnClick setting for the widget.
*/
.claro .dijitComboBoxOpenOnClickHover .dijitButtonNode,
.claro .dijitComboBox .dijitDownArrowButtonHover {
background-color: #abd6ff;
}
.claro .dijitComboBoxOpenOnClickHover .dijitArrowButtonInner,
.claro .dijitComboBox .dijitDownArrowButtonHover .dijitArrowButtonInner {
background-position: -70px 53%;
}
/* Arrow Button change when drop down is open */
.claro .dijitComboBox .dijitHasDropDownOpen {
background-color: #7dbdfa;
background-image: url("../images/activeGradient.png");
background-repeat: repeat-x;
background-image: -moz-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%);
background-image: -webkit-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%);
background-image: -o-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%);
background-image: -ms-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%);
_background-image: none;
padding: 1px;
}
.dj_iequirks .claro .dijitComboBox .dijitHasDropDownOpen {
padding: 1px 0;
}
.claro .dijitComboBox .dijitHasDropDownOpen .dijitArrowButtonInner {
background-position: -70px 53%;
border: 0 none;
}
/* disabled state */
.claro div.dijitComboBoxDisabled .dijitArrowButtonInner {
/* specific selector set to override background-position setting from Button.js
* (.claro .dijitComboBoxDisabled .dijitArrowButtonInner) */
background-position: 0 50%;
background-color: #efefef;
}
/*========================= hacks for browsers =========================*/
/* it seems the input[type="hidden"] has a height (16px) too... this may cause the widget's height calculate error */
.dj_ff3 .claro .dijitInputField input[type="hidden"] {
display: none;
height: 0;
width: 0;
}
.dj_borderbox .claro .dijitComboBox .dijitHasDropDownOpen .dijitArrowButtonInner {
width: 18px;
}
.dj_borderbox .claro .dijitComboBoxFocused .dijitHasDropDownOpen .dijitArrowButtonInner {
width: 16px;
}

View File

@ -0,0 +1,241 @@
/* claro/form/Common.css */
/*========================= common css =========================*/
@import "../variables";
/* 'dijitTextBox' refers to 'dijit(TextBox|DateTextBox|CurrencyTextBox|...)' */
.claro .dijitTextBox,
.claro .dijitInputInner {
// .dijitInputInner selector needed for ValidationTextBox on IE6 because <input> doesn't inherit
// the color setting from the ancestor div.dijitTextBox
color: @text-color;
}
.claro .dijitValidationTextBoxError .dijitValidationContainer {
background-color: @erroricon-background-color;
background-image: url("../@{image-form-error}");
background-position: top center;
border: solid @erroricon-background-color 0;
width: 9px;
}
.claro .dijitTextBoxError .dijitValidationContainer {
border-left-width: 1px;
}
.claro .dijitValidationTextBoxError .dijitValidationIcon {
width: 0;
background-color: transparent !important; /* so the INPUT doesn't obscure the border in rtl+a11y */
}
/* Padding for the input area of TextBox based widgets, and corresponding padding for the
* down arrow button and the placeholder. placeholder is explicitly listed because
* dijitPlaceHolder is absolutely positioned, so padding set on dijitInputField
* won't affect it
*/
.claro .dijitTextArea,
.claro .dijitInputField .dijitPlaceHolder {
padding: @textbox-padding;
}
.claro .dijitSelect .dijitInputField,
.claro .dijitTextBox .dijitInputField {
// Subtract 1px from top/bottom because we add 1px to other nodes, see rules below.
// Although we are theoretically only adding 1px to top/bottom browsers seem to pad inputs by 1px on left/right,
// although that varies by so compensate for that too.
padding: @textbox-padding - 1px @textbox-padding;
}
.dj_gecko .claro .dijitTextBox .dijitInputInner,
.dj_webkit .claro .dijitTextBox .dijitInputInner {
// Although we are theoretically only adding 1px to top/bottom, some browsers seem to pad inputs by 1px on left/right,
// so compensate for that too.
padding: @textbox-padding - 1px;
}
.claro .dijitSelect,
.claro .dijitSelect .dijitButtonContents,
.claro .dijitTextBox,
.claro .dijitTextBox .dijitButtonNode {
/* color for (outer) border on *TextBox widgets, and border between input and buttons on ComboBox and Spinner */
border-color: @border-color;
.transition-property(background-color, border);
.transition-duration(.35s);
}
.claro .dijitSelect,
.claro .dijitTextBox {
background-color: @textbox-background-color;
}
/* hover */
.claro .dijitSelectHover,
.claro .dijitSelectHover .dijitButtonContents,
.claro .dijitTextBoxHover,
.claro .dijitTextBoxHover .dijitButtonNode {
border-color: @hovered-border-color;
.transition-duration(.25s);
}
.claro .dijitTextBoxHover {
background-color: @textbox-hovered-background-color;
.textbox-background-image;
}
/* error state */
.claro .dijitSelectError,
.claro .dijitSelectError .dijitButtonContents,
.claro .dijitTextBoxError,
.claro .dijitTextBoxError .dijitButtonNode {
border-color: @error-border-color;
}
/* focused state */
.claro .dijitSelectFocused,
.claro .dijitSelectFocused .dijitButtonContents,
.claro .dijitTextBoxFocused,
.claro .dijitTextBoxFocused .dijitButtonNode {
border-color:@focused-border-color;
.transition-duration(.1s);
}
.claro .dijitTextBoxFocused {
background-color: @textbox-focused-background-color;
.textbox-background-image;
}
.claro .dijitTextBoxFocused .dijitInputContainer {
background: @textbox-focused-background-color;
}
.claro .dijitSelectErrorFocused,
.claro .dijitSelectErrorFocused .dijitButtonContents,
.claro .dijitTextBoxErrorFocused,
.claro .dijitTextBoxErrorFocused .dijitButtonNode {
border-color: @error-focused-border-color;
}
/* disabled state */
.claro .dijitSelectDisabled,
.claro .dijitSelectDisabled .dijitButtonContents,
.claro .dijitTextBoxDisabled,
.claro .dijitTextBoxDisabled .dijitButtonNode {
border-color: @disabled-border-color;
}
.claro .dijitSelectDisabled,
.claro .dijitTextBoxDisabled,
.claro .dijitTextBoxDisabled .dijitInputContainer {
background-color: @textbox-disabled-background-color;
background-image: none;
}
.claro .dijitSelectDisabled,
.claro .dijitTextBoxDisabled,
.claro .dijitTextBoxDisabled .dijitInputInner {
color: @disabled-text-color;
}
.dj_webkit .claro .dijitDisabled input {
/* because WebKit lightens disabled input/textarea no matter what color you specify */
color: darken(@disabled-text-color, 5%)
}
.dj_webkit .claro textarea.dijitTextAreaDisabled {
/* because WebKit lightens disabled input/textarea no matter what color you specify */
color: darken(@disabled-text-color, 40%)
}
/*========================= for special widgets =========================*/
/* Input boxes with an arrow (for a drop down) */
.claro .dijitSelect .dijitArrowButtonInner,
.claro .dijitComboBox .dijitArrowButtonInner {
background-image: url("../@{image-form-common-arrows}");
background-position:-35px 53%;
background-repeat: no-repeat;
margin: 0;
width:16px;
}
.claro .dijitComboBox .dijitArrowButtonInner {
border: 1px solid @arrowbutton-inner-border-color; // white gutter around the arrow button
}
.claro .dijitToolbar .dijitComboBox .dijitArrowButtonInner {
border: none;
}
.claro .dijitToolbar .dijitComboBox .dijitArrowButtonInner {
border: none;
}
/* Add 1px vertical padding to the <input> where user types and the validation icon,
to match the 1px border on arrow button */
.claro .dijitSelectLabel,
.claro .dijitTextBox .dijitInputInner,
.claro .dijitValidationTextBox .dijitValidationContainer {
padding: 1px 0;
}
.claro .dijitComboBox .dijitButtonNode {
background-color: @arrowbutton-background-color;
.standard-gradient("../");
}
/* Arrow "hover" effect:
* The arrow button should change color whenever the mouse is in a position such that clicking it
* will toggle the drop down. That's either (1) anywhere over the ComboBox or (2) over the arrow
* button, depending on the openOnClick setting for the widget.
*/
.claro .dijitComboBoxOpenOnClickHover .dijitButtonNode,
.claro .dijitComboBox .dijitDownArrowButtonHover {
background-color:@arrowbutton-hovered-background-color;
}
.claro .dijitComboBoxOpenOnClickHover .dijitArrowButtonInner,
.claro .dijitComboBox .dijitDownArrowButtonHover .dijitArrowButtonInner {
background-position:-70px 53%;
}
/* Arrow Button change when drop down is open */
.claro .dijitComboBox .dijitHasDropDownOpen { // .dijitHasDropDown is on dijitArrowButton node
background-color: @pressed-background-color;
.active-gradient("../");
padding: 1px; // Since no border on arrow button (see rule below)
}
.dj_iequirks .claro .dijitComboBox .dijitHasDropDownOpen {
padding: 1px 0;
}
.claro .dijitComboBox .dijitHasDropDownOpen .dijitArrowButtonInner {
background-position:-70px 53%;
border: 0 none;
}
/* disabled state */
.claro div.dijitComboBoxDisabled .dijitArrowButtonInner {
/* specific selector set to override background-position setting from Button.js
* (.claro .dijitComboBoxDisabled .dijitArrowButtonInner) */
background-position:0 50%;
background-color:@disabled-background-color;
}
/*========================= hacks for browsers =========================*/
/* it seems the input[type="hidden"] has a height (16px) too... this may cause the widget's height calculate error */
.dj_ff3 .claro .dijitInputField input[type="hidden"] {
display: none;
height: 0;
width: 0;
}
.dj_borderbox .claro .dijitComboBox .dijitHasDropDownOpen .dijitArrowButtonInner {
width:18px; // quirks mode means border-box sizing, so 18px with the border (same as 16px without border)
}
.dj_borderbox .claro .dijitComboBoxFocused .dijitHasDropDownOpen .dijitArrowButtonInner {
width:16px; // when no border, then back to 16px just like content-box sizing
}

View File

@ -0,0 +1,5 @@
/* claro/form/Common_rtl.css */
.claro .dijitTextBoxRtlError .dijitValidationContainer {
border-left-width: 0 !important;
border-right-width: 1px !important;
}

View File

@ -0,0 +1,8 @@
/* claro/form/Common_rtl.css */
@import "../variables";
.claro .dijitTextBoxRtlError .dijitValidationContainer {
border-left-width: 0 !important;
border-right-width: 1px !important;
}

View File

@ -0,0 +1,148 @@
/* NumberSpinner - namespace "dijitSpinner"
*
* Styling NumberSpinner mainly includes:
*
* 1. Arrows
* Outer containers: .dijitSpinnerButtonContainer|.dijitSpinnerButtonInner - for border, padding and position
* Arrows: .dijitArrowButton|.dijitUpArrowButton.|dijitDownArrowButton
* Inner container: .dijitArrowButtonInner - for border, padding, width|height and background image
*
* 2. Hover state
* .dijitUpArrowButtonHover|.dijitDownArrowButtonHover .* - for background color|image
*
* 3. Active state
* .dijitUpArrowButtonActive|.dijitDownArrowButtonActive .* - for border, padding, margin and background color|image
*
* 4. Focused state
* .dijitSpinnerFocused .* - for background color|image
*
* 5. Disabled state
* .dijitSpinnerDisabled .* - for background color|image
*/
.claro .dijitSpinnerButtonContainer {
overflow: hidden;
position: relative;
width: auto;
padding: 0 2px;
}
.claro .dijitSpinnerButtonContainer .dijitSpinnerButtonInner {
border-width: 1px 0;
/* reserve space to match the claro combobox button border with border and not padding to make IE happier */
border-style: solid none;
}
/* button */
.claro .dijitSpinner .dijitArrowButton {
width: auto;
background-color: #efefef;
background-image: url("../images/standardGradient.png");
background-repeat: repeat-x;
background-image: -moz-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
background-image: -o-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
background-image: -ms-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
_background-image: none;
overflow: hidden;
}
.dj_iequirks .claro .dijitSpinner .dijitArrowButton {
overflow: visible;
/* 0 height w/o this */
}
.claro .dijitSpinner .dijitSpinnerButtonInner {
width: 15px;
}
/* up & down button icons */
.claro .dijitSpinner .dijitArrowButtonInner {
border: solid 1px #fff;
border-bottom-width: 0;
/* 2 top borders = 1 top+bottom border in ComboBox */
background-image: url("../form/images/commonFormArrows.png");
background-repeat: no-repeat;
height: 100%;
width: 15px;
padding-left: 1px;
padding-right: 1px;
/* for up arrow */
background-position: -139px center;
/* override button.css (TODO: move to Common.css since ComboBox needs this too) */
display: block;
margin: -1px 0 -1px 0;
/* compensate for inner border */
}
.dj_iequirks .claro .dijitSpinner .dijitArrowButtonInner,
.dj_ie6 .claro .dijitSpinner .dijitArrowButtonInner,
.dj_ie7 .claro .dijitSpinner .dijitArrowButtonInner,
.dj_ie8 .claro .dijitSpinner .dijitArrowButtonInner {
margin-top: 0;
/* since its bottom aligned */
}
.dj_iequirks .claro .dijitSpinner .dijitArrowButtonInner {
width: 19px;
}
.claro .dijitSpinner .dijitDownArrowButton .dijitArrowButtonInner {
background-position: -34px;
}
.claro .dijitSpinner .dijitArrowButtonInner .dijitInputField {
padding: 0;
}
/** hover & focused status **/
.claro .dijitUpArrowButtonActive,
.claro .dijitDownArrowButtonActive {
background-color: #abd6ff;
}
.claro .dijitSpinner .dijitUpArrowButtonHover,
.claro .dijitSpinner .dijitDownArrowButtonHover,
.claro .dijitSpinnerFocused .dijitArrowButton {
background-color: #abd6ff;
}
.claro .dijitSpinner .dijitUpArrowButtonHover .dijitArrowButtonInner {
background-position: -174px;
}
.claro .dijitSpinner .dijitDownArrowButtonHover .dijitArrowButtonInner {
background-position: -69px;
}
.claro .dijitSpinnerFocused {
background-color: #fff;
background-image: none;
}
/* mouse down status */
.claro .dijitSpinner .dijitDownArrowButtonActive,
.claro .dijitSpinner .dijitUpArrowButtonActive {
background-color: #7dbefa;
background-image: url("../images/activeGradient.png");
background-repeat: repeat-x;
background-image: -moz-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%);
background-image: -webkit-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%);
background-image: -o-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%);
background-image: -ms-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%);
_background-image: none;
}
.claro .dijitSpinner .dijitUpArrowButtonActive .dijitArrowButtonInner,
.claro .dijitSpinner .dijitDownArrowButtonActive .dijitArrowButtonInner {
/* hide inner border while button is depressed */
border: 0;
padding: 1px;
margin-right: 2px;
margin-bottom: 1px;
}
.claro .dijitSpinner .dijitUpArrowButtonActive .dijitArrowButtonInner {
background-position: -173px;
}
.claro .dijitSpinner .dijitDownArrowButtonActive .dijitArrowButtonInner {
background-position: -68px;
}
/* disabled */
.claro .dijitSpinnerDisabled .dijitArrowButtonInner {
background-color: #efefef;
}
.claro .dijitSpinnerDisabled .dijitUpArrowButton .dijitArrowButtonInner {
background-position: -104px;
}
.claro .dijitSpinnerDisabled .dijitDownArrowButton .dijitArrowButtonInner {
background-position: 1px;
}
/** hacks for browsers **/
/* for IE 7, when div is enlarged,
* should be no empty space between dijitInputLayoutContainer and dijitSpinner*/
.dj_ie7 .claro .dijitSpinner {
overflow: visible;
}

View File

@ -0,0 +1,150 @@
/* NumberSpinner - namespace "dijitSpinner"
*
* Styling NumberSpinner mainly includes:
*
* 1. Arrows
* Outer containers: .dijitSpinnerButtonContainer|.dijitSpinnerButtonInner - for border, padding and position
* Arrows: .dijitArrowButton|.dijitUpArrowButton.|dijitDownArrowButton
* Inner container: .dijitArrowButtonInner - for border, padding, width|height and background image
*
* 2. Hover state
* .dijitUpArrowButtonHover|.dijitDownArrowButtonHover .* - for background color|image
*
* 3. Active state
* .dijitUpArrowButtonActive|.dijitDownArrowButtonActive .* - for border, padding, margin and background color|image
*
* 4. Focused state
* .dijitSpinnerFocused .* - for background color|image
*
* 5. Disabled state
* .dijitSpinnerDisabled .* - for background color|image
*/
@import "../variables";
.claro .dijitSpinnerButtonContainer {
overflow: hidden;
position: relative;
width: auto;
padding: 0 2px;
}
.claro .dijitSpinnerButtonContainer .dijitSpinnerButtonInner {
border-width: 1px 0; /* reserve space to match the claro combobox button border with border and not padding to make IE happier */
border-style: solid none;
}
/* button */
.claro .dijitSpinner .dijitArrowButton {
width:auto;
background-color: @arrowbutton-background-color;
.standard-gradient("../");
overflow: hidden;
}
.dj_iequirks .claro .dijitSpinner .dijitArrowButton {
overflow: visible; /* 0 height w/o this */
}
.claro .dijitSpinner .dijitSpinnerButtonInner {
width: 15px;
}
/* up & down button icons */
.claro .dijitSpinner .dijitArrowButtonInner {
border:solid 1px @arrowbutton-inner-border-color;
border-bottom-width: 0; /* 2 top borders = 1 top+bottom border in ComboBox */
background-image: url("../@{image-form-common-arrows}");
background-repeat: no-repeat;
height: 100%;
width:15px;
padding-left: 1px;
padding-right: 1px;
/* for up arrow */
background-position:-139px center;
/* override button.css (TODO: move to Common.css since ComboBox needs this too) */
display: block;
margin: -1px 0 -1px 0; /* compensate for inner border */
}
.dj_iequirks .claro .dijitSpinner .dijitArrowButtonInner,
.dj_ie6 .claro .dijitSpinner .dijitArrowButtonInner,
.dj_ie7 .claro .dijitSpinner .dijitArrowButtonInner,
.dj_ie8 .claro .dijitSpinner .dijitArrowButtonInner {
margin-top: 0; /* since its bottom aligned */
}
.dj_iequirks .claro .dijitSpinner .dijitArrowButtonInner {
width: 19px;
}
.claro .dijitSpinner .dijitDownArrowButton .dijitArrowButtonInner {
background-position:-34px;
}
.claro .dijitSpinner .dijitArrowButtonInner .dijitInputField {
padding: 0;
}
/** hover & focused status **/
.claro .dijitUpArrowButtonActive,
.claro .dijitDownArrowButtonActive {
background-color:@arrowbutton-pressed-background-color;
}
.claro .dijitSpinner .dijitUpArrowButtonHover,
.claro .dijitSpinner .dijitDownArrowButtonHover,
.claro .dijitSpinnerFocused .dijitArrowButton {
background-color: @arrowbutton-hovered-background-color;
}
.claro .dijitSpinner .dijitUpArrowButtonHover .dijitArrowButtonInner {
background-position:-174px;
}
.claro .dijitSpinner .dijitDownArrowButtonHover .dijitArrowButtonInner {
background-position:-69px;
}
.claro .dijitSpinnerFocused {
background-color: @textbox-focused-background-color;
background-image: none;
}
/* mouse down status */
.claro .dijitSpinner .dijitDownArrowButtonActive,
.claro .dijitSpinner .dijitUpArrowButtonActive {
background-color: #7dbefa; // TODO. Mailed Jason about inconsistent ComboBox/Spinner behavior.
.active-gradient("../");
}
.claro .dijitSpinner .dijitUpArrowButtonActive .dijitArrowButtonInner,
.claro .dijitSpinner .dijitDownArrowButtonActive .dijitArrowButtonInner {
/* hide inner border while button is depressed */
border: 0;
padding: 1px;
margin-right:2px;
margin-bottom:1px;
}
.claro .dijitSpinner .dijitUpArrowButtonActive .dijitArrowButtonInner {
background-position:-173px;
}
.claro .dijitSpinner .dijitDownArrowButtonActive .dijitArrowButtonInner {
background-position:-68px;
}
/* disabled */
.claro .dijitSpinnerDisabled .dijitArrowButtonInner {
background-color: @disabled-background-color;
}
.claro .dijitSpinnerDisabled .dijitUpArrowButton .dijitArrowButtonInner {
background-position:-104px;
}
.claro .dijitSpinnerDisabled .dijitDownArrowButton .dijitArrowButtonInner {
background-position:1px;
}
/** hacks for browsers **/
/* for IE 7, when div is enlarged,
* should be no empty space between dijitInputLayoutContainer and dijitSpinner*/
.dj_ie7 .claro .dijitSpinner {
overflow:visible;
}

View File

@ -0,0 +1,74 @@
/* RadioButton
*
* Styling RadioButton mainly includes:
*
* 1. Containers
* .dijitRadio|.dijitRadioIcon - for border, padding, width|height and background image
*
* 2. RadioButton within ToggleButton
* .dijitToggleButton|.dijitToggleButtonChecked .* - for background image
*
* 3. Checked state
* .dijitRadioChecked - for checked background-color|image
* .dijitToggleButtonChecked - for border, background-color|image, display and width|height
*
* 4. Hover state
* .dijitRadioHover|.dijitRadioCheckedHover - for background image
*
* 5. Disabled state
* .dijitRadioDisabled|.dijitRadioCheckedDisabled - for background image
*/
.claro .dijitToggleButton .dijitRadio,
.claro .dijitToggleButton .dijitRadioIcon {
background-image: url("../form/images/checkboxRadioButtonStates.png");
}
.dj_ie6 .claro .dijitToggleButton .dijitRadio,
.dj_ie6 .claro .dijitToggleButton .dijitRadioIcon {
background-image: url("../form/images/checkboxAndRadioButtons_IE6.png");
}
.claro .dijitRadio,
.claro .dijitRadioIcon {
/* inside a toggle button */
background-image: url("../form/images/checkboxRadioButtonStates.png");
/* checkbox sprite image */
background-repeat: no-repeat;
width: 15px;
height: 15px;
margin: 0 2px 0 0;
padding: 0;
}
.dj_ie6 .claro .dijitRadio,
.dj_ie6 .claro .dijitRadioIcon {
/* inside a toggle button */
background-image: url("../form/images/checkboxAndRadioButtons_IE6.png");
/* checkbox sprite image */
}
.claro .dijitRadio {
/* unselected */
background-position: -105px;
}
.claro .dijitToggleButton .dijitRadioIcon {
/* unselected */
background-position: -107px;
}
.claro .dijitRadioDisabled {
/* unselected and disabled */
background-position: -165px;
}
.claro .dijitRadioHover {
/* hovering over an unselected enabled radio button */
background-position: -135px;
}
.claro .dijitRadioChecked {
background-position: -90px;
}
.claro .dijitToggleButtonChecked .dijitRadioIcon {
background-position: -92px;
}
.claro .dijitRadioCheckedHover {
background-position: -120px;
}
.claro .dijitRadioCheckedDisabled {
/* selected but disabled */
background-position: -150px;
}

View File

@ -0,0 +1,84 @@
/* RadioButton
*
* Styling RadioButton mainly includes:
*
* 1. Containers
* .dijitRadio|.dijitRadioIcon - for border, padding, width|height and background image
*
* 2. RadioButton within ToggleButton
* .dijitToggleButton|.dijitToggleButtonChecked .* - for background image
*
* 3. Checked state
* .dijitRadioChecked - for checked background-color|image
* .dijitToggleButtonChecked - for border, background-color|image, display and width|height
*
* 4. Hover state
* .dijitRadioHover|.dijitRadioCheckedHover - for background image
*
* 5. Disabled state
* .dijitRadioDisabled|.dijitRadioCheckedDisabled - for background image
*/
@import "../variables";
.claro .dijitToggleButton .dijitRadio,
.claro .dijitToggleButton .dijitRadioIcon {
background-image: url("../@{image-form-checkbox-and-radios}");
}
.dj_ie6 .claro .dijitToggleButton .dijitRadio,
.dj_ie6 .claro .dijitToggleButton .dijitRadioIcon {
background-image: url("../@{image-form-checkbox-and-radios-ie6}");
}
.claro .dijitRadio,
.claro .dijitRadioIcon { /* inside a toggle button */
background-image: url("../@{image-form-checkbox-and-radios}"); /* checkbox sprite image */
background-repeat: no-repeat;
width: 15px;
height: 15px;
margin: 0 2px 0 0;
padding: 0;
}
.dj_ie6 .claro .dijitRadio,
.dj_ie6 .claro .dijitRadioIcon { /* inside a toggle button */
background-image: url("../@{image-form-checkbox-and-radios-ie6}"); /* checkbox sprite image */
}
.claro .dijitRadio{
/* unselected */
background-position: -105px;
}
.claro .dijitToggleButton .dijitRadioIcon {
/* unselected */
background-position: -107px;
}
.claro .dijitRadioDisabled {
/* unselected and disabled */
background-position: -165px;
}
.claro .dijitRadioHover {
/* hovering over an unselected enabled radio button */
background-position: -135px;
}
.claro .dijitRadioChecked{
background-position: -90px;
}
.claro .dijitToggleButtonChecked .dijitRadioIcon {
background-position: -92px;
}
.claro .dijitRadioCheckedHover{
background-position: -120px;
}
.claro .dijitRadioCheckedDisabled {
/* selected but disabled */
background-position: -150px;
}

View File

@ -0,0 +1,96 @@
/* Select
*
* Styling Select mainly includes:
*
* 1. Containers
* .dijitSelect - for border, background-color
* .dijitButtonContents - for border
*
* 2. Arrow
* .dijitArrowButton - for border, padding and background-color|image
* .dijitArrowButtonInner - for border, background-color|image, display and width|height
*
* 3. Menu
* .dijitSelectMenu .* - for border, padding
*
* 4. Various states
* .dijitSelectHover|.dijitSelectFocused|.dijitSelectDisabled .* - for border, padding and background-color|image
*/
/* normal status */
.claro .dijitSelect .dijitArrowButtonContainer {
border: 1px solid #fff;
}
.claro .dijitSelect .dijitArrowButton {
padding: 0;
background-color: #efefef;
background-image: url("../images/standardGradient.png");
background-repeat: repeat-x;
background-image: -moz-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
background-image: -o-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
background-image: -ms-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
_background-image: none;
}
.claro .dijitSelect .dijitArrowButton .dijitArrowButtonInner {
height: 16px;
}
/* hover status */
.claro .dijitSelectHover {
background-color: #e5f2fe;
background-image: -moz-linear-gradient(rgba(127, 127, 127, 0.2) 0%, rgba(127, 127, 127, 0) 2px);
background-image: -webkit-linear-gradient(rgba(127, 127, 127, 0.2) 0%, rgba(127, 127, 127, 0) 2px);
background-image: -o-linear-gradient(rgba(127, 127, 127, 0.2) 0%, rgba(127, 127, 127, 0) 2px);
background-image: -ms-linear-gradient(rgba(127, 127, 127, 0.2) 0%, rgba(127, 127, 127, 0) 2px);
background-repeat: repeat-x;
}
.claro .dijitSelectFocused,
.claro .dijitSelectHover {
border-color: #759dc0;
}
.claro .dijitSelectHover .dijitArrowButton {
background-color: #abd6ff;
}
.claro .dijitSelectHover .dijitArrowButton .dijitArrowButtonInner {
background-position: -70px 53%;
}
/* focused status */
.claro .dijitSelectFocused .dijitArrowButton {
background-color: #7dbefa;
background-image: url("../images/activeGradient.png");
background-repeat: repeat-x;
background-image: -moz-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%);
background-image: -webkit-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%);
background-image: -o-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%);
background-image: -ms-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%);
_background-image: none;
}
.claro .dijitSelectFocused .dijitArrowButton {
border: none;
padding: 1px;
}
.claro .dijitSelectFocused .dijitArrowButton .dijitArrowButtonInner {
background-position: -70px 53%;
}
/* disable status */
.claro .dijitSelectDisabled {
border-color: #d3d3d3;
background-color: #efefef;
background-image: none;
color: #818181;
}
.claro .dijitSelectDisabled .dijitArrowButton .dijitArrowButtonInner {
background-position: 0 53%;
}
/* Dropdown menu style for select */
.claro .dijitSelectMenu td.dijitMenuItemIconCell,
.claro .dijitSelectMenu td.dijitMenuArrowCell {
/* so that arrow and icon cells from MenuItem are not displayed */
display: none;
}
.claro .dijitSelectMenu td.dijitMenuItemLabel {
/* line up menu text with text in select box (in LTR and RTL modes) */
padding: 2px;
}
.claro .dijitSelectMenu .dijitMenuSeparatorTop {
border-bottom: 1px solid #759dc0;
}

View File

@ -0,0 +1,98 @@
/* Select
*
* Styling Select mainly includes:
*
* 1. Containers
* .dijitSelect - for border, background-color
* .dijitButtonContents - for border
*
* 2. Arrow
* .dijitArrowButton - for border, padding and background-color|image
* .dijitArrowButtonInner - for border, background-color|image, display and width|height
*
* 3. Menu
* .dijitSelectMenu .* - for border, padding
*
* 4. Various states
* .dijitSelectHover|.dijitSelectFocused|.dijitSelectDisabled .* - for border, padding and background-color|image
*/
@import "../variables";
/* normal status */
.claro .dijitSelect .dijitArrowButtonContainer {
border: 1px solid @arrowbutton-inner-border-color;
}
.claro .dijitSelect .dijitArrowButton {
padding: 0;
background-color: @arrowbutton-background-color;
.standard-gradient("../");
}
.claro .dijitSelect .dijitArrowButton .dijitArrowButtonInner {
height:16px;
}
/* hover status */
.claro .dijitSelectHover {
background-color: @textbox-hovered-background-color;
.textbox-background-image;
background-repeat: repeat-x;
}
.claro .dijitSelectFocused,
.claro .dijitSelectHover {
border-color:@hovered-border-color;
}
.claro .dijitSelectHover .dijitArrowButton {
background-color:@arrowbutton-hovered-background-color;
}
.claro .dijitSelectHover .dijitArrowButton .dijitArrowButtonInner {
background-position:-70px 53%;
}
/* focused status */
.claro .dijitSelectFocused .dijitArrowButton {
background-color:#7dbefa; // TODO. Mailed Jason about inconsistent ComboBox/Spinner behavior.
.active-gradient("../");
}
.claro .dijitSelectFocused .dijitArrowButton {
border: none;
padding: 1px;
}
.claro .dijitSelectFocused .dijitArrowButton .dijitArrowButtonInner {
background-position:-70px 53%;
}
/* disable status */
.claro .dijitSelectDisabled {
border-color: @disabled-border-color;
background-color: @disabled-background-color;
background-image: none;
color: @disabled-text-color;
}
.claro .dijitSelectDisabled .dijitArrowButton .dijitArrowButtonInner {
background-position:0 53%
}
/* Dropdown menu style for select */
.claro .dijitSelectMenu td.dijitMenuItemIconCell,
.claro .dijitSelectMenu td.dijitMenuArrowCell {
/* so that arrow and icon cells from MenuItem are not displayed */
display: none;
}
.claro .dijitSelectMenu td.dijitMenuItemLabel {
/* line up menu text with text in select box (in LTR and RTL modes) */
padding: @textbox-padding;
}
.claro .dijitSelectMenu .dijitMenuSeparatorTop {
border-bottom:1px solid @focused-border-color;
}

View File

@ -0,0 +1,345 @@
/* Slider
*
* Styling Slider mainly includes styling the Slider progress bar (dijitSliderProgressBar)
*
* Slider progress bar:
* 1. Slider progress bar (default styling):
* .dijitSliderProgressBarH - progress bar at the middle of horizontal slider
* .dijitSliderLeftBumper - bar at the left of horizontal slider
* .dijitSliderRightBumper - bar at the right of horizontal slider
* .dijitSliderProgressBarV - progress bar at the middle of vertical slider
* .dijitSliderTopBumper - bar at the top of vertical slider
* .dijitSliderBottomtBumper - bar at the bottom of vertical slider
*
* 2. hovered Slider progress bar (ie, mouse hover on progress bar)
* .dijitSliderHover .dijitSliderProgressBarH(horizontal) - hovered bar style: background, border
*
* 3. focused Slider progress bar (ie, mouse focused on progress bar)
* .dijitSliderFocused .dijitSliderProgressBarH(horizontal) - focus bar style: background, border
*
* 4. disabled/read-only Slider progress bar
* .dijitSliderDisabled .dijitSliderProgressBarH(horizontal) - bar styles when slider is disabled
*
*
* Slider Thumbs:
* 1. Slider Thumbs (default styling):
* .dijitSliderImageHandleH / .dijitSliderImageHandleV - styles for the controller on the progress bar
*
* 2. hovered Slider Thumbs (ie, mouse hover on slider thumbs)
* .dijitSliderHover .dijitSliderImageHandleH - hovered controller style
*
* 3. focused Slider progress bar (ie, mouse focused on slider thumbs)
* .dijitSliderFocused .dijitSliderImageHandleV - focused controller style
*
*
* Slider Increment/Decrement Buttons:
* 1. Slider Increment/Decrement Buttons (default styling):
* .dijitSliderDecrementIconH - decrement icon which lies at the left of horizontal slider
* .dijitSliderIncrementIconH - increment icon which lies at the right of horizontal slider
* .dijitSliderDecrementIconV - decrement icon which lies at the bottom of vertical slider
* .dijitSliderIncrementIconV - increment icon which lies at the top of vertical slider
*
* 2. hovered Slider Increment/Decrement Buttons (mouse hover on the icons)
* .dijitSliderHover .dijitSliderDecrementIconH - for background, border
*
* 3. active Slider Increment/Decrement Buttons (mouse down on the icons)
* .dijitSliderActive .dijitSliderIncrementIconV - for background, border
*
* 4. disabled/read-only Slider Increment/Decrement Buttons
* .dijitSliderDisabled .dijitSliderDecrementIconH - styles for the icons in disabled slider
* .dijitSliderReadOnly .dijitSliderIncrementIconV - styles for the icons in read-only slider
*/
.claro .dijitSliderBar {
border-style: solid;
outline: 1px;
}
.claro .dijitSliderFocused .dijitSliderBar {
border-color: #759dc0;
}
.claro .dijitSliderHover .dijitSliderBar {
border-color: #759dc0;
}
.claro .dijitSliderDisabled .dijitSliderBar {
background-image: none;
border-color: #d3d3d3;
}
.claro .dijitRuleLabelsContainer {
color: #000;
}
/* Horizontal Slider */
.claro .dijitRuleLabelsContainerH {
padding: 2px 0;
}
.claro .dijitSlider .dijitSliderProgressBarH,
.claro .dijitSlider .dijitSliderLeftBumper {
border-color: #b5bcc7;
background-color: #cfe5fa;
background-image: -moz-linear-gradient(top, #ffffff 0px, #ffffff 1px, rgba(255, 255, 255, 0) 2px);
background-image: -webkit-linear-gradient(top, #ffffff 0px, #ffffff 1px, rgba(255, 255, 255, 0) 2px);
background-image: -o-linear-gradient(top, #ffffff 0px, #ffffff 1px, rgba(255, 255, 255, 0) 2px);
background-image: -ms-linear-gradient(top, #ffffff 0px, #ffffff 1px, rgba(255, 255, 255, 0) 2px);
}
.claro .dijitSlider .dijitSliderRemainingBarH,
.claro .dijitSlider .dijitSliderRightBumper {
border-color: #b5bcc7;
background-color: #fff;
}
.claro .dijitSliderRightBumper {
border-right: solid 1px #b5bcc7;
}
.claro .dijitSliderLeftBumper {
border-left: solid 1px #b5bcc7;
}
.claro .dijitSliderHover .dijitSliderProgressBarH,
.claro .dijitSliderHover .dijitSliderLeftBumper {
background-color: #abd6ff;
border-color: #759dc0;
}
.claro .dijitSliderHover .dijitSliderRemainingBarH,
.claro .dijitSliderHover .dijitSliderRightBumper {
background-color: #fff;
border-color: #759dc0;
}
.claro .dijitSliderFocused .dijitSliderProgressBarH,
.claro .dijitSliderFocused .dijitSliderLeftBumper {
background-color: #abd6ff;
border-color: #759dc0;
-webkit-box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.2);
-moz-box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.2);
box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.2);
}
.claro .dijitSliderFocused .dijitSliderRemainingBarH,
.claro .dijitSliderFocused .dijitSliderRightBumper {
background-color: #fff;
border-color: #759dc0;
-webkit-box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.2);
-moz-box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.2);
box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.2);
}
.claro .dijitSliderDisabled .dijitSliderProgressBarH,
.claro .dijitSliderDisabled .dijitSliderLeftBumper {
background-color: #d3d3d3;
/* left side of slider, fill matches border */
background-image: none;
}
.claro .dijitSliderDisabled .dijitSliderRemainingBarH,
.claro .dijitSliderDisabled .dijitSliderRightBumper {
background-color: #efefef;
}
/* Vertical Slider */
.claro .dijitRuleLabelsContainerV {
padding: 0 2px;
}
.claro .dijitSlider .dijitSliderProgressBarV,
.claro .dijitSlider .dijitSliderBottomBumper {
border-color: #b5bcc7;
background-color: #cfe5fa;
background-image: -moz-linear-gradient(left, #ffffff 0px, rgba(255, 255, 255, 0) 1px);
background-image: -webkit-linear-gradient(left, #ffffff 0px, rgba(255, 255, 255, 0) 1px);
background-image: -o-linear-gradient(left, #ffffff 0px, rgba(255, 255, 255, 0) 1px);
background-image: -ms-linear-gradient(left, #ffffff 0px, rgba(255, 255, 255, 0) 1px);
}
.claro .dijitSlider .dijitSliderRemainingBarV,
.claro .dijitSlider .dijitSliderTopBumper {
border-color: #b5bcc7;
background-color: #fff;
}
.claro .dijitSliderBottomBumper {
border-bottom: solid 1px #b5bcc7;
}
.claro .dijitSliderTopBumper {
border-top: solid 1px #b5bcc7;
}
.claro .dijitSliderHover .dijitSliderProgressBarV,
.claro .dijitSliderHover .dijitSliderBottomBumper {
background-color: #abd6ff;
border-color: #759dc0;
}
.claro .dijitSliderHover .dijitSliderRemainingBarV,
.claro .dijitSliderHover .dijitSliderTopBumper {
background-color: #fff;
border-color: #759dc0;
}
.claro .dijitSliderFocused .dijitSliderProgressBarV,
.claro .dijitSliderFocused .dijitSliderBottomBumper {
background-color: #abd6ff;
border-color: #759dc0;
-webkit-box-shadow: inset 1px 0px 1px rgba(0, 0, 0, 0.2);
-moz-box-shadow: inset 1px 0px 1px rgba(0, 0, 0, 0.2);
box-shadow: inset 1px 0px 1px rgba(0, 0, 0, 0.2);
}
.claro .dijitSliderFocused .dijitSliderRemainingBarV,
.claro .dijitSliderFocused .dijitSliderTopBumper {
background-color: #fff;
border-color: #759dc0;
-webkit-box-shadow: inset 1px 0px 1px rgba(0, 0, 0, 0.2);
-moz-box-shadow: inset 1px 0px 1px rgba(0, 0, 0, 0.2);
box-shadow: inset 1px 0px 1px rgba(0, 0, 0, 0.2);
}
.claro .dijitSliderDisabled .dijitSliderProgressBarV,
.claro .dijitSliderDisabled .dijitSliderBottomBumper {
background-color: #d3d3d3;
/* bottom side of slider, fill matches border */
}
.claro .dijitSliderDisabled .dijitSliderRemainingBarV,
.claro .dijitSliderDisabled .dijitSliderTopBumper {
background-color: #efefef;
}
/* ------- Thumbs ------- */
.claro .dijitSliderImageHandleH {
border: 0;
width: 18px;
height: 16px;
background-image: url("../form/images/sliderThumbs.png");
background-repeat: no-repeat;
background-position: 0 0;
}
.claro .dijitSliderHover .dijitSliderImageHandleH {
background-position: -18px 0;
}
.claro .dijitSliderFocused .dijitSliderImageHandleH {
background-position: -36px 0;
}
.claro .dijitSliderProgressBarH .dijitSliderThumbHover {
background-position: -36px 0;
}
.claro .dijitSliderProgressBarH .dijitSliderThumbActive {
background-position: -36px 0;
}
.claro .dijitSliderReadOnly .dijitSliderImageHandleH,
.claro .dijitSliderDisabled .dijitSliderImageHandleH {
background-position: -54px 0;
}
.claro .dijitSliderImageHandleV {
border: 0;
width: 18px;
height: 16px;
background-image: url("../form/images/sliderThumbs.png");
background-repeat: no-repeat;
background-position: -289px 0;
}
.claro .dijitSliderHover .dijitSliderImageHandleV {
background-position: -307px 0;
}
.claro .dijitSliderFocused .dijitSliderImageHandleV {
background-position: -325px 0;
}
.claro .dijitSliderProgressBarV .dijitSliderThumbHover {
background-position: -325px 0;
}
.claro .dijitSliderProgressBarV .dijitSliderThumbActive {
background-position: -325px 0;
}
.claro .dijitSliderReadOnly .dijitSliderImageHandleV,
.claro .dijitSliderDisabled .dijitSliderImageHandleV {
background-position: -343px 0;
}
/* ---- Increment/Decrement Buttons ---- */
.claro .dijitSliderButtonContainerH {
padding: 1px 3px 1px 2px;
}
.claro .dijitSliderButtonContainerV {
padding: 3px 1px 2px 1px;
}
.claro .dijitSliderDecrementIconH,
.claro .dijitSliderIncrementIconH,
.claro .dijitSliderDecrementIconV,
.claro .dijitSliderIncrementIconV {
background-image: url("../form/images/commonFormArrows.png");
background-repeat: no-repeat;
background-color: #efefef;
-moz-border-radius: 2px;
border-radius: 2px;
border: solid 1px #b5bcc7;
font-size: 1px;
}
.claro .dijitSliderDecrementIconH,
.claro .dijitSliderIncrementIconH {
height: 12px;
width: 9px;
}
.claro .dijitSliderDecrementIconV,
.claro .dijitSliderIncrementIconV {
height: 9px;
width: 12px;
}
.claro .dijitSliderActive .dijitSliderDecrementIconH,
.claro .dijitSliderActive .dijitSliderIncrementIconH,
.claro .dijitSliderActive .dijitSliderDecrementIconV,
.claro .dijitSliderActive .dijitSliderIncrementIconV,
.claro .dijitSliderHover .dijitSliderDecrementIconH,
.claro .dijitSliderHover .dijitSliderIncrementIconH,
.claro .dijitSliderHover .dijitSliderDecrementIconV,
.claro .dijitSliderHover .dijitSliderIncrementIconV {
/* dijitSliderActive should be treated as dijitSliderHover since "clicking the slider" has no meaning */
border: solid 1px #759dc0;
background-color: #fff;
}
.claro .dijitSliderDecrementIconH {
background-position: -357px 50%;
}
.claro .dijitSliderActive .dijitSliderDecrementIconH .claro .dijitSliderHover .dijitSliderDecrementIconH {
background-position: -393px 50%;
}
.claro .dijitSliderIncrementIconH {
background-position: -251px 50%;
}
.claro .dijitSliderActive .dijitSliderIncrementIconH .claro .dijitSliderHover .dijitSliderIncrementIconH {
background-position: -283px 50%;
}
.claro .dijitSliderDecrementIconV {
background-position: -38px 50%;
}
.claro .dijitSliderActive .dijitSliderDecrementIconV .claro .dijitSliderHover .dijitSliderDecrementIconV {
background-position: -73px 50%;
}
.claro .dijitSliderIncrementIconV {
background-position: -143px 49%;
}
.claro .dijitSliderActive .dijitSliderIncrementIconV .claro .dijitSliderHover .dijitSliderIncrementIconV {
background-position: -178px 49%;
}
.claro .dijitSliderButtonContainerV .dijitSliderDecrementButtonHover,
.claro .dijitSliderButtonContainerH .dijitSliderDecrementButtonHover,
.claro .dijitSliderButtonContainerV .dijitSliderIncrementButtonHover,
.claro .dijitSliderButtonContainerH .dijitSliderIncrementButtonHover {
background-color: #cfe5fa;
}
.claro .dijitSliderButtonContainerV .dijitSliderDecrementButtonActive,
.claro .dijitSliderButtonContainerH .dijitSliderDecrementButtonActive,
.claro .dijitSliderButtonContainerV .dijitSliderIncrementButtonActive,
.claro .dijitSliderButtonContainerH .dijitSliderIncrementButtonActive {
background-color: #abd6ff;
border-color: #759dc0;
}
.claro .dijitSliderButtonInner {
visibility: hidden;
}
.claro .dijitSliderDisabled .dijitSliderBar {
border-color: #d3d3d3;
}
.claro .dijitSliderReadOnly *,
.claro .dijitSliderDisabled * {
border-color: #d3d3d3;
color: #818181;
}
.claro .dijitSliderReadOnly .dijitSliderDecrementIconH,
.claro .dijitSliderDisabled .dijitSliderDecrementIconH {
background-position: -321px 50%;
background-color: #efefef;
}
.claro .dijitSliderReadOnly .dijitSliderIncrementIconH,
.claro .dijitSliderDisabled .dijitSliderIncrementIconH {
background-position: -215px 50%;
background-color: #efefef;
}
.claro .dijitSliderReadOnly .dijitSliderDecrementIconV,
.claro .dijitSliderDisabled .dijitSliderDecrementIconV {
background-position: -3px 49%;
background-color: #efefef;
}
.claro .dijitSliderReadOnly .dijitSliderIncrementIconV,
.claro .dijitSliderDisabled .dijitSliderIncrementIconV {
background-position: -107px 49%;
background-color: #efefef;
}

View File

@ -0,0 +1,344 @@
/* Slider
*
* Styling Slider mainly includes styling the Slider progress bar (dijitSliderProgressBar)
*
* Slider progress bar:
* 1. Slider progress bar (default styling):
* .dijitSliderProgressBarH - progress bar at the middle of horizontal slider
* .dijitSliderLeftBumper - bar at the left of horizontal slider
* .dijitSliderRightBumper - bar at the right of horizontal slider
* .dijitSliderProgressBarV - progress bar at the middle of vertical slider
* .dijitSliderTopBumper - bar at the top of vertical slider
* .dijitSliderBottomtBumper - bar at the bottom of vertical slider
*
* 2. hovered Slider progress bar (ie, mouse hover on progress bar)
* .dijitSliderHover .dijitSliderProgressBarH(horizontal) - hovered bar style: background, border
*
* 3. focused Slider progress bar (ie, mouse focused on progress bar)
* .dijitSliderFocused .dijitSliderProgressBarH(horizontal) - focus bar style: background, border
*
* 4. disabled/read-only Slider progress bar
* .dijitSliderDisabled .dijitSliderProgressBarH(horizontal) - bar styles when slider is disabled
*
*
* Slider Thumbs:
* 1. Slider Thumbs (default styling):
* .dijitSliderImageHandleH / .dijitSliderImageHandleV - styles for the controller on the progress bar
*
* 2. hovered Slider Thumbs (ie, mouse hover on slider thumbs)
* .dijitSliderHover .dijitSliderImageHandleH - hovered controller style
*
* 3. focused Slider progress bar (ie, mouse focused on slider thumbs)
* .dijitSliderFocused .dijitSliderImageHandleV - focused controller style
*
*
* Slider Increment/Decrement Buttons:
* 1. Slider Increment/Decrement Buttons (default styling):
* .dijitSliderDecrementIconH - decrement icon which lies at the left of horizontal slider
* .dijitSliderIncrementIconH - increment icon which lies at the right of horizontal slider
* .dijitSliderDecrementIconV - decrement icon which lies at the bottom of vertical slider
* .dijitSliderIncrementIconV - increment icon which lies at the top of vertical slider
*
* 2. hovered Slider Increment/Decrement Buttons (mouse hover on the icons)
* .dijitSliderHover .dijitSliderDecrementIconH - for background, border
*
* 3. active Slider Increment/Decrement Buttons (mouse down on the icons)
* .dijitSliderActive .dijitSliderIncrementIconV - for background, border
*
* 4. disabled/read-only Slider Increment/Decrement Buttons
* .dijitSliderDisabled .dijitSliderDecrementIconH - styles for the icons in disabled slider
* .dijitSliderReadOnly .dijitSliderIncrementIconV - styles for the icons in read-only slider
*/
@import "../variables";
.claro .dijitSliderBar {
border-style: solid;
outline: 1px;
}
.claro .dijitSliderFocused .dijitSliderBar {
border-color: @focused-border-color;
}
.claro .dijitSliderHover .dijitSliderBar {
border-color: @hovered-border-color;
}
.claro .dijitSliderDisabled .dijitSliderBar {
background-image: none;
border-color: @disabled-border-color;
}
.claro .dijitRuleLabelsContainer {
color: @text-color;
}
/* Horizontal Slider */
.claro .dijitRuleLabelsContainerH {
padding: 2px 0;
}
.claro .dijitSlider .dijitSliderProgressBarH,
.claro .dijitSlider .dijitSliderLeftBumper{
border-color: @border-color;
background-color: @slider-fullbar-background-color;
.alpha-white-gradient (top, 1,0px, 1,1px, 0,2px);
}
.claro .dijitSlider .dijitSliderRemainingBarH,
.claro .dijitSlider .dijitSliderRightBumper{
border-color: @border-color;
background-color: @slider-remainingbar-background-color;
}
.claro .dijitSliderRightBumper {
border-right: solid 1px @border-color;
}
.claro .dijitSliderLeftBumper {
border-left: solid 1px @border-color;
}
.claro .dijitSliderHover .dijitSliderProgressBarH,
.claro .dijitSliderHover .dijitSliderLeftBumper{
background-color: @slider-hovered-fullbar-background-color;
border-color: @hovered-border-color;
}
.claro .dijitSliderHover .dijitSliderRemainingBarH,
.claro .dijitSliderHover .dijitSliderRightBumper{
background-color: @slider-hovered-remainingbar-background-color;
border-color: @hovered-border-color;
}
.claro .dijitSliderFocused .dijitSliderProgressBarH,
.claro .dijitSliderFocused .dijitSliderLeftBumper{
background-color: @slider-focused-fullbar-background-color;
border-color: @focused-border-color;
.box-shadow(inset 0px 1px 1px rgba(0, 0, 0, 0.2));
}
.claro .dijitSliderFocused .dijitSliderRemainingBarH,
.claro .dijitSliderFocused .dijitSliderRightBumper{
background-color: @slider-focused-remainingbar-background-color;
border-color: @focused-border-color;
.box-shadow(inset 0px 1px 1px rgba(0, 0, 0, 0.2));
}
.claro .dijitSliderDisabled .dijitSliderProgressBarH,
.claro .dijitSliderDisabled .dijitSliderLeftBumper{
background-color: @disabled-border-color; /* left side of slider, fill matches border */
background-image:none;
}
.claro .dijitSliderDisabled .dijitSliderRemainingBarH,
.claro .dijitSliderDisabled .dijitSliderRightBumper{
background-color: @disabled-background-color;
}
/* Vertical Slider */
.claro .dijitRuleLabelsContainerV {
padding: 0 2px;
}
.claro .dijitSlider .dijitSliderProgressBarV,
.claro .dijitSlider .dijitSliderBottomBumper{
border-color: @border-color;
background-color: @slider-fullbar-background-color;
.alpha-white-gradient (left, 1,0px, 0,1px);
}
.claro .dijitSlider .dijitSliderRemainingBarV,
.claro .dijitSlider .dijitSliderTopBumper{
border-color: @border-color;
background-color: @slider-remainingbar-background-color;
}
.claro .dijitSliderBottomBumper {
border-bottom: solid 1px @border-color;
}
.claro .dijitSliderTopBumper {
border-top: solid 1px @border-color;
}
.claro .dijitSliderHover .dijitSliderProgressBarV,
.claro .dijitSliderHover .dijitSliderBottomBumper{
background-color: @slider-hovered-fullbar-background-color;
border-color: @hovered-border-color;
}
.claro .dijitSliderHover .dijitSliderRemainingBarV,
.claro .dijitSliderHover .dijitSliderTopBumper{
background-color: @slider-hovered-remainingbar-background-color;
border-color: @hovered-border-color;
}
.claro .dijitSliderFocused .dijitSliderProgressBarV,
.claro .dijitSliderFocused .dijitSliderBottomBumper{
background-color: @slider-focused-fullbar-background-color;
border-color: @focused-border-color;
.box-shadow(inset 1px 0px 1px rgba(0, 0, 0, 0.2));
}
.claro .dijitSliderFocused .dijitSliderRemainingBarV,
.claro .dijitSliderFocused .dijitSliderTopBumper{
background-color: @slider-focused-remainingbar-background-color;
border-color: @focused-border-color;
.box-shadow(inset 1px 0px 1px rgba(0, 0, 0, 0.2));
}
.claro .dijitSliderDisabled .dijitSliderProgressBarV,
.claro .dijitSliderDisabled .dijitSliderBottomBumper{
background-color: @disabled-border-color; /* bottom side of slider, fill matches border */
}
.claro .dijitSliderDisabled .dijitSliderRemainingBarV,
.claro .dijitSliderDisabled .dijitSliderTopBumper{
background-color: @disabled-background-color;
}
/* ------- Thumbs ------- */
.claro .dijitSliderImageHandleH {
border: 0;
width: 18px;
height: 16px;
background-image: url("../@{image-form-slider-thumbs}");
background-repeat:no-repeat;
background-position:0 0;
}
.claro .dijitSliderHover .dijitSliderImageHandleH {
background-position:-18px 0;
}
.claro .dijitSliderFocused .dijitSliderImageHandleH {
background-position:-36px 0;
}
.claro .dijitSliderProgressBarH .dijitSliderThumbHover{
background-position:-36px 0;
}
.claro .dijitSliderProgressBarH .dijitSliderThumbActive{
background-position:-36px 0;
}
.claro .dijitSliderReadOnly .dijitSliderImageHandleH,
.claro .dijitSliderDisabled .dijitSliderImageHandleH {
background-position:-54px 0;
}
.claro .dijitSliderImageHandleV {
border: 0;
width: 18px;
height: 16px;
background-image: url("../@{image-form-slider-thumbs}");
background-repeat:no-repeat;
background-position:-289px 0;
}
.claro .dijitSliderHover .dijitSliderImageHandleV {
background-position:-307px 0;
}
.claro .dijitSliderFocused .dijitSliderImageHandleV {
background-position:-325px 0;
}
.claro .dijitSliderProgressBarV .dijitSliderThumbHover{
background-position:-325px 0;
}
.claro .dijitSliderProgressBarV .dijitSliderThumbActive{
background-position:-325px 0;
}
.claro .dijitSliderReadOnly .dijitSliderImageHandleV,
.claro .dijitSliderDisabled .dijitSliderImageHandleV {
background-position:-343px 0;
}
/* ---- Increment/Decrement Buttons ---- */
.claro .dijitSliderButtonContainerH{
padding: 1px 3px 1px 2px;
}
.claro .dijitSliderButtonContainerV{
padding: 3px 1px 2px 1px;
}
.claro .dijitSliderDecrementIconH,
.claro .dijitSliderIncrementIconH,
.claro .dijitSliderDecrementIconV,
.claro .dijitSliderIncrementIconV {
background-image: url("../@{image-form-common-arrows}");
background-repeat:no-repeat;
background-color: @arrowbutton-background-color;
.border-radius(2px);
border: solid 1px @border-color;
font-size: 1px;
}
.claro .dijitSliderDecrementIconH,
.claro .dijitSliderIncrementIconH {
height: 12px;
width: 9px;
}
.claro .dijitSliderDecrementIconV,
.claro .dijitSliderIncrementIconV {
height: 9px;
width: 12px;
}
.claro .dijitSliderActive .dijitSliderDecrementIconH,
.claro .dijitSliderActive .dijitSliderIncrementIconH,
.claro .dijitSliderActive .dijitSliderDecrementIconV,
.claro .dijitSliderActive .dijitSliderIncrementIconV,
.claro .dijitSliderHover .dijitSliderDecrementIconH,
.claro .dijitSliderHover .dijitSliderIncrementIconH,
.claro .dijitSliderHover .dijitSliderDecrementIconV,
.claro .dijitSliderHover .dijitSliderIncrementIconV {
/* dijitSliderActive should be treated as dijitSliderHover since "clicking the slider" has no meaning */
border: solid 1px @hovered-border-color;
background-color: @slider-hoveredButton-background-color;
}
.claro .dijitSliderDecrementIconH {
background-position:-357px 50%;
}
.claro .dijitSliderActive .dijitSliderDecrementIconH
.claro .dijitSliderHover .dijitSliderDecrementIconH {
background-position:-393px 50%;
}
.claro .dijitSliderIncrementIconH {
background-position:-251px 50%;
}
.claro .dijitSliderActive .dijitSliderIncrementIconH
.claro .dijitSliderHover .dijitSliderIncrementIconH {
background-position:-283px 50%;
}
.claro .dijitSliderDecrementIconV {
background-position:-38px 50%;
}
.claro .dijitSliderActive .dijitSliderDecrementIconV
.claro .dijitSliderHover .dijitSliderDecrementIconV {
background-position:-73px 50%;
}
.claro .dijitSliderIncrementIconV {
background-position:-143px 49%;
}
.claro .dijitSliderActive .dijitSliderIncrementIconV
.claro .dijitSliderHover .dijitSliderIncrementIconV {
background-position:-178px 49%;
}
.claro .dijitSliderButtonContainerV .dijitSliderDecrementButtonHover,
.claro .dijitSliderButtonContainerH .dijitSliderDecrementButtonHover,
.claro .dijitSliderButtonContainerV .dijitSliderIncrementButtonHover,
.claro .dijitSliderButtonContainerH .dijitSliderIncrementButtonHover {
background-color: @slider-button-hovered-background-color;
}
.claro .dijitSliderButtonContainerV .dijitSliderDecrementButtonActive,
.claro .dijitSliderButtonContainerH .dijitSliderDecrementButtonActive,
.claro .dijitSliderButtonContainerV .dijitSliderIncrementButtonActive,
.claro .dijitSliderButtonContainerH .dijitSliderIncrementButtonActive {
background-color: @slider-button-pressed-background-color;
border-color:@pressed-border-color;
}
.claro .dijitSliderButtonInner {
visibility: hidden;
}
.claro .dijitSliderDisabled .dijitSliderBar{
border-color: @disabled-border-color;
}
.claro .dijitSliderReadOnly *,.claro .dijitSliderDisabled * {
border-color: @disabled-border-color;
color: @disabled-text-color;
}
.claro .dijitSliderReadOnly .dijitSliderDecrementIconH,
.claro .dijitSliderDisabled .dijitSliderDecrementIconH {
background-position:-321px 50%;
background-color:@disabled-background-color;
}
.claro .dijitSliderReadOnly .dijitSliderIncrementIconH,
.claro .dijitSliderDisabled .dijitSliderIncrementIconH {
background-position:-215px 50%;
background-color:@disabled-background-color;
}
.claro .dijitSliderReadOnly .dijitSliderDecrementIconV,
.claro .dijitSliderDisabled .dijitSliderDecrementIconV {
background-position:-3px 49%;
background-color:@disabled-background-color;
}
.claro .dijitSliderReadOnly .dijitSliderIncrementIconV,
.claro .dijitSliderDisabled .dijitSliderIncrementIconV {
background-position:-107px 49%;
background-color:@disabled-background-color;
}

View File

@ -0,0 +1,26 @@
.claro .dijitSliderRtl .dijitSliderProgressBarH,
.claro .dijitSliderRtl .dijitSliderRemainingBarH,
.claro .dijitSliderRtl .dijitSliderLeftBumper,
.claro .dijitSliderRtl .dijitSliderRightBumper,
.claro .dijitSliderRtl .dijitSliderTopBumper {
background-position: top right;
}
.claro .dijitSliderRtl .dijitSliderProgressBarV,
.claro .dijitSliderRtl .dijitSliderRemainingBarV,
.claro .dijitSliderRtl .dijitSliderBottomBumper {
background-position: bottom right;
}
.claro .dijitSliderRtl .dijitSliderLeftBumper {
border-left-width: 0;
border-right-width: 1px;
}
.claro .dijitSliderRtl .dijitSliderRightBumper {
border-left-width: 1px;
border-right-width: 0;
}
.claro .dijitSliderRtl .dijitSliderIncrementIconH {
background-position: -357px 50%;
}
.claro .dijitSliderRtl .dijitSliderDecrementIconH {
background-position: -251px 50%;
}

View File

@ -0,0 +1,33 @@
@import "../variables";
.claro .dijitSliderRtl .dijitSliderProgressBarH,
.claro .dijitSliderRtl .dijitSliderRemainingBarH,
.claro .dijitSliderRtl .dijitSliderLeftBumper,
.claro .dijitSliderRtl .dijitSliderRightBumper,
.claro .dijitSliderRtl .dijitSliderTopBumper {
background-position: top right;
}
.claro .dijitSliderRtl .dijitSliderProgressBarV,
.claro .dijitSliderRtl .dijitSliderRemainingBarV,
.claro .dijitSliderRtl .dijitSliderBottomBumper {
background-position: bottom right;
}
.claro .dijitSliderRtl .dijitSliderLeftBumper {
border-left-width: 0;
border-right-width: 1px;
}
.claro .dijitSliderRtl .dijitSliderRightBumper {
border-left-width: 1px;
border-right-width: 0;
}
.claro .dijitSliderRtl .dijitSliderIncrementIconH {
background-position:-357px 50%;
}
.claro .dijitSliderRtl .dijitSliderDecrementIconH {
background-position:-251px 50%;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 297 B

Some files were not shown because too many files have changed in this diff Show More