422 |
423 |
424 |
425 |
--------------------------------------------------------------------------------
/GPL-LICENSE.txt:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 2, June 1991
3 |
4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc.
5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6 | Everyone is permitted to copy and distribute verbatim copies
7 | of this license document, but changing it is not allowed.
8 |
9 | Preamble
10 |
11 | The licenses for most software are designed to take away your
12 | freedom to share and change it. By contrast, the GNU General Public
13 | License is intended to guarantee your freedom to share and change free
14 | software--to make sure the software is free for all its users. This
15 | General Public License applies to most of the Free Software
16 | Foundation's software and to any other program whose authors commit to
17 | using it. (Some other Free Software Foundation software is covered by
18 | the GNU Lesser General Public License instead.) You can apply it to
19 | your programs, too.
20 |
21 | When we speak of free software, we are referring to freedom, not
22 | price. Our General Public Licenses are designed to make sure that you
23 | have the freedom to distribute copies of free software (and charge for
24 | this service if you wish), that you receive source code or can get it
25 | if you want it, that you can change the software or use pieces of it
26 | in new free programs; and that you know you can do these things.
27 |
28 | To protect your rights, we need to make restrictions that forbid
29 | anyone to deny you these rights or to ask you to surrender the rights.
30 | These restrictions translate to certain responsibilities for you if you
31 | distribute copies of the software, or if you modify it.
32 |
33 | For example, if you distribute copies of such a program, whether
34 | gratis or for a fee, you must give the recipients all the rights that
35 | you have. You must make sure that they, too, receive or can get the
36 | source code. And you must show them these terms so they know their
37 | rights.
38 |
39 | We protect your rights with two steps: (1) copyright the software, and
40 | (2) offer you this license which gives you legal permission to copy,
41 | distribute and/or modify the software.
42 |
43 | Also, for each author's protection and ours, we want to make certain
44 | that everyone understands that there is no warranty for this free
45 | software. If the software is modified by someone else and passed on, we
46 | want its recipients to know that what they have is not the original, so
47 | that any problems introduced by others will not reflect on the original
48 | authors' reputations.
49 |
50 | Finally, any free program is threatened constantly by software
51 | patents. We wish to avoid the danger that redistributors of a free
52 | program will individually obtain patent licenses, in effect making the
53 | program proprietary. To prevent this, we have made it clear that any
54 | patent must be licensed for everyone's free use or not licensed at all.
55 |
56 | The precise terms and conditions for copying, distribution and
57 | modification follow.
58 |
59 | GNU GENERAL PUBLIC LICENSE
60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61 |
62 | 0. This License applies to any program or other work which contains
63 | a notice placed by the copyright holder saying it may be distributed
64 | under the terms of this General Public License. The "Program", below,
65 | refers to any such program or work, and a "work based on the Program"
66 | means either the Program or any derivative work under copyright law:
67 | that is to say, a work containing the Program or a portion of it,
68 | either verbatim or with modifications and/or translated into another
69 | language. (Hereinafter, translation is included without limitation in
70 | the term "modification".) Each licensee is addressed as "you".
71 |
72 | Activities other than copying, distribution and modification are not
73 | covered by this License; they are outside its scope. The act of
74 | running the Program is not restricted, and the output from the Program
75 | is covered only if its contents constitute a work based on the
76 | Program (independent of having been made by running the Program).
77 | Whether that is true depends on what the Program does.
78 |
79 | 1. You may copy and distribute verbatim copies of the Program's
80 | source code as you receive it, in any medium, provided that you
81 | conspicuously and appropriately publish on each copy an appropriate
82 | copyright notice and disclaimer of warranty; keep intact all the
83 | notices that refer to this License and to the absence of any warranty;
84 | and give any other recipients of the Program a copy of this License
85 | along with the Program.
86 |
87 | You may charge a fee for the physical act of transferring a copy, and
88 | you may at your option offer warranty protection in exchange for a fee.
89 |
90 | 2. You may modify your copy or copies of the Program or any portion
91 | of it, thus forming a work based on the Program, and copy and
92 | distribute such modifications or work under the terms of Section 1
93 | above, provided that you also meet all of these conditions:
94 |
95 | a) You must cause the modified files to carry prominent notices
96 | stating that you changed the files and the date of any change.
97 |
98 | b) You must cause any work that you distribute or publish, that in
99 | whole or in part contains or is derived from the Program or any
100 | part thereof, to be licensed as a whole at no charge to all third
101 | parties under the terms of this License.
102 |
103 | c) If the modified program normally reads commands interactively
104 | when run, you must cause it, when started running for such
105 | interactive use in the most ordinary way, to print or display an
106 | announcement including an appropriate copyright notice and a
107 | notice that there is no warranty (or else, saying that you provide
108 | a warranty) and that users may redistribute the program under
109 | these conditions, and telling the user how to view a copy of this
110 | License. (Exception: if the Program itself is interactive but
111 | does not normally print such an announcement, your work based on
112 | the Program is not required to print an announcement.)
113 |
114 | These requirements apply to the modified work as a whole. If
115 | identifiable sections of that work are not derived from the Program,
116 | and can be reasonably considered independent and separate works in
117 | themselves, then this License, and its terms, do not apply to those
118 | sections when you distribute them as separate works. But when you
119 | distribute the same sections as part of a whole which is a work based
120 | on the Program, the distribution of the whole must be on the terms of
121 | this License, whose permissions for other licensees extend to the
122 | entire whole, and thus to each and every part regardless of who wrote it.
123 |
124 | Thus, it is not the intent of this section to claim rights or contest
125 | your rights to work written entirely by you; rather, the intent is to
126 | exercise the right to control the distribution of derivative or
127 | collective works based on the Program.
128 |
129 | In addition, mere aggregation of another work not based on the Program
130 | with the Program (or with a work based on the Program) on a volume of
131 | a storage or distribution medium does not bring the other work under
132 | the scope of this License.
133 |
134 | 3. You may copy and distribute the Program (or a work based on it,
135 | under Section 2) in object code or executable form under the terms of
136 | Sections 1 and 2 above provided that you also do one of the following:
137 |
138 | a) Accompany it with the complete corresponding machine-readable
139 | source code, which must be distributed under the terms of Sections
140 | 1 and 2 above on a medium customarily used for software interchange; or,
141 |
142 | b) Accompany it with a written offer, valid for at least three
143 | years, to give any third party, for a charge no more than your
144 | cost of physically performing source distribution, a complete
145 | machine-readable copy of the corresponding source code, to be
146 | distributed under the terms of Sections 1 and 2 above on a medium
147 | customarily used for software interchange; or,
148 |
149 | c) Accompany it with the information you received as to the offer
150 | to distribute corresponding source code. (This alternative is
151 | allowed only for noncommercial distribution and only if you
152 | received the program in object code or executable form with such
153 | an offer, in accord with Subsection b above.)
154 |
155 | The source code for a work means the preferred form of the work for
156 | making modifications to it. For an executable work, complete source
157 | code means all the source code for all modules it contains, plus any
158 | associated interface definition files, plus the scripts used to
159 | control compilation and installation of the executable. However, as a
160 | special exception, the source code distributed need not include
161 | anything that is normally distributed (in either source or binary
162 | form) with the major components (compiler, kernel, and so on) of the
163 | operating system on which the executable runs, unless that component
164 | itself accompanies the executable.
165 |
166 | If distribution of executable or object code is made by offering
167 | access to copy from a designated place, then offering equivalent
168 | access to copy the source code from the same place counts as
169 | distribution of the source code, even though third parties are not
170 | compelled to copy the source along with the object code.
171 |
172 | 4. You may not copy, modify, sublicense, or distribute the Program
173 | except as expressly provided under this License. Any attempt
174 | otherwise to copy, modify, sublicense or distribute the Program is
175 | void, and will automatically terminate your rights under this License.
176 | However, parties who have received copies, or rights, from you under
177 | this License will not have their licenses terminated so long as such
178 | parties remain in full compliance.
179 |
180 | 5. You are not required to accept this License, since you have not
181 | signed it. However, nothing else grants you permission to modify or
182 | distribute the Program or its derivative works. These actions are
183 | prohibited by law if you do not accept this License. Therefore, by
184 | modifying or distributing the Program (or any work based on the
185 | Program), you indicate your acceptance of this License to do so, and
186 | all its terms and conditions for copying, distributing or modifying
187 | the Program or works based on it.
188 |
189 | 6. Each time you redistribute the Program (or any work based on the
190 | Program), the recipient automatically receives a license from the
191 | original licensor to copy, distribute or modify the Program subject to
192 | these terms and conditions. You may not impose any further
193 | restrictions on the recipients' exercise of the rights granted herein.
194 | You are not responsible for enforcing compliance by third parties to
195 | this License.
196 |
197 | 7. If, as a consequence of a court judgment or allegation of patent
198 | infringement or for any other reason (not limited to patent issues),
199 | conditions are imposed on you (whether by court order, agreement or
200 | otherwise) that contradict the conditions of this License, they do not
201 | excuse you from the conditions of this License. If you cannot
202 | distribute so as to satisfy simultaneously your obligations under this
203 | License and any other pertinent obligations, then as a consequence you
204 | may not distribute the Program at all. For example, if a patent
205 | license would not permit royalty-free redistribution of the Program by
206 | all those who receive copies directly or indirectly through you, then
207 | the only way you could satisfy both it and this License would be to
208 | refrain entirely from distribution of the Program.
209 |
210 | If any portion of this section is held invalid or unenforceable under
211 | any particular circumstance, the balance of the section is intended to
212 | apply and the section as a whole is intended to apply in other
213 | circumstances.
214 |
215 | It is not the purpose of this section to induce you to infringe any
216 | patents or other property right claims or to contest validity of any
217 | such claims; this section has the sole purpose of protecting the
218 | integrity of the free software distribution system, which is
219 | implemented by public license practices. Many people have made
220 | generous contributions to the wide range of software distributed
221 | through that system in reliance on consistent application of that
222 | system; it is up to the author/donor to decide if he or she is willing
223 | to distribute software through any other system and a licensee cannot
224 | impose that choice.
225 |
226 | This section is intended to make thoroughly clear what is believed to
227 | be a consequence of the rest of this License.
228 |
229 | 8. If the distribution and/or use of the Program is restricted in
230 | certain countries either by patents or by copyrighted interfaces, the
231 | original copyright holder who places the Program under this License
232 | may add an explicit geographical distribution limitation excluding
233 | those countries, so that distribution is permitted only in or among
234 | countries not thus excluded. In such case, this License incorporates
235 | the limitation as if written in the body of this License.
236 |
237 | 9. The Free Software Foundation may publish revised and/or new versions
238 | of the General Public License from time to time. Such new versions will
239 | be similar in spirit to the present version, but may differ in detail to
240 | address new problems or concerns.
241 |
242 | Each version is given a distinguishing version number. If the Program
243 | specifies a version number of this License which applies to it and "any
244 | later version", you have the option of following the terms and conditions
245 | either of that version or of any later version published by the Free
246 | Software Foundation. If the Program does not specify a version number of
247 | this License, you may choose any version ever published by the Free Software
248 | Foundation.
249 |
250 | 10. If you wish to incorporate parts of the Program into other free
251 | programs whose distribution conditions are different, write to the author
252 | to ask for permission. For software which is copyrighted by the Free
253 | Software Foundation, write to the Free Software Foundation; we sometimes
254 | make exceptions for this. Our decision will be guided by the two goals
255 | of preserving the free status of all derivatives of our free software and
256 | of promoting the sharing and reuse of software generally.
257 |
258 | NO WARRANTY
259 |
260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268 | REPAIR OR CORRECTION.
269 |
270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278 | POSSIBILITY OF SUCH DAMAGES.
279 |
--------------------------------------------------------------------------------
/theme/ui.theme.css:
--------------------------------------------------------------------------------
1 |
2 |
3 | /*
4 | * jQuery UI CSS Framework
5 | * Copyright (c) 2009 AUTHORS.txt (http://ui.jquery.com/about)
6 | * Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
7 | * To view and modify this theme, visit http://ui.jquery.com/themeroller/?ffDefault=segoe%20ui,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=3b3b35&bgTextureHeader=05_inset_soft.png&bgImgOpacityHeader=22&borderColorHeader=59584f&fcHeader=ffffff&iconColorHeader=e7e6e4&bgColorContent=f0efea&bgTextureContent=03_highlight_soft.png&bgImgOpacityContent=100&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=808080&bgColorDefault=327E04&bgTextureDefault=03_highlight_soft.png&bgImgOpacityDefault=25&borderColorDefault=327E04&fcDefault=ffffff&iconColorDefault=eeeeee&bgColorHover=5A9D1A&bgTextureHover=03_highlight_soft.png&bgImgOpacityHover=25&borderColorHover=327E04&fcHover=ffffff&iconColorHover=ffffff&bgColorActive=f0efea&bgTextureActive=07_diagonals_small.png&bgImgOpacityActive=100&borderColorActive=c4c5c3&fcActive=403D38&iconColorActive=8DC262&bgColorHighlight=fcf0ba&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=e8e1b5&fcHighlight=363636&iconColorHighlight=8DC262&bgColorError=ffedad&bgTextureError=03_highlight_soft.png&bgImgOpacityError=95&borderColorError=e3a345&fcError=cd5c0a&iconColorError=cd0a0a&bgColorOverlay=2e2e28&bgTextureOverlay=21_glow_ball.png&bgImgOpacityOverlay=25&opacityOverlay=65&bgColorShadow=f0f0f0&bgTextureShadow=01_flat.png&bgImgOpacityShadow=35&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
8 | */
9 |
10 |
11 | /* Component containers
12 | ----------------------------------*/
13 | .ui-widget { font-family: segoe ui, Arial, sans-serif; font-size: 1.1em; }
14 | .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: segoe ui, Arial, sans-serif; font-size: 1em; }
15 | .ui-widget-content { border: 1px solid #aaaaaa; background: #f0efea url(images/ui-bg_highlight-soft_100_f0efea_1x100.png) 50% top repeat-x; color: #222222; }
16 | .ui-widget-content a { color: #222222; }
17 | .ui-widget-header { border: 1px solid #59584f; background: #3b3b35 url(images/ui-bg_inset-soft_22_3b3b35_1x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; }
18 | .ui-widget-header a { color: #ffffff; }
19 |
20 | /* Interaction states
21 | ----------------------------------*/
22 | .ui-state-default, .ui-widget-content .ui-state-default { border: 1px solid #327E04; background: #327E04 url(images/ui-bg_highlight-soft_25_327E04_1x100.png) 50% 50% repeat-x; font-weight: bold; color: #ffffff; outline: none; }
23 | .ui-state-default a { color: #ffffff; text-decoration: none; outline: none; }
24 | .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus { border: 1px solid #327E04; background: #5A9D1A url(images/ui-bg_highlight-soft_25_5A9D1A_1x100.png) 50% 50% repeat-x; font-weight: bold; color: #ffffff; outline: none; }
25 | .ui-state-hover a { color: #ffffff; text-decoration: none; outline: none; }
26 | .ui-state-active, .ui-widget-content .ui-state-active { border: 1px solid #c4c5c3; background: #f0efea url(images/ui-bg_diagonals-small_100_f0efea_40x40.png) 50% 50% repeat; font-weight: bold; color: #403D38; outline: none; }
27 | .ui-state-active a { color: #403D38; outline: none; text-decoration: none; }
28 |
29 | /* Interaction Cues
30 | ----------------------------------*/
31 | .ui-state-highlight, .ui-widget-content .ui-state-highlight {border: 1px solid #e8e1b5; background: #fcf0ba url(images/ui-bg_glass_55_fcf0ba_1x400.png) 50% 50% repeat-x; color: #363636; }
32 | .ui-state-highlight a, .ui-widget-content .ui-state-highlight a { color: #363636; }
33 | .ui-state-error, .ui-widget-content .ui-state-error {border: 1px solid #e3a345; background: #ffedad url(images/ui-bg_highlight-soft_95_ffedad_1x100.png) 50% top repeat-x; color: #cd5c0a; }
34 | .ui-state-error a, .ui-widget-content .ui-state-error a { color: #cd5c0a; }
35 | .ui-state-error-text, .ui-widget-content .ui-state-error-text { color: #cd5c0a; }
36 | .ui-state-disabled, .ui-widget-content .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
37 | .ui-priority-primary, .ui-widget-content .ui-priority-primary { font-weight: bold; }
38 | .ui-priority-secondary, .ui-widget-content .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
39 |
40 | /* Icons
41 | ----------------------------------*/
42 |
43 | /* states and images */
44 | .ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_808080_256x240.png); }
45 | .ui-widget-content .ui-icon {background-image: url(images/ui-icons_808080_256x240.png); }
46 | .ui-widget-header .ui-icon {background-image: url(images/ui-icons_e7e6e4_256x240.png); }
47 | .ui-state-default .ui-icon { background-image: url(images/ui-icons_eeeeee_256x240.png); }
48 | .ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); }
49 | .ui-state-active .ui-icon {background-image: url(images/ui-icons_8DC262_256x240.png); }
50 | .ui-state-highlight .ui-icon {background-image: url(images/ui-icons_8DC262_256x240.png); }
51 | .ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png); }
52 |
53 | /* positioning */
54 | .ui-icon-carat-1-n { background-position: 0 0; }
55 | .ui-icon-carat-1-ne { background-position: -16px 0; }
56 | .ui-icon-carat-1-e { background-position: -32px 0; }
57 | .ui-icon-carat-1-se { background-position: -48px 0; }
58 | .ui-icon-carat-1-s { background-position: -64px 0; }
59 | .ui-icon-carat-1-sw { background-position: -80px 0; }
60 | .ui-icon-carat-1-w { background-position: -96px 0; }
61 | .ui-icon-carat-1-nw { background-position: -112px 0; }
62 | .ui-icon-carat-2-n-s { background-position: -128px 0; }
63 | .ui-icon-carat-2-e-w { background-position: -144px 0; }
64 | .ui-icon-triangle-1-n { background-position: 0 -16px; }
65 | .ui-icon-triangle-1-ne { background-position: -16px -16px; }
66 | .ui-icon-triangle-1-e { background-position: -32px -16px; }
67 | .ui-icon-triangle-1-se { background-position: -48px -16px; }
68 | .ui-icon-triangle-1-s { background-position: -64px -16px; }
69 | .ui-icon-triangle-1-sw { background-position: -80px -16px; }
70 | .ui-icon-triangle-1-w { background-position: -96px -16px; }
71 | .ui-icon-triangle-1-nw { background-position: -112px -16px; }
72 | .ui-icon-triangle-2-n-s { background-position: -128px -16px; }
73 | .ui-icon-triangle-2-e-w { background-position: -144px -16px; }
74 | .ui-icon-arrow-1-n { background-position: 0 -32px; }
75 | .ui-icon-arrow-1-ne { background-position: -16px -32px; }
76 | .ui-icon-arrow-1-e { background-position: -32px -32px; }
77 | .ui-icon-arrow-1-se { background-position: -48px -32px; }
78 | .ui-icon-arrow-1-s { background-position: -64px -32px; }
79 | .ui-icon-arrow-1-sw { background-position: -80px -32px; }
80 | .ui-icon-arrow-1-w { background-position: -96px -32px; }
81 | .ui-icon-arrow-1-nw { background-position: -112px -32px; }
82 | .ui-icon-arrow-2-n-s { background-position: -128px -32px; }
83 | .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
84 | .ui-icon-arrow-2-e-w { background-position: -160px -32px; }
85 | .ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
86 | .ui-icon-arrowstop-1-n { background-position: -192px -32px; }
87 | .ui-icon-arrowstop-1-e { background-position: -208px -32px; }
88 | .ui-icon-arrowstop-1-s { background-position: -224px -32px; }
89 | .ui-icon-arrowstop-1-w { background-position: -240px -32px; }
90 | .ui-icon-arrowthick-1-n { background-position: 0 -48px; }
91 | .ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
92 | .ui-icon-arrowthick-1-e { background-position: -32px -48px; }
93 | .ui-icon-arrowthick-1-se { background-position: -48px -48px; }
94 | .ui-icon-arrowthick-1-s { background-position: -64px -48px; }
95 | .ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
96 | .ui-icon-arrowthick-1-w { background-position: -96px -48px; }
97 | .ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
98 | .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
99 | .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
100 | .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
101 | .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
102 | .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
103 | .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
104 | .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
105 | .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
106 | .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
107 | .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
108 | .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
109 | .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
110 | .ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
111 | .ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
112 | .ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
113 | .ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
114 | .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
115 | .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
116 | .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
117 | .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
118 | .ui-icon-arrow-4 { background-position: 0 -80px; }
119 | .ui-icon-arrow-4-diag { background-position: -16px -80px; }
120 | .ui-icon-extlink { background-position: -32px -80px; }
121 | .ui-icon-newwin { background-position: -48px -80px; }
122 | .ui-icon-refresh { background-position: -64px -80px; }
123 | .ui-icon-shuffle { background-position: -80px -80px; }
124 | .ui-icon-transfer-e-w { background-position: -96px -80px; }
125 | .ui-icon-transferthick-e-w { background-position: -112px -80px; }
126 | .ui-icon-folder-collapsed { background-position: 0 -96px; }
127 | .ui-icon-folder-open { background-position: -16px -96px; }
128 | .ui-icon-document { background-position: -32px -96px; }
129 | .ui-icon-document-b { background-position: -48px -96px; }
130 | .ui-icon-note { background-position: -64px -96px; }
131 | .ui-icon-mail-closed { background-position: -80px -96px; }
132 | .ui-icon-mail-open { background-position: -96px -96px; }
133 | .ui-icon-suitcase { background-position: -112px -96px; }
134 | .ui-icon-comment { background-position: -128px -96px; }
135 | .ui-icon-person { background-position: -144px -96px; }
136 | .ui-icon-print { background-position: -160px -96px; }
137 | .ui-icon-trash { background-position: -176px -96px; }
138 | .ui-icon-locked { background-position: -192px -96px; }
139 | .ui-icon-unlocked { background-position: -208px -96px; }
140 | .ui-icon-bookmark { background-position: -224px -96px; }
141 | .ui-icon-tag { background-position: -240px -96px; }
142 | .ui-icon-home { background-position: 0 -112px; }
143 | .ui-icon-flag { background-position: -16px -112px; }
144 | .ui-icon-calendar { background-position: -32px -112px; }
145 | .ui-icon-cart { background-position: -48px -112px; }
146 | .ui-icon-pencil { background-position: -64px -112px; }
147 | .ui-icon-clock { background-position: -80px -112px; }
148 | .ui-icon-disk { background-position: -96px -112px; }
149 | .ui-icon-calculator { background-position: -112px -112px; }
150 | .ui-icon-zoomin { background-position: -128px -112px; }
151 | .ui-icon-zoomout { background-position: -144px -112px; }
152 | .ui-icon-search { background-position: -160px -112px; }
153 | .ui-icon-wrench { background-position: -176px -112px; }
154 | .ui-icon-gear { background-position: -192px -112px; }
155 | .ui-icon-heart { background-position: -208px -112px; }
156 | .ui-icon-star { background-position: -224px -112px; }
157 | .ui-icon-link { background-position: -240px -112px; }
158 | .ui-icon-cancel { background-position: 0 -128px; }
159 | .ui-icon-plus { background-position: -16px -128px; }
160 | .ui-icon-plusthick { background-position: -32px -128px; }
161 | .ui-icon-minus { background-position: -48px -128px; }
162 | .ui-icon-minusthick { background-position: -64px -128px; }
163 | .ui-icon-close { background-position: -80px -128px; }
164 | .ui-icon-closethick { background-position: -96px -128px; }
165 | .ui-icon-key { background-position: -112px -128px; }
166 | .ui-icon-lightbulb { background-position: -128px -128px; }
167 | .ui-icon-scissors { background-position: -144px -128px; }
168 | .ui-icon-clipboard { background-position: -160px -128px; }
169 | .ui-icon-copy { background-position: -176px -128px; }
170 | .ui-icon-contact { background-position: -192px -128px; }
171 | .ui-icon-image { background-position: -208px -128px; }
172 | .ui-icon-video { background-position: -224px -128px; }
173 | .ui-icon-script { background-position: -240px -128px; }
174 | .ui-icon-alert { background-position: 0 -144px; }
175 | .ui-icon-info { background-position: -16px -144px; }
176 | .ui-icon-notice { background-position: -32px -144px; }
177 | .ui-icon-help { background-position: -48px -144px; }
178 | .ui-icon-check { background-position: -64px -144px; }
179 | .ui-icon-bullet { background-position: -80px -144px; }
180 | .ui-icon-radio-off { background-position: -96px -144px; }
181 | .ui-icon-radio-on { background-position: -112px -144px; }
182 | .ui-icon-pin-w { background-position: -128px -144px; }
183 | .ui-icon-pin-s { background-position: -144px -144px; }
184 | .ui-icon-play { background-position: 0 -160px; }
185 | .ui-icon-pause { background-position: -16px -160px; }
186 | .ui-icon-seek-next { background-position: -32px -160px; }
187 | .ui-icon-seek-prev { background-position: -48px -160px; }
188 | .ui-icon-seek-end { background-position: -64px -160px; }
189 | .ui-icon-seek-first { background-position: -80px -160px; }
190 | .ui-icon-stop { background-position: -96px -160px; }
191 | .ui-icon-eject { background-position: -112px -160px; }
192 | .ui-icon-volume-off { background-position: -128px -160px; }
193 | .ui-icon-volume-on { background-position: -144px -160px; }
194 | .ui-icon-power { background-position: 0 -176px; }
195 | .ui-icon-signal-diag { background-position: -16px -176px; }
196 | .ui-icon-signal { background-position: -32px -176px; }
197 | .ui-icon-battery-0 { background-position: -48px -176px; }
198 | .ui-icon-battery-1 { background-position: -64px -176px; }
199 | .ui-icon-battery-2 { background-position: -80px -176px; }
200 | .ui-icon-battery-3 { background-position: -96px -176px; }
201 | .ui-icon-circle-plus { background-position: 0 -192px; }
202 | .ui-icon-circle-minus { background-position: -16px -192px; }
203 | .ui-icon-circle-close { background-position: -32px -192px; }
204 | .ui-icon-circle-triangle-e { background-position: -48px -192px; }
205 | .ui-icon-circle-triangle-s { background-position: -64px -192px; }
206 | .ui-icon-circle-triangle-w { background-position: -80px -192px; }
207 | .ui-icon-circle-triangle-n { background-position: -96px -192px; }
208 | .ui-icon-circle-arrow-e { background-position: -112px -192px; }
209 | .ui-icon-circle-arrow-s { background-position: -128px -192px; }
210 | .ui-icon-circle-arrow-w { background-position: -144px -192px; }
211 | .ui-icon-circle-arrow-n { background-position: -160px -192px; }
212 | .ui-icon-circle-zoomin { background-position: -176px -192px; }
213 | .ui-icon-circle-zoomout { background-position: -192px -192px; }
214 | .ui-icon-circle-check { background-position: -208px -192px; }
215 | .ui-icon-circlesmall-plus { background-position: 0 -208px; }
216 | .ui-icon-circlesmall-minus { background-position: -16px -208px; }
217 | .ui-icon-circlesmall-close { background-position: -32px -208px; }
218 | .ui-icon-squaresmall-plus { background-position: -48px -208px; }
219 | .ui-icon-squaresmall-minus { background-position: -64px -208px; }
220 | .ui-icon-squaresmall-close { background-position: -80px -208px; }
221 | .ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
222 | .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
223 | .ui-icon-grip-solid-vertical { background-position: -32px -224px; }
224 | .ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
225 | .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
226 | .ui-icon-grip-diagonal-se { background-position: -80px -224px; }
227 |
228 |
229 | /* Misc visuals
230 | ----------------------------------*/
231 |
232 | /* Corner radius */
233 | .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; }
234 | .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; }
235 | .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; }
236 | .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; }
237 | .ui-corner-top { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; }
238 | .ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; }
239 | .ui-corner-right { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; }
240 | .ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; }
241 | .ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; }
242 |
243 | /* Overlays */
244 | .ui-widget-overlay { background: #2e2e28 url(images/ui-bg_glow-ball_25_2e2e28_600x600.png) 50% 35% repeat-x; opacity: .65;filter:Alpha(Opacity=65); }
245 | .ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #f0f0f0 url(images/ui-bg_flat_35_f0f0f0_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; }
--------------------------------------------------------------------------------
/fg.menu.js:
--------------------------------------------------------------------------------
1 | /*--------------------------------------------------------------------
2 | Scripts for creating and manipulating custom menus based on standard
markup
3 | Version: 3.0, 03.31.2009
4 |
5 | By: Maggie Costello Wachs (maggie@filamentgroup.com) and Scott Jehl (scott@filamentgroup.com)
6 | http://www.filamentgroup.com
7 | * reference articles: http://www.filamentgroup.com/lab/jquery_ipod_style_drilldown_menu/
8 |
9 | Copyright (c) 2009 Filament Group
10 | Dual licensed under the MIT (filamentgroup.com/examples/mit-license.txt) and GPL (filamentgroup.com/examples/gpl-license.txt) licenses.
11 | --------------------------------------------------------------------*/
12 |
13 |
14 | var allUIMenus = [];
15 |
16 | $.fn.menu = function(options){
17 | var caller = this;
18 | var options = options;
19 | var m = new Menu(caller, options);
20 | allUIMenus.push(m);
21 |
22 | $(this)
23 | .mousedown(function(){
24 | if (!m.menuOpen) { m.showLoading(); };
25 | })
26 | .click(function(){
27 | if (m.menuOpen == false) { m.showMenu(); }
28 | else { m.kill(); };
29 | return false;
30 | });
31 | };
32 |
33 | function Menu(caller, options){
34 | var menu = this;
35 | var caller = $(caller);
36 | var container = $('
'+options.content+'
');
37 |
38 | this.menuOpen = false;
39 | this.menuExists = false;
40 |
41 | var options = jQuery.extend({
42 | content: null,
43 | width: 180, // width of menu container, must be set or passed in to calculate widths of child menus
44 | maxHeight: 180, // max height of menu (if a drilldown: height does not include breadcrumb)
45 | positionOpts: {
46 | posX: 'left',
47 | posY: 'bottom',
48 | offsetX: 0,
49 | offsetY: 0,
50 | directionH: 'right',
51 | directionV: 'down',
52 | detectH: true, // do horizontal collision detection
53 | detectV: true, // do vertical collision detection
54 | linkToFront: false
55 | },
56 | showSpeed: 200, // show/hide speed in milliseconds
57 | callerOnState: 'ui-state-active', // class to change the appearance of the link/button when the menu is showing
58 | loadingState: 'ui-state-loading', // class added to the link/button while the menu is created
59 | linkHover: 'ui-state-hover', // class for menu option hover state
60 | linkHoverSecondary: 'li-hover', // alternate class, may be used for multi-level menus
61 | // ----- multi-level menu defaults -----
62 | crossSpeed: 200, // cross-fade speed for multi-level menus
63 | crumbDefaultText: 'Choose an option:',
64 | backLink: true, // in the ipod-style menu: instead of breadcrumbs, show only a 'back' link
65 | backLinkText: 'Back',
66 | flyOut: false, // multi-level menus are ipod-style by default; this parameter overrides to make a flyout instead
67 | flyOutOnState: 'ui-state-default',
68 | nextMenuLink: 'ui-icon-triangle-1-e', // class to style the link (specifically, a span within the link) used in the multi-level menu to show the next level
69 | topLinkText: 'All',
70 | nextCrumbLink: 'ui-icon-carat-1-e'
71 | }, options);
72 |
73 | var killAllMenus = function(){
74 | $.each(allUIMenus, function(i){
75 | if (allUIMenus[i].menuOpen) { allUIMenus[i].kill(); };
76 | });
77 | };
78 |
79 | this.kill = function(){
80 | caller
81 | .removeClass(options.loadingState)
82 | .removeClass('fg-menu-open')
83 | .removeClass(options.callerOnState);
84 | container.find('li').removeClass(options.linkHoverSecondary).find('a').removeClass(options.linkHover);
85 | if (options.flyOutOnState) { container.find('li a').removeClass(options.flyOutOnState); };
86 | if (options.callerOnState) { caller.removeClass(options.callerOnState); };
87 | if (container.is('.fg-menu-ipod')) { menu.resetDrilldownMenu(); };
88 | if (container.is('.fg-menu-flyout')) { menu.resetFlyoutMenu(); };
89 | container.parent().hide();
90 | menu.menuOpen = false;
91 | $(document).unbind('click', killAllMenus);
92 | $(document).unbind('keydown');
93 | };
94 |
95 | this.showLoading = function(){
96 | caller.addClass(options.loadingState);
97 | };
98 |
99 | this.showMenu = function(){
100 | killAllMenus();
101 | if (!menu.menuExists) { menu.create() };
102 | caller
103 | .addClass('fg-menu-open')
104 | .addClass(options.callerOnState);
105 | container.parent().show().click(function(){ menu.kill(); return false; });
106 | container.hide().slideDown(options.showSpeed).find('.fg-menu:eq(0)');
107 | menu.menuOpen = true;
108 | caller.removeClass(options.loadingState);
109 | $(document).click(killAllMenus);
110 |
111 | // assign key events
112 | $(document).keydown(function(event){
113 | var e;
114 | if (event.which !="") { e = event.which; }
115 | else if (event.charCode != "") { e = event.charCode; }
116 | else if (event.keyCode != "") { e = event.keyCode; }
117 |
118 | var menuType = ($(event.target).parents('div').is('.fg-menu-flyout')) ? 'flyout' : 'ipod' ;
119 |
120 | switch(e) {
121 | case 37: // left arrow
122 | if (menuType == 'flyout') {
123 | $(event.target).trigger('mouseout');
124 | if ($('.'+options.flyOutOnState).size() > 0) { $('.'+options.flyOutOnState).trigger('mouseover'); };
125 | };
126 |
127 | if (menuType == 'ipod') {
128 | $(event.target).trigger('mouseout');
129 | if ($('.fg-menu-footer').find('a').size() > 0) { $('.fg-menu-footer').find('a').trigger('click'); };
130 | if ($('.fg-menu-header').find('a').size() > 0) { $('.fg-menu-current-crumb').prev().find('a').trigger('click'); };
131 | if ($('.fg-menu-current').prev().is('.fg-menu-indicator')) {
132 | $('.fg-menu-current').prev().trigger('mouseover');
133 | };
134 | };
135 | return false;
136 | break;
137 |
138 | case 38: // up arrow
139 | if ($(event.target).is('.' + options.linkHover)) {
140 | var prevLink = $(event.target).parent().prev().find('a:eq(0)');
141 | if (prevLink.size() > 0) {
142 | $(event.target).trigger('mouseout');
143 | prevLink.trigger('mouseover');
144 | };
145 | }
146 | else { container.find('a:eq(0)').trigger('mouseover'); }
147 | return false;
148 | break;
149 |
150 | case 39: // right arrow
151 | if ($(event.target).is('.fg-menu-indicator')) {
152 | if (menuType == 'flyout') {
153 | $(event.target).next().find('a:eq(0)').trigger('mouseover');
154 | }
155 | else if (menuType == 'ipod') {
156 | $(event.target).trigger('click');
157 | setTimeout(function(){
158 | $(event.target).next().find('a:eq(0)').trigger('mouseover');
159 | }, options.crossSpeed);
160 | };
161 | };
162 | return false;
163 | break;
164 |
165 | case 40: // down arrow
166 | if ($(event.target).is('.' + options.linkHover)) {
167 | var nextLink = $(event.target).parent().next().find('a:eq(0)');
168 | if (nextLink.size() > 0) {
169 | $(event.target).trigger('mouseout');
170 | nextLink.trigger('mouseover');
171 | };
172 | }
173 | else { container.find('a:eq(0)').trigger('mouseover'); }
174 | return false;
175 | break;
176 |
177 | case 27: // escape
178 | killAllMenus();
179 | break;
180 |
181 | case 13: // enter
182 | if ($(event.target).is('.fg-menu-indicator') && menuType == 'ipod') {
183 | $(event.target).trigger('click');
184 | setTimeout(function(){
185 | $(event.target).next().find('a:eq(0)').trigger('mouseover');
186 | }, options.crossSpeed);
187 | };
188 | break;
189 | };
190 | });
191 | };
192 |
193 | this.create = function(){
194 | container.css({ width: options.width }).appendTo('body').find('ul:first').not('.fg-menu-breadcrumb').addClass('fg-menu');
195 | container.find('ul, li a').addClass('ui-corner-all');
196 |
197 | // aria roles & attributes
198 | container.find('ul').attr('role', 'menu').eq(0).attr('aria-activedescendant','active-menuitem').attr('aria-labelledby', caller.attr('id'));
199 | container.find('li').attr('role', 'menuitem');
200 | container.find('li:has(ul)').attr('aria-haspopup', 'true').find('ul').attr('aria-expanded', 'false');
201 | container.find('a').attr('tabindex', '-1');
202 |
203 | // when there are multiple levels of hierarchy, create flyout or drilldown menu
204 | if (container.find('ul').size() > 1) {
205 | if (options.flyOut) { menu.flyout(container, options); }
206 | else { menu.drilldown(container, options); }
207 | }
208 | else {
209 | container.find('a').click(function(){
210 | menu.chooseItem(this);
211 | return false;
212 | });
213 | };
214 |
215 | if (options.linkHover) {
216 | var allLinks = container.find('.fg-menu li a');
217 | allLinks.hover(
218 | function(){
219 | var menuitem = $(this);
220 | $('.'+options.linkHover).removeClass(options.linkHover).blur().parent().removeAttr('id');
221 | $(this).addClass(options.linkHover).focus().parent().attr('id','active-menuitem');
222 | },
223 | function(){
224 | $(this).removeClass(options.linkHover).blur().parent().removeAttr('id');
225 | }
226 | );
227 | };
228 |
229 | if (options.linkHoverSecondary) {
230 | container.find('.fg-menu li').hover(
231 | function(){
232 | $(this).siblings('li').removeClass(options.linkHoverSecondary);
233 | if (options.flyOutOnState) { $(this).siblings('li').find('a').removeClass(options.flyOutOnState); }
234 | $(this).addClass(options.linkHoverSecondary);
235 | },
236 | function(){ $(this).removeClass(options.linkHoverSecondary); }
237 | );
238 | };
239 |
240 | menu.setPosition(container, caller, options);
241 | menu.menuExists = true;
242 | };
243 |
244 | this.chooseItem = function(item){
245 | menu.kill();
246 | // edit this for your own custom function/callback:
247 | $('#menuSelection').text($(item).text());
248 | location.href = $(item).attr('href');
249 | };
250 | };
251 |
252 | Menu.prototype.flyout = function(container, options) {
253 | var menu = this;
254 |
255 | this.resetFlyoutMenu = function(){
256 | var allLists = container.find('ul ul');
257 | allLists.removeClass('ui-widget-content').hide();
258 | };
259 |
260 | container.addClass('fg-menu-flyout').find('li:has(ul)').each(function(){
261 | var linkWidth = container.width();
262 | var showTimer, hideTimer;
263 | var allSubLists = $(this).find('ul');
264 |
265 | allSubLists.css({ left: linkWidth, width: linkWidth }).hide();
266 |
267 | $(this).find('a:eq(0)').addClass('fg-menu-indicator').html('' + $(this).find('a:eq(0)').text() + '').hover(
268 | function(){
269 | clearTimeout(hideTimer);
270 | var subList = $(this).next();
271 | if (!fitVertical(subList, $(this).offset().top)) { subList.css({ top: 'auto', bottom: 0 }); };
272 | if (!fitHorizontal(subList, $(this).offset().left + 100)) { subList.css({ left: 'auto', right: linkWidth, 'z-index': 999 }); };
273 | showTimer = setTimeout(function(){
274 | subList.addClass('ui-widget-content').show(options.showSpeed).attr('aria-expanded', 'true');
275 | }, 300);
276 | },
277 | function(){
278 | clearTimeout(showTimer);
279 | var subList = $(this).next();
280 | hideTimer = setTimeout(function(){
281 | subList.removeClass('ui-widget-content').hide(options.showSpeed).attr('aria-expanded', 'false');
282 | }, 400);
283 | }
284 | );
285 |
286 | $(this).find('ul a').hover(
287 | function(){
288 | clearTimeout(hideTimer);
289 | if ($(this).parents('ul').prev().is('a.fg-menu-indicator')) {
290 | $(this).parents('ul').prev().addClass(options.flyOutOnState);
291 | }
292 | },
293 | function(){
294 | hideTimer = setTimeout(function(){
295 | allSubLists.hide(options.showSpeed);
296 | container.find(options.flyOutOnState).removeClass(options.flyOutOnState);
297 | }, 500);
298 | }
299 | );
300 | });
301 |
302 | container.find('a').click(function(){
303 | menu.chooseItem(this);
304 | return false;
305 | });
306 | };
307 |
308 |
309 | Menu.prototype.drilldown = function(container, options) {
310 | var menu = this;
311 | var topList = container.find('.fg-menu');
312 | var breadcrumb = $('
');
313 | var crumbDefaultHeader = $('
'+options.crumbDefaultText+'
');
314 | var firstCrumbText = (options.backLink) ? options.backLinkText : options.topLinkText;
315 | var firstCrumbClass = (options.backLink) ? 'fg-menu-prev-list' : 'fg-menu-all-lists';
316 | var firstCrumbLinkClass = (options.backLink) ? 'ui-state-default ui-corner-all' : '';
317 | var firstCrumbIcon = (options.backLink) ? '' : '';
318 | var firstCrumb = $('