Skip to content

Commit 880be4b

Browse files
committed
rest of the files
1 parent 53a7c33 commit 880be4b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+7027
-0
lines changed

build.xml

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
<project name="jQuery.Tools" default="min">
2+
3+
<taskdef resource="net/sf/antcontrib/antlib.xml"/>
4+
5+
<property name="dir" value="/home/tipiirai/svn/flowplayer"/>
6+
<property file="${dir}/www/trunk/etc/version.properties" prefix="v"/>
7+
<property name="rhino" value="${dir}/builder/lib/rhino.jar"/>
8+
<property name="target.dir" value="/opt/flowplayer/webapp/js/tools"/>
9+
<property name="yui.path" value="/opt/yuicompressor-2.4.2/build/yuicompressor-2.4.2.jar"/>
10+
11+
12+
<target name="closure">
13+
14+
<apply
15+
executable="/usr/lib/jvm/java-6-sun-1.6.0.10/bin/java"
16+
parallel="false"
17+
verbose="true"
18+
dest="src">
19+
20+
<fileset dir="src" includes="form/*.js"/>
21+
<arg line="-jar"/>
22+
<arg path="lib/compiler.jar"/>
23+
<arg line="--js"/>
24+
<srcfile/>
25+
<arg line="--js_output_file"/>
26+
<mapper type="glob" from="*.js" to="../build/*.min.js"/>
27+
<targetfile/>
28+
</apply>
29+
30+
</target>
31+
32+
<target name="loop">
33+
<for param="file">
34+
35+
<path>
36+
<fileset dir="${basedir}" includes="**/tools.*.js"/>
37+
</path>
38+
39+
<sequential>
40+
<!-- source file -->
41+
<var name="sourceFile" value="@{file}"/>
42+
43+
<!-- tool name -->
44+
<propertyregex input="@{file}" override="yes" property="tool" replace="\1"
45+
regexp=".*tools.(.*)\.js"/>
46+
47+
<!-- version number -->
48+
<propertycopy name="version" from="v.${tool}" override="yes"/>
49+
50+
<!-- base file name -->
51+
<var name="base" value="${target.dir}/tools.${tool}-${version}"/>
52+
53+
<!-- only process if the source file is modified -->
54+
<outofdate property="isModified">
55+
<sourcefiles path="@{file}"/>
56+
<targetfiles path="${base}.js"/>
57+
58+
<sequential>
59+
<antcall target="${target}"/>
60+
</sequential>
61+
62+
</outofdate>
63+
64+
</sequential>
65+
</for>
66+
67+
</target>
68+
69+
<!-- source code -->
70+
<target name="source">
71+
72+
<copy file="${sourceFile}" tofile="${base}.js"/>
73+
74+
<!-- <exec executable="svn" outputproperty="svnlog.out" >
75+
<arg line="info ${sourceFile}"/>
76+
</exec> -->
77+
78+
<propertyregex property="revision" input="${svnlog.out}" select="\1">
79+
<regexp pattern="Revision: ([0-9]*)"/>
80+
</propertyregex>
81+
82+
<propertyregex property="date" input="${svnlog.out}" select="\1">
83+
<regexp pattern="Date: (.+\))"/>
84+
</propertyregex>
85+
86+
<replaceregexp match="@VERSION" replace="${version}" flags="g" byline="true"
87+
file="${base}.js" />
88+
89+
<replaceregexp match="@DATE" replace="${date}" file="${base}.js" />
90+
<replaceregexp match="@REVISION" replace="${revision}" file="${base}.js" />
91+
<echo message="Source code: ${base}.js" />
92+
93+
</target>
94+
95+
<!-- minify -->
96+
<target name="min">
97+
<property name="target" value="min.do"/>
98+
<antcall target="loop"/>
99+
</target>
100+
101+
<!-- yuicompress: http://www.julienlecomte.net/blog/2007/09/16/ -->
102+
<target name="min.do" depends="source">
103+
104+
<apply executable="java" parallel="false">
105+
<fileset file="${base}.js"/>
106+
<arg line="-jar"/>
107+
<arg path="${yui.path}"/>
108+
<srcfile/>
109+
<arg line="-o"/>
110+
<mapper type="glob" from="*.js" to="${target.dir}/*.min.js"/>
111+
<targetfile/>
112+
</apply>
113+
114+
<replaceregexp match="/\*!" replace="/\*\*" file="${base}.js" />
115+
<echo message="Minified: ${base}.min.js"/>
116+
117+
</target>
118+
119+
120+
<!-- lint -->
121+
<target name="lint">
122+
<property name="target" value="lint.do"/>
123+
<antcall target="loop"/>
124+
</target>
125+
126+
<target name="lint.do">
127+
<echo message="Verifying ${tool}"/>
128+
<java jar="${rhino}" fork="true">
129+
<arg value="${dir}/builder/lib/jslint.js" />
130+
<arg value="${sourceFile}" />
131+
</java>
132+
</target>
133+
134+
</project>
135+
136+
137+
138+

