diff options
Diffstat (limited to 'gstudio/static/gstudio/js/jquery-ui-timepicker-0.2.9')
10 files changed, 2928 insertions, 0 deletions
diff --git a/gstudio/static/gstudio/js/jquery-ui-timepicker-0.2.9/GPL-LICENSE.txt b/gstudio/static/gstudio/js/jquery-ui-timepicker-0.2.9/GPL-LICENSE.txt new file mode 100644 index 00000000..932f1111 --- /dev/null +++ b/gstudio/static/gstudio/js/jquery-ui-timepicker-0.2.9/GPL-LICENSE.txt @@ -0,0 +1,278 @@ +GNU GENERAL PUBLIC LICENSE +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by + the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for + this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + +To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + +For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + +We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, + distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain + that everyone understands that there is no warranty for this free + software. If the software is modified by someone else and passed on, we + want its recipients to know that what they have is not the original, so + that any problems introduced by others will not reflect on the original + authors' reputations. + + Finally, any free program is threatened constantly by software + patents. We wish to avoid the danger that redistributors of a free + program will individually obtain patent licenses, in effect making the + program proprietary. To prevent this, we have made it clear that any + patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and + modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains + a notice placed by the copyright holder saying it may be distributed + under the terms of this General Public License. The "Program", below, + refers to any such program or work, and a "work based on the Program" + means either the Program or any derivative work under copyright law: + that is to say, a work containing the Program or a portion of it, + either verbatim or with modifications and/or translated into another + language. (Hereinafter, translation is included without limitation in + the term "modification".) Each licensee is addressed as "you". + + Activities other than copying, distribution and modification are not + covered by this License; they are outside its scope. The act of + running the Program is not restricted, and the output from the Program + is covered only if its contents constitute a work based on the + Program (independent of having been made by running the Program). + Whether that is true depends on what the Program does. + + 1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the + notices that refer to this License and to the absence of any warranty; + and give any other recipients of the Program a copy of this License + along with the Program. + + You may charge a fee for the physical act of transferring a copy, and + you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion + of it, thus forming a work based on the Program, and copy and + distribute such modifications or work under the terms of Section 1 + above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + + These requirements apply to the modified work as a whole. If + identifiable sections of that work are not derived from the Program, + and can be reasonably considered independent and separate works in + themselves, then this License, and its terms, do not apply to those + sections when you distribute them as separate works. But when you + distribute the same sections as part of a whole which is a work based + on the Program, the distribution of the whole must be on the terms of + this License, whose permissions for other licensees extend to the + entire whole, and thus to each and every part regardless of who wrote it. + + Thus, it is not the intent of this section to claim rights or contest + your rights to work written entirely by you; rather, the intent is to + exercise the right to control the distribution of derivative or + collective works based on the Program. + + In addition, mere aggregation of another work not based on the Program + with the Program (or with a work based on the Program) on a volume of + a storage or distribution medium does not bring the other work under + the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, + under Section 2) in object code or executable form under the terms of + Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + + The source code for a work means the preferred form of the work for + making modifications to it. For an executable work, complete source + code means all the source code for all modules it contains, plus any + associated interface definition files, plus the scripts used to + control compilation and installation of the executable. However, as a + special exception, the source code distributed need not include + anything that is normally distributed (in either source or binary + form) with the major components (compiler, kernel, and so on) of the + operating system on which the executable runs, unless that component + itself accompanies the executable. + + If distribution of executable or object code is made by offering + access to copy from a designated place, then offering equivalent + access to copy the source code from the same place counts as + distribution of the source code, even though third parties are not + compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program + except as expressly provided under this License. Any attempt + otherwise to copy, modify, sublicense or distribute the Program is + void, and will automatically terminate your rights under this License. + However, parties who have received copies, or rights, from you under + this License will not have their licenses terminated so long as such + parties remain in full compliance. + + 5. You are not required to accept this License, since you have not + signed it. However, nothing else grants you permission to modify or + distribute the Program or its derivative works. These actions are + prohibited by law if you do not accept this License. Therefore, by + modifying or distributing the Program (or any work based on the + Program), you indicate your acceptance of this License to do so, and + all its terms and conditions for copying, distributing or modifying + the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the + Program), the recipient automatically receives a license from the + original licensor to copy, distribute or modify the Program subject to + these terms and conditions. You may not impose any further + restrictions on the recipients' exercise of the rights granted herein. + You are not responsible for enforcing compliance by third parties to + this License. + + 7. If, as a consequence of a court judgment or allegation of patent + infringement or for any other reason (not limited to patent issues), + conditions are imposed on you (whether by court order, agreement or + otherwise) that contradict the conditions of this License, they do not + excuse you from the conditions of this License. If you cannot + distribute so as to satisfy simultaneously your obligations under this + License and any other pertinent obligations, then as a consequence you + may not distribute the Program at all. For example, if a patent + license would not permit royalty-free redistribution of the Program by + all those who receive copies directly or indirectly through you, then + the only way you could satisfy both it and this License would be to + refrain entirely from distribution of the Program. + + If any portion of this section is held invalid or unenforceable under + any particular circumstance, the balance of the section is intended to + apply and the section as a whole is intended to apply in other + circumstances. + + It is not the purpose of this section to induce you to infringe any + patents or other property right claims or to contest validity of any + such claims; this section has the sole purpose of protecting the + integrity of the free software distribution system, which is + implemented by public license practices. Many people have made + generous contributions to the wide range of software distributed + through that system in reliance on consistent application of that + system; it is up to the author/donor to decide if he or she is willing + to distribute software through any other system and a licensee cannot + impose that choice. + + This section is intended to make thoroughly clear what is believed to + be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in + certain countries either by patents or by copyrighted interfaces, the + original copyright holder who places the Program under this License + may add an explicit geographical distribution limitation excluding + those countries, so that distribution is permitted only in or among + countries not thus excluded. In such case, this License incorporates + the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions + of the 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 a version number of this License which applies to it and "any + later version", you have the option of following the terms and conditions + either of that version or of any later version published by the Free + Software Foundation. If the Program does not specify a version number of + this License, you may choose any version ever published by the Free Software + Foundation. + + 10. If you wish to incorporate parts of the Program into other free + programs whose distribution conditions are different, write to the author + to ask for permission. For software which is copyrighted by the Free + Software Foundation, write to the Free Software Foundation; we sometimes + make exceptions for this. Our decision will be guided by the two goals + of preserving the free status of all derivatives of our free software and + of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING + WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR + REDISTRIBUTE THE 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.""'''''' diff --git a/gstudio/static/gstudio/js/jquery-ui-timepicker-0.2.9/MIT-LICENSE.txt b/gstudio/static/gstudio/js/jquery-ui-timepicker-0.2.9/MIT-LICENSE.txt new file mode 100644 index 00000000..53270463 --- /dev/null +++ b/gstudio/static/gstudio/js/jquery-ui-timepicker-0.2.9/MIT-LICENSE.txt @@ -0,0 +1,20 @@ +Copyright (c) 2011 John Resig, http://jquery.com/ + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/gstudio/static/gstudio/js/jquery-ui-timepicker-0.2.9/i18n/i18n.html b/gstudio/static/gstudio/js/jquery-ui-timepicker-0.2.9/i18n/i18n.html new file mode 100644 index 00000000..83cb5e3f --- /dev/null +++ b/gstudio/static/gstudio/js/jquery-ui-timepicker-0.2.9/i18n/i18n.html @@ -0,0 +1,73 @@ +<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>Internationalisation page for the jquery ui timepicker</title>
+
+ <script src="../include/jquery-1.5.1.min.js"></script>
+ <script src="../include/jquery.ui.core.min.js"></script>
+ <script src="../include/jquery.ui.widget.min.js"></script>
+ <script src="../jquery.ui.timepicker.js"></script>
+
+ <link rel="stylesheet" href="../include/jquery-ui-1.8.14.custom.css" />
+ <link rel="stylesheet" href="../jquery.ui.timepicker.css" />
+ <style>
+ #timepicker { font-size: 10px }
+ </style>
+
+ <script src='jquery.ui.timepicker-de.js'></script>
+ <script src='jquery.ui.timepicker-fr.js'></script>
+ <script src='jquery.ui.timepicker-ja.js'></script>
+</head>
+<body>
+
+ <script type="text/javascript">
+ $(document).ready(function() {
+
+ $.timepicker.setDefaults( $.timepicker.regional[ "" ] );
+
+ $('#timepicker').timepicker({
+ showCloseButton: true,
+ showNowButton: true,
+ showDeselectButton: true
+ });
+
+ $('#locale').change(function() {
+ $('#timepicker').timepicker( "option",
+ $.timepicker.regional[ $( this ).val() ] );
+ });
+ });
+ </script>
+
+ Select a localisation :
+ <select id='locale'>
+ <option value='fr'>Français</option>
+ <option value='de'>Deutsch</option>
+ <option value='ja'>Japanese</option>
+ </select>
+
+ <br>
+
+ <div id="timepicker">
+
+ </div>
+
+ <br>
+
+ List of localisations :
+<ul>
+ <li>
+ <a href="jquery.ui.timepicker-de.js">Deutsch (jquery.ui.timepicker-de.js</a>
+ </li>
+
+ <li>
+ <a href="jquery.ui.timepicker-fr.js">Français (jquery.ui.timepicker-fr.js</a>
+ </li>
+
+ <li>
+ <a href="jquery.ui.timepicker-ja.js">Japanese (jquery.ui.timepicker-ja.js</a>
+ </li>
+
+</ul>
+
+</body>
\ No newline at end of file diff --git a/gstudio/static/gstudio/js/jquery-ui-timepicker-0.2.9/i18n/jquery.ui.timepicker-de.js b/gstudio/static/gstudio/js/jquery-ui-timepicker-0.2.9/i18n/jquery.ui.timepicker-de.js new file mode 100644 index 00000000..c010a498 --- /dev/null +++ b/gstudio/static/gstudio/js/jquery-ui-timepicker-0.2.9/i18n/jquery.ui.timepicker-de.js @@ -0,0 +1,9 @@ +/* Deutsch initialisation for the timepicker plugin */
+/* Written by Bernd Plagge (bplagge@choicenet.ne.jp). */
+jQuery(function($){
+ $.timepicker.regional['de'] = {
+ hourText: 'Stunde',
+ minuteText: 'Minuten',
+ amPmText: ['AM', 'PM'] }
+ $.timepicker.setDefaults($.timepicker.regional['de']);
+});
\ No newline at end of file diff --git a/gstudio/static/gstudio/js/jquery-ui-timepicker-0.2.9/i18n/jquery.ui.timepicker-fr.js b/gstudio/static/gstudio/js/jquery-ui-timepicker-0.2.9/i18n/jquery.ui.timepicker-fr.js new file mode 100644 index 00000000..bd37d731 --- /dev/null +++ b/gstudio/static/gstudio/js/jquery-ui-timepicker-0.2.9/i18n/jquery.ui.timepicker-fr.js @@ -0,0 +1,13 @@ +/* French initialisation for the jQuery time picker plugin. */
+/* Written by Bernd Plagge (bplagge@choicenet.ne.jp),
+ Francois Gelinas (frank@fgelinas.com) */
+jQuery(function($){
+ $.timepicker.regional['fr'] = {
+ hourText: 'Heures',
+ minuteText: 'Minutes',
+ amPmText: ['AM', 'PM'],
+ closeButtonText: 'Fermer',
+ nowButtonText: 'Maintenant',
+ deselectButtonText: 'Désélectionner' }
+ $.timepicker.setDefaults($.timepicker.regional['fr']);
+});
\ No newline at end of file diff --git a/gstudio/static/gstudio/js/jquery-ui-timepicker-0.2.9/i18n/jquery.ui.timepicker-ja.js b/gstudio/static/gstudio/js/jquery-ui-timepicker-0.2.9/i18n/jquery.ui.timepicker-ja.js new file mode 100644 index 00000000..01b2c8a3 --- /dev/null +++ b/gstudio/static/gstudio/js/jquery-ui-timepicker-0.2.9/i18n/jquery.ui.timepicker-ja.js @@ -0,0 +1,9 @@ +/* Japanese initialisation for the jQuery time picker plugin. */
+/* Written by Bernd Plagge (bplagge@choicenet.ne.jp). */
+jQuery(function($){
+ $.timepicker.regional['ja'] = {
+ hourText: '時間',
+ minuteText: '分',
+ amPmText: ['午前', '午後'] }
+ $.timepicker.setDefaults($.timepicker.regional['ja']);
+});
diff --git a/gstudio/static/gstudio/js/jquery-ui-timepicker-0.2.9/index.html b/gstudio/static/gstudio/js/jquery-ui-timepicker-0.2.9/index.html new file mode 100644 index 00000000..a29d78c7 --- /dev/null +++ b/gstudio/static/gstudio/js/jquery-ui-timepicker-0.2.9/index.html @@ -0,0 +1,1007 @@ +<!DOCTYPE html>
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
+ <title>jQuery UI Time Picker by Francois Gelinas</title>
+ <link rel="stylesheet" href="include/jquery-ui-1.8.14.custom.css" type="text/css" />
+ <link rel="stylesheet" href="jquery.ui.timepicker.css?v=0.2.9" type="text/css" />
+
+<!-- uncomment to test with legacy jquery -->
+<!--
+ <script type="text/javascript" src="jquery-1.2.6.js"></script>
+ <script type="text/javascript" src="jquery.fix.for.1.2.6.js"></script>
+ <script type="text/javascript" src="jquery.ui.1.6.all.js"></script>
+-->
+
+ <script type="text/javascript" src="include/jquery-1.5.1.min.js"></script>
+ <script type="text/javascript" src="include/jquery.ui.core.min.js"></script>
+ <script type="text/javascript" src="include/jquery.ui.widget.min.js"></script>
+ <script type="text/javascript" src="include/jquery.ui.tabs.min.js"></script>
+ <script type="text/javascript" src="include/jquery.ui.position.min.js"></script>
+
+ <script type="text/javascript" src="jquery.ui.timepicker.js?v=0.2.9"></script>
+
+ <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
+ <style type="text/css">
+ /* some styling for the page */
+ body { font-size: 10px; /* for the widget natural size */ }
+ #content { font-size: 1.2em; /* for the rest of the page to show at a normal size */
+ font-family: "Lucida Sans Unicode", "Lucida Grande", Verdana, Arial, Helvetica, sans-serif;
+ width: 950px; margin: auto;
+ }
+ .box { border: 1px solid #888; padding: 15px; margin:12px; }
+ .code { margin: 6px; padding: 9px; background-color: #fdf5ce; border: 1px solid #c77405; }
+ fieldset { padding: 0.5em 2em }
+ hr { margin: 0.5em 0; clear: both }
+ a { cursor: pointer; }
+ #requirements li { line-height: 1.6em; }
+ </style>
+
+ <script type="text/javascript">
+
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-24327002-1']);
+ _gaq.push(['_trackPageview']);
+
+ (function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ })();
+
+ function plusone_clicked() {
+ $('#thankyou').fadeIn(300);
+ }
+
+ $(document).ready(function() {
+ $('#floating_timepicker').timepicker({
+ onSelect: function(time, inst) {
+ $('#floating_selected_time').html('You selected ' + time);
+ }
+ });
+
+ $('#tabs').tabs();
+
+ });
+
+
+ </script>
+</head>
+<body>
+
+<div id="content">
+
+<div style="float: right; padding: 20px 0 20px 20px; font-size: 10px;">
+ <div id="floating_timepicker">
+ </div>
+ <span id="floating_selected_time">
+ </span>
+</div>
+
+<h1>jQuery UI Timepicker
+ <span style="color: #999; font-size:10px;">(By <a href="http://fgelinas.com">François Gélinas</a>)</span>
+ <g:plusone callback='plusone_clicked'></g:plusone>
+ <span id="thankyou" style="display: none; font-size: 0.6em;" class="code">
+ Thanks !! (:
+ </span>
+</h1>
+
+<h2>What is this?</h2>
+<p style="font-size: 1.1em;">
+
+ This is a jQuery UI time picker plugin build to match with other official jQuery UI widgets.
+ Based on the existing date picker, it will blend nicely with your form and use your selected jQuery UI theme.
+ The plugin is very easy to integrate in your form for you time (hours / minutes) inputs.
+</p>
+<p>
+ Licensed under the same license as jQuery : <a href="http://docs.jquery.com/Licensing">MIT and GPL licenses</a>
+</p>
+
+<div style="clear: both"></div>
+
+<div id="tabs">
+
+ <ul>
+ <li><a href="#examples">Examples</a></li>
+ <li><a href="#usage">Usage</a></li>
+ <li><a href="#requirements">Requirements</a></li>
+ <li><a href="#release_notes">Release notes</a></li>
+ <li><a href="#get_timepicker">Get Timepicker version 0.2.9</a></li>
+ </ul>
+
+ <div id="examples">
+ <div>
+ Default time picker :
+ <input type="text" style="width: 70px;" id="timepicker.[1]" value="" />
+ <script type="text/javascript">
+ $(document).ready(function() {
+ $('#timepicker\\.\\[1\\]').timepicker();
+ });
+ </script>
+
+ <a onclick="$('#script_1').toggle(200); return false;">[Show code]</a>
+ <pre id="script_1" style="display: none" class="code">$('#timepicker').timepicker();</pre>
+ </div>
+
+
+ <hr />
+
+ <div>
+ Time picker with period (AM/PM) in input and with hours leading 0s :
+ <input type="text" style="width: 70px;" id="timepicker_6" value="01:30 PM" />
+ <script type="text/javascript">
+ $(document).ready(function() {
+ $('#timepicker_6').timepicker({
+ showPeriod: true,
+ showLeadingZero: true
+ });
+ });
+ </script>
+
+ <a onclick="$('#script_6').toggle(200)">[Show code]</a>
+<pre id="script_6" style="display: none" class="code">$('#timepicker').timepicker({
+ showPeriod: true,
+ showLeadingZero: true
+});</pre>
+ </div>
+
+ <hr />
+
+ <div>
+ Time picker with buttons and labels in another language (Français) :
+ <input type="text" style="width: 70px;" id="timepicker_locale" value="13h30" />
+ <br>
+ See the <a href="i18n/i18n.html">internationalisation page</a> for more information and details.
+ <script type="text/javascript">
+ $(document).ready(function() {
+ $('#timepicker_locale').timepicker({
+ hourText: 'Heures',
+ minuteText: 'Minutes',
+ amPmText: ['AM', 'PM'],
+ timeSeparator: 'h',
+ showLeadingZero: false,
+ nowButtonText: 'Maintenant',
+ showNowButton: true,
+ closeButtonText: 'Fermer',
+ showCloseButton: true,
+ deselectButtonText: 'Désélectionner',
+ showDeselectButton: true
+ });
+ });
+
+ </script>
+ <a onclick="$('#script_locale').toggle(200)">[Show code]</a>
+<pre id="script_locale" style="display: none" class="code">$('#timepicker').timepicker({
+ hourText: 'Heures',
+ minuteText: 'Minutes',
+ amPmText: ['AM', 'PM'],
+ timeSeparator: 'h',
+ nowButtonText: 'Maintenant',
+ showNowButton: true,
+ closeButtonText: 'Fermer',
+ showCloseButton: true,
+ deselectButtonText: 'Désélectionner',
+ showDeselectButton: true
+});</pre>
+ </div>
+
+ <hr />
+
+ <div>
+ Time picker with restricted (disabled) hours / minutes. 8:30 PM to 6:30 AM disabled :
+ <input type="text" style="width: 70px" id="timepicker_7" value="01:30 PM" />
+
+ <script type="text/javascript">
+ $(document).ready(function() {
+ $('#timepicker_7').timepicker({
+ showPeriod: true,
+ onHourShow: timepicker7OnHourShowCallback,
+ onMinuteShow: timepicker7OnMinuteShowCallback
+ });
+ });
+ function timepicker7OnHourShowCallback(hour) {
+ if ((hour > 20) || (hour < 6)) {
+ return false;
+ }
+ return true;
+ }
+ function timepicker7OnMinuteShowCallback(hour, minute) {
+ if ((hour == 20) && (minute >= 30)) { return false; }
+ if ((hour == 6) && (minute < 30)) { return false; }
+ return true;
+ }
+
+ </script>
+ <a onclick="$('#script_7').toggle(200)">[Show code]</a>
+<pre id="script_7" style="display: none" class="code">$('#timepicker').timepicker({
+ showPeriod: true,
+ onHourShow: OnHourShowCallback,
+ onMinuteShow: OnMinuteShowCallback
+ });
+function OnHourShowCallback(hour) {
+ if ((hour > 20) || (hour < 6)) {
+ return false; // not valid
+ }
+ return true; // valid
+}
+function OnMinuteShowCallback(hour, minute) {
+ if ((hour == 20) && (minute >= 30)) { return false; } // not valid
+ if ((hour == 6) && (minute < 30)) { return false; } // not valid
+ return true; // valid
+}</pre>
+ </div>
+
+ <hr />
+
+ <div>
+ Define when the time picker is shown with the <kbd>showOn</kbd> option and set a trigger element with the <kbd>button</kbd> option
+ <input type="text" style="width: 70px;" id="timepicker_showon" value="13h30" />
+ <div class='timepicker_button_trigger'
+ style="width: 16px; height:16px; background: url(include/ui-lightness/images/ui-icons_222222_256x240.png) -80px, -96px;
+ display: inline-block; border-radius: 2px; border: 1px solid #222222; margin-top: 3px; cursor:pointer"></div>
+ <button class='timepicker_button_trigger' id="btn_trigger_timepicker">Show</button>
+
+
+ <script type="text/javascript">
+ $(document).ready(function() {
+ $('#timepicker_showon').timepicker({
+ showOn: 'button',
+ button: $('.timepicker_button_trigger'),
+ showLeadingZero: false,
+ timeSeparator: 'h'
+ });
+
+ });
+
+ </script>
+ <a onclick="$('#script_showhide').toggle(200)">[Show code]</a>
+<pre id="script_showhide" style="display: none" class="code">$('#timepicker').timepicker({
+ showOn: 'button',
+ button: '.timepicker_button_trigger'
+});
+</pre>
+
+ </div>
+
+
+ <hr />
+
+ <div>
+ Time picker without the AM/PM labels on the left (showPeriodLabels option set to false:
+ <input type="text" style="width: 70px;" id="timepicker_noPeriodLabels" value="13:30" />
+
+ <script type="text/javascript">
+ $(document).ready(function() {
+ $('#timepicker_noPeriodLabels').timepicker({
+ showPeriodLabels: false
+ });
+ });
+
+ </script>
+ <a onclick="$('#script_noPeriodLabels').toggle(200)">[Show code]</a>
+<pre id="script_noPeriodLabels" style="display: none" class="code">$('#timepicker').timepicker({
+ showPeriodLabels: false,
+});
+</pre>
+
+ </div>
+
+
+ <hr />
+
+ <div>
+
+ Custom defined hours range (Business hours 6am to 7pm) and minutes increment set to 15 instead of 5, on 3 rows
+ <input type="text" style="width: 70px" id="timepicker_customrange" value="13:30">
+ <script type="text/javascript">
+ $(document).ready(function() {
+ $('#timepicker_customrange').timepicker({
+ hours: { starts: 6, ends: 19 },
+ minutes: { interval: 15 },
+ rows: 3,
+ showPeriodLabels: true,
+ minuteText: 'Min'
+ })
+ });
+
+ </script>
+
+ <a onclick="$('#script_2').toggle(200)">[Show code]</a>
+<pre id="script_2" style="display: none" class="code"> $('#timepicke').timepicker({
+ hours: { starts: 6, ends: 19 },
+ minutes: { interval: 15 },
+ rows: 3
+ showPeriodLabels: true,
+ minuteText: 'Min'
+});
+</pre>
+ </div>
+
+ <hr />
+
+ <div>
+ Input for hours only :
+ <input type="text" style="width: 70px" id="timepicker_hours" value="5 PM">
+ , input for minutes only :
+ <input type="text" style="width: 70px" id="timepicker_minutes" value="45">
+
+ <script type="text/javascript">
+ $(document).ready(function() {
+ $('#timepicker_hours').timepicker({
+ showMinutes: false,
+ showPeriod: true,
+ showLeadingZero: false
+ });
+ $('#timepicker_minutes').timepicker({
+ showHours: false
+ });
+ })
+ </script>
+
+ <a onclick="$('#script_hoursminutesonly').toggle(200)">[Show code]</a>
+<pre id="script_hoursminutesonly" style="display: none" class="code">$('#timepicker_hours').timepicker({
+ showMinutes: false,
+ showPeriod: true,
+ showLeadingZero: false
+});
+$('#timepicker_minutes').timepicker({
+ showHours: false
+});</pre>
+
+ </div>
+
+
+ <hr />
+
+ <div>
+ Timepicker with the Now, Deselect and Close buttons
+ <input type="text" style="width: 70px" id="timepicker_buttons" value="12:35">
+
+
+ <script type="text/javascript">
+ $(document).ready(function() {
+ $('#timepicker_buttons').timepicker({
+ showNowButton: true,
+ showDeselectButton: true,
+ defaultTime: '', // removes the highlighted time for when the input is empty.
+ showCloseButton: true
+ });
+ })
+ </script>
+
+ <a onclick="$('#script_buttonpane').toggle(200)">[Show code]</a>
+<pre id="script_buttonpane" style="display: none" class="code">$('#timepicker_buttons').timepicker({
+ showNowButton: true,
+ showDeselectButton: true,
+ defaultTime: '', // removes the highlighted time for when the input is empty.
+ showCloseButton: true
+});</pre>
+
+ </div>
+
+
+ <hr />
+
+ <div>
+ onSelect (hours and minutes both trigger event), beforeShow and onClose events :
+ <input type="text" style="width: 70px" id="timepicker_3" value="13:30" />
+ <script type="text/javascript">
+ $(document).ready(function() {
+ $('#timepicker_3').timepicker({
+ beforeShow: function(input, inst) {
+ log_event('beforeShow triggered for instance id ' + inst.id);
+ },
+ onClose: function(time, inst) {
+ log_event('onClose triggered with time : ' + time + ' for instance id : ' + inst.id);
+ },
+ onSelect: function(time, inst) {
+ log_event('onSelect triggered with time : ' + time + ' for instance id : ' + inst.id);
+ }
+ });
+ });
+
+ function log_event(event) {
+ $('#events_log').val(
+ $('#events_log').val() + "\n" + event
+ )
+ }
+ </script>
+
+ <a onclick="$('#script_3').toggle(200)">[Show code]</a>
+<pre id="script_3" style="display: none" class="code">function log_event(event) {
+ $('#events_log').val(
+ $('#events_log').val() + "\n" + event
+ )
+}
+$('#timepicker').timepicker({
+ onClose: function(time, inst) {
+ log_event('onClose triggered with time : ' + time + ' for instance id : ' + inst.id);
+ },
+ onSelect: function(time, inst) {
+ log_event('onSelect triggered with time : ' + time + ' for instance id : ' + inst.id);
+ }
+});
+</pre>
+ <br />
+ <textarea id="events_log" rows="4" cols="120" >events log :</textarea>
+ </div>
+
+
+<hr />
+
+ <div>
+
+ <div style="float: left">
+ Inline time picker :
+ <span style="color: #888;">
+ Alternate field :
+ <input type="text" style="width: 70px" id="timepicker_alt" value="13:30" readonly="readonly" disabled="disabled"/>
+ </span>
+ <br />
+ <input type="button" value="Change time to 16:55" onclick="javascript:$('#timepicker_inline_7').timepicker('setTime','16:55');">
+ <br>
+ <input type="button" id='tp7_getTime_button' value="Get selected time" onclick="javascript:tp7_getTime();" >
+ <br>
+ <input type="button" id="tp7_getHourMinute_button" value="Get hour and minute" onclick="javascript:tp7_getHourMinute();" >
+ <br />
+ <a onclick="$('#script_inline').toggle(200); return false;">[Show code]</a>
+ </div>
+ <div id="timepicker_inline_7" style="font-size: 10px; float: left; margin-left: 24px;"></div>
+ <script type="text/javascript">
+ $(document).ready(function() {
+ $('#timepicker_inline_7').timepicker({
+ altField: '#timepicker_alt',
+ defaultTime: '13:30'
+ });
+ });
+ function tp7_getTime() {
+ $('#tp7_getTime_button').val('Selected time : ' + $('#timepicker_inline_7').timepicker('getTime'));
+ }
+ function tp7_getHourMinute() {
+ $('#tp7_getHourMinute_button').val(
+ 'Hour : ' + $('#timepicker_inline_7').timepicker('getHour')
+ + ', ' +
+ 'minute : ' + $('#timepicker_inline_7').timepicker('getMinute')
+ );
+ }
+ </script>
+ <div style="clear: both"></div>
+
+<pre class="code" id="script_inline" style="display: none">$('#timepicker_inline_div').timepicker({
+ altField: '#timepicker_alt_input',
+ defaultTime: '9:20'
+});
+function setNewTime() {
+ $('#timepicker_inline_div').timepicker('setTime','16:55');
+}
+function getTime() {
+ $('#getTime_button').val('Selected time : ' + $('#timepicker').timepicker('getTime'));
+}
+function getHourMinute() {
+ $('#getHourMinute_button').val(
+ 'Hour : ' + $('#timepicker').timepicker('getHour')
+ + ', ' +
+ 'minute : ' + $('#timepicker').timepicker('getMinute')
+ );
+}
+</pre>
+
+ </div>
+
+
+ <hr />
+
+ <div>
+
+ Two timepickers to select chronological time range, the first timepicker is restricted to before the time selected in the second timepicker, and vice versa.
+ <br>
+ Start time :
+ <input type="text" style="width: 70px" id="timepicker_start" value="9:15" />
+ end time :
+ <input type="text" style="width: 70px" id="timepicker_end" value="16:30" />
+
+ <a onclick="$('#script_time_range').toggle(200); return false;">[Show code]</a>
+
+ <script type="text/javascript">
+ $(document).ready(function() {
+ $('#timepicker_start').timepicker({
+ showLeadingZero: false,
+ onHourShow: tpStartOnHourShowCallback,
+ onMinuteShow: tpStartOnMinuteShowCallback
+ });
+ $('#timepicker_end').timepicker({
+ showLeadingZero: false,
+ onHourShow: tpEndOnHourShowCallback,
+ onMinuteShow: tpEndOnMinuteShowCallback
+ });
+ });
+
+ function tpStartOnHourShowCallback(hour) {
+ var tpEndHour = $('#timepicker_end').timepicker('getHour');
+ // Check if proposed hour is prior or equal to selected end time hour
+ if (hour <= tpEndHour) { return true; }
+ // if hour did not match, it can not be selected
+ return false;
+ }
+ function tpStartOnMinuteShowCallback(hour, minute) {
+ var tpEndHour = $('#timepicker_end').timepicker('getHour');
+ var tpEndMinute = $('#timepicker_end').timepicker('getMinute');
+ // Check if proposed hour is prior to selected end time hour
+ if (hour < tpEndHour) { return true; }
+ // Check if proposed hour is equal to selected end time hour and minutes is prior
+ if ( (hour == tpEndHour) && (minute < tpEndMinute) ) { return true; }
+ // if minute did not match, it can not be selected
+ return false;
+ }
+
+ function tpEndOnHourShowCallback(hour) {
+ var tpStartHour = $('#timepicker_start').timepicker('getHour');
+ // Check if proposed hour is after or equal to selected start time hour
+ if (hour >= tpStartHour) { return true; }
+ // if hour did not match, it can not be selected
+ return false;
+ }
+ function tpEndOnMinuteShowCallback(hour, minute) {
+ var tpStartHour = $('#timepicker_start').timepicker('getHour');
+ var tpStartMinute = $('#timepicker_start').timepicker('getMinute');
+ // Check if proposed hour is after selected start time hour
+ if (hour > tpStartHour) { return true; }
+ // Check if proposed hour is equal to selected start time hour and minutes is after
+ if ( (hour == tpStartHour) && (minute > tpStartMinute) ) { return true; }
+ // if minute did not match, it can not be selected
+ return false;
+ }
+
+ </script>
+
+<pre class="code" id="script_time_range" style="display: none">
+$(document).ready(function() {
+ $('#timepicker_start').timepicker({
+ showLeadingZero: false,
+ onHourShow: tpStartOnHourShowCallback,
+ onMinuteShow: tpStartOnMinuteShowCallback
+ });
+ $('#timepicker_end').timepicker({
+ showLeadingZero: false,
+ onHourShow: tpEndOnHourShowCallback,
+ onMinuteShow: tpEndOnMinuteShowCallback
+ });
+});
+
+function tpStartOnHourShowCallback(hour) {
+ var tpEndHour = $('#timepicker_end').timepicker('getHour');
+ // Check if proposed hour is prior or equal to selected end time hour
+ if (hour <= tpEndHour) { return true; }
+ // if hour did not match, it can not be selected
+ return false;
+}
+function tpStartOnMinuteShowCallback(hour, minute) {
+ var tpEndHour = $('#timepicker_end').timepicker('getHour');
+ var tpEndMinute = $('#timepicker_end').timepicker('getMinute');
+ // Check if proposed hour is prior to selected end time hour
+ if (hour < tpEndHour) { return true; }
+ // Check if proposed hour is equal to selected end time hour and minutes is prior
+ if ( (hour == tpEndHour) && (minute < tpEndMinute) ) { return true; }
+ // if minute did not match, it can not be selected
+ return false;
+}
+
+function tpEndOnHourShowCallback(hour) {
+ var tpStartHour = $('#timepicker_start').timepicker('getHour');
+ // Check if proposed hour is after or equal to selected start time hour
+ if (hour >= tpStartHour) { return true; }
+ // if hour did not match, it can not be selected
+ return false;
+}
+function tpEndOnMinuteShowCallback(hour, minute) {
+ var tpStartHour = $('#timepicker_start').timepicker('getHour');
+ var tpStartMinute = $('#timepicker_start').timepicker('getMinute');
+ // Check if proposed hour is after selected start time hour
+ if (hour > tpStartHour) { return true; }
+ // Check if proposed hour is equal to selected start time hour and minutes is after
+ if ( (hour == tpStartHour) && (minute > tpStartMinute) ) { return true; }
+ // if minute did not match, it can not be selected
+ return false;
+}
+</pre>
+
+ </div>
+
+
+
+ <hr />
+
+ <div>
+ Example to disable and re-enable a timepicker.
+ <br />
+ <div id="timepicker_disable_inline" style="font-size: 10px; float: left;"></div>
+ <input type="text" style="width: 70px" id="timepicker_disable" value="9:15" />
+ <br />
+ <button id="btn_disable_tp">Disable the time pickers</button>
+ <br />
+ <button id="btn_enable_tp">Re-enable the time pickers</button>
+ <br />
+ <a onclick="$('#script_tp_disable').toggle(200); return false;">[Show code]</a>
+ <div style="clear: both"></div>
+
+ <script type="text/javascript">
+ $(document).ready(function() {
+ $('#timepicker_disable_inline').timepicker();
+ $('#timepicker_disable').timepicker({showLeadingZero: false });
+ $('#btn_disable_tp').click(function() {
+ $('#timepicker_disable_inline').timepicker('disable');
+ $('#timepicker_disable').timepicker('disable');
+ });
+ $('#btn_enable_tp').click(function() {
+ $('#timepicker_disable_inline').timepicker('enable');
+ $('#timepicker_disable').timepicker('enable');
+ });
+ });
+ </script>
+<pre class="code" style="display: none" id="script_tp_disable">
+$('#timepicker_disable_inline').timepicker();
+$('#timepicker_disable').timepicker({showLeadingZero: false });
+$('#btn_disable_tp').click(function() {
+ $('#timepicker_disable_inline').timepicker('disable');
+ $('#timepicker_disable').timepicker('disable');
+});
+$('#btn_enable_tp').click(function() {
+ $('#timepicker_disable_inline').timepicker('enable');
+ $('#timepicker_disable').timepicker('enable');
+});
+</pre>
+ </div>
+
+
+ </div>
+
+ <!------------------------------------------------------------------------------------------------------------->
+ <!------------------------------------------------------------------------------------------------------------->
+ <!------------------------------------------------------------------------------------------------------------->
+
+ <div id="usage">
+
+ <h2><a name="documentation"></a>Usage:</h2>
+ <pre class="code">$('#timepicker').timepicker({
+ // Options
+ timeSeparator: ':', // The character to use to separate hours and minutes. (default: ':')
+ showLeadingZero: true, // Define whether or not to show a leading zero for hours < 10.
+ (default: true)
+ showMinutesLeadingZero: true, // Define whether or not to show a leading zero for minutes < 10.
+ (default: true)
+ showPeriod: false, // Define whether or not to show AM/PM with selected time. (default: false)
+ showPeriodLabels: true, // Define if the AM/PM labels on the left are displayed. (default: true)
+ periodSeparator: ' ', // The character to use to separate the time from the time period.
+ altField: '#alternate_input', // Define an alternate input to parse selected time to
+ defaultTime: '12:34', // Used as default time when input field is empty or for inline timePicker
+ // (set to 'now' for the current time, '' for no highlighted time,
+ default value: now)
+
+ // trigger options
+ showOn: 'focus', // Define when the timepicker is shown.
+ // 'focus': when the input gets focus, 'button' when the button trigger element is clicked,
+ // 'both': when the input gets focus and when the button is clicked.
+ button: null, // jQuery selector that acts as button trigger. ex: '#trigger_button'
+
+ // Localization
+ hourText: 'Hour', // Define the locale text for "Hours"
+ minuteText: 'Minute', // Define the locale text for "Minute"
+ amPmText: ['AM', 'PM'], // Define the locale text for periods
+
+ // Position
+ myPosition: 'left top', // Corner of the dialog to position, used with the jQuery UI Position utility if present.
+ atPosition: 'left bottom', // Corner of the input to position
+
+ // Events
+ beforeShow: beforeShowCallback, // Callback function executed before the timepicker is rendered and displayed.
+ onSelect: onSelectCallback, // Define a callback function when an hour / minutes is selected.
+ onClose: onCloseCallback, // Define a callback function when the timepicker is closed.
+ onHourShow: onHourShow, // Define a callback to enable / disable certain hours. ex: function onHourShow(hour)
+ onMinuteShow: onMinuteShow, // Define a callback to enable / disable certain minutes. ex: function onMinuteShow(hour, minute)
+
+ // custom hours and minutes
+ hours: {
+ starts: 0, // First displayed hour
+ ends: 23 // Last displayed hour
+ },
+ minutes: {
+ starts: 0, // First displayed minute
+ ends: 55, // Last displayed minute
+ interval: 5 // Interval of displayed minutes
+ },
+ rows: 4, // Number of rows for the input tables, minimum 2, makes more sense if you use multiple of 2
+ showHours: true, // Define if the hours section is displayed or not. Set to false to get a minute only dialog
+ showMinutes: true, // Define if the minutes section is displayed or not. Set to false to get an hour only dialog
+
+ // buttons
+ showCloseButton: false, // shows an OK button to confirm the edit
+ closeButtonText: 'Done', // Text for the confirmation button (ok button)
+ showNowButton: false, // Shows the 'now' button
+ nowButtonText: 'Now', // Text for the now button
+ showDeselectButton: false, // Shows the deselect time button
+ deselectButtonText: 'Deselect' // Text for the deselect button
+
+});</pre>
+
+ </div>
+
+ <!------------------------------------------------------------------------------------------------------------->
+ <!------------------------------------------------------------------------------------------------------------->
+ <!------------------------------------------------------------------------------------------------------------->
+
+ <div id="requirements">
+ <h2>Requirements : </h2>
+ <ul>
+ <li>
+ <a href="http://jquery.com">
+ jQuery 1.5.1 (probably works with previous versions)
+ </a>
+ </li>
+ <li>
+ <a href="http://jqueryui.com/">
+ jQuery UI Core (included in jquery-ui-x.x.x.custom.min.js)
+ </a>
+ </li>
+ <li>
+ <a href="http://jqueryui.com/demos/position/">
+ jQuery UI Position utility (optional for special position of the dialog)
+ </a>
+ </li>
+ <li>
+ <a href="http://jqueryui.com/">
+ jQuery UI Theme.css (included in jquery-ui-x.x.x.custom.css)
+ </a>
+ </li>
+
+ <li>
+ <a href="jquery.ui.timepicker.js?v=0.2.9">
+ jquery.ui.timepicker.js
+ </a>
+ </li>
+
+ <li>
+ <a href="jquery.ui.timepicker.css?v=0.2.9">
+ jquery.ui.timepicker.css
+ </a>
+ </li>
+
+
+ </ul>
+ </div>
+
+ <!------------------------------------------------------------------------------------------------------------->
+ <!------------------------------------------------------------------------------------------------------------->
+ <!------------------------------------------------------------------------------------------------------------->
+
+ <div id="release_notes">
+
+ <h2>Releases :</h2>
+ <dl>
+
+ <dt>Release 0.2.9 - November 13, 2011</dt>
+ <dd>Fixed the zIndex problem and removed the zIndex option (Thanks everyone who reported the problem)</dd>
+ <dd>Fix a bug where repeatedly clicking on hour cells made the timepicker very slow.</dd>
+ <dd>Added Italian translation, thanks to Serge Margarita.</dd>
+
+ <dt>Release 0.2.8 - October 28, 2011</dt>
+ <dd>Updated defaultTime to allow for Date object (github issue #26)</dd>
+ <dd>Fixed the now and deselect buttons in IE</dd>
+
+ <dt>Release 0.2.7 - October 19, 2011</dt>
+ <dd>Added option to omit minutes in parsed time when user select 0 for minutes. (Thanks tribalvibes, Github issue #23)</dd>
+ <dd>Added support for internationalisation (fr, de and ja, Thanks Bernd Plagge).</dd>
+ <dd>Added an <a href="i18n/i18n.html">internationalisation page</a></dd>
+
+ <dt>0.2.6 - October 12, 2011</dt>
+ <dd>Fixed a bug when input ID have more then one special char. (Thanks Jacqueline Krijnen)</dd>
+ <dd>Fixed a bug when parsing hours only or minutes only time. (Thanks protron, <a href="https://github.com/fgelinas/timepicker/issues/20">github issue #20</a>)</dd>
+ <dd>Added 'Now', 'Deselect' and 'Close' buttons. (Thanks Christian Grobmeier for the close button code, <a href="https://github.com/fgelinas/timepicker/issues/20">github issue #22</a>)</dd>
+
+ <dt>0.2.5 - September 13, 2011</dt>
+ <dd>Added support for disable and enable. (Suggested by danielrex, github issue #17)</dd>
+ <dd>Added an example for 2 timepicker to behave as a period selector (start time and end time). (Thanks Bill Pellowe)</dd>
+ <dd>Renamed the stylesheet to jquery.ui.timepicker.css to be more consistent with jQuery UI file name convention.</dd>
+
+ <dt>0.2.4 - August 5, 2011</dt>
+ <dd>Fixed the hand cursor in the css file. (Thanks Mike Neumegen)</dd>
+ <dd>Added position option to use with the jquery ui position utility.</dd>
+ <dd>Added option to display only hours or only minutes.</dd>
+
+ <dt>0.2.3 - July 11, 2011 </dt>
+ <dd>Fix github issue #3 : Bug when hours or minutes choices does not divide by number of rows (thanks wukimus).</dd>
+ <dd>Changed default behavior of the defaultTime option, if set to '' and input is empty, there will be no highlighted time in the popup (Thanks Rasmus Schultz)</dd>
+ <dd>Fix github issue #4 : Error when generating empty minute cell. (Thanks 123Haynes)</dd>
+ <dd>Fix github issue #5 : Add functionality for "getTime" option. (Thanks edanuff)</dd>
+ <dd>Added the periodSeparator option. (thanks jrchamp)</dd>
+ <dd>Fixed "getTime" for inline timepickers. (thanks Mike Neumegen)</dd>
+ <dd>Added "getHour" and "getMinute" to get individual values.</dd>
+ <dd>New page interface, about time :)</dd>
+
+ <dt>0.2.2 - June 16, 2011</dt>
+ <dd>Fixed a "console.log" line that I forgot to remove before release 0.2.1. (Thanks Derek Lavine)</dd>
+
+ <dt>0.2.1 - June 8, 2011</dt>
+ <dd>Timepicker does not give the focus back to the input any more after time selection. This is similar to the datepicker behaviour and is more natural to the user because it shows the dialog again when the user click on the input again, as expected.</dd>
+ <dd>Added options to customize the hours and minutes ranges and interval for more customization.</dd>
+
+ <dt>0.2 - May 28, 2011</dt>
+ <dd>In the last release, I messed up versions and lost some changes so I'm fixing all this up with release 0.2</dd>
+
+
+ <dt>0.1.2 - May 26, 2011</dt>
+ <dd>Fixed a bug with inline timepickers that would append a #timepickr hashtag when selecting hours and minutes.</dd>
+ <dd>Fixed z-index problem with IE6 (Thanks Graham Bentley)</dd>
+ <dd>Added selection of highlighted text when enter is pressed on the input field (Thanks Glen Chiacchieri)</dd>
+ <dd>Adjusted some focus problems, now the input gets the focus back when the used click on hours / minutes.</dd>
+
+ <dt>0.1.something aka the lost release - around April 11</dt>
+ <dd>Fixed a bug for when input Id had a dot in it, it was getting double escaped when it should not. (Thanks Zdenek Machac)</dd>
+ <dd>So in 0.1.1 I created a bug that made timepicker changes the location hash, well now it's fixed. (Thanks Lucas Falk)</dd>
+
+ <dt>0.1.1 - April 6, 2011</dt>
+ <dd>Changed the cells click and dblclick binding for faster rendering in IE6/7 (Thanks Blair Parsons)</dd>
+ <dd>Fixed a class naming bug created in 0.1.0 (Thanks Morlion Peter)</dd>
+
+ <dt>0.1.0 - March 23, 2011</dt>
+ <dd>Fixed some bugs with version 0.0.9</dd>
+
+ <dt>0.0.9 - March 22, 2011</dt>
+ <dd>Added zIndex option (Thanks Frank Enderle)</dd>
+ <dd>Added showPeriodLabels option (default: true) to show/hide AM/PM labels on the left (thanks Frank Enderle)</dd>
+ <dd>Added showOn ['focus'|'button'|'both'] and button options for alternate trigger method</dd>
+
+ <dt>0.0.8 - February 17, 2011</dt>
+ <dd>Fixed close event not triggered when switching to another input with time picker (thanks Stuart Gregg)</dd>
+
+ <dt>0.0.7 - February 10, 2011</dt>
+ <dd>Added function to set time after initialisation :$('#timepicker').timepicker('setTime',newTime);</dd>
+ <dd>Added support for disabled period of time : onHourShow and onMinuteShow (thanks Rene Felgenträger)</dd>
+
+ <dt>0.0.6 - January 19, 2011</dt>
+ <dd>Replaced some div with tables to : fix some display bugs in IE7, fix inline display and fix my headhake.</dd>
+ <dd>Added standard "change" event being triggered on the input when the content changes. (Thanks Rasmus Schultz)</dd>
+ <dd>Added support for inline timePicker, attached to div or span.</dd>
+ <dd>Added altField that receive the parsed time value when selected time changes.</dd>
+ <dd>Added defaultTime value to use when input field is missing (inline) or input value is empty. If defaultTime is missing then current time is used.</dd>
+
+ <dt>0.0.5 - January 18, 2011</dt>
+ <dd>Now updating time picker selected value when manually typing in the text field (thanks Rasmus Schultz)<br />
+ <small>Another step toward inline time picker ?</small></dd>
+ <dd>Fixed : with showPeriod: true and showLeadingZero: true, PM hours did not show leading zeros (thanks Chandler May)</dd>
+ <dd>Fixed : with showPeriod: true and showLeadingZero: true, Selecting 12 AM shows as 00 AM in the input field, also parsing 12AM did not work correctly (thanks Rasmus Schultz)</dd>
+
+ <dt>0.0.4 - January 10, 2011</dt>
+ <dd>Changed showLeadingZero to affect only hours, added showMinutesLeadingZero for minutes display.</dd>
+ <dd>Changed the default value of timeSeparator from 'h' to ':'.</dd>
+ <dd>Removed width:100% on tables in the css, caused a bug in some browsers.</dd>
+
+ <dt>0.0.3 - January 8, 2011</dt>
+ <dd>Fixed a bug with the widget not displaying with some jQuery UI 1.8.7 css. (Thanks Alexander Fietz)</dd>
+ <dd>Fixed a display bug on page load, a small empty div was visible at the bottom of pages. (Thanks Gertjan van Roekel)</dd>
+ <dd>Modified the jquery-ui-timepicker.css to make the widget more dynamic to style and sizes changes.</dd>
+
+ <dt>0.0.2 - January 4, 2011</dt>
+ <dd>Added showPeriod: period (AM/PM) in input and showLeadingZero: to control display of number < 10. (big thanks Steve Commisso)</dd>
+
+ <dt>0.0.1 - December 2010</dt>
+ <dd>First release</dd>
+ </dl>
+
+ <hr />
+
+ <h2>To Do : </h2>
+
+ <ul>
+ <li>
+ Possibility to use the timepicker for hours only, or minutes only.
+ </li>
+
+ <li>
+ Change the code style to use the jQuery widget framework.
+ </li>
+ <li>
+ Detect a second click on the same cell and close the picker (ie: the user selected hours and do not want to select different minutes or vice versa, and click twice on the same cell instead)
+ This is already simulated with the handling of the double click.
+ </li>
+ </ul>
+
+ </div>
+
+ <!------------------------------------------------------------------------------------------------------------->
+ <!------------------------------------------------------------------------------------------------------------->
+ <!------------------------------------------------------------------------------------------------------------->
+
+ <div id="get_timepicker">
+
+ <h2>Download Timepicker</h2>
+
+ <p>
+ Current version : 0.2.9 - released November 13, 2011
+ </p>
+
+ <p>
+ <a href="http://github.com/fgelinas/timepicker">Get it on github</a>
+ </p>
+
+ <p>
+ <a href="releases/jquery-ui-timepicker-0.2.9.zip">Download from here (.zip)</a>
+ </p>
+
+ <hr >
+
+ <p>
+ I put a lot of time and effort in this project. If you like it, please <span style="text-decoration: line-through">pay me a beer</span> donate
+ <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
+ <input type="hidden" name="cmd" value="_s-xclick">
+ <input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----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-----END PKCS7-----
+ ">
+ <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
+ <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
+ </form>
+ </p>
+
+ <hr />
+
+ <p>
+ Instruction for legacy jQuery integration (jQuery 1.2.6 and jQuery UI 1.6)
+ <br>
+
+ <ul>
+ <li>
+ <a href="releases/jquery-ui-timepicker-legacy_support.zip">Get the legacy package here</a>
+ , built with jQuery Timepicker 0.2.4 but should work with newer versions
+ </li>
+ <li>
+ Make sure to include jquery-1.2.6.js, jquery.fix.for.1.2.6.js and jquery.ui.1.6.all.js
+ </li>
+ <li>
+ See the working example in index.html in the "legacy_1.2.6" folder.
+ </li>
+ <li>
+ Support for previous versions of jquery is limited.
+ </li>
+ </ul>
+
+ </p>
+
+ </div>
+</div>
+
+
+<hr />
+<!-- =============================================================================================================== -->
+
+<div id="footer">
+
+
+
+ <p>
+ <strong>New! New!</strong> TimePicker is now 100% more social, on GitHub @ <a href="http://github.com/fgelinas/timepicker">http://github.com/fgelinas/timepicker</a>.
+ </p>
+ <p>
+ Get the release package here : <a href="releases/jquery-ui-timepicker-0.2.9.zip">jquery-ui-timepicker-0.2.9.zip</a>
+ </p>
+
+ <hr />
+
+ <p>
+ <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
+ I put a lot of time and effort in this project. If you like it, please <span style="text-decoration: line-through">pay me a beer</span> donate
+ <input type="hidden" name="cmd" value="_s-xclick">
+ <input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----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-----END PKCS7-----
+ ">
+ <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
+ <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
+ </form>
+ </p>
+
+
+ <hr />
+ Bug, ideas or comments : <a href="mailto:frank@fgelinas.com">frank@fgelinas.com</a>
+
+</div>
+
+</div>
+
+</body>
+</html>
diff --git a/gstudio/static/gstudio/js/jquery-ui-timepicker-0.2.9/jquery.ui.timepicker.css b/gstudio/static/gstudio/js/jquery-ui-timepicker-0.2.9/jquery.ui.timepicker.css new file mode 100644 index 00000000..08b442a7 --- /dev/null +++ b/gstudio/static/gstudio/js/jquery-ui-timepicker-0.2.9/jquery.ui.timepicker.css @@ -0,0 +1,69 @@ +/*
+ * Timepicker stylesheet
+ * Highly inspired from datepicker
+ * FG - Nov 2010 - Web3R
+ *
+ * version 0.0.3 : Fixed some settings, more dynamic
+ * version 0.0.4 : Removed width:100% on tables
+ * version 0.1.1 : set width 0 on tables to fix an ie6 bug
+ */
+
+.ui-timepicker-inline { display: inline; }
+
+#ui-timepicker-div { padding: 0.2em }
+.ui-timepicker-table { display: inline-table; width: 0; }
+.ui-timepicker-table table { margin:0.15em 0 0 0; border-collapse: collapse; }
+
+.ui-timepicker-hours, .ui-timepicker-minutes { padding: 0.2em; }
+
+.ui-timepicker-table .ui-timepicker-title { line-height: 1.8em; text-align: center; }
+.ui-timepicker-table td { padding: 0.1em; width: 2.2em; }
+.ui-timepicker-table th.periods { padding: 0.1em; width: 2.2em; }
+
+/* span for disabled cells */
+.ui-timepicker-table td span {
+ display:block;
+ padding:0.2em 0.3em 0.2em 0.5em;
+ width: 1.2em;
+
+ text-align:right;
+ text-decoration:none;
+}
+/* anchors for clickable cells */
+.ui-timepicker-table td a {
+ display:block;
+ padding:0.2em 0.3em 0.2em 0.5em;
+ width: 1.2em;
+ cursor: pointer;
+ text-align:right;
+ text-decoration:none;
+}
+
+
+/* buttons and button pane styling */
+.ui-timepicker .ui-timepicker-buttonpane {
+ background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0;
+}
+.ui-timepicker .ui-timepicker-buttonpane button { margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
+/* The close button */
+.ui-timepicker .ui-timepicker-close { float: right }
+
+/* the now button */
+.ui-timepicker .ui-timepicker-now { float: left; }
+
+/* the deselect button */
+.ui-timepicker .ui-timepicker-deselect { float: left; }
+
+
+/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
+.ui-timepicker-cover {
+ display: none; /*sorry for IE5*/
+ display/**/: block; /*sorry for IE5*/
+ position: absolute; /*must have*/
+ z-index: -1; /*must have*/
+ filter: mask(); /*must have*/
+ top: -4px; /*must have*/
+ left: -4px; /*must have*/
+ width: 200px; /*must have*/
+ height: 200px; /*must have*/
+}
\ No newline at end of file diff --git a/gstudio/static/gstudio/js/jquery-ui-timepicker-0.2.9/jquery.ui.timepicker.js b/gstudio/static/gstudio/js/jquery-ui-timepicker-0.2.9/jquery.ui.timepicker.js new file mode 100644 index 00000000..d086b674 --- /dev/null +++ b/gstudio/static/gstudio/js/jquery-ui-timepicker-0.2.9/jquery.ui.timepicker.js @@ -0,0 +1,1345 @@ +/*
+ * jQuery UI Timepicker 0.2.9
+ *
+ * Copyright 2010-2011, Francois Gelinas
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://fgelinas.com/code/timepicker
+ *
+ * Depends:
+ * jquery.ui.core.js
+ * jquery.ui.position.js (only if position settngs are used)
+ *
+ * Change version 0.1.0 - moved the t-rex up here
+ *
+ ____
+ ___ .-~. /_"-._
+ `-._~-. / /_ "~o\ :Y
+ \ \ / : \~x. ` ')
+ ] Y / | Y< ~-.__j
+ / ! _.--~T : l l< /.-~
+ / / ____.--~ . ` l /~\ \<|Y
+ / / .-~~" /| . ',-~\ \L|
+ / / / .^ \ Y~Y \.^>/l_ "--'
+ / Y .-"( . l__ j_j l_/ /~_.-~ .
+ Y l / \ ) ~~~." / `/"~ / \.__/l_
+ | \ _.-" ~-{__ l : l._Z~-.___.--~
+ | ~---~ / ~~"---\_ ' __[>
+ l . _.^ ___ _>-y~
+ \ \ . .-~ .-~ ~>--" /
+ \ ~---" / ./ _.-'
+ "-.,_____.,_ _.--~\ _.-~
+ ~~ ( _} -Row
+ `. ~(
+ ) \
+ /,`--'~\--'~\
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ->T-Rex<-
+*/
+
+(function ($, undefined) {
+
+ $.extend($.ui, { timepicker: { version: "0.2.9"} });
+
+ var PROP_NAME = 'timepicker';
+ var tpuuid = new Date().getTime();
+
+ /* Time picker manager.
+ Use the singleton instance of this class, $.timepicker, to interact with the time picker.
+ Settings for (groups of) time pickers are maintained in an instance object,
+ allowing multiple different settings on the same page. */
+
+ function Timepicker() {
+ this.debug = true; // Change this to true to start debugging
+ this._curInst = null; // The current instance in use
+ this._isInline = false; // true if the instance is displayed inline
+ this._disabledInputs = []; // List of time picker inputs that have been disabled
+ this._timepickerShowing = false; // True if the popup picker is showing , false if not
+ this._inDialog = false; // True if showing within a "dialog", false if not
+ this._dialogClass = 'ui-timepicker-dialog'; // The name of the dialog marker class
+ this._mainDivId = 'ui-timepicker-div'; // The ID of the main timepicker division
+ this._inlineClass = 'ui-timepicker-inline'; // The name of the inline marker class
+ this._currentClass = 'ui-timepicker-current'; // The name of the current hour / minutes marker class
+ this._dayOverClass = 'ui-timepicker-days-cell-over'; // The name of the day hover marker class
+
+ this.regional = []; // Available regional settings, indexed by language code
+ this.regional[''] = { // Default regional settings
+ hourText: 'Hour', // Display text for hours section
+ minuteText: 'Minute', // Display text for minutes link
+ amPmText: ['AM', 'PM'], // Display text for AM PM
+ closeButtonText: 'Done', // Text for the confirmation button (ok button)
+ nowButtonText: 'Now', // Text for the now button
+ deselectButtonText: 'Deselect' // Text for the deselect button
+ };
+ this._defaults = { // Global defaults for all the time picker instances
+ showOn: 'focus', // 'focus' for popup on focus,
+ // 'button' for trigger button, or 'both' for either (not yet implemented)
+ button: null, // 'button' element that will trigger the timepicker
+ showAnim: 'fadeIn', // Name of jQuery animation for popup
+ showOptions: {}, // Options for enhanced animations
+ appendText: '', // Display text following the input box, e.g. showing the format
+
+ beforeShow: null, // Define a callback function executed before the timepicker is shown
+ onSelect: null, // Define a callback function when a hour / minutes is selected
+ onClose: null, // Define a callback function when the timepicker is closed
+
+ timeSeparator: ':', // The character to use to separate hours and minutes.
+ periodSeparator: ' ', // The character to use to separate the time from the time period.
+ showPeriod: false, // Define whether or not to show AM/PM with selected time
+ showPeriodLabels: true, // Show the AM/PM labels on the left of the time picker
+ showLeadingZero: true, // Define whether or not to show a leading zero for hours < 10. [true/false]
+ showMinutesLeadingZero: true, // Define whether or not to show a leading zero for minutes < 10.
+ altField: '', // Selector for an alternate field to store selected time into
+ defaultTime: 'now', // Used as default time when input field is empty or for inline timePicker
+ // (set to 'now' for the current time, '' for no highlighted time)
+ myPosition: 'left top', // Position of the dialog relative to the input.
+ // see the position utility for more info : http://jqueryui.com/demos/position/
+ atPosition: 'left bottom', // Position of the input element to match
+ // Note : if the position utility is not loaded, the timepicker will attach left top to left bottom
+ //NEW: 2011-02-03
+ onHourShow: null, // callback for enabling / disabling on selectable hours ex : function(hour) { return true; }
+ onMinuteShow: null, // callback for enabling / disabling on time selection ex : function(hour,minute) { return true; }
+
+ hours: {
+ starts: 0, // first displayed hour
+ ends: 23 // last displayed hour
+ },
+ minutes: {
+ starts: 0, // first displayed minute
+ ends: 55, // last displayed minute
+ interval: 5 // interval of displayed minutes
+ },
+ rows: 4, // number of rows for the input tables, minimum 2, makes more sense if you use multiple of 2
+ // 2011-08-05 0.2.4
+ showHours: true, // display the hours section of the dialog
+ showMinutes: true, // display the minute section of the dialog
+ optionalMinutes: false, // optionally parse inputs of whole hours with minutes omitted
+
+ // buttons
+ showCloseButton: false, // shows an OK button to confirm the edit
+ showNowButton: false, // Shows the 'now' button
+ showDeselectButton: false // Shows the deselect time button
+
+ };
+ $.extend(this._defaults, this.regional['']);
+
+ this.tpDiv = $('<div id="' + this._mainDivId + '" class="ui-timepicker ui-widget ui-helper-clearfix ui-corner-all " style="display: none"></div>');
+ }
+
+ $.extend(Timepicker.prototype, {
+ /* Class name added to elements to indicate already configured with a time picker. */
+ markerClassName: 'hasTimepicker',
+
+ /* Debug logging (if enabled). */
+ log: function () {
+ if (this.debug)
+ console.log.apply('', arguments);
+ },
+
+ _widgetTimepicker: function () {
+ return this.tpDiv;
+ },
+
+ /* Override the default settings for all instances of the time picker.
+ @param settings object - the new settings to use as defaults (anonymous object)
+ @return the manager object */
+ setDefaults: function (settings) {
+ extendRemove(this._defaults, settings || {});
+ return this;
+ },
+
+ /* Attach the time picker to a jQuery selection.
+ @param target element - the target input field or division or span
+ @param settings object - the new settings to use for this time picker instance (anonymous) */
+ _attachTimepicker: function (target, settings) {
+ // check for settings on the control itself - in namespace 'time:'
+ var inlineSettings = null;
+ for (var attrName in this._defaults) {
+ var attrValue = target.getAttribute('time:' + attrName);
+ if (attrValue) {
+ inlineSettings = inlineSettings || {};
+ try {
+ inlineSettings[attrName] = eval(attrValue);
+ } catch (err) {
+ inlineSettings[attrName] = attrValue;
+ }
+ }
+ }
+ var nodeName = target.nodeName.toLowerCase();
+ var inline = (nodeName == 'div' || nodeName == 'span');
+
+ if (!target.id) {
+ this.uuid += 1;
+ target.id = 'tp' + this.uuid;
+ }
+ var inst = this._newInst($(target), inline);
+ inst.settings = $.extend({}, settings || {}, inlineSettings || {});
+ if (nodeName == 'input') {
+ this._connectTimepicker(target, inst);
+ // init inst.hours and inst.minutes from the input value
+ this._setTimeFromField(inst);
+ } else if (inline) {
+ this._inlineTimepicker(target, inst);
+ }
+
+
+ },
+
+ /* Create a new instance object. */
+ _newInst: function (target, inline) {
+ var id = target[0].id.replace(/([^A-Za-z0-9_-])/g, '\\\\$1'); // escape jQuery meta chars
+ return {
+ id: id, input: target, // associated target
+ inline: inline, // is timepicker inline or not :
+ tpDiv: (!inline ? this.tpDiv : // presentation div
+ $('<div class="' + this._inlineClass + ' ui-timepicker ui-widget ui-helper-clearfix"></div>'))
+ };
+ },
+
+ /* Attach the time picker to an input field. */
+ _connectTimepicker: function (target, inst) {
+ var input = $(target);
+ inst.append = $([]);
+ inst.trigger = $([]);
+ if (input.hasClass(this.markerClassName)) { return; }
+ this._attachments(input, inst);
+ input.addClass(this.markerClassName).
+ keydown(this._doKeyDown).
+ keyup(this._doKeyUp).
+ bind("setData.timepicker", function (event, key, value) {
+ inst.settings[key] = value;
+ }).
+ bind("getData.timepicker", function (event, key) {
+ return this._get(inst, key);
+ });
+ $.data(target, PROP_NAME, inst);
+ },
+
+ /* Handle keystrokes. */
+ _doKeyDown: function (event) {
+ var inst = $.timepicker._getInst(event.target);
+ var handled = true;
+ inst._keyEvent = true;
+ if ($.timepicker._timepickerShowing) {
+ switch (event.keyCode) {
+ case 9: $.timepicker._hideTimepicker();
+ handled = false;
+ break; // hide on tab out
+ case 13:
+ $.timepicker._updateSelectedValue(inst);
+ $.timepicker._hideTimepicker();
+
+ return false; // don't submit the form
+ break; // select the value on enter
+ case 27: $.timepicker._hideTimepicker();
+ break; // hide on escape
+ default: handled = false;
+ }
+ }
+ else if (event.keyCode == 36 && event.ctrlKey) { // display the time picker on ctrl+home
+ $.timepicker._showTimepicker(this);
+ }
+ else {
+ handled = false;
+ }
+ if (handled) {
+ event.preventDefault();
+ event.stopPropagation();
+ }
+ },
+
+ /* Update selected time on keyUp */
+ /* Added verion 0.0.5 */
+ _doKeyUp: function (event) {
+ var inst = $.timepicker._getInst(event.target);
+ $.timepicker._setTimeFromField(inst);
+ $.timepicker._updateTimepicker(inst);
+ },
+
+ /* Make attachments based on settings. */
+ _attachments: function (input, inst) {
+ var appendText = this._get(inst, 'appendText');
+ var isRTL = this._get(inst, 'isRTL');
+ if (inst.append) { inst.append.remove(); }
+ if (appendText) {
+ inst.append = $('<span class="' + this._appendClass + '">' + appendText + '</span>');
+ input[isRTL ? 'before' : 'after'](inst.append);
+ }
+ input.unbind('focus.timepicker', this._showTimepicker);
+ if (inst.trigger) { inst.trigger.remove(); }
+
+ var showOn = this._get(inst, 'showOn');
+ if (showOn == 'focus' || showOn == 'both') { // pop-up time picker when in the marked field
+ input.bind("focus.timepicker", this._showTimepicker);
+ }
+ if (showOn == 'button' || showOn == 'both') { // pop-up time picker when 'button' element is clicked
+ var button = this._get(inst, 'button');
+ $(button).bind("click.timepicker", function () {
+ if ($.timepicker._timepickerShowing && $.timepicker._lastInput == input[0]) { $.timepicker._hideTimepicker(); }
+ else { $.timepicker._showTimepicker(input[0]); }
+ return false;
+ });
+
+ }
+ },
+
+
+ /* Attach an inline time picker to a div. */
+ _inlineTimepicker: function(target, inst) {
+ var divSpan = $(target);
+ if (divSpan.hasClass(this.markerClassName))
+ return;
+ divSpan.addClass(this.markerClassName).append(inst.tpDiv).
+ bind("setData.timepicker", function(event, key, value){
+ inst.settings[key] = value;
+ }).bind("getData.timepicker", function(event, key){
+ return this._get(inst, key);
+ });
+ $.data(target, PROP_NAME, inst);
+
+ this._setTimeFromField(inst);
+ this._updateTimepicker(inst);
+ inst.tpDiv.show();
+ },
+
+ /* Pop-up the time picker for a given input field.
+ @param input element - the input field attached to the time picker or
+ event - if triggered by focus */
+ _showTimepicker: function (input) {
+ input = input.target || input;
+ if (input.nodeName.toLowerCase() != 'input') { input = $('input', input.parentNode)[0]; } // find from button/image trigger
+ if ($.timepicker._isDisabledTimepicker(input) || $.timepicker._lastInput == input) { return; } // already here
+
+ // fix v 0.0.8 - close current timepicker before showing another one
+ $.timepicker._hideTimepicker();
+
+ var inst = $.timepicker._getInst(input);
+ if ($.timepicker._curInst && $.timepicker._curInst != inst) {
+ $.timepicker._curInst.tpDiv.stop(true, true);
+ }
+ var beforeShow = $.timepicker._get(inst, 'beforeShow');
+ extendRemove(inst.settings, (beforeShow ? beforeShow.apply(input, [input, inst]) : {}));
+ inst.lastVal = null;
+ $.timepicker._lastInput = input;
+
+ $.timepicker._setTimeFromField(inst);
+
+ // calculate default position
+ if ($.timepicker._inDialog) { input.value = ''; } // hide cursor
+ if (!$.timepicker._pos) { // position below input
+ $.timepicker._pos = $.timepicker._findPos(input);
+ $.timepicker._pos[1] += input.offsetHeight; // add the height
+ }
+ var isFixed = false;
+ $(input).parents().each(function () {
+ isFixed |= $(this).css('position') == 'fixed';
+ return !isFixed;
+ });
+ if (isFixed && $.browser.opera) { // correction for Opera when fixed and scrolled
+ $.timepicker._pos[0] -= document.documentElement.scrollLeft;
+ $.timepicker._pos[1] -= document.documentElement.scrollTop;
+ }
+
+ var offset = { left: $.timepicker._pos[0], top: $.timepicker._pos[1] };
+
+ $.timepicker._pos = null;
+ // determine sizing offscreen
+ inst.tpDiv.css({ position: 'absolute', display: 'block', top: '-1000px' });
+ $.timepicker._updateTimepicker(inst);
+
+
+ // position with the ui position utility, if loaded
+ if ( ( ! inst.inline ) && ( typeof $.ui.position == 'object' ) ) {
+ inst.tpDiv.position({
+ of: inst.input,
+ my: $.timepicker._get( inst, 'myPosition' ),
+ at: $.timepicker._get( inst, 'atPosition' ),
+ // offset: $( "#offset" ).val(),
+ // using: using,
+ collision: 'flip'
+ });
+ var offset = inst.tpDiv.offset();
+ $.timepicker._pos = [offset.top, offset.left];
+ }
+
+
+ // reset clicked state
+ inst._hoursClicked = false;
+ inst._minutesClicked = false;
+
+ // fix width for dynamic number of time pickers
+ // and adjust position before showing
+ offset = $.timepicker._checkOffset(inst, offset, isFixed);
+ inst.tpDiv.css({ position: ($.timepicker._inDialog && $.blockUI ?
+ 'static' : (isFixed ? 'fixed' : 'absolute')), display: 'none',
+ left: offset.left + 'px', top: offset.top + 'px'
+ });
+ if ( ! inst.inline ) {
+ var showAnim = $.timepicker._get(inst, 'showAnim');
+ var duration = $.timepicker._get(inst, 'duration');
+
+ var postProcess = function () {
+ $.timepicker._timepickerShowing = true;
+ var borders = $.timepicker._getBorders(inst.tpDiv);
+ inst.tpDiv.find('iframe.ui-timepicker-cover'). // IE6- only
+ css({ left: -borders[0], top: -borders[1],
+ width: inst.tpDiv.outerWidth(), height: inst.tpDiv.outerHeight()
+ });
+ };
+
+ // Fixed the zIndex problem for real (I hope) - FG - v 0.2.9
+ inst.tpDiv.css('zIndex', $.timepicker._getZIndex(input) +1);
+
+ if ($.effects && $.effects[showAnim]) {
+ inst.tpDiv.show(showAnim, $.timepicker._get(inst, 'showOptions'), duration, postProcess);
+ }
+ else {
+ inst.tpDiv[showAnim || 'show']((showAnim ? duration : null), postProcess);
+ }
+ if (!showAnim || !duration) { postProcess(); }
+ if (inst.input.is(':visible') && !inst.input.is(':disabled')) { inst.input.focus(); }
+ $.timepicker._curInst = inst;
+ }
+ },
+
+ // This is a copy of the zIndex function of UI core 1.8.??
+ // Copied in the timepicker to stay backward compatible.
+ _getZIndex: function (target) {
+ var elem = $( target ), position, value;
+ while ( elem.length && elem[ 0 ] !== document ) {
+ position = elem.css( "position" );
+ if ( position === "absolute" || position === "relative" || position === "fixed" ) {
+ value = parseInt( elem.css( "zIndex" ), 10 );
+ if ( !isNaN( value ) && value !== 0 ) {
+ return value;
+ }
+ }
+ elem = elem.parent();
+ }
+ },
+
+ /* Generate the time picker content. */
+ _updateTimepicker: function (inst) {
+ inst.tpDiv.empty().append(this._generateHTML(inst));
+ this._rebindDialogEvents(inst);
+
+ },
+
+ _rebindDialogEvents: function (inst) {
+ var borders = $.timepicker._getBorders(inst.tpDiv),
+ self = this;
+ inst.tpDiv
+ .find('iframe.ui-timepicker-cover') // IE6- only
+ .css({ left: -borders[0], top: -borders[1],
+ width: inst.tpDiv.outerWidth(), height: inst.tpDiv.outerHeight()
+ })
+ .end()
+ // after the picker html is appended bind the click & double click events (faster in IE this way
+ // then letting the browser interpret the inline events)
+ // the binding for the minute cells also exists in _updateMinuteDisplay
+ .find('.ui-timepicker-minute-cell')
+ .unbind()
+ .bind("click", { fromDoubleClick:false }, $.proxy($.timepicker.selectMinutes, this))
+ .bind("dblclick", { fromDoubleClick:true }, $.proxy($.timepicker.selectMinutes, this))
+ .end()
+ .find('.ui-timepicker-hour-cell')
+ .unbind()
+ .bind("click", { fromDoubleClick:false }, $.proxy($.timepicker.selectHours, this))
+ .bind("dblclick", { fromDoubleClick:true }, $.proxy($.timepicker.selectHours, this))
+ .end()
+ .find('.ui-timepicker td a')
+ .unbind()
+ .bind('mouseout', function () {
+ $(this).removeClass('ui-state-hover');
+ if (this.className.indexOf('ui-timepicker-prev') != -1) $(this).removeClass('ui-timepicker-prev-hover');
+ if (this.className.indexOf('ui-timepicker-next') != -1) $(this).removeClass('ui-timepicker-next-hover');
+ })
+ .bind('mouseover', function () {
+ if ( ! self._isDisabledTimepicker(inst.inline ? inst.tpDiv.parent()[0] : inst.input[0])) {
+ $(this).parents('.ui-timepicker-calendar').find('a').removeClass('ui-state-hover');
+ $(this).addClass('ui-state-hover');
+ if (this.className.indexOf('ui-timepicker-prev') != -1) $(this).addClass('ui-timepicker-prev-hover');
+ if (this.className.indexOf('ui-timepicker-next') != -1) $(this).addClass('ui-timepicker-next-hover');
+ }
+ })
+ .end()
+ .find('.' + this._dayOverClass + ' a')
+ .trigger('mouseover')
+ .end()
+ .find('.ui-timepicker-now').bind("click",function(e) {
+ $.timepicker.selectNow(e);
+ }).end()
+ .find('.ui-timepicker-deselect').bind("click",function(e) {
+ $.timepicker.deselectTime(e);
+ }).end()
+ .find('.ui-timepicker-close').bind("click",function(e) {
+ $.timepicker._hideTimepicker();
+ }).end();
+ },
+
+ /* Generate the HTML for the current state of the time picker. */
+ _generateHTML: function (inst) {
+
+ var h, m, row, col, html, hoursHtml, minutesHtml = '',
+ showPeriod = (this._get(inst, 'showPeriod') == true),
+ showPeriodLabels = (this._get(inst, 'showPeriodLabels') == true),
+ showLeadingZero = (this._get(inst, 'showLeadingZero') == true),
+ showHours = (this._get(inst, 'showHours') == true),
+ showMinutes = (this._get(inst, 'showMinutes') == true),
+ amPmText = this._get(inst, 'amPmText'),
+ rows = this._get(inst, 'rows'),
+ amRows = 0,
+ pmRows = 0,
+ amItems = 0,
+ pmItems = 0,
+ amFirstRow = 0,
+ pmFirstRow = 0,
+ hours = Array(),
+ hours_options = this._get(inst, 'hours'),
+ hoursPerRow = null,
+ hourCounter = 0,
+ hourLabel = this._get(inst, 'hourText'),
+ showCloseButton = this._get(inst, 'showCloseButton'),
+ closeButtonText = this._get(inst, 'closeButtonText'),
+ showNowButton = this._get(inst, 'showNowButton'),
+ nowButtonText = this._get(inst, 'nowButtonText'),
+ showDeselectButton = this._get(inst, 'showDeselectButton'),
+ deselectButtonText = this._get(inst, 'deselectButtonText'),
+ showButtonPanel = showCloseButton || showNowButton || showDeselectButton;
+
+
+
+ // prepare all hours and minutes, makes it easier to distribute by rows
+ for (h = hours_options.starts; h <= hours_options.ends; h++) {
+ hours.push (h);
+ }
+ hoursPerRow = Math.ceil(hours.length / rows); // always round up
+
+ if (showPeriodLabels) {
+ for (hourCounter = 0; hourCounter < hours.length; hourCounter++) {
+ if (hours[hourCounter] < 12) {
+ amItems++;
+ }
+ else {
+ pmItems++;
+ }
+ }
+ hourCounter = 0;
+
+ amRows = Math.floor(amItems / hours.length * rows);
+ pmRows = Math.floor(pmItems / hours.length * rows);
+
+ // assign the extra row to the period that is more densly populated
+ if (rows != amRows + pmRows) {
+ // Make sure: AM Has Items and either PM Does Not, AM has no rows yet, or AM is more dense
+ if (amItems && (!pmItems || !amRows || (pmRows && amItems / amRows >= pmItems / pmRows))) {
+ amRows++;
+ } else {
+ pmRows++;
+ }
+ }
+ amFirstRow = Math.min(amRows, 1);
+ pmFirstRow = amRows + 1;
+ hoursPerRow = Math.ceil(Math.max(amItems / amRows, pmItems / pmRows));
+ }
+
+
+ html = '<table class="ui-timepicker-table ui-widget-content ui-corner-all"><tr>';
+
+ if (showHours) {
+
+ html += '<td class="ui-timepicker-hours">' +
+ '<div class="ui-timepicker-title ui-widget-header ui-helper-clearfix ui-corner-all">' +
+ hourLabel +
+ '</div>' +
+ '<table class="ui-timepicker">';
+
+ for (row = 1; row <= rows; row++) {
+ html += '<tr>';
+ // AM
+ if (row == amFirstRow && showPeriodLabels) {
+ html += '<th rowspan="' + amRows.toString() + '" class="periods" scope="row">' + amPmText[0] + '</th>';
+ }
+ // PM
+ if (row == pmFirstRow && showPeriodLabels) {
+ html += '<th rowspan="' + pmRows.toString() + '" class="periods" scope="row">' + amPmText[1] + '</th>';
+ }
+ for (col = 1; col <= hoursPerRow; col++) {
+ if (showPeriodLabels && row < pmFirstRow && hours[hourCounter] >= 12) {
+ html += this._generateHTMLHourCell(inst, undefined, showPeriod, showLeadingZero);
+ } else {
+ html += this._generateHTMLHourCell(inst, hours[hourCounter], showPeriod, showLeadingZero);
+ hourCounter++;
+ }
+ }
+ html += '</tr>';
+ }
+ html += '</tr></table>' + // Close the hours cells table
+ '</td>'; // Close the Hour td
+ }
+
+ if (showMinutes) {
+ html += '<td class="ui-timepicker-minutes">';
+ html += this._generateHTMLMinutes(inst);
+ html += '</td>';
+ }
+
+ html += '</tr>';
+
+
+ if (showButtonPanel) {
+ var buttonPanel = '<tr><td colspan="3"><div class="ui-timepicker-buttonpane ui-widget-content">';
+ if (showNowButton) {
+ buttonPanel += '<button type="button" class="ui-timepicker-now ui-state-default ui-corner-all" '
+ + ' data-timepicker-instance-id="#' + inst.id.replace(/\\\\/g,"\\") + '" >'
+ + nowButtonText + '</button>';
+ }
+ if (showDeselectButton) {
+ buttonPanel += '<button type="button" class="ui-timepicker-deselect ui-state-default ui-corner-all" '
+ + ' data-timepicker-instance-id="#' + inst.id.replace(/\\\\/g,"\\") + '" >'
+ + deselectButtonText + '</button>';
+ }
+ if (showCloseButton) {
+ buttonPanel += '<button type="button" class="ui-timepicker-close ui-state-default ui-corner-all" '
+ + ' data-timepicker-instance-id="#' + inst.id.replace(/\\\\/g,"\\") + '" >'
+ + closeButtonText + '</button>';
+ }
+
+ html += buttonPanel + '</div></td></tr>';
+ }
+ html += '</table>';
+
+ /* IE6 IFRAME FIX (taken from datepicker 1.5.3, fixed in 0.1.2 */
+ html += ($.browser.msie && parseInt($.browser.version,10) < 7 && !inst.inline ?
+ '<iframe src="javascript:false;" class="ui-timepicker-cover" frameborder="0"></iframe>' : '');
+
+ return html;
+ },
+
+ /* Special function that update the minutes selection in currently visible timepicker
+ * called on hour selection when onMinuteShow is defined */
+ _updateMinuteDisplay: function (inst) {
+ var newHtml = this._generateHTMLMinutes(inst);
+ inst.tpDiv.find('td.ui-timepicker-minutes').html(newHtml);
+ this._rebindDialogEvents(inst);
+ // after the picker html is appended bind the click & double click events (faster in IE this way
+ // then letting the browser interpret the inline events)
+ // yes I know, duplicate code, sorry
+/* .find('.ui-timepicker-minute-cell')
+ .bind("click", { fromDoubleClick:false }, $.proxy($.timepicker.selectMinutes, this))
+ .bind("dblclick", { fromDoubleClick:true }, $.proxy($.timepicker.selectMinutes, this));
+*/
+
+ },
+
+ /*
+ * Generate the minutes table
+ * This is separated from the _generateHTML function because is can be called separately (when hours changes)
+ */
+ _generateHTMLMinutes: function (inst) {
+
+ var m, row, html = '',
+ rows = this._get(inst, 'rows'),
+ minutes = Array(),
+ minutes_options = this._get(inst, 'minutes'),
+ minutesPerRow = null,
+ minuteCounter = 0,
+ showMinutesLeadingZero = (this._get(inst, 'showMinutesLeadingZero') == true),
+ onMinuteShow = this._get(inst, 'onMinuteShow'),
+ minuteLabel = this._get(inst, 'minuteText');
+
+ if ( ! minutes_options.starts) {
+ minutes_options.starts = 0;
+ }
+ if ( ! minutes_options.ends) {
+ minutes_options.ends = 59;
+ }
+ for (m = minutes_options.starts; m <= minutes_options.ends; m += minutes_options.interval) {
+ minutes.push(m);
+ }
+ minutesPerRow = Math.round(minutes.length / rows + 0.49); // always round up
+
+ /*
+ * The minutes table
+ */
+ // if currently selected minute is not enabled, we have a problem and need to select a new minute.
+ if (onMinuteShow &&
+ (onMinuteShow.apply((inst.input ? inst.input[0] : null), [inst.hours , inst.minutes]) == false) ) {
+ // loop minutes and select first available
+ for (minuteCounter = 0; minuteCounter < minutes.length; minuteCounter += 1) {
+ m = minutes[minuteCounter];
+ if (onMinuteShow.apply((inst.input ? inst.input[0] : null), [inst.hours, m])) {
+ inst.minutes = m;
+ break;
+ }
+ }
+ }
+
+
+
+ html += '<div class="ui-timepicker-title ui-widget-header ui-helper-clearfix ui-corner-all">' +
+ minuteLabel +
+ '</div>' +
+ '<table class="ui-timepicker">';
+
+ minuteCounter = 0;
+ for (row = 1; row <= rows; row++) {
+ html += '<tr>';
+ while (minuteCounter < row * minutesPerRow) {
+ var m = minutes[minuteCounter];
+ var displayText = '';
+ if (m !== undefined ) {
+ displayText = (m < 10) && showMinutesLeadingZero ? "0" + m.toString() : m.toString();
+ }
+ html += this._generateHTMLMinuteCell(inst, m, displayText);
+ minuteCounter++;
+ }
+ html += '</tr>';
+ }
+
+ html += '</table>';
+
+ return html;
+ },
+
+ /* Generate the content of a "Hour" cell */
+ _generateHTMLHourCell: function (inst, hour, showPeriod, showLeadingZero) {
+
+ var displayHour = hour;
+ if ((hour > 12) && showPeriod) {
+ displayHour = hour - 12;
+ }
+ if ((displayHour == 0) && showPeriod) {
+ displayHour = 12;
+ }
+ if ((displayHour < 10) && showLeadingZero) {
+ displayHour = '0' + displayHour;
+ }
+
+ var html = "";
+ var enabled = true;
+ var onHourShow = this._get(inst, 'onHourShow'); //custom callback
+
+ if (hour == undefined) {
+ html = '<td><span class="ui-state-default ui-state-disabled"> </span></td>';
+ return html;
+ }
+
+ if (onHourShow) {
+ enabled = onHourShow.apply((inst.input ? inst.input[0] : null), [hour]);
+ }
+
+ if (enabled) {
+ html = '<td class="ui-timepicker-hour-cell" data-timepicker-instance-id="#' + inst.id.replace(/\\\\/g,"\\") + '" data-hour="' + hour.toString() + '">' +
+ '<a class="ui-state-default ' +
+ (hour == inst.hours ? 'ui-state-active' : '') +
+ '">' +
+ displayHour.toString() +
+ '</a></td>';
+ }
+ else {
+ html =
+ '<td>' +
+ '<span class="ui-state-default ui-state-disabled ' +
+ (hour == inst.hours ? ' ui-state-active ' : ' ') +
+ '">' +
+ displayHour.toString() +
+ '</span>' +
+ '</td>';
+ }
+ return html;
+ },
+
+ /* Generate the content of a "Hour" cell */
+ _generateHTMLMinuteCell: function (inst, minute, displayText) {
+ var html = "";
+ var enabled = true;
+ var onMinuteShow = this._get(inst, 'onMinuteShow'); //custom callback
+ if (onMinuteShow) {
+ //NEW: 2011-02-03 we should give the hour as a parameter as well!
+ enabled = onMinuteShow.apply((inst.input ? inst.input[0] : null), [inst.hours,minute]); //trigger callback
+ }
+
+ if (minute == undefined) {
+ html = '<td><span class="ui-state-default ui-state-disabled"> </span></td>';
+ return html;
+ }
+
+ if (enabled) {
+ html = '<td class="ui-timepicker-minute-cell" data-timepicker-instance-id="#' + inst.id.replace(/\\\\/g,"\\") + '" data-minute="' + minute.toString() + '" >' +
+ '<a class="ui-state-default ' +
+ (minute == inst.minutes ? 'ui-state-active' : '') +
+ '" >' +
+ displayText +
+ '</a></td>';
+ }
+ else {
+
+ html = '<td>' +
+ '<span class="ui-state-default ui-state-disabled" >' +
+ displayText +
+ '</span>' +
+ '</td>';
+ }
+ return html;
+ },
+
+
+ /* Enable the date picker to a jQuery selection.
+ @param target element - the target input field or division or span */
+ _enableTimepicker: function(target) {
+ var $target = $(target),
+ target_id = $target.attr('id'),
+ inst = $.data(target, PROP_NAME);
+
+ if (!$target.hasClass(this.markerClassName)) {
+ return;
+ }
+ var nodeName = target.nodeName.toLowerCase();
+ if (nodeName == 'input') {
+ target.disabled = false;
+ inst.trigger.filter('button').
+ each(function() { this.disabled = false; }).end();
+ }
+ else if (nodeName == 'div' || nodeName == 'span') {
+ var inline = $target.children('.' + this._inlineClass);
+ inline.children().removeClass('ui-state-disabled');
+ }
+ this._disabledInputs = $.map(this._disabledInputs,
+ function(value) { return (value == target_id ? null : value); }); // delete entry
+ },
+
+ /* Disable the time picker to a jQuery selection.
+ @param target element - the target input field or division or span */
+ _disableTimepicker: function(target) {
+ var $target = $(target);
+ var inst = $.data(target, PROP_NAME);
+ if (!$target.hasClass(this.markerClassName)) {
+ return;
+ }
+ var nodeName = target.nodeName.toLowerCase();
+ if (nodeName == 'input') {
+ target.disabled = true;
+
+ inst.trigger.filter('button').
+ each(function() { this.disabled = true; }).end();
+
+ }
+ else if (nodeName == 'div' || nodeName == 'span') {
+ var inline = $target.children('.' + this._inlineClass);
+ inline.children().addClass('ui-state-disabled');
+ }
+ this._disabledInputs = $.map(this._disabledInputs,
+ function(value) { return (value == target ? null : value); }); // delete entry
+ this._disabledInputs[this._disabledInputs.length] = $target.attr('id');
+ },
+
+ /* Is the first field in a jQuery collection disabled as a timepicker?
+ @param target_id element - the target input field or division or span
+ @return boolean - true if disabled, false if enabled */
+ _isDisabledTimepicker: function (target_id) {
+ if ( ! target_id) { return false; }
+ for (var i = 0; i < this._disabledInputs.length; i++) {
+ if (this._disabledInputs[i] == target_id) { return true; }
+ }
+ return false;
+ },
+
+ /* Check positioning to remain on screen. */
+ _checkOffset: function (inst, offset, isFixed) {
+ var tpWidth = inst.tpDiv.outerWidth();
+ var tpHeight = inst.tpDiv.outerHeight();
+ var inputWidth = inst.input ? inst.input.outerWidth() : 0;
+ var inputHeight = inst.input ? inst.input.outerHeight() : 0;
+ var viewWidth = document.documentElement.clientWidth + $(document).scrollLeft();
+ var viewHeight = document.documentElement.clientHeight + $(document).scrollTop();
+
+ offset.left -= (this._get(inst, 'isRTL') ? (tpWidth - inputWidth) : 0);
+ offset.left -= (isFixed && offset.left == inst.input.offset().left) ? $(document).scrollLeft() : 0;
+ offset.top -= (isFixed && offset.top == (inst.input.offset().top + inputHeight)) ? $(document).scrollTop() : 0;
+
+ // now check if datepicker is showing outside window viewport - move to a better place if so.
+ offset.left -= Math.min(offset.left, (offset.left + tpWidth > viewWidth && viewWidth > tpWidth) ?
+ Math.abs(offset.left + tpWidth - viewWidth) : 0);
+ offset.top -= Math.min(offset.top, (offset.top + tpHeight > viewHeight && viewHeight > tpHeight) ?
+ Math.abs(tpHeight + inputHeight) : 0);
+
+ return offset;
+ },
+
+ /* Find an object's position on the screen. */
+ _findPos: function (obj) {
+ var inst = this._getInst(obj);
+ var isRTL = this._get(inst, 'isRTL');
+ while (obj && (obj.type == 'hidden' || obj.nodeType != 1)) {
+ obj = obj[isRTL ? 'previousSibling' : 'nextSibling'];
+ }
+ var position = $(obj).offset();
+ return [position.left, position.top];
+ },
+
+ /* Retrieve the size of left and top borders for an element.
+ @param elem (jQuery object) the element of interest
+ @return (number[2]) the left and top borders */
+ _getBorders: function (elem) {
+ var convert = function (value) {
+ return { thin: 1, medium: 2, thick: 3}[value] || value;
+ };
+ return [parseFloat(convert(elem.css('border-left-width'))),
+ parseFloat(convert(elem.css('border-top-width')))];
+ },
+
+
+ /* Close time picker if clicked elsewhere. */
+ _checkExternalClick: function (event) {
+ if (!$.timepicker._curInst) { return; }
+ var $target = $(event.target);
+ if ($target[0].id != $.timepicker._mainDivId &&
+ $target.parents('#' + $.timepicker._mainDivId).length == 0 &&
+ !$target.hasClass($.timepicker.markerClassName) &&
+ !$target.hasClass($.timepicker._triggerClass) &&
+ $.timepicker._timepickerShowing && !($.timepicker._inDialog && $.blockUI))
+ $.timepicker._hideTimepicker();
+ },
+
+ /* Hide the time picker from view.
+ @param input element - the input field attached to the time picker */
+ _hideTimepicker: function (input) {
+ var inst = this._curInst;
+ if (!inst || (input && inst != $.data(input, PROP_NAME))) { return; }
+ if (this._timepickerShowing) {
+ var showAnim = this._get(inst, 'showAnim');
+ var duration = this._get(inst, 'duration');
+ var postProcess = function () {
+ $.timepicker._tidyDialog(inst);
+ this._curInst = null;
+ };
+ if ($.effects && $.effects[showAnim]) {
+ inst.tpDiv.hide(showAnim, $.timepicker._get(inst, 'showOptions'), duration, postProcess);
+ }
+ else {
+ inst.tpDiv[(showAnim == 'slideDown' ? 'slideUp' :
+ (showAnim == 'fadeIn' ? 'fadeOut' : 'hide'))]((showAnim ? duration : null), postProcess);
+ }
+ if (!showAnim) { postProcess(); }
+ var onClose = this._get(inst, 'onClose');
+ if (onClose) {
+ onClose.apply(
+ (inst.input ? inst.input[0] : null),
+ [(inst.input ? inst.input.val() : ''), inst]); // trigger custom callback
+ }
+ this._timepickerShowing = false;
+ this._lastInput = null;
+ if (this._inDialog) {
+ this._dialogInput.css({ position: 'absolute', left: '0', top: '-100px' });
+ if ($.blockUI) {
+ $.unblockUI();
+ $('body').append(this.tpDiv);
+ }
+ }
+ this._inDialog = false;
+ }
+ },
+
+
+
+ /* Tidy up after a dialog display. */
+ _tidyDialog: function (inst) {
+ inst.tpDiv.removeClass(this._dialogClass).unbind('.ui-timepicker');
+ },
+
+ /* Retrieve the instance data for the target control.
+ @param target element - the target input field or division or span
+ @return object - the associated instance data
+ @throws error if a jQuery problem getting data */
+ _getInst: function (target) {
+ try {
+ return $.data(target, PROP_NAME);
+ }
+ catch (err) {
+ throw 'Missing instance data for this timepicker';
+ }
+ },
+
+ /* Get a setting value, defaulting if necessary. */
+ _get: function (inst, name) {
+ return inst.settings[name] !== undefined ?
+ inst.settings[name] : this._defaults[name];
+ },
+
+ /* Parse existing time and initialise time picker. */
+ _setTimeFromField: function (inst) {
+ if (inst.input.val() == inst.lastVal) { return; }
+ var defaultTime = this._get(inst, 'defaultTime');
+
+ var timeToParse = defaultTime == 'now' ? this._getCurrentTimeRounded(inst) : defaultTime;
+ if ((inst.inline == false) && (inst.input.val() != '')) { timeToParse = inst.input.val() }
+
+ if (timeToParse instanceof Date) {
+ inst.hours = timeToParse.getHours();
+ inst.minutes = timeToParse.getMinutes();
+ } else {
+ var timeVal = inst.lastVal = timeToParse;
+ if (timeToParse == '') {
+ inst.hours = -1;
+ inst.minutes = -1;
+ } else {
+ var time = this.parseTime(inst, timeVal);
+ inst.hours = time.hours;
+ inst.minutes = time.minutes;
+ }
+ }
+
+
+ $.timepicker._updateTimepicker(inst);
+ },
+
+ /* Update or retrieve the settings for an existing time picker.
+ @param target element - the target input field or division or span
+ @param name object - the new settings to update or
+ string - the name of the setting to change or retrieve,
+ when retrieving also 'all' for all instance settings or
+ 'defaults' for all global defaults
+ @param value any - the new value for the setting
+ (omit if above is an object or to retrieve a value) */
+ _optionTimepicker: function(target, name, value) {
+ var inst = this._getInst(target);
+ if (arguments.length == 2 && typeof name == 'string') {
+ return (name == 'defaults' ? $.extend({}, $.timepicker._defaults) :
+ (inst ? (name == 'all' ? $.extend({}, inst.settings) :
+ this._get(inst, name)) : null));
+ }
+ var settings = name || {};
+ if (typeof name == 'string') {
+ settings = {};
+ settings[name] = value;
+ }
+ if (inst) {
+ if (this._curInst == inst) {
+ this._hideTimepicker();
+ }
+ extendRemove(inst.settings, settings);
+ this._updateTimepicker(inst);
+ }
+ },
+
+
+ /* Set the time for a jQuery selection.
+ @param target element - the target input field or division or span
+ @param time String - the new time */
+ _setTimeTimepicker: function(target, time) {
+ var inst = this._getInst(target);
+ if (inst) {
+ this._setTime(inst, time);
+ this._updateTimepicker(inst);
+ this._updateAlternate(inst, time);
+ }
+ },
+
+ /* Set the time directly. */
+ _setTime: function(inst, time, noChange) {
+ var origHours = inst.hours;
+ var origMinutes = inst.minutes;
+ var time = this.parseTime(inst, time);
+ inst.hours = time.hours;
+ inst.minutes = time.minutes;
+
+ if ((origHours != inst.hours || origMinutes != inst.minuts) && !noChange) {
+ inst.input.trigger('change');
+ }
+ this._updateTimepicker(inst);
+ this._updateSelectedValue(inst);
+ },
+
+ /* Return the current time, ready to be parsed, rounded to the closest 5 minute */
+ _getCurrentTimeRounded: function (inst) {
+ var currentTime = new Date(),
+ currentMinutes = currentTime.getMinutes(),
+ // round to closest 5
+ adjustedMinutes = Math.round( currentMinutes / 5 ) * 5;
+ currentTime.setMinutes(adjustedMinutes);
+ return currentTime;
+ },
+
+ /*
+ * Parse a time string into hours and minutes
+ */
+ parseTime: function (inst, timeVal) {
+ var retVal = new Object();
+ retVal.hours = -1;
+ retVal.minutes = -1;
+
+ var timeSeparator = this._get(inst, 'timeSeparator'),
+ amPmText = this._get(inst, 'amPmText'),
+ showHours = this._get(inst, 'showHours'),
+ showMinutes = this._get(inst, 'showMinutes'),
+ optionalMinutes = this._get(inst, 'optionalMinutes'),
+ showPeriod = (this._get(inst, 'showPeriod') == true),
+ p = timeVal.indexOf(timeSeparator);
+
+ // check if time separator found
+ if (p != -1) {
+ retVal.hours = parseInt(timeVal.substr(0, p), 10);
+ retVal.minutes = parseInt(timeVal.substr(p + 1), 10);
+ }
+ // check for hours only
+ else if ( (showHours) && ( !showMinutes || optionalMinutes ) ) {
+ retVal.hours = parseInt(timeVal, 10);
+ }
+ // check for minutes only
+ else if ( ( ! showHours) && (showMinutes) ) {
+ retVal.minutes = parseInt(timeVal, 10);
+ }
+
+ if (showHours) {
+ var timeValUpper = timeVal.toUpperCase();
+ if ((retVal.hours < 12) && (showPeriod) && (timeValUpper.indexOf(amPmText[1].toUpperCase()) != -1)) {
+ retVal.hours += 12;
+ }
+ // fix for 12 AM
+ if ((retVal.hours == 12) && (showPeriod) && (timeValUpper.indexOf(amPmText[0].toUpperCase()) != -1)) {
+ retVal.hours = 0;
+ }
+ }
+
+ return retVal;
+ },
+
+ selectNow: function(e) {
+
+ var id = $(e.target).attr("data-timepicker-instance-id"),
+ $target = $(id),
+ inst = this._getInst($target[0]);
+
+ //if (!inst || (input && inst != $.data(input, PROP_NAME))) { return; }
+ var currentTime = new Date();
+ inst.hours = currentTime.getHours();
+ inst.minutes = currentTime.getMinutes();
+ this._updateSelectedValue(inst);
+ this._updateTimepicker(inst);
+ this._hideTimepicker();
+ },
+
+ deselectTime: function(e) {
+ var id = $(e.target).attr("data-timepicker-instance-id"),
+ $target = $(id),
+ inst = this._getInst($target[0]);
+ inst.hours = -1;
+ inst.minutes = -1;
+ this._updateSelectedValue(inst);
+ this._hideTimepicker();
+ },
+
+
+ selectHours: function (event) {
+ var $td = $(event.currentTarget),
+ id = $td.attr("data-timepicker-instance-id"),
+ newHours = $td.attr("data-hour"),
+ fromDoubleClick = event.data.fromDoubleClick,
+ $target = $(id),
+ inst = this._getInst($target[0]),
+ showMinutes = (this._get(inst, 'showMinutes') == true);
+
+ // don't select if disabled
+ if ( $.timepicker._isDisabledTimepicker($target.attr('id')) ) { return false }
+
+ $td.parents('.ui-timepicker-hours:first').find('a').removeClass('ui-state-active');
+ $td.children('a').addClass('ui-state-active');
+ inst.hours = newHours;
+
+ // added for onMinuteShow callback
+ var onMinuteShow = this._get(inst, 'onMinuteShow');
+ if (onMinuteShow) {
+ // this will trigger a callback on selected hour to make sure selected minute is allowed.
+ this._updateMinuteDisplay(inst);
+ }
+
+ this._updateSelectedValue(inst);
+
+ inst._hoursClicked = true;
+ if ((inst._minutesClicked) || (fromDoubleClick) || (showMinutes == false)) {
+ $.timepicker._hideTimepicker();
+ }
+ // return false because if used inline, prevent the url to change to a hashtag
+ return false;
+ },
+
+ selectMinutes: function (event) {
+ var $td = $(event.currentTarget),
+ id = $td.attr("data-timepicker-instance-id"),
+ newMinutes = $td.attr("data-minute"),
+ fromDoubleClick = event.data.fromDoubleClick,
+ $target = $(id),
+ inst = this._getInst($target[0]),
+ showHours = (this._get(inst, 'showHours') == true);
+
+ // don't select if disabled
+ if ( $.timepicker._isDisabledTimepicker($target.attr('id')) ) { return false }
+
+ $td.parents('.ui-timepicker-minutes:first').find('a').removeClass('ui-state-active');
+ $td.children('a').addClass('ui-state-active');
+
+ inst.minutes = newMinutes;
+ this._updateSelectedValue(inst);
+
+ inst._minutesClicked = true;
+ if ((inst._hoursClicked) || (fromDoubleClick) || (showHours == false)) {
+ $.timepicker._hideTimepicker();
+ // return false because if used inline, prevent the url to change to a hashtag
+ return false;
+ }
+
+ // return false because if used inline, prevent the url to change to a hashtag
+ return false;
+ },
+
+ _updateSelectedValue: function (inst) {
+ var newTime = this._getParsedTime(inst);
+ if (inst.input) {
+ inst.input.val(newTime);
+ inst.input.trigger('change');
+ }
+ var onSelect = this._get(inst, 'onSelect');
+ if (onSelect) { onSelect.apply((inst.input ? inst.input[0] : null), [newTime, inst]); } // trigger custom callback
+ this._updateAlternate(inst, newTime);
+ return newTime;
+ },
+
+ /* this function process selected time and return it parsed according to instance options */
+ _getParsedTime: function(inst) {
+
+ if (inst.hours == -1 && inst.minutes == -1) {
+ return '';
+ }
+
+ if ((inst.hours < 0) || (inst.hours > 23)) { inst.hours = 12; }
+ if ((inst.minutes < 0) || (inst.minutes > 59)) { inst.minutes = 0; }
+
+ var period = "",
+ showPeriod = (this._get(inst, 'showPeriod') == true),
+ showLeadingZero = (this._get(inst, 'showLeadingZero') == true),
+ showHours = (this._get(inst, 'showHours') == true),
+ showMinutes = (this._get(inst, 'showMinutes') == true),
+ optionalMinutes = (this._get(inst, 'optionalMinutes') == true),
+ amPmText = this._get(inst, 'amPmText'),
+ selectedHours = inst.hours ? inst.hours : 0,
+ selectedMinutes = inst.minutes ? inst.minutes : 0,
+ displayHours = selectedHours ? selectedHours : 0,
+ parsedTime = '';
+
+ if (showPeriod) {
+ if (inst.hours == 0) {
+ displayHours = 12;
+ }
+ if (inst.hours < 12) {
+ period = amPmText[0];
+ }
+ else {
+ period = amPmText[1];
+ if (displayHours > 12) {
+ displayHours -= 12;
+ }
+ }
+ }
+
+ var h = displayHours.toString();
+ if (showLeadingZero && (displayHours < 10)) { h = '0' + h; }
+
+ var m = selectedMinutes.toString();
+ if (selectedMinutes < 10) { m = '0' + m; }
+
+ if (showHours) {
+ parsedTime += h;
+ }
+ if (showHours && showMinutes && (!optionalMinutes || m != 0)) {
+ parsedTime += this._get(inst, 'timeSeparator');
+ }
+ if (showMinutes && (!optionalMinutes || m != 0)) {
+ parsedTime += m;
+ }
+ if (showHours) {
+ if (period.length > 0) { parsedTime += this._get(inst, 'periodSeparator') + period; }
+ }
+
+ return parsedTime;
+ },
+
+ /* Update any alternate field to synchronise with the main field. */
+ _updateAlternate: function(inst, newTime) {
+ var altField = this._get(inst, 'altField');
+ if (altField) { // update alternate field too
+ $(altField).each(function(i,e) {
+ $(e).val(newTime);
+ });
+ }
+ },
+
+ /* This might look unused but it's called by the $.fn.timepicker function with param getTime */
+ /* added v 0.2.3 - gitHub issue #5 - Thanks edanuff */
+ _getTimeTimepicker : function(input) {
+ var inst = this._getInst(input);
+ return this._getParsedTime(inst);
+ },
+ _getHourTimepicker: function(input) {
+ var inst = this._getInst(input);
+ if ( inst == undefined) { return -1; }
+ return inst.hours;
+ },
+ _getMinuteTimepicker: function(input) {
+ var inst= this._getInst(input);
+ if ( inst == undefined) { return -1; }
+ return inst.minutes;
+ }
+
+ });
+
+
+
+ /* Invoke the timepicker functionality.
+ @param options string - a command, optionally followed by additional parameters or
+ Object - settings for attaching new timepicker functionality
+ @return jQuery object */
+ $.fn.timepicker = function (options) {
+
+ /* Initialise the time picker. */
+ if (!$.timepicker.initialized) {
+ $(document).mousedown($.timepicker._checkExternalClick).
+ find('body').append($.timepicker.tpDiv);
+ $.timepicker.initialized = true;
+ }
+
+ var otherArgs = Array.prototype.slice.call(arguments, 1);
+ if (typeof options == 'string' && (options == 'getTime' || options == 'getHour' || options == 'getMinute' ))
+ return $.timepicker['_' + options + 'Timepicker'].
+ apply($.timepicker, [this[0]].concat(otherArgs));
+ if (options == 'option' && arguments.length == 2 && typeof arguments[1] == 'string')
+ return $.timepicker['_' + options + 'Timepicker'].
+ apply($.timepicker, [this[0]].concat(otherArgs));
+ return this.each(function () {
+ typeof options == 'string' ?
+ $.timepicker['_' + options + 'Timepicker'].
+ apply($.timepicker, [this].concat(otherArgs)) :
+ $.timepicker._attachTimepicker(this, options);
+ });
+ };
+
+ /* jQuery extend now ignores nulls! */
+ function extendRemove(target, props) {
+ $.extend(target, props);
+ for (var name in props)
+ if (props[name] == null || props[name] == undefined)
+ target[name] = props[name];
+ return target;
+ };
+
+ $.timepicker = new Timepicker(); // singleton instance
+ $.timepicker.initialized = false;
+ $.timepicker.uuid = new Date().getTime();
+ $.timepicker.version = "0.2.9";
+
+ // Workaround for #4055
+ // Add another global to avoid noConflict issues with inline event handlers
+ window['TP_jQuery_' + tpuuid] = $;
+
+})(jQuery);
diff --git a/gstudio/static/gstudio/js/jquery-ui-timepicker-0.2.9/releases.txt b/gstudio/static/gstudio/js/jquery-ui-timepicker-0.2.9/releases.txt new file mode 100644 index 00000000..64622d49 --- /dev/null +++ b/gstudio/static/gstudio/js/jquery-ui-timepicker-0.2.9/releases.txt @@ -0,0 +1,105 @@ +Release 0.2.9 - November 13, 2011
+Fixed the zIndex problem and removed the zIndex option (Thanks everyone who reported the problem)
+Fix a bug where repeatedly clicking on hour cells made the timepicker very slow.
+Added Italian translation, thanks to Serge Margarita.
+
+Release 0.2.8 - November 5, 2011
+Updated "defaultTime" to allow for Date object (github issue #26)
+Fixed the now and deselect buttons in IE
+
+Release 0.2.7 - October 19, 2011
+Added option to omit minutes in parsed time when user select 0 for minutes. (Thanks tribalvibes, Github issue #23)
+Added support for internationalisation (fr, de and ja, Thanks Bernd Plagge).
+
+Release 0.2.6 - October 12, 2011
+Fixed a bug when input ID have more then one special char. (Thamks Jacqueline Krijnen)
+Fixed a bug when parsing hours only or minutes only time. (Thanks protron, <a href="https://github.com/fgelinas/timepicker/issues/20">github issue #20</a>)
+Added 'Now', 'Deselect' and 'Close' buttons. (Thanks Christian Grobmeier for the close button code, <a href="https://github.com/fgelinas/timepicker/issues/20">github issue #22</a>)
+
+Release 0.2.5 - September 13, 2011
+Added support for disable and enable. (Suggested by danielrex, github issue #17)
+Added an example for 2 timepicker to behave as a period selector (start time and end time). (Thanks Bill Pellowe)
+Renamed the stylesheet to jquery.ui.timepicker.css to be more consistent with jQuery UI file name convention.
+
+Release 0.2.4 - August 5, 2011
+Fixed the hand cursor in the css file. (Thanks Mike Neumegen)
+Added position option to use with the jquery ui position utility.
+Added option to display only hours or only minutes.
+
+Release 0.2.3 - July 11, 2011
+Fix github issue #3 : Bug when hours or minutes choices does not divide by number of rows (thanks wukimus)
+Changed default behavior of the defaultTime option, if set to '' and input is empty, there will be no highlighted time in the popup (Thanks Rasmus Schultz)
+Fix github issue #4 : Error when generating empty minute cell. (Thanks 123Haynes)
+Fix github issue #5 : Add functionality for "getTime" option. (Thanks edanuff)
+Added the periodSeparator option. (thanks jrchamp)
+Fixed "getTime" for inline timepickers. (thanks Mike Neumegen)
+Added "getHour" and "getMinute" to get individual values.
+
+Release 0.2.2 - June 16, 2011
+Fixed a "console.log" line that I forgot to remove before release 0.2.1
+
+Release 0.2.1 - June 12, 2011
+Timepicker does not give the focus back to the input any more after time selection. This is similar to the datepicker behaviour and is more natural to the user because it shows the dialog again when the user click on the input again, as expected.
+Added options to customize the hours and minutes ranges and interval for more customization.
+
+Release 0.2 - May 28, 2011
+So in the previous release I mixed up versions and lost some changes, I guess that's what happen when you drink and code.
+
+Release 0.1.2 - May 26, 2011
+Fixed a bug with inline timepickers that would append a #timepickr hashtag when selecting hours and minutes.
+Fixed z-index problem with IE6 (Thanks Graham Bentley)
+Added selection of highlighted text when enter is pressed on the input field (Thanks Glen Chiacchieri)
+Adjusted some focus problems, now the input gets the focus back when the used click on hours / minutes.
+
+Release 0.1.something aka the lost release - around April 11
+Fixed a bug for when input Id had a dot in it, it was getting double escaped when it should not. (Thanks Zdenek Machac)
+So in 0.1.1 I created a bug that made timepicker changes the location hash, well now it's fixed. (Thanks Lucas Falk)
+
+Release 0.1.1 - April 6, 2011
+Changed the cells click and dblclick binding for faster rendering in IE6/7 (Thanks Blair Parsons)
+Fixed a class naming bug created in 0.1.0 (Thanks Morlion Peter)
+
+Release 0.1.0 - March 23, 2011
+Fixed some bugs with release 0.0.9
+
+Release 0.0.9 - March 22, 2011
+Added zIndex option (Thanks Frank Enderle)
+Added option showPeriodLabels that defines if the AM/PM labels are displayed on the left (Thanks Frank Enderle)
+Added showOn ['focus'|'button'|'both'] and button options for alternate trigger method
+
+Release 0.0.8 - Fev 17, 2011
+Fixed close event not triggered when switching to another input with time picker (thanks Stuart Gregg)
+
+Release 0.0.7 - Fev 10, 2011
+Added function to set time after initialisation :$('#timepicker').timepicker('setTime',newTime);
+Added support for disabled period of time : onHourShow and onMinuteShow (thanks Rene Felgentr�ger)
+
+Release 0.0.6 - Jan 19, 2011
+Added standard "change" event being triggered on the input when the content changes. (Thanks Rasmus Schultz)
+Added support for inline timePicker, attached to div or span
+Added altField that receive the parsed time value when selected time changes
+Added defaultTime value to use when input field is missing (inline) or input value is empty
+ if defaultTime is missing, current time is used
+
+Release 0.0.5 - Jan 18, 2011
+Now updating time picker selected value when manually typing in the text field (thanks Rasmus Schultz)
+Fixed : with showPeriod: true and showLeadingZero: true, PM hours did not show leading zeros (thanks Chandler May)
+Fixed : with showPeriod: true and showLeadingZero: true, Selecting 12 AM shows as 00 AM in the input field, also parsing 12AM did not work correctly (thanks Rasmus Schultz)
+
+Release 0.0.4 - jan 10, 2011
+changed showLeadingZero to affect only hours, added showMinutesLeadingZero for minutes display
+Removed width:100% for tables in css
+
+Release 0.0.3 - Jan 8, 2011
+Re-added a display:none on the main div (fix a small empty div visible at the bottom of the page before timepicker is called) (Thanks Gertjan van Roekel)
+Fixed a problem where the timepicker was never displayed with jquery ui 1.8.7 css,
+ the problem was the class ui-helper-hidden-accessible, witch I removed.
+ Thanks Alexander Fietz and StackOverflow : http://stackoverflow.com/questions/4522274/jquery-timepicker-and-jqueryui-1-8-7-conflict
+
+Release 0.0.2 - Jan 6, 2011
+Updated to include common display options for USA users
+Stephen Commisso - Jan 2011
+
+As it is a timepicker, I inspired most of the code from the datepicker
+Francois Gelinas - Nov 2010
+
|