mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Merge branch 'master' into selectmenu
This commit is contained in:
commit
dd272e7568
@ -194,3 +194,9 @@ Pavel Stetina <pavel.stetina@nangu.tv>
|
||||
Mike Stay <metaweta@gmail.com>
|
||||
Steven Roussey <sroussey@gmail.com>
|
||||
Mike Hollis <hollis21@gmail.com>
|
||||
Lee Rowlands <lee.rowlands@previousnext.com.au>
|
||||
Timmy Willison <timmywillisn@gmail.com>
|
||||
Karl Swedberg <kswedberg@gmail.com>
|
||||
Baoju Yuan <the_guy_1987@hotmail.com>
|
||||
Maciej Mroziński <mrozik87@gmail.com>
|
||||
Luis Dalmolin <luis.nh@gmail.com>
|
||||
|
278
GPL-LICENSE.txt
278
GPL-LICENSE.txt
@ -1,278 +0,0 @@
|
||||
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.
|
67
build/core.json
Normal file
67
build/core.json
Normal file
@ -0,0 +1,67 @@
|
||||
{
|
||||
"core": {
|
||||
"description": "The core of jQuery UI, required for all interactions and widgets.",
|
||||
"homepage": "http://jqueryui.com/",
|
||||
"demo": "http://jqueryui.com/",
|
||||
"docs": "http://api.jqueryui.com/category/ui-core/"
|
||||
},
|
||||
"datepicker": {
|
||||
"description": "Displays a calendar from an input or inline for selecting dates.",
|
||||
"dependencies": [ "core" ],
|
||||
"keywords": [
|
||||
"form",
|
||||
"calendar",
|
||||
"date",
|
||||
"i18n"
|
||||
],
|
||||
"category": "widget"
|
||||
},
|
||||
"effect": {
|
||||
"title": "jQuery UI Effects Core",
|
||||
"description": "Extends the internal jQuery effects. Includes morphing and easing. Required by all other effects.",
|
||||
"keywords": [
|
||||
"animation",
|
||||
"show",
|
||||
"hide",
|
||||
"color",
|
||||
"class",
|
||||
"transition",
|
||||
"easing"
|
||||
],
|
||||
"category": "effect",
|
||||
"homepage": "http://jqueryui.com/",
|
||||
"demo": "http://jqueryui.com/effects/",
|
||||
"docs": "http://api.jqueryui.com/category/effects-core/"
|
||||
},
|
||||
"position": {
|
||||
"description": "Positions elements relative to other elements.",
|
||||
"keywords": [
|
||||
"offset",
|
||||
"relative",
|
||||
"absolute",
|
||||
"fixed",
|
||||
"collision"
|
||||
]
|
||||
},
|
||||
"transfer": {
|
||||
"name": "ui.effect-transfer",
|
||||
"title": "jQuery UI Transfer Effect",
|
||||
"description": "Displays a transfer effect from one element to another.",
|
||||
"keywords": [
|
||||
"effect"
|
||||
],
|
||||
"homepage": "http://jqueryui.com/transfer-effect/",
|
||||
"demo": "http://jqueryui.com/transfer-effect/",
|
||||
"docs": "http://api.jqueryui.com/transfer-effect/",
|
||||
"dependencies": [ "effect" ],
|
||||
"category": "effect"
|
||||
},
|
||||
"widget": {
|
||||
"description": "Provides a factory for creating stateful widgets with a common API.",
|
||||
"keywords": [
|
||||
"abstraction",
|
||||
"state",
|
||||
"factory"
|
||||
]
|
||||
}
|
||||
}
|
38
build/effect.json
Normal file
38
build/effect.json
Normal file
@ -0,0 +1,38 @@
|
||||
{
|
||||
"blind": {
|
||||
"description": "Blinds the element."
|
||||
},
|
||||
"bounce": {
|
||||
"description": "Bounces an element horizontally or vertically n times."
|
||||
},
|
||||
"clip": {
|
||||
"description": "Clips the element on and off like an old TV."
|
||||
},
|
||||
"drop": {
|
||||
"description": "Moves an element in one direction and hides it at the same time."
|
||||
},
|
||||
"explode": {
|
||||
"description": "Explodes an element in all directions into n pieces. Implodes an element to its original wholeness."
|
||||
},
|
||||
"fade": {
|
||||
"description": "Fades an element."
|
||||
},
|
||||
"fold": {
|
||||
"description": "Folds an element first horizontally and then vertically."
|
||||
},
|
||||
"highlight": {
|
||||
"description": "Highlights the background of an element in a defined color for a custom duration."
|
||||
},
|
||||
"pulsate": {
|
||||
"description": "Pulsates an element n times by changing the opacity to zero and back."
|
||||
},
|
||||
"scale": {
|
||||
"description": "Grows or shrinks an element and its content. Restores an elemnt to its original size."
|
||||
},
|
||||
"shake": {
|
||||
"description": "Shakes an element horizontally or vertically n times."
|
||||
},
|
||||
"slide": {
|
||||
"description": "Slides an element in and out of the viewport."
|
||||
}
|
||||
}
|
36
build/interaction.json
Normal file
36
build/interaction.json
Normal file
@ -0,0 +1,36 @@
|
||||
{
|
||||
"draggable": {
|
||||
"description": "Enables dragging functionality for any element.",
|
||||
"keywords": [
|
||||
"drag",
|
||||
"drop"
|
||||
]
|
||||
},
|
||||
"droppable": {
|
||||
"dependencies": [ "draggable" ],
|
||||
"description": "Enables drop targets for draggable elements.",
|
||||
"keywords": [
|
||||
"drag",
|
||||
"drop"
|
||||
]
|
||||
},
|
||||
"resizable": {
|
||||
"description": "Enables resize functionality for any element.",
|
||||
"keywords": [
|
||||
"resize"
|
||||
]
|
||||
},
|
||||
"selectable": {
|
||||
"description": "Allows groups of elements to be selected with the mouse.",
|
||||
"keywords": [
|
||||
"selection"
|
||||
]
|
||||
},
|
||||
"sortable": {
|
||||
"description": "Enables items in a list to be sorted using the mouse.",
|
||||
"keywords": [
|
||||
"sort",
|
||||
"list"
|
||||
]
|
||||
}
|
||||
}
|
@ -1,336 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
base_dir="`pwd`/jquery-ui-release"
|
||||
repo_dir="$base_dir/jquery-ui"
|
||||
release_dir="$repo_dir/build/release"
|
||||
|
||||
github_repo="git@github.com:jquery/jquery-ui.git"
|
||||
remote_cmd="ssh jqadmin@ui-dev.jquery.com /srv/dev.jqueryui.com/prepare-release"
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Setup environment
|
||||
#
|
||||
|
||||
echo
|
||||
echo "--------------------------"
|
||||
echo "| SETTING UP ENVIRONMENT |"
|
||||
echo "--------------------------"
|
||||
echo
|
||||
|
||||
mkdir $base_dir
|
||||
cd $base_dir
|
||||
|
||||
echo "Cloning repo from $github_repo..."
|
||||
git clone $github_repo
|
||||
cd $repo_dir
|
||||
|
||||
echo
|
||||
echo "Environment setup complete."
|
||||
echo
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Figure out which versions we're dealing with
|
||||
#
|
||||
|
||||
echo
|
||||
echo "------------------------"
|
||||
echo "| CALCULATING VERSIONS |"
|
||||
echo "------------------------"
|
||||
echo
|
||||
|
||||
# NOTE: this will be different for minor and major releases
|
||||
version=`$remote_cmd/get-latest-version`
|
||||
major_minor=${version%.*}
|
||||
point=${version##*.}
|
||||
version_new="${major_minor}.$(($point + 1))"
|
||||
version_next=`cat version.txt`
|
||||
|
||||
echo "We are going from $version to $version_new."
|
||||
echo "version.txt will be set to $version_next when complete."
|
||||
echo "Press enter to continue, or ctrl+c to cancel."
|
||||
read
|
||||
|
||||
|
||||
#
|
||||
# Generate shell for changelog
|
||||
#
|
||||
|
||||
echo
|
||||
echo "------------------------"
|
||||
echo "| GENERATING CHANGELOG |"
|
||||
echo "------------------------"
|
||||
echo
|
||||
|
||||
echo "Creating shell for changelog..."
|
||||
changelog_url="http:\/\/docs.jquery.com\/action\/edit\/UI\/Changelog\/$version_new"
|
||||
`sed "s/CHANGELOG_URL/$changelog_url/" <$release_dir/changelog-shell >$base_dir/changelog`
|
||||
|
||||
|
||||
# find all commits
|
||||
echo "Adding commits to changelog..."
|
||||
format_ticket='[http://dev.jqueryui.com/ticket/XXXX #XXXX]'
|
||||
format_commit='[http://github.com/jquery/jquery-ui/commit/%H %h]'
|
||||
format_full="* %s ($format_ticket, $format_commit)"
|
||||
git whatchanged $version... --pretty=format:"$format_full" \
|
||||
-- ui themes demos build \
|
||||
| sed '/^:/ d' \
|
||||
| sed '/^$/ d' \
|
||||
| sed 's/\(Fixe[sd] #\)\([0-9][0-9]*\)\(.*\)\(XXXX #XXXX\)/Fixed #\2\3\2 #\2/' \
|
||||
| LC_ALL='C' sort -f \
|
||||
>> $base_dir/changelog
|
||||
|
||||
# find all fixed tickets
|
||||
echo "Adding Trac tickets to changelog..."
|
||||
$remote_cmd/generate-changelog >> $base_dir/changelog
|
||||
|
||||
echo
|
||||
echo "Changelog complete."
|
||||
echo
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Generate list of contributors
|
||||
#
|
||||
|
||||
echo
|
||||
echo "--------------------------"
|
||||
echo "| GATHERING CONTRIBUTORS |"
|
||||
echo "--------------------------"
|
||||
echo
|
||||
|
||||
|
||||
# find all committers and authors
|
||||
echo "Adding commiters and authors..."
|
||||
format_contributors='%aN%n%cN'
|
||||
git whatchanged $version... --pretty=format:"$format_contributors" \
|
||||
| sed '/^:/ d' \
|
||||
| sed '/^$/ d' \
|
||||
> $base_dir/thankyou
|
||||
|
||||
# find all reporters and commenters from Trac
|
||||
echo "Adding reporters and commenters from Trac..."
|
||||
$remote_cmd/generate-contributors >> $base_dir/thankyou
|
||||
|
||||
# sort names
|
||||
echo "Sorting contributors..."
|
||||
LC_ALL='C' sort -f $base_dir/thankyou | uniq > $base_dir/_thankyou
|
||||
mv $base_dir/_thankyou $base_dir/thankyou
|
||||
|
||||
# find all people that were thanked
|
||||
echo "Adding people thanked in commits..."
|
||||
git whatchanged $version... \
|
||||
| grep -i thank \
|
||||
>> $base_dir/thankyou
|
||||
|
||||
echo
|
||||
echo "Find contributors from duplicates of fixed tickets and add them to:"
|
||||
echo "$base_dir/thankyou"
|
||||
echo "Press enter when done."
|
||||
read
|
||||
|
||||
echo
|
||||
echo "Contributors list complete."
|
||||
echo
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Update version
|
||||
#
|
||||
|
||||
echo
|
||||
echo "--------------------"
|
||||
echo "| UPDATING VERSION |"
|
||||
echo "--------------------"
|
||||
echo
|
||||
|
||||
echo "Updating version.txt to $version_new..."
|
||||
echo $version_new > version.txt
|
||||
|
||||
git commit -a -m "Tagging the $version_new release."
|
||||
version_new_time=`git log -1 --pretty=format:"%ad"`
|
||||
echo "Committed version.txt at $version_new_time..."
|
||||
|
||||
echo "Tagging $version_new..."
|
||||
git tag $version_new
|
||||
|
||||
echo "Updating version.txt to $version_next..."
|
||||
echo $version_next > version.txt
|
||||
|
||||
git commit -a -m "Updating the master version to $version_next"
|
||||
echo "Committed version.txt..."
|
||||
|
||||
echo
|
||||
echo "Version update complete."
|
||||
echo
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Push to GitHub
|
||||
#
|
||||
|
||||
echo
|
||||
echo "---------------------"
|
||||
echo "| PUSHING TO GITHUB |"
|
||||
echo "---------------------"
|
||||
echo
|
||||
|
||||
echo "Please review the output and generated files as a sanity check."
|
||||
echo "Press enter to continue or ctrl+c to abort."
|
||||
read
|
||||
|
||||
git push
|
||||
git push --tags
|
||||
|
||||
echo
|
||||
echo "Push to GitHub complete."
|
||||
echo
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Update Trac
|
||||
#
|
||||
|
||||
echo
|
||||
echo "-----------------"
|
||||
echo "| UPDATING TRAC |"
|
||||
echo "-----------------"
|
||||
echo
|
||||
|
||||
# TODO: automate this
|
||||
# NOTE: this will be different for minor and major releases
|
||||
milestone=`$remote_cmd/get-latest-milestone`
|
||||
|
||||
# Create new milestrone and version
|
||||
echo "$version_new was tagged at $version_new_time."
|
||||
echo "Create and close the $version_new Milestone with the above date and time."
|
||||
echo "Create the $version_new Version with the above date and time."
|
||||
echo "Press enter when done."
|
||||
read
|
||||
|
||||
# Update milestone for all fixed tickets
|
||||
echo "Change all $milestone fixed tickets to $version_new."
|
||||
echo "Press enter when done."
|
||||
read
|
||||
|
||||
echo
|
||||
echo "Trac updates complete."
|
||||
echo
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Build jQuery UI
|
||||
#
|
||||
|
||||
echo
|
||||
echo "----------------------"
|
||||
echo "| BUILDING JQUERY UI |"
|
||||
echo "----------------------"
|
||||
echo
|
||||
|
||||
# check out the tagged version
|
||||
echo "Checking out $version_new..."
|
||||
git checkout $version_new
|
||||
cd build
|
||||
|
||||
# Update the link to the docs (never contains the patch version)
|
||||
echo "Updating URL for API docs..."
|
||||
sed "s/UI\/API\/\${release\.version}/UI\/API\/$major_minor/" build.xml >build.xml.tmp
|
||||
mv build.xml.tmp build.xml
|
||||
|
||||
# Run the build
|
||||
echo "Running build..."
|
||||
ant
|
||||
|
||||
echo
|
||||
echo "Build complete."
|
||||
echo
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Upload zip to Google Code
|
||||
#
|
||||
|
||||
echo
|
||||
echo "----------------------"
|
||||
echo "| UPDATE GOOGLE CODE |"
|
||||
echo "----------------------"
|
||||
echo
|
||||
|
||||
echo "Upload zip to Google Code."
|
||||
echo " http://code.google.com/p/jquery-ui/downloads/entry"
|
||||
echo " Summary: jQuery UI $version_new (Source, demos, docs, themes, tests) STABLE"
|
||||
echo " Labels: Featured, Type-Source, OpSys-All"
|
||||
echo "Modify the previous release to no longer say STABLE at the end."
|
||||
echo "Remove the featured label from the previous release."
|
||||
echo "Press enter when done."
|
||||
read
|
||||
|
||||
echo
|
||||
echo "Google Code update complete."
|
||||
echo
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Update SVN
|
||||
#
|
||||
|
||||
echo
|
||||
echo "----------------"
|
||||
echo "| UPDATING SVN |"
|
||||
echo "----------------"
|
||||
echo
|
||||
|
||||
cd $base_dir
|
||||
mkdir svn
|
||||
cd svn
|
||||
|
||||
echo "Checking out SVN tags..."
|
||||
svn co --depth immediates https://jquery-ui.googlecode.com/svn/tags
|
||||
cd tags
|
||||
|
||||
echo "Unzipping build into tags/$version_new..."
|
||||
unzip $repo_dir/build/dist/jquery-ui-$version_new.zip
|
||||
mv jquery-ui-$version_new $version_new
|
||||
|
||||
echo "Adding files to SVN..."
|
||||
svn add $version_new
|
||||
|
||||
echo "Setting svn:mime-type..."
|
||||
find $version_new -name \*.js -exec svn propset svn:mime-type text/javascript {} \;
|
||||
find $version_new -name \*.css -exec svn propset svn:mime-type text/css {} \;
|
||||
find $version_new -name \*.html -exec svn propset svn:mime-type text/html {} \;
|
||||
find $version_new -name \*.png -exec svn propset svn:mime-type image/png {} \;
|
||||
find $version_new -name \*.gif -exec svn propset svn:mime-type image/gif {} \;
|
||||
|
||||
# TODO: commit
|
||||
echo
|
||||
echo "svn commit with the following message:"
|
||||
echo "Created $version_new tag from http://jquery-ui.googlecode.com/files/jquery-ui-$version_new.zip"
|
||||
echo "Press enter when done."
|
||||
read
|
||||
|
||||
echo
|
||||
echo "SVN update complete."
|
||||
echo
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Generate themes
|
||||
#
|
||||
|
||||
|
||||
|
||||
|
||||
# ruby -e 'puts File.read("thankyou").split("\n").join(", ")' > thankyou2
|
399
build/release/release.js
Normal file
399
build/release/release.js
Normal file
@ -0,0 +1,399 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
var baseDir, repoDir, prevVersion, newVersion, nextVersion, tagTime,
|
||||
fs = require( "fs" ),
|
||||
path = require( "path" ),
|
||||
// support: node <0.8
|
||||
existsSync = fs.existsSync || path.existsSync,
|
||||
rnewline = /\r?\n/,
|
||||
repo = "git@github.com:jquery/jquery-ui.git",
|
||||
branch = "master";
|
||||
|
||||
walk([
|
||||
bootstrap,
|
||||
|
||||
section( "setting up repo" ),
|
||||
cloneRepo,
|
||||
checkState,
|
||||
|
||||
section( "calculating versions" ),
|
||||
getVersions,
|
||||
confirm,
|
||||
|
||||
section( "building release" ),
|
||||
buildRelease,
|
||||
|
||||
section( "pushing tag" ),
|
||||
confirmReview,
|
||||
pushRelease,
|
||||
|
||||
section( "updating branch version" ),
|
||||
updateBranchVersion,
|
||||
|
||||
section( "pushing " + branch ),
|
||||
confirmReview,
|
||||
pushBranch,
|
||||
|
||||
section( "generating changelog" ),
|
||||
generateChangelog,
|
||||
|
||||
section( "gathering contributors" ),
|
||||
gatherContributors,
|
||||
|
||||
section( "updating trac" ),
|
||||
updateTrac,
|
||||
confirm
|
||||
|
||||
// TODO: upload release zip to GitHub
|
||||
]);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function cloneRepo() {
|
||||
echo( "Cloning " + repo.cyan + "..." );
|
||||
git( "clone " + repo + " " + repoDir, "Error cloning repo." );
|
||||
cd( repoDir );
|
||||
|
||||
echo( "Checking out " + branch.cyan + " branch..." );
|
||||
git( "checkout " + branch, "Error checking out branch." );
|
||||
echo();
|
||||
|
||||
echo( "Installing dependencies..." );
|
||||
if ( exec( "npm install" ).code !== 0 ) {
|
||||
abort( "Error installing dependencies." );
|
||||
}
|
||||
echo();
|
||||
}
|
||||
|
||||
function checkState() {
|
||||
echo( "Checking AUTHORS.txt..." );
|
||||
var result, lastActualAuthor,
|
||||
lastListedAuthor = cat( "AUTHORS.txt" ).trim().split( rnewline ).pop();
|
||||
|
||||
result = exec( "grunt authors", { silent: true });
|
||||
if ( result.code !== 0 ) {
|
||||
abort( "Error getting list of authors." );
|
||||
}
|
||||
lastActualAuthor = result.output.split( rnewline ).splice( -4, 1 )[ 0 ];
|
||||
|
||||
if ( lastListedAuthor !== lastActualAuthor ) {
|
||||
echo( "Last listed author is " + lastListedAuthor.red + "." );
|
||||
echo( "Last actual author is " + lastActualAuthor.green + "." );
|
||||
abort( "Please update AUTHORS.txt." );
|
||||
}
|
||||
|
||||
echo( "Last listed author (" + lastListedAuthor.cyan + ") is correct." );
|
||||
}
|
||||
|
||||
function getVersions() {
|
||||
// prevVersion, newVersion, nextVersion are defined in the parent scope
|
||||
var parts, major, minor, patch,
|
||||
currentVersion = readPackage().version;
|
||||
|
||||
echo( "Validating current version..." );
|
||||
if ( currentVersion.substr( -3, 3 ) !== "pre" ) {
|
||||
echo( "The current version is " + currentVersion.red + "." );
|
||||
abort( "The version must be a pre version." );
|
||||
}
|
||||
|
||||
newVersion = currentVersion.substr( 0, currentVersion.length - 3 );
|
||||
parts = newVersion.split( "." );
|
||||
major = parseInt( parts[ 0 ], 10 );
|
||||
minor = parseInt( parts[ 1 ], 10 );
|
||||
patch = parseInt( parts[ 2 ], 10 );
|
||||
// TODO: handle 2.0.0
|
||||
if ( minor === 0 ) {
|
||||
abort( "This script is not smart enough to handle the 2.0.0 release." );
|
||||
}
|
||||
prevVersion = patch === 0 ?
|
||||
[ major, minor - 1, 0 ].join( "." ) :
|
||||
[ major, minor, patch - 1 ].join( "." );
|
||||
// TODO: Remove version hack after 1.9.0 release
|
||||
if ( prevVersion === "1.8.0" ) {
|
||||
prevVersion = "1.8";
|
||||
}
|
||||
nextVersion = [ major, minor, patch + 1 ].join( "." ) + "pre";
|
||||
|
||||
echo( "We are going from " + prevVersion.cyan + " to " + newVersion.cyan + "." );
|
||||
echo( "After the release, the version will be " + nextVersion.cyan + "." );
|
||||
}
|
||||
|
||||
function buildRelease() {
|
||||
var pkg;
|
||||
|
||||
echo( "Creating " + "release".cyan + " branch..." );
|
||||
git( "checkout -b release", "Error creating release branch." );
|
||||
echo();
|
||||
|
||||
echo( "Updating package.json..." );
|
||||
pkg = readPackage();
|
||||
pkg.version = newVersion;
|
||||
pkg.licenses.forEach(function( license ) {
|
||||
license.url = license.url.replace( "master", newVersion );
|
||||
});
|
||||
writePackage( pkg );
|
||||
|
||||
echo( "Generating manifest files..." );
|
||||
if ( exec( "grunt manifest" ).code !== 0 ) {
|
||||
abort( "Error generating manifest files." );
|
||||
}
|
||||
echo();
|
||||
|
||||
echo( "Building release..." );
|
||||
// TODO: Build themes
|
||||
if ( exec( "grunt release" ).code !== 0 ) {
|
||||
abort( "Error building release." );
|
||||
}
|
||||
echo();
|
||||
|
||||
echo( "Committing release artifacts..." );
|
||||
git( "add *.jquery.json", "Error adding manifest files to git." );
|
||||
git( "commit -am 'Tagging the " + newVersion + " release.'",
|
||||
"Error committing release changes." );
|
||||
echo();
|
||||
|
||||
echo( "Tagging release..." );
|
||||
git( "tag " + newVersion, "Error tagging " + newVersion + "." );
|
||||
tagTime = git( "log -1 --format='%ad'", "Error getting tag timestamp." ).trim();
|
||||
}
|
||||
|
||||
function pushRelease() {
|
||||
echo( "Pushing release to GitHub..." );
|
||||
git( "push --tags", "Error pushing tags to GitHub." );
|
||||
}
|
||||
|
||||
function updateBranchVersion() {
|
||||
var pkg;
|
||||
|
||||
echo( "Checking out " + branch.cyan + " branch..." );
|
||||
git( "checkout " + branch, "Error checking out " + branch + " branch." );
|
||||
|
||||
echo( "Updating package.json..." );
|
||||
pkg = readPackage();
|
||||
pkg.version = nextVersion;
|
||||
writePackage( pkg );
|
||||
|
||||
echo( "Committing version update..." );
|
||||
git( "commit -am 'Updating the " + branch + " version to " + nextVersion + ".'",
|
||||
"Error committing package.json." );
|
||||
}
|
||||
|
||||
function pushBranch() {
|
||||
echo( "Pushing " + branch.cyan + " to GitHub..." );
|
||||
git( "push", "Error pushing to GitHub." );
|
||||
}
|
||||
|
||||
function generateChangelog() {
|
||||
var commits,
|
||||
changelogPath = baseDir + "/changelog",
|
||||
changelog = cat( "build/release/changelog-shell" ) + "\n",
|
||||
fullFormat = "* %s (TICKETREF, [http://github.com/jquery/jquery-ui/commit/%H %h])";
|
||||
|
||||
echo ( "Adding commits..." );
|
||||
commits = gitLog( fullFormat );
|
||||
|
||||
echo( "Adding links to tickets..." );
|
||||
changelog += commits
|
||||
// Add ticket references
|
||||
.map(function( commit ) {
|
||||
var tickets = [];
|
||||
commit.replace( /Fixe[sd] #(\d+)/g, function( match, ticket ) {
|
||||
tickets.push( ticket );
|
||||
});
|
||||
return tickets.length ?
|
||||
commit.replace( "TICKETREF", tickets.map(function( ticket ) {
|
||||
return "[http://bugs.jqueryui.com/ticket/" + ticket + " #" + ticket + "]";
|
||||
}).join( ", " ) ) :
|
||||
// Leave TICKETREF token in place so it's easy to find commits without tickets
|
||||
commit;
|
||||
})
|
||||
// Sort commits so that they're grouped by component
|
||||
.sort()
|
||||
.join( "\n" ) + "\n";
|
||||
|
||||
echo( "Adding Trac tickets..." );
|
||||
changelog += trac( "/query?milestone=" + newVersion + "&resolution=fixed" +
|
||||
"&col=id&col=component&col=summary&order=component" ) + "\n";
|
||||
|
||||
fs.writeFileSync( changelogPath, changelog );
|
||||
echo( "Stored changelog in " + changelogPath.cyan + "." );
|
||||
}
|
||||
|
||||
function gatherContributors() {
|
||||
var contributors,
|
||||
contributorsPath = baseDir + "/contributors";
|
||||
|
||||
echo( "Adding committers and authors..." );
|
||||
contributors = gitLog( "%aN%n%cN" );
|
||||
|
||||
echo( "Adding reporters and commenters from Trac..." );
|
||||
contributors = contributors.concat(
|
||||
trac( "/report/22?V=" + newVersion + "&max=-1" )
|
||||
.split( rnewline )
|
||||
// Remove header and trailing newline
|
||||
.slice( 1, -1 ) );
|
||||
|
||||
echo( "Sorting contributors..." );
|
||||
contributors = unique( contributors ).sort(function( a, b ) {
|
||||
return a.toLowerCase() < b.toLowerCase() ? -1 : 1;
|
||||
});
|
||||
|
||||
echo ( "Adding people thanked in commits..." );
|
||||
contributors = contributors.concat(
|
||||
gitLog( "%b%n%s" ).filter(function( line ) {
|
||||
return /thank/i.test( line );
|
||||
}));
|
||||
|
||||
fs.writeFileSync( contributorsPath, contributors.join( "\n" ) );
|
||||
echo( "Stored contributors in " + contributorsPath.cyan + "." );
|
||||
}
|
||||
|
||||
function updateTrac() {
|
||||
echo( newVersion.cyan + " was tagged at " + tagTime.cyan + "." );
|
||||
echo( "Close the " + newVersion.cyan + " Milestone with the above date and time." );
|
||||
echo( "Create the " + newVersion.cyan + " Version with the above date and time." );
|
||||
echo( "Create a Milestone for the next minor release." );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// ===== HELPER FUNCTIONS ======================================================
|
||||
|
||||
function git( command, errorMessage ) {
|
||||
var result = exec( "git " + command );
|
||||
if ( result.code !== 0 ) {
|
||||
abort( errorMessage );
|
||||
}
|
||||
|
||||
return result.output;
|
||||
}
|
||||
|
||||
function gitLog( format ) {
|
||||
var result = exec( "git log " + prevVersion + ".." + newVersion + " " +
|
||||
"--format='" + format + "'",
|
||||
{ silent: true });
|
||||
|
||||
if ( result.code !== 0 ) {
|
||||
abort( "Error getting git log." );
|
||||
}
|
||||
|
||||
result = result.output.split( rnewline );
|
||||
if ( result[ result.length - 1 ] === "" ) {
|
||||
result.pop();
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
function trac( path ) {
|
||||
var result = exec( "curl -s 'http://bugs.jqueryui.com" + path + "&format=tab'",
|
||||
{ silent: true });
|
||||
|
||||
if ( result.code !== 0 ) {
|
||||
abort( "Error getting Trac data." );
|
||||
}
|
||||
|
||||
return result.output;
|
||||
}
|
||||
|
||||
function unique( arr ) {
|
||||
var obj = {};
|
||||
arr.forEach(function( item ) {
|
||||
obj[ item ] = 1;
|
||||
});
|
||||
return Object.keys( obj );
|
||||
}
|
||||
|
||||
function readPackage() {
|
||||
return JSON.parse( fs.readFileSync( repoDir + "/package.json" ) );
|
||||
}
|
||||
|
||||
function writePackage( pkg ) {
|
||||
fs.writeFileSync( repoDir + "/package.json",
|
||||
JSON.stringify( pkg, null, "\t" ) + "\n" );
|
||||
}
|
||||
|
||||
function bootstrap( fn ) {
|
||||
console.log( "Determining directories..." );
|
||||
baseDir = process.cwd() + "/__release";
|
||||
repoDir = baseDir + "/repo";
|
||||
|
||||
if ( existsSync( baseDir ) ) {
|
||||
console.log( "The directory '" + baseDir + "' already exists." );
|
||||
console.log( "Aborting." );
|
||||
process.exit( 1 );
|
||||
}
|
||||
|
||||
console.log( "Creating directory..." );
|
||||
fs.mkdirSync( baseDir );
|
||||
|
||||
console.log( "Installing dependencies..." );
|
||||
require( "child_process" ).exec( "npm install shelljs colors", {
|
||||
cwd: baseDir
|
||||
}, function( error ) {
|
||||
if ( error ) {
|
||||
console.log( error );
|
||||
return process.exit( 1 );
|
||||
}
|
||||
|
||||
require( baseDir + "/node_modules/shelljs/global" );
|
||||
require( baseDir + "/node_modules/colors" );
|
||||
|
||||
fn();
|
||||
});
|
||||
}
|
||||
|
||||
function section( name ) {
|
||||
return function() {
|
||||
echo();
|
||||
echo( "##" );
|
||||
echo( "## " + name.toUpperCase().magenta );
|
||||
echo( "##" );
|
||||
echo();
|
||||
};
|
||||
}
|
||||
|
||||
function prompt( fn ) {
|
||||
process.stdin.once( "data", function( chunk ) {
|
||||
process.stdin.pause();
|
||||
fn( chunk.toString().trim() );
|
||||
});
|
||||
process.stdin.resume();
|
||||
}
|
||||
|
||||
function confirm( fn ) {
|
||||
echo( "Press enter to continue, or ctrl+c to cancel.".yellow );
|
||||
prompt( fn );
|
||||
}
|
||||
|
||||
function confirmReview( fn ) {
|
||||
echo( "Please review the output and generated files as a sanity check.".yellow );
|
||||
confirm( fn );
|
||||
}
|
||||
|
||||
function abort( msg ) {
|
||||
echo( msg.red );
|
||||
echo( "Aborting.".red );
|
||||
exit( 1 );
|
||||
}
|
||||
|
||||
function walk( methods ) {
|
||||
var method = methods.shift();
|
||||
|
||||
function next( error ) {
|
||||
if ( methods.length ) {
|
||||
walk( methods );
|
||||
}
|
||||
}
|
||||
|
||||
if ( !method.length ) {
|
||||
method();
|
||||
next();
|
||||
} else {
|
||||
method( next );
|
||||
}
|
||||
}
|
@ -2,6 +2,85 @@ module.exports = function( grunt ) {
|
||||
|
||||
var path = require( "path" );
|
||||
|
||||
grunt.registerTask( "manifest", "Generate jquery.json manifest files", function() {
|
||||
var pkg = grunt.config( "pkg" ),
|
||||
base = {
|
||||
core: {
|
||||
name: "ui.{plugin}",
|
||||
title: "jQuery UI {Plugin}"
|
||||
},
|
||||
widget: {
|
||||
name: "ui.{plugin}",
|
||||
title: "jQuery UI {Plugin}",
|
||||
dependencies: [ "core", "widget" ]
|
||||
},
|
||||
interaction: {
|
||||
name: "ui.{plugin}",
|
||||
title: "jQuery UI {Plugin}",
|
||||
dependencies: [ "core", "widget", "mouse" ]
|
||||
},
|
||||
effect: {
|
||||
name: "ui.effect-{plugin}",
|
||||
title: "jQuery UI {Plugin} Effect",
|
||||
keywords: [ "effect", "show", "hide" ],
|
||||
homepage: "http://jqueryui.com/{plugin}-effect/",
|
||||
demo: "http://jqueryui.com/{plugin}-effect/",
|
||||
docs: "http://api.jqueryui.com/{plugin}-effect/",
|
||||
dependencies: [ "effect" ]
|
||||
}
|
||||
};
|
||||
|
||||
Object.keys( base ).forEach(function( type ) {
|
||||
var baseManifest = base[ type ],
|
||||
plugins = grunt.file.readJSON( "build/" + type + ".json" );
|
||||
|
||||
Object.keys( plugins ).forEach(function( plugin ) {
|
||||
var manifest,
|
||||
data = plugins[ plugin ],
|
||||
name = plugin.charAt( 0 ).toUpperCase() + plugin.substr( 1 );
|
||||
|
||||
function replace( str ) {
|
||||
return str.replace( "{plugin}", plugin ).replace( "{Plugin}", name );
|
||||
}
|
||||
|
||||
manifest = {
|
||||
name: data.name || replace( baseManifest.name ),
|
||||
title: data.title || replace( baseManifest.title ),
|
||||
description: data.description,
|
||||
keywords: [ "ui", plugin ]
|
||||
.concat( baseManifest.keywords || [] )
|
||||
.concat( data.keywords || [] ),
|
||||
version: pkg.version,
|
||||
author: pkg.author,
|
||||
maintainers: pkg.maintainers,
|
||||
licenses: pkg.licenses,
|
||||
bugs: pkg.bugs,
|
||||
homepage: data.homepage || replace( baseManifest.homepage ||
|
||||
"http://jqueryui.com/{plugin}/" ),
|
||||
demo: data.demo || replace( baseManifest.demo ||
|
||||
"http://jqueryui.com/{plugin}/" ),
|
||||
docs: data.docs || replace( baseManifest.docs ||
|
||||
"http://api.jqueryui.com/{plugin}/" ),
|
||||
download: "http://jqueryui.com/download/",
|
||||
dependencies: {
|
||||
jquery: ">=1.6"
|
||||
},
|
||||
// custom
|
||||
category: data.category || type
|
||||
};
|
||||
|
||||
(baseManifest.dependencies || [])
|
||||
.concat(data.dependencies || [])
|
||||
.forEach(function( dependency ) {
|
||||
manifest.dependencies[ "ui." + dependency ] = pkg.version;
|
||||
});
|
||||
|
||||
grunt.file.write( manifest.name + ".jquery.json",
|
||||
JSON.stringify( manifest, null, "\t" ) + "\n" );
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
grunt.registerMultiTask( "copy", "Copy files to destination folder and replace @VERSION with pkg.version", function() {
|
||||
function replaceVersion( source ) {
|
||||
return source.replace( /@VERSION/g, grunt.config( "pkg.version" ) );
|
||||
|
@ -1,33 +1,38 @@
|
||||
/*jshint node: true */
|
||||
module.exports = function( grunt ) {
|
||||
|
||||
var tests = {
|
||||
"Accordion": "accordion/accordion.html",
|
||||
"Accordion_deprecated": "accordion/accordion_deprecated.html",
|
||||
"Autocomplete": "autocomplete/autocomplete.html",
|
||||
"Button": "button/button.html",
|
||||
"Core": "core/core.html",
|
||||
//"datepicker/datepicker.html",
|
||||
//"dialog/dialog.html",
|
||||
//"draggable/draggable.html",
|
||||
//"droppable/droppable.html",
|
||||
"Effects": "effects/effects.html",
|
||||
"Menu": "menu/menu.html",
|
||||
"Position": "position/position.html",
|
||||
"Position_deprecated": "position/position_deprecated.html",
|
||||
"Progressbar": "progressbar/progressbar.html",
|
||||
//"resizable/resizable.html",
|
||||
//"selectable/selectable.html",
|
||||
//"slider/slider.html",
|
||||
//"sortable/sortable.html",
|
||||
"Spinner": "spinner/spinner.html",
|
||||
"Tabs": "tabs/tabs.html",
|
||||
"Tabs_deprecated": "tabs/tabs_deprecated.html",
|
||||
"Tooltip": "tooltip/tooltip.html",
|
||||
"Widget": "widget/widget.html"
|
||||
};
|
||||
var versions = {
|
||||
"git": "git",
|
||||
"1.7": "1.7 1.7.1 1.7.2",
|
||||
"1.6": "1.6 1.6.1 1.6.2 1.6.3 1.6.4"
|
||||
},
|
||||
tests = {
|
||||
"Accordion": "accordion/accordion.html",
|
||||
"Accordion_deprecated": "accordion/accordion_deprecated.html",
|
||||
"Autocomplete": "autocomplete/autocomplete.html",
|
||||
"Button": "button/button.html",
|
||||
"Core": "core/core.html",
|
||||
//"datepicker/datepicker.html",
|
||||
//"dialog/dialog.html",
|
||||
//"draggable/draggable.html",
|
||||
//"droppable/droppable.html",
|
||||
"Effects": "effects/effects.html",
|
||||
"Menu": "menu/menu.html",
|
||||
"Position": "position/position.html",
|
||||
"Position_deprecated": "position/position_deprecated.html",
|
||||
"Progressbar": "progressbar/progressbar.html",
|
||||
//"resizable/resizable.html",
|
||||
//"selectable/selectable.html",
|
||||
//"slider/slider.html",
|
||||
//"sortable/sortable.html",
|
||||
"Spinner": "spinner/spinner.html",
|
||||
"Tabs": "tabs/tabs.html",
|
||||
"Tabs_deprecated": "tabs/tabs_deprecated.html",
|
||||
"Tooltip": "tooltip/tooltip.html",
|
||||
"Widget": "widget/widget.html"
|
||||
};
|
||||
|
||||
function submit( commit, tests, configFile, done ) {
|
||||
function submit( commit, tests, configFile, version, done ) {
|
||||
var test,
|
||||
testswarm = require( "testswarm" ),
|
||||
config = grunt.file.readJSON( configFile ).jqueryui,
|
||||
@ -39,12 +44,12 @@ function submit( commit, tests, configFile, done ) {
|
||||
testswarm({
|
||||
url: config.swarmUrl,
|
||||
pollInterval: 10000,
|
||||
timeout: 1000 * 60 * 30,
|
||||
timeout: 1000 * 60 * 45,
|
||||
done: done
|
||||
}, {
|
||||
authUsername: config.authUsername,
|
||||
authToken: config.authToken,
|
||||
jobName: 'jQuery UI commit #<a href="https://github.com/jquery/jquery-ui/commit/' + commit + '">' + commit.substr( 0, 10 ) + '</a>',
|
||||
jobName: 'jQuery UI ' + version + '<a href="https://github.com/jquery/jquery-ui/commit/' + commit + '">' + commit.substr( 0, 7 ) + '</a>',
|
||||
runMax: config.runMax,
|
||||
"runNames[]": Object.keys(tests),
|
||||
"runUrls[]": testUrls,
|
||||
@ -58,17 +63,17 @@ grunt.registerTask( "testswarm", function( commit, configFile ) {
|
||||
for ( test in tests ) {
|
||||
latestTests[ test ] = tests[ test ] + "?nojshint=true";
|
||||
}
|
||||
submit( commit, latestTests, configFile, this.async() );
|
||||
submit( commit, latestTests, configFile, "", this.async() );
|
||||
});
|
||||
|
||||
grunt.registerTask( "testswarm-multi-jquery", function( commit, configFile ) {
|
||||
grunt.registerTask( "testswarm-multi-jquery", function( commit, configFile, minor ) {
|
||||
var allTests = {};
|
||||
"1.6 1.6.1 1.6.2 1.6.3 1.6.4 1.7 1.7.1 1.7.2 git".split(" ").forEach(function( version ) {
|
||||
versions[ minor ].split(" ").forEach(function( version ) {
|
||||
for ( var test in tests ) {
|
||||
allTests[ test + "-" + version ] = tests[ test ] + "?nojshint=true&jquery=" + version;
|
||||
}
|
||||
});
|
||||
submit( commit, allTests, configFile, this.async() );
|
||||
submit( commit, allTests, configFile, minor + " core ", this.async() );
|
||||
});
|
||||
|
||||
};
|
||||
|
98
build/widget.json
Normal file
98
build/widget.json
Normal file
@ -0,0 +1,98 @@
|
||||
{
|
||||
"accordion": {
|
||||
"dependencies": [],
|
||||
"description": "Displays collapsible content panels for presenting information in a limited amount of space.",
|
||||
"keywords": [
|
||||
"navigation",
|
||||
"panel",
|
||||
"collapse",
|
||||
"expand"
|
||||
]
|
||||
},
|
||||
"autocomplete": {
|
||||
"dependencies": [ "menu", "position" ],
|
||||
"description": "Lists suggested words as the user is typing.",
|
||||
"keywords": [
|
||||
"form",
|
||||
"word",
|
||||
"predict",
|
||||
"suggest"
|
||||
]
|
||||
},
|
||||
"button": {
|
||||
"dependencies": [],
|
||||
"description": "Enhances a form with themable buttons.",
|
||||
"keywords": [
|
||||
"form",
|
||||
"radio",
|
||||
"checkbox"
|
||||
]
|
||||
},
|
||||
"dialog": {
|
||||
"dependencies": [ "button", "draggable", "position", "resizable" ],
|
||||
"description": "Displays customizable dialog windows.",
|
||||
"keywords": [
|
||||
"modal",
|
||||
"alert",
|
||||
"popup"
|
||||
]
|
||||
},
|
||||
"menu": {
|
||||
"dependencies": [ "position" ],
|
||||
"description": "Creates nestable menus.",
|
||||
"keywords": [
|
||||
"dropdown",
|
||||
"flyout"
|
||||
]
|
||||
},
|
||||
"mouse": {
|
||||
"dependencies": [],
|
||||
"description": "Abstracts mouse-based interactions to assist in creating certain widgets.",
|
||||
"keywords": [
|
||||
"abstraction"
|
||||
],
|
||||
"category": "core"
|
||||
},
|
||||
"progressbar": {
|
||||
"dependencies": [],
|
||||
"description": "Displays a status indicator for loading state, standard percentage, and other progress indicators.",
|
||||
"keywords": [
|
||||
"determinate",
|
||||
"status"
|
||||
]
|
||||
},
|
||||
"slider": {
|
||||
"dependencies": [ "mouse" ],
|
||||
"description": "Displays a flexible slider with ranges and accessibility via keyboard.",
|
||||
"keywords": [
|
||||
"form",
|
||||
"number",
|
||||
"range"
|
||||
]
|
||||
},
|
||||
"spinner": {
|
||||
"dependencies": [ "button" ],
|
||||
"description": "Displays buttons to easily input numbers via the keyboard or mouse.",
|
||||
"keywords": [
|
||||
"form",
|
||||
"number",
|
||||
"spinbutton",
|
||||
"stepper"
|
||||
]
|
||||
},
|
||||
"tabs": {
|
||||
"dependencies": [],
|
||||
"description": "Transforms a set of container elements into a tab structure.",
|
||||
"keywords": [
|
||||
"navigation",
|
||||
"panel",
|
||||
"collapse",
|
||||
"expand"
|
||||
]
|
||||
},
|
||||
"tooltip": {
|
||||
"dependencies": [ "position" ],
|
||||
"description": "Shows additional information for any element on hover or focus.",
|
||||
"keywords": []
|
||||
}
|
||||
}
|
@ -52,7 +52,7 @@
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>Example of a donation form, with currency selection and amout spinner.</p>
|
||||
<p>Example of a donation form, with currency selection and amount spinner.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
|
6
grunt.js
6
grunt.js
@ -114,7 +114,7 @@ function createBanner( files ) {
|
||||
"<%= grunt.template.today('isoDate') %>\n" +
|
||||
"<%= pkg.homepage ? '* ' + pkg.homepage + '\n' : '' %>" +
|
||||
"* Includes: " + (files ? fileNames.join(", ") : "<%= stripDirectory(grunt.task.current.file.src[1]) %>") + "\n" +
|
||||
"* Copyright (c) <%= grunt.template.today('yyyy') %> <%= pkg.author.name %>;" +
|
||||
"* Copyright <%= grunt.template.today('yyyy') %> <%= pkg.author.name %>;" +
|
||||
" Licensed <%= _.pluck(pkg.licenses, 'type').join(', ') %> */";
|
||||
}
|
||||
|
||||
@ -158,12 +158,12 @@ grunt.initConfig({
|
||||
dist: {
|
||||
src: [
|
||||
"AUTHORS.txt",
|
||||
"GPL-LICENSE.txt",
|
||||
"jquery-*.js",
|
||||
"MIT-LICENSE.txt",
|
||||
"README.md",
|
||||
"grunt.js",
|
||||
"package.json",
|
||||
"*.jquery.json",
|
||||
"ui/**/*",
|
||||
"demos/**/*",
|
||||
"themes/**/*",
|
||||
@ -203,7 +203,6 @@ grunt.initConfig({
|
||||
cdn: {
|
||||
src: [
|
||||
"AUTHORS.txt",
|
||||
"GPL-LICENSE.txt",
|
||||
"MIT-LICENSE.txt",
|
||||
"ui/*.js",
|
||||
"package.json"
|
||||
@ -246,7 +245,6 @@ grunt.initConfig({
|
||||
themes: {
|
||||
src: [
|
||||
"AUTHORS.txt",
|
||||
"GPL-LICENSE.txt",
|
||||
"MIT-LICENSE.txt",
|
||||
"package.json"
|
||||
],
|
||||
|
124
package.json
124
package.json
@ -1,66 +1,62 @@
|
||||
{
|
||||
"name": "jquery-ui",
|
||||
"title": "jQuery UI",
|
||||
"description": "Abstractions for low-level interaction and animation, advanced effects and high-level, themeable widgets, built on top of the jQuery JavaScript Library, that you can use to build highly interactive web applications.",
|
||||
"version": "1.9.0pre",
|
||||
"homepage": "http://jqueryui.com",
|
||||
"author": {
|
||||
"name": "jQuery Foundation and other contributors",
|
||||
"url": "http://jqueryui.com"
|
||||
},
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "Scott González",
|
||||
"email": "scott.gonzalez@gmail.com",
|
||||
"url": "http://scottgonzalez.com"
|
||||
},
|
||||
{
|
||||
"name": "Jörn Zaefferer",
|
||||
"email": "joern.zaefferer@gmail.com",
|
||||
"url": "http://bassistance.de"
|
||||
},
|
||||
{
|
||||
"name": "Richard D. Worth",
|
||||
"email": "rdworth@gmail.com",
|
||||
"url": "http://rdworth.org"
|
||||
},
|
||||
{
|
||||
"name": "Kris Borchers",
|
||||
"email": "kris.borchers@gmail.com",
|
||||
"url": "http://krisborchers.com"
|
||||
},
|
||||
{
|
||||
"name": "Corey Frang",
|
||||
"email": "gnarf37@gmail.com",
|
||||
"url": "http://gnarf.net"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/jquery/jquery-ui.git"
|
||||
},
|
||||
"bugs": "http://bugs.jqueryui.com/",
|
||||
"licenses": [
|
||||
{
|
||||
"type": "MIT",
|
||||
"url": "http://www.opensource.org/licenses/MIT"
|
||||
},
|
||||
{
|
||||
"type": "GPL",
|
||||
"url": "http://www.opensource.org/licenses/GPL-2.0"
|
||||
}
|
||||
],
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"grunt": "~0.3.9",
|
||||
"grunt-css": "0.2.0",
|
||||
"grunt-compare-size": "0.1.4",
|
||||
"grunt-html": "0.1.1",
|
||||
"grunt-junit": "0.1.4",
|
||||
"grunt-git-authors": "1.0.0",
|
||||
"request": "2.9.153",
|
||||
"rimraf": "2.0.1",
|
||||
"testswarm": "0.2.3"
|
||||
},
|
||||
"keywords": []
|
||||
"name": "jquery-ui",
|
||||
"title": "jQuery UI",
|
||||
"description": "A curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library.",
|
||||
"version": "1.9.0pre",
|
||||
"homepage": "http://jqueryui.com",
|
||||
"author": {
|
||||
"name": "jQuery Foundation and other contributors",
|
||||
"url": "https://github.com/jquery/jquery-ui/blob/master/AUTHORS.txt"
|
||||
},
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "Scott González",
|
||||
"email": "scott.gonzalez@gmail.com",
|
||||
"url": "http://scottgonzalez.com"
|
||||
},
|
||||
{
|
||||
"name": "Jörn Zaefferer",
|
||||
"email": "joern.zaefferer@gmail.com",
|
||||
"url": "http://bassistance.de"
|
||||
},
|
||||
{
|
||||
"name": "Richard D. Worth",
|
||||
"email": "rdworth@gmail.com",
|
||||
"url": "http://rdworth.org"
|
||||
},
|
||||
{
|
||||
"name": "Kris Borchers",
|
||||
"email": "kris.borchers@gmail.com",
|
||||
"url": "http://krisborchers.com"
|
||||
},
|
||||
{
|
||||
"name": "Corey Frang",
|
||||
"email": "gnarf37@gmail.com",
|
||||
"url": "http://gnarf.net"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/jquery/jquery-ui.git"
|
||||
},
|
||||
"bugs": "http://bugs.jqueryui.com/",
|
||||
"licenses": [
|
||||
{
|
||||
"type": "MIT",
|
||||
"url": "https://github.com/jquery/jquery-ui/blob/master/MIT-LICENSE.txt"
|
||||
}
|
||||
],
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"grunt": "~0.3.9",
|
||||
"grunt-css": "0.2.0",
|
||||
"grunt-compare-size": "0.1.4",
|
||||
"grunt-html": "0.1.1",
|
||||
"grunt-junit": "0.1.4",
|
||||
"grunt-git-authors": "1.0.0",
|
||||
"request": "2.9.153",
|
||||
"rimraf": "2.0.1",
|
||||
"testswarm": "0.2.3"
|
||||
},
|
||||
"keywords": []
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*/
|
||||
|
||||
|
@ -10,7 +10,7 @@ asyncTest( "#3123: Prevent tabbing out of modal dialogs", function() {
|
||||
|
||||
var el = $( "<div><input id='t3123-first'><input id='t3123-last'></div>" ).dialog({ modal: true }),
|
||||
inputs = el.find( "input" ),
|
||||
widget = el.dialog( "widget" );
|
||||
widget = el.dialog( "widget" )[ 0 ];
|
||||
|
||||
function checkTab() {
|
||||
ok( $.contains( widget, document.activeElement ), "Tab key event moved focus within the modal" );
|
||||
|
@ -577,22 +577,4 @@ test( "handle keyboard navigation with spelling of menu items", function() {
|
||||
element.focus();
|
||||
});
|
||||
|
||||
asyncTest( "handle page up and page down before the menu has focus", function() {
|
||||
expect( 1 );
|
||||
var element = $( "#menu1" ).menu({
|
||||
focus: function( event, ui ) {
|
||||
log( $( event.target ).find( ".ui-state-focus" ).parent().index() );
|
||||
}
|
||||
});
|
||||
|
||||
log( "keydown", true );
|
||||
element.simulate( "keydown", { keyCode: $.ui.keyCode.PAGE_DOWN } );
|
||||
element.blur();
|
||||
setTimeout( function() {
|
||||
element.simulate( "keydown", { keyCode: $.ui.keyCode.PAGE_UP } );
|
||||
equal( logOutput(), "keydown,0,0", "Page Up and Page Down bring initial focus to first item" );
|
||||
start();
|
||||
}, 500 );
|
||||
});
|
||||
|
||||
})( jQuery );
|
||||
|
@ -16,6 +16,7 @@ function handle() {
|
||||
module("slider: core");
|
||||
|
||||
test("keydown HOME on handle sets value to min", function() {
|
||||
expect( 2 );
|
||||
el = $('<div></div>');
|
||||
options = {
|
||||
max: 5,
|
||||
@ -50,6 +51,7 @@ test("keydown HOME on handle sets value to min", function() {
|
||||
});
|
||||
|
||||
test("keydown END on handle sets value to max", function() {
|
||||
expect( 2 );
|
||||
el = $('<div></div>');
|
||||
options = {
|
||||
max: 5,
|
||||
@ -84,6 +86,7 @@ test("keydown END on handle sets value to max", function() {
|
||||
});
|
||||
|
||||
test("keydown PAGE_UP on handle increases value by 1/5 range, not greater than max", function() {
|
||||
expect( 4 );
|
||||
$.each(['horizontal', 'vertical'], function(i, orientation) {
|
||||
el = $('<div></div>');
|
||||
options = {
|
||||
@ -107,6 +110,7 @@ test("keydown PAGE_UP on handle increases value by 1/5 range, not greater than m
|
||||
});
|
||||
|
||||
test("keydown PAGE_DOWN on handle decreases value by 1/5 range, not less than min", function() {
|
||||
expect( 4 );
|
||||
$.each(['horizontal', 'vertical'], function(i, orientation) {
|
||||
el = $('<div></div>');
|
||||
options = {
|
||||
@ -130,6 +134,7 @@ test("keydown PAGE_DOWN on handle decreases value by 1/5 range, not less than mi
|
||||
});
|
||||
|
||||
test("keydown UP on handle increases value by step, not greater than max", function() {
|
||||
expect( 4 );
|
||||
el = $('<div></div>');
|
||||
options = {
|
||||
max: 5,
|
||||
@ -170,6 +175,7 @@ test("keydown UP on handle increases value by step, not greater than max", funct
|
||||
});
|
||||
|
||||
test("keydown RIGHT on handle increases value by step, not greater than max", function() {
|
||||
expect( 4 );
|
||||
el = $('<div></div>');
|
||||
options = {
|
||||
max: 5,
|
||||
@ -210,6 +216,7 @@ test("keydown RIGHT on handle increases value by step, not greater than max", fu
|
||||
});
|
||||
|
||||
test("keydown DOWN on handle decreases value by step, not less than min", function() {
|
||||
expect( 4 );
|
||||
el = $('<div></div>');
|
||||
options = {
|
||||
max: 5,
|
||||
@ -250,6 +257,7 @@ test("keydown DOWN on handle decreases value by step, not less than min", functi
|
||||
});
|
||||
|
||||
test("keydown LEFT on handle decreases value by step, not less than min", function() {
|
||||
expect( 4 );
|
||||
el = $('<div></div>');
|
||||
options = {
|
||||
max: 5,
|
||||
|
@ -12,8 +12,7 @@ module( "slider: events" );
|
||||
test( "mouse based interaction", function() {
|
||||
expect(4);
|
||||
|
||||
var el = $( "<div></div>" )
|
||||
.appendTo( "body" )
|
||||
var el = $( "#slider1" )
|
||||
.slider({
|
||||
start: function(event, ui) {
|
||||
equal( event.originalEvent.type, "mousedown", "start triggered by mousedown" );
|
||||
@ -37,8 +36,7 @@ test( "keyboard based interaction", function() {
|
||||
expect(3);
|
||||
|
||||
// Test keyup at end of handle slide (keyboard)
|
||||
var el = $( "<div></div>" )
|
||||
.appendTo( "body" )
|
||||
var el = $( "#slider1" )
|
||||
.slider({
|
||||
start: function(event, ui) {
|
||||
equal( event.originalEvent.type, "keydown", "start triggered by keydown" );
|
||||
|
@ -27,21 +27,14 @@ test("init", function() {
|
||||
});
|
||||
|
||||
test("destroy", function() {
|
||||
$("<div></div>").appendTo('body').slider().slider("destroy").remove();
|
||||
ok(true, '.slider("destroy") called on element');
|
||||
|
||||
$([]).slider().slider("destroy").remove();
|
||||
ok(true, '.slider("destroy") called on empty collection');
|
||||
|
||||
$('<div></div>').appendTo('body').remove().slider().slider("destroy").remove();
|
||||
ok(true, '.slider("destroy") called on disconnected DOMElement');
|
||||
|
||||
var expected = $('<div></div>').slider(),
|
||||
actual = expected.slider('destroy');
|
||||
equal(actual, expected, 'destroy is chainable');
|
||||
expect( 1 );
|
||||
domEqual( "#slider1", function() {
|
||||
$( "#slider1" ).slider().slider( "destroy" );
|
||||
});
|
||||
});
|
||||
|
||||
test("enable", function() {
|
||||
expect( 5 );
|
||||
var el,
|
||||
expected = $('<div></div>').slider(),
|
||||
actual = expected.slider('enable');
|
||||
@ -56,6 +49,7 @@ test("enable", function() {
|
||||
});
|
||||
|
||||
test("disable", function() {
|
||||
expect( 5 );
|
||||
var el,
|
||||
expected = $('<div></div>').slider(),
|
||||
actual = expected.slider('disable');
|
||||
@ -70,6 +64,7 @@ test("disable", function() {
|
||||
});
|
||||
|
||||
test("value", function() {
|
||||
expect( 17 );
|
||||
$([false, 'min', 'max']).each(function() {
|
||||
var el = $('<div></div>').slider({
|
||||
range: this,
|
||||
|
@ -12,6 +12,7 @@ function handle() {
|
||||
module("slider: options");
|
||||
|
||||
test("max", function() {
|
||||
expect( 2 );
|
||||
el = $('<div></div>');
|
||||
|
||||
options = {
|
||||
@ -30,6 +31,7 @@ test("max", function() {
|
||||
});
|
||||
|
||||
test("min", function() {
|
||||
expect( 2 );
|
||||
el = $('<div></div>');
|
||||
|
||||
options = {
|
||||
@ -48,7 +50,8 @@ test("min", function() {
|
||||
});
|
||||
|
||||
test("orientation", function() {
|
||||
el = $('<div></div>');
|
||||
expect( 6 );
|
||||
el = $('#slider1');
|
||||
|
||||
options = {
|
||||
max: 2,
|
||||
@ -62,7 +65,7 @@ test("orientation", function() {
|
||||
el.slider(options).slider("option", "orientation", "horizontal");
|
||||
ok(el.is('.ui-slider-horizontal'), "horizontal slider has class .ui-slider-horizontal");
|
||||
ok(!el.is('.ui-slider-vertical'), "horizontal slider does not have class .ui-slider-vertical");
|
||||
equal(handle().css('left'), percentVal + '%', "horizontal slider handle is positioned with left: %");
|
||||
equal(handle()[0].style.left, percentVal + '%', "horizontal slider handle is positioned with left: %");
|
||||
|
||||
el.slider('destroy');
|
||||
|
||||
@ -78,7 +81,7 @@ test("orientation", function() {
|
||||
el.slider(options).slider("option", "orientation", "vertical");
|
||||
ok(el.is('.ui-slider-vertical'), "vertical slider has class .ui-slider-vertical");
|
||||
ok(!el.is('.ui-slider-horizontal'), "vertical slider does not have class .ui-slider-horizontal");
|
||||
equal(handle().css('bottom'), percentVal + '%', "vertical slider handle is positioned with bottom: %");
|
||||
equal(handle()[0].style.bottom, percentVal + '%', "vertical slider handle is positioned with bottom: %");
|
||||
|
||||
el.slider('destroy');
|
||||
|
||||
@ -92,6 +95,7 @@ test("orientation", function() {
|
||||
// value option/method: the value option is not restricted by min/max/step.
|
||||
// What is returned by the value method is restricted by min (>=), max (<=), and step (even multiple)
|
||||
test("step", function() {
|
||||
expect( 9 );
|
||||
var el = $('<div></div>').slider({
|
||||
min: 0,
|
||||
value: 0,
|
||||
@ -112,7 +116,7 @@ test("step", function() {
|
||||
el.slider("value", 19);
|
||||
equal( el.slider("value"), 20 );
|
||||
|
||||
el = $('<div></div>').slider({
|
||||
el = $('<div></div>').slider({
|
||||
min: 0,
|
||||
value: 0,
|
||||
step: 20,
|
||||
|
@ -285,11 +285,7 @@ asyncTest( "keyboard support - LEFT, RIGHT, UP, DOWN, HOME, END, SPACE, ENTER",
|
||||
equal( panels.eq( 2 ).attr( "aria-expanded" ), "false", "third panel has aria-expanded=false" );
|
||||
equal( panels.eq( 2 ).attr( "aria-hidden" ), "true", "third panel has aria-hidden=true" );
|
||||
|
||||
// support: Firefox 12
|
||||
// Firefox <13 passes arguments so we can't use setTimeout( start, 1 )
|
||||
setTimeout(function() {
|
||||
start();
|
||||
}, 1 );
|
||||
setTimeout( start, 1 );
|
||||
}
|
||||
|
||||
setTimeout( step1, 1 );
|
||||
@ -482,11 +478,7 @@ asyncTest( "keyboard support - CTRL navigation", function() {
|
||||
equal( panels.eq( 0 ).attr( "aria-expanded" ), "false", "first panel has aria-expanded=false" );
|
||||
equal( panels.eq( 0 ).attr( "aria-hidden" ), "true", "first panel has aria-hidden=true" );
|
||||
|
||||
// support: Firefox 12
|
||||
// Firefox <13 passes arguments so we can't use setTimeout( start, 1 )
|
||||
setTimeout(function() {
|
||||
start();
|
||||
}, 1 );
|
||||
setTimeout( start, 1 );
|
||||
}
|
||||
|
||||
setTimeout( step1, 1 );
|
||||
@ -578,11 +570,7 @@ asyncTest( "keyboard support - CTRL+UP, ALT+PAGE_DOWN, ALT+PAGE_UP", function()
|
||||
panels.eq( 1 ).simulate( "keydown", { keyCode: keyCode.UP, ctrlKey: true } );
|
||||
strictEqual( document.activeElement, tabs[ 1 ], "second tab is activeElement" );
|
||||
|
||||
// support: Firefox 12
|
||||
// Firefox <13 passes arguments so we can't use setTimeout( start, 1 )
|
||||
setTimeout(function() {
|
||||
start();
|
||||
}, 1 );
|
||||
setTimeout( start, 1 );
|
||||
}
|
||||
|
||||
setTimeout( step1, 1 );
|
||||
|
@ -1,8 +1,8 @@
|
||||
body {
|
||||
margin: 1em;
|
||||
padding: 0;
|
||||
background: #191919;
|
||||
color: #fff;
|
||||
background: #fff;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
ul.effects {
|
||||
|
2
themes/base/jquery.ui.accordion.css
vendored
2
themes/base/jquery.ui.accordion.css
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Accordion#theming
|
||||
|
2
themes/base/jquery.ui.all.css
vendored
2
themes/base/jquery.ui.all.css
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Theming
|
||||
|
2
themes/base/jquery.ui.autocomplete.css
vendored
2
themes/base/jquery.ui.autocomplete.css
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Autocomplete#theming
|
||||
|
2
themes/base/jquery.ui.base.css
vendored
2
themes/base/jquery.ui.base.css
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Theming
|
||||
|
2
themes/base/jquery.ui.button.css
vendored
2
themes/base/jquery.ui.button.css
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Button#theming
|
||||
|
2
themes/base/jquery.ui.core.css
vendored
2
themes/base/jquery.ui.core.css
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Theming/API
|
||||
|
2
themes/base/jquery.ui.datepicker.css
vendored
2
themes/base/jquery.ui.datepicker.css
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Datepicker#theming
|
||||
|
2
themes/base/jquery.ui.dialog.css
vendored
2
themes/base/jquery.ui.dialog.css
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Dialog#theming
|
||||
|
2
themes/base/jquery.ui.menu.css
vendored
2
themes/base/jquery.ui.menu.css
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Menu#theming
|
||||
|
2
themes/base/jquery.ui.progressbar.css
vendored
2
themes/base/jquery.ui.progressbar.css
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Progressbar#theming
|
||||
|
2
themes/base/jquery.ui.resizable.css
vendored
2
themes/base/jquery.ui.resizable.css
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Resizable#theming
|
||||
|
2
themes/base/jquery.ui.selectable.css
vendored
2
themes/base/jquery.ui.selectable.css
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Selectable#theming
|
||||
|
2
themes/base/jquery.ui.slider.css
vendored
2
themes/base/jquery.ui.slider.css
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Slider#theming
|
||||
|
2
themes/base/jquery.ui.spinner.css
vendored
2
themes/base/jquery.ui.spinner.css
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Spinner#theming
|
||||
|
2
themes/base/jquery.ui.tabs.css
vendored
2
themes/base/jquery.ui.tabs.css
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Tabs#theming
|
||||
|
2
themes/base/jquery.ui.theme.css
vendored
2
themes/base/jquery.ui.theme.css
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Theming/API
|
||||
|
2
themes/base/jquery.ui.tooltip.css
vendored
2
themes/base/jquery.ui.tooltip.css
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*/
|
||||
.ui-tooltip {
|
||||
|
2
ui/jquery.ui.accordion.js
vendored
2
ui/jquery.ui.accordion.js
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Accordion
|
||||
|
6
ui/jquery.ui.autocomplete.js
vendored
6
ui/jquery.ui.autocomplete.js
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Autocomplete
|
||||
@ -577,7 +577,7 @@ $.widget( "ui.autocomplete", $.ui.autocomplete, {
|
||||
options: {
|
||||
messages: {
|
||||
noResults: "No search results.",
|
||||
results: function(amount) {
|
||||
results: function( amount ) {
|
||||
return amount + ( amount > 1 ? " results are" : " result is" ) +
|
||||
" available, use up and down arrow keys to navigate.";
|
||||
}
|
||||
@ -587,7 +587,7 @@ $.widget( "ui.autocomplete", $.ui.autocomplete, {
|
||||
__response: function( content ) {
|
||||
var message;
|
||||
this._superApply( arguments );
|
||||
if ( this.options.disabled || this.cancelSearch) {
|
||||
if ( this.options.disabled || this.cancelSearch ) {
|
||||
return;
|
||||
}
|
||||
if ( content && content.length ) {
|
||||
|
2
ui/jquery.ui.button.js
vendored
2
ui/jquery.ui.button.js
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Button
|
||||
|
2
ui/jquery.ui.core.js
vendored
2
ui/jquery.ui.core.js
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI
|
||||
|
15
ui/jquery.ui.datepicker.js
vendored
15
ui/jquery.ui.datepicker.js
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Datepicker
|
||||
@ -309,7 +309,7 @@ $.extend(Datepicker.prototype, {
|
||||
this.uuid += 1;
|
||||
var id = 'dp' + this.uuid;
|
||||
this._dialogInput = $('<input type="text" id="' + id +
|
||||
'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>');
|
||||
'" style="position: absolute; top: -100px; width: 0px;"/>');
|
||||
this._dialogInput.keydown(this._doKeyDown);
|
||||
$('body').append(this._dialogInput);
|
||||
inst = this._dialogInst = this._newInst(this._dialogInput, false);
|
||||
@ -708,6 +708,9 @@ $.extend(Datepicker.prototype, {
|
||||
|
||||
/* Generate the date picker content. */
|
||||
_updateDatepicker: function(inst) {
|
||||
if ($.datepicker._curInst && inst != $.datepicker._curInst) {
|
||||
return;
|
||||
}
|
||||
this.maxRows = 4; //Reset the max number of rows being displayed (see #7043)
|
||||
var borders = $.datepicker._getBorders(inst.dpDiv);
|
||||
instActive = inst; // for delegate hover events
|
||||
@ -763,8 +766,8 @@ $.extend(Datepicker.prototype, {
|
||||
var dpHeight = inst.dpDiv.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();
|
||||
var viewWidth = document.documentElement.clientWidth + (isFixed ? 0 : $(document).scrollLeft());
|
||||
var viewHeight = document.documentElement.clientHeight + (isFixed ? 0 : $(document).scrollTop());
|
||||
|
||||
offset.left -= (this._get(inst, 'isRTL') ? (dpWidth - inputWidth) : 0);
|
||||
offset.left -= (isFixed && offset.left == inst.input.offset().left) ? $(document).scrollLeft() : 0;
|
||||
@ -1411,7 +1414,7 @@ $.extend(Datepicker.prototype, {
|
||||
*/
|
||||
_attachHandlers: function(inst) {
|
||||
var stepMonths = this._get(inst, 'stepMonths');
|
||||
var id = '#' + inst.id;
|
||||
var id = '#' + inst.id.replace( /\\\\/g, "\\" );
|
||||
inst.dpDiv.find('[data-handler]').map(function () {
|
||||
var handler = {
|
||||
prev: function () {
|
||||
@ -1815,7 +1818,7 @@ $.fn.datepicker = function(options){
|
||||
/* Initialise the date picker. */
|
||||
if (!$.datepicker.initialized) {
|
||||
$(document).mousedown($.datepicker._checkExternalClick).
|
||||
find('body').append($.datepicker.dpDiv);
|
||||
find(document.body).append($.datepicker.dpDiv);
|
||||
$.datepicker.initialized = true;
|
||||
}
|
||||
|
||||
|
2
ui/jquery.ui.dialog.js
vendored
2
ui/jquery.ui.dialog.js
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Dialog
|
||||
|
2
ui/jquery.ui.draggable.js
vendored
2
ui/jquery.ui.draggable.js
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Draggables
|
||||
|
2
ui/jquery.ui.droppable.js
vendored
2
ui/jquery.ui.droppable.js
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Droppables
|
||||
|
6
ui/jquery.ui.effect-blind.js
vendored
6
ui/jquery.ui.effect-blind.js
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Effects/Blind
|
||||
@ -42,7 +42,7 @@ $.effects.effect.blind = function( o, done ) {
|
||||
});
|
||||
|
||||
distance = wrapper[ ref ]();
|
||||
margin = parseFloat( wrapper.css( ref2 ) );
|
||||
margin = parseFloat( wrapper.css( ref2 ) ) || 0;
|
||||
|
||||
animation[ ref ] = show ? distance : 0;
|
||||
if ( !motion ) {
|
||||
@ -51,7 +51,7 @@ $.effects.effect.blind = function( o, done ) {
|
||||
.css( vertical ? "top" : "left", "auto" )
|
||||
.css({ position: "absolute" });
|
||||
|
||||
animation[ ref2 ] = show ? margin : distance + margin;
|
||||
animation[ ref2 ] = show ? margin : distance + margin;
|
||||
}
|
||||
|
||||
// start at 0 if we are showing
|
||||
|
2
ui/jquery.ui.effect-bounce.js
vendored
2
ui/jquery.ui.effect-bounce.js
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Effects/Bounce
|
||||
|
2
ui/jquery.ui.effect-clip.js
vendored
2
ui/jquery.ui.effect-clip.js
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Effects/Clip
|
||||
|
4
ui/jquery.ui.effect-drop.js
vendored
4
ui/jquery.ui.effect-drop.js
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Effects/Drop
|
||||
@ -32,7 +32,7 @@ $.effects.effect.drop = function( o, done ) {
|
||||
el.show();
|
||||
$.effects.createWrapper( el );
|
||||
|
||||
distance = o.distance || el[ ref === "top" ? "outerHeight": "outerWidth" ]({ margin: true }) / 2;
|
||||
distance = o.distance || el[ ref === "top" ? "outerHeight": "outerWidth" ]( true ) / 2;
|
||||
|
||||
if ( show ) {
|
||||
el
|
||||
|
2
ui/jquery.ui.effect-explode.js
vendored
2
ui/jquery.ui.effect-explode.js
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Effects/Explode
|
||||
|
2
ui/jquery.ui.effect-fade.js
vendored
2
ui/jquery.ui.effect-fade.js
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Effects/Fade
|
||||
|
2
ui/jquery.ui.effect-fold.js
vendored
2
ui/jquery.ui.effect-fold.js
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Effects/Fold
|
||||
|
2
ui/jquery.ui.effect-highlight.js
vendored
2
ui/jquery.ui.effect-highlight.js
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Effects/Highlight
|
||||
|
2
ui/jquery.ui.effect-pulsate.js
vendored
2
ui/jquery.ui.effect-pulsate.js
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Effects/Pulsate
|
||||
|
2
ui/jquery.ui.effect-scale.js
vendored
2
ui/jquery.ui.effect-scale.js
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Effects/Scale
|
||||
|
2
ui/jquery.ui.effect-shake.js
vendored
2
ui/jquery.ui.effect-shake.js
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Effects/Shake
|
||||
|
6
ui/jquery.ui.effect-slide.js
vendored
6
ui/jquery.ui.effect-slide.js
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Effects/Slide
|
||||
@ -29,9 +29,7 @@ $.effects.effect.slide = function( o, done ) {
|
||||
// Adjust
|
||||
$.effects.save( el, props );
|
||||
el.show();
|
||||
distance = o.distance || el[ ref === "top" ? "outerHeight" : "outerWidth" ]({
|
||||
margin: true
|
||||
});
|
||||
distance = o.distance || el[ ref === "top" ? "outerHeight" : "outerWidth" ]( true );
|
||||
|
||||
$.effects.createWrapper( el ).css({
|
||||
overflow: "hidden"
|
||||
|
2
ui/jquery.ui.effect-transfer.js
vendored
2
ui/jquery.ui.effect-transfer.js
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Effects/Transfer
|
||||
|
2
ui/jquery.ui.effect.js
vendored
2
ui/jquery.ui.effect.js
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Effects/
|
||||
|
46
ui/jquery.ui.menu.js
vendored
46
ui/jquery.ui.menu.js
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Menu
|
||||
@ -15,7 +15,7 @@
|
||||
*/
|
||||
(function( $, undefined ) {
|
||||
|
||||
var currentEventTarget = null;
|
||||
var mouseHandled = false;
|
||||
|
||||
$.widget( "ui.menu", {
|
||||
version: "@VERSION",
|
||||
@ -73,23 +73,16 @@ $.widget( "ui.menu", {
|
||||
},
|
||||
"click .ui-menu-item:has(a)": function( event ) {
|
||||
var target = $( event.target );
|
||||
if ( target[0] !== currentEventTarget ) {
|
||||
currentEventTarget = target[0];
|
||||
// TODO: What are we trying to accomplish with this check?
|
||||
// Clicking a menu item twice results in a select event with
|
||||
// an empty ui.item.
|
||||
target.one( "click" + this.eventNamespace, function( event ) {
|
||||
currentEventTarget = null;
|
||||
});
|
||||
// Don't select disabled menu items
|
||||
if ( !target.closest( ".ui-menu-item" ).is( ".ui-state-disabled" ) ) {
|
||||
this.select( event );
|
||||
// Redirect focus to the menu with a delay for firefox
|
||||
this._delay(function() {
|
||||
if ( !this.element.is(":focus") ) {
|
||||
this.element.focus();
|
||||
}
|
||||
}, 20 );
|
||||
if ( !mouseHandled && target.closest( ".ui-menu-item" ).not( ".ui-state-disabled" ).length ) {
|
||||
mouseHandled = true;
|
||||
|
||||
this.select( event );
|
||||
// Open submenu on click
|
||||
if ( this.element.has( ".ui-menu" ).length ) {
|
||||
this.expand( event );
|
||||
} else if ( !this.element.is(":focus") ) {
|
||||
// Redirect focus to the menu
|
||||
this.element.focus();
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -127,6 +120,9 @@ $.widget( "ui.menu", {
|
||||
if ( !$( event.target ).closest( ".ui-menu" ).length ) {
|
||||
this.collapseAll( event );
|
||||
}
|
||||
|
||||
// Reset the mouseHandled flag
|
||||
mouseHandled = false;
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -166,9 +162,6 @@ $.widget( "ui.menu", {
|
||||
|
||||
// Destroy menu dividers
|
||||
this.element.find( ".ui-menu-divider" ).removeClass( "ui-menu-divider ui-widget-content" );
|
||||
|
||||
// Unbind currentEventTarget click event handler
|
||||
this._off( $( currentEventTarget ), "click" );
|
||||
},
|
||||
|
||||
_keydown: function( event ) {
|
||||
@ -496,7 +489,7 @@ $.widget( "ui.menu", {
|
||||
// Delay so Firefox will not hide activedescendant change in expanding submenu from AT
|
||||
this._delay(function() {
|
||||
this.focus( event, newItem );
|
||||
}, 20 );
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
@ -591,9 +584,12 @@ $.widget( "ui.menu", {
|
||||
select: function( event ) {
|
||||
// Save active reference before collapseAll triggers blur
|
||||
var ui = {
|
||||
item: this.active
|
||||
// Selecting a menu item removes the active item causing multiple clicks to be missing an item
|
||||
item: this.active || $( event.target ).closest( ".ui-menu-item" )
|
||||
};
|
||||
this.collapseAll( event, true );
|
||||
if ( !ui.item.has( ".ui-menu" ).length ) {
|
||||
this.collapseAll( event, true );
|
||||
}
|
||||
this._trigger( "select", event, ui );
|
||||
}
|
||||
});
|
||||
|
10
ui/jquery.ui.mouse.js
vendored
10
ui/jquery.ui.mouse.js
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Mouse
|
||||
@ -47,9 +47,11 @@ $.widget("ui.mouse", {
|
||||
// other instances of mouse
|
||||
_mouseDestroy: function() {
|
||||
this.element.unbind('.'+this.widgetName);
|
||||
$(document)
|
||||
.unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
|
||||
.unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);
|
||||
if ( this._mouseMoveDelegate ) {
|
||||
$(document)
|
||||
.unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
|
||||
.unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);
|
||||
}
|
||||
},
|
||||
|
||||
_mouseDown: function(event) {
|
||||
|
2
ui/jquery.ui.position.js
vendored
2
ui/jquery.ui.position.js
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Position
|
||||
|
2
ui/jquery.ui.progressbar.js
vendored
2
ui/jquery.ui.progressbar.js
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Progressbar
|
||||
|
2
ui/jquery.ui.resizable.js
vendored
2
ui/jquery.ui.resizable.js
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Resizables
|
||||
|
2
ui/jquery.ui.selectable.js
vendored
2
ui/jquery.ui.selectable.js
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Selectables
|
||||
|
2
ui/jquery.ui.slider.js
vendored
2
ui/jquery.ui.slider.js
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Slider
|
||||
|
4
ui/jquery.ui.sortable.js
vendored
4
ui/jquery.ui.sortable.js
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Sortables
|
||||
@ -1030,6 +1030,8 @@ $.widget("ui.sortable", $.ui.mouse, {
|
||||
for (var i=0; i < delayedTriggers.length; i++) { delayedTriggers[i].call(this, event); }; //Trigger all delayed events
|
||||
this._trigger("stop", event, this._uiHash());
|
||||
}
|
||||
|
||||
this.fromOutside = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
2
ui/jquery.ui.spinner.js
vendored
2
ui/jquery.ui.spinner.js
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Spinner
|
||||
|
2
ui/jquery.ui.tabs.js
vendored
2
ui/jquery.ui.tabs.js
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Tabs
|
||||
|
2
ui/jquery.ui.tooltip.js
vendored
2
ui/jquery.ui.tooltip.js
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* Depends:
|
||||
|
2
ui/jquery.ui.widget.js
vendored
2
ui/jquery.ui.widget.js
vendored
@ -3,7 +3,7 @@
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Widget
|
||||
|
Loading…
Reference in New Issue
Block a user