doc/form/index.html

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
2+
jQuery Tools / FORM
3+
"20 year wait is over. HTML5 is here."
4+
5+
The missing collection of Form Tools (6 kB!) to turn your forms into pure amazing.
6+
7+
Use HTML5 now (2 cols)
8+
The above form is constructed with HTML and CSS. No hacks or tweaks. Pure HTML5 standard.
9+
Forms built with these tools work consistently on all major browsers &amp; even in IE6. What's really amazing is
10+
that the form may have datepickers and sliders even when JavaScript is disabled!
11+
12+
4 thumbnails: source, IE6/Firefox with JS, Opera 10 no JS, Firefox no JS
13+
14+
Validate with standards &amp; and style
15+
jQuery Tools form validation is easy to use, highly configurable and looks good. Most importantly,
16+
it follows closely the HTML5 <a href="http://www.whatwg.org/specs/web-forms/current-work/#form-validation" class="external">Web Forms 2.0</a> standard. It takes the best parts of it and empowers it with the power of jQuery. The result is
17+
something that hasn't existed before: a solid, smooth HTML form validation tool.
18+
19+
Style your inputs
20+
Every web designer has been struggling with the same problem: There is no way to style
21+
select, checkbox, radio or file input fields. Not anymore. With Styleable tool you can
22+
control the looks of your widgets with CSS. Borders, colors, background images. Everything.
23+
You can style your existing forms and nothing will break even if you have been using
24+
JavaScript to manipulate the inputs. The widgets are even scriptable, just like before.
25+
26+
The missing HTML5 slider
27+
The brand new jQuery Tools Slider element is an essential HTML5 widget for many different situations.
28+
Write <samp>&lt;input type="range" /&gt;</samp> and you are done. This generic widget can also
29+
be used outside forms: you can make customized scrollbars, for example.
30+
31+
Datepicker done right
32+
Here's another important form widget that follows the HTML5 standard. Place this widget on your page with
33+
<samp>&lt;input type="date" /&gt;</samp> tag. The look and feel is flexible and can be styled
34+
in radically different ways. It incorporates roughly the same feature set as in jQuery UI datepicker, but
35+
80% smaller in size! In fact all the form tools presented here are smaller in size than the UI datepicker alone.

doc/form/validator.html

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
2+
jQuery Tools / Validator
3+
Standards based validation for jQuery
4+
5+
DEMO: registration form (fieldsets, url, email, required, number, data-validation ...)
6+
7+
Above form is initialized with a simple JavaScript one-liner ("view source" in a tab)
8+
9+
<pii:code>
10+
$("form").validator();
11+
</pii:code>
12+
13+
<p>
14+
jQuery Tools Validation is something that hasn't existed before: a compact, standards based and easy HTML form validation tool. It relies on the new HTML5 input data types and takes the best parts of <a href="http://www.whatwg.org/specs/web-forms/current-work/#form-validation" class="external">Web Forms 2.0</a> standard. Combined with the power of jQuery we can transform the fairly complex Web Forms standard into pure amazing.
15+
</p>
16+
17+
Use HTML5 input types now!
18+
HTML5 provides new input types such as <samp>number, email</samp> and <samp>url</samp>. Or you can specify additional conditions such as <samp>max, min, required</samp> or <samp>pattern</samp>. These work out of the box on every major browser. You can also use amazingly flexible <a href="#custom">API</a> to add your own input types or conditions. You can take full advantage of the jQuery selector engine.
19+
20+
21+
Full control of error messages
22+
- separate / combined
23+
- localization
24+
- styling
25+
26+
Web Forms 2.0
27+
- invalid event
28+
- :invalid selector
29+
30+
Beyond Web Forms 2.0
31+
- API, event model,
32+
33+
34+
<a name="configuration"></a>
35+
<h2>Configuration</h2>
36+
37+
singleField: false, // all inputs at once
38+
singleError: false, // all errors per input at once
39+
errorClass: 'error',
40+
messageClass: 'error',
41+
messagePosition: 'after',
42+
lang: 'en',
43+
effect: 'default',
44+
45+
events: {
46+
input: null, // change || blur || keyup
47+
error: 'keyup', // change || blur || keyup
48+
form: 'submit' // click || keypress || mouseover
49+
}
50+
51+
52+
<a name="custom"></a>
53+
<h2>Adding new validators</h2>
54+
55+
fn: function(matcher, msg, fn, isCustom)
56+
57+
58+
59+
<a name="localization"></a>
60+
<h2>Localization</h2>
61+
62+
setMessage: function(matcher, msg, lang)
63+
64+
messages:

doc/toolbox/lazyload.html

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
2+
jQuery Tools / Lazyload
3+
Your pages can be faster
4+
5+
DEMO: Lazyloaded Scrollable
6+
7+
Lazyload is an utility to take full control of loading of your performance heavy assets: images, background images and non visible HTML.
8+
9+
10+
We need faster websites
11+
Lazyload enables you to control the loading of images, background images and HTML. If your page contains large images that
12+
are not visible yet there is no need to load all of them beforehand. This tool defers the loading of your assets until you
13+
<em>really</em> need them making your pages work faster. Of course the tool itself weights only XXX kb when minified so it
14+
does not hurt performance by itself.
15+
16+
17+
Integrate to your existing pages
18+
Lazyload works out of the box. Add this call to your page <samp>$(":invisible").lazyload(true);</samp> and your done.
19+
If you have lot's of images this will have instant effect for your site. Your images are not loaded until they become
20+
visible when user scrolls the page. View <a href="/tools/demos/util/lazyload.html">demo</a>.
21+
22+
23+
Integrate to your JavaScript code
24+
Lazyload already gives enormous power for Tabs, Overlays, Scrollables and Tooltips. They can now load large amount of data from the server
25+
without consuming redundant bandwidth. You and can also extend your own JavaScript tools with Lazyload. There is a simple and powerfull
26+
API and event model and you can add customized <a href="#loaders">loaders</a> and appearance <a href="#effects">effects</a> when needed.
27+
28+
29+
Load anything
30+
Besides images you can also load any kind of HTML and if this loaded content contains more images they are also Lazyloaded!
31+
The whole bunch of HTML and images are not revealed until the whole mass is completely loaded. Of course a progress indicator is
32+
shown making your application responsive.
33+
34+
35+
<h2>Demos</h2>
36+
- lazyloaded page: lazyload(true) --> assets will be shown when they become visible
37+
- basics of lazyloading: standalones from image, bgimage and HTML
38+
- customizing the loading (progress indicator, slow fade, onLoad, recursive)
39+
- Lazyloading overlay with the grow effect
40+
41+
42+
<h2>Configuration</h2>
43+
44+
effect#'show'
45+
css#{
46+
before: 'lazy',
47+
loading: 'loading',
48+
after: null,
49+
progress: 'progress'
50+
}
51+
fadeInSpeed#'normal'
52+
progress#'Loading'
53+
54+
55+
<h3>Grow effect</h3>
56+
57+
growSpeed#'slow'
58+
growParent#'.grow'
59+
60+
61+
<h2>Scripting API</h2>
62+
63+
load
64+
getElements
65+
getConf
66+
getProgress
67+
68+
69+
<h2>Events</h2>
70+
71+
onBeforeLoad
72+
onLoad
73+
onLoadAll
74+
onError
75+
bind
76+
one
77+
unbind
78+
79+
<h2>Creating Loaders</h2>
80+
81+
addLoader: function(matcher, initFn, loadFn)
82+
83+
84+
<h2>Creating Effects</h2>
85+
86+
addEffect: function(name, fn) {
87+
effects[name] = fn;
88+
}

lib/compiler.jar

3.95 MB
Binary file not shown.

release-notes/version-1.2.0.txt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
2+
mask
3+
- simple, straighforward, lightweight
4+
- fit called when mask loaded
5+
- all events are unbind upon close
6+
- easy access: $.mask.load(), $.mask.close();
7+
- configuration can be given upon load();
8+
- 2.6 kB!
9+
- conf.startOpacity
10+
- conf.top
11+
- conf.left
12+
- existing element can be mad as mask
13+
14+
overlay
15+
- removed deprecated getContent method
16+
- removed the gallery plugin
17+
18+

0 commit comments

Comments
 (0)