added version to all builds; changed current version to 1.2.2-pre - to be updated after each release so its clear that a build is from which milestone; build.xml cleanup (removing uselss lite, docs, test and _with_plguins targets); deleted useless docs build files (replaced by wiki and wiki xml exporter and api browsers)
This commit is contained in:
parent
e2fc993334
commit
ba9c14a589
134
build.xml
134
build.xml
|
@ -1,36 +1,25 @@
|
|||
<project name="jQuery" default="all" basedir=".">
|
||||
<project name="jQuery" default="jquery" basedir=".">
|
||||
|
||||
<!--
|
||||
- Using this build file to create your own custom distribution -
|
||||
To get jQuery even smaller, remove the modules you don't need by removing the fileset elements
|
||||
in the jquery-target, for example leaving only these:
|
||||
|
||||
If you want to include jQuery on your site with a certain set of plugins,
|
||||
follow these steps to create your custom build:
|
||||
<fileset dir="${SRC_DIR}" includes="intro.js" />
|
||||
<fileset dir="${SRC_DIR}" includes="core.js" />
|
||||
<fileset dir="${SRC_DIR}" includes="selector.js" />
|
||||
<fileset dir="${SRC_DIR}" includes="event.js" />
|
||||
<fileset dir="${SRC_DIR}" includes="outro.js" />
|
||||
|
||||
1. Copy the plugins you need to the plugins folder (if you haven't already, checkout
|
||||
the plugins folder from SVN.
|
||||
2. Modify the PLUGINS property to include all plugins you want, see PLUGINS_ALL for syntax
|
||||
eg. if you need form and tabs plugin, set the value for PLUGINS to this:
|
||||
form/*.js, tabs/*.js
|
||||
3. Execute the standard jquery and packed targets to build your distribution
|
||||
|
||||
TODO Using this build file to create docs for a single plugin
|
||||
That'd remove ajax, fx and offset support, leaving basic selectors, manipulation and event handling.
|
||||
-->
|
||||
|
||||
<!-- SETUP -->
|
||||
|
||||
<property description="Source Folder" name="SRC_DIR" value="src" />
|
||||
<property description="Source Folder" name="SRC_DIR" value="src" />
|
||||
<property description="Files for parsing etc." name="BUILD_DIR" value="build" />
|
||||
<property description="Rhino JS Engine" name="JAR" value="${BUILD_DIR}/js.jar" />
|
||||
|
||||
<property description="Dir to look for plugins" name="PLUGIN_DIR" location="../plugins" />
|
||||
<property description="Add single plugins here" name="PLUGINS" value="none" />
|
||||
<property description="Add all plugins here" name="PLUGINS_ALL"
|
||||
value="button/*.js,center/*.js,cookie/*.js,form/*.js,greybox/*.js,interface/*.js,pager/*.js,tablesorter/*.js,tabs/*.js,tooltip/*.js,accordion/*.js" />
|
||||
|
||||
<property description="Target parent folder for built files" name="PREFIX" value="." />
|
||||
<property description="Folder for docs target" name="DOCS_DIR" value="${PREFIX}/docs" />
|
||||
<property description="Folder for test target" name="TEST_DIR" value="${PREFIX}/test" />
|
||||
<property description="Folder for jquery, min, lite and packed target" name="DIST_DIR" value="${PREFIX}/dist" />
|
||||
<property description="Folder for jquery, min, lite and packed target" name="DIST_DIR" value="./dist" />
|
||||
|
||||
<!-- Files names for distribution -->
|
||||
<property name="JQ" value="${DIST_DIR}/jquery.js" />
|
||||
|
@ -40,7 +29,7 @@
|
|||
|
||||
<!-- MAIN -->
|
||||
|
||||
<target name="jquery" description="Main jquery build, set PLUGINS property to include plugins">
|
||||
<target name="jquery" description="Main jquery build, concatenates source files and replaces @VERSION">
|
||||
<echo message="Building ${JQ}" />
|
||||
<mkdir dir="${DIST_DIR}" />
|
||||
<concat destfile="${JQ}">
|
||||
|
@ -51,29 +40,16 @@
|
|||
<fileset dir="${SRC_DIR}" includes="ajax.js" />
|
||||
<fileset dir="${SRC_DIR}" includes="fx.js" />
|
||||
<fileset dir="${SRC_DIR}" includes="offset.js" />
|
||||
<fileset dir="${PLUGIN_DIR}" includes="${PLUGINS}" />
|
||||
<fileset dir="${SRC_DIR}" includes="outro.js" />
|
||||
</concat>
|
||||
<java jar="${JAR}" fork="true">
|
||||
<arg value="${BUILD_DIR}/build/version.js" />
|
||||
<arg value="${JQ}" />
|
||||
</java>
|
||||
<echo message="${JQ} built." />
|
||||
</target>
|
||||
|
||||
<target name="jquery_with_plugins" description="Build jquery with all plugins, useful to full documentation">
|
||||
<antcall target="jquery">
|
||||
<param name="PLUGINS" value="${PLUGINS_ALL}" />
|
||||
</antcall>
|
||||
</target>
|
||||
|
||||
<target name="lite" depends="jquery" description="Remove all /** */ comments">
|
||||
<echo message="Building ${JQ_LITE}" />
|
||||
<java jar="${JAR}" fork="true">
|
||||
<arg value="${BUILD_DIR}/build/lite.js" />
|
||||
<arg value="${JQ}" />
|
||||
<arg value="${JQ_LITE}" />
|
||||
</java>
|
||||
<echo message="${JQ_LITE} built." />
|
||||
</target>
|
||||
|
||||
<target name="min" depends="jquery" description="Remove all comments and whitespace, no compression">
|
||||
<target name="min" depends="jquery" description="Remove all comments and whitespace, no compression, great in combination with GZip">
|
||||
<echo message="Building ${JQ_MIN}" />
|
||||
<java jar="${JAR}" fork="true">
|
||||
<arg value="${BUILD_DIR}/build/min.js" />
|
||||
|
@ -93,78 +69,6 @@
|
|||
<echo message="${JQ_PACK} built." />
|
||||
</target>
|
||||
|
||||
<target name="pack_with_plugins" depends="jquery_with_plugins" description="Pack jquery with all plugins, not very useful">
|
||||
<echo message="Building ${JQ_PACK}" />
|
||||
<java jar="${JAR}" fork="true">
|
||||
<arg value="${BUILD_DIR}/build/pack.js" />
|
||||
<arg value="${JQ}" />
|
||||
<arg value="${JQ_PACK}" />
|
||||
</java>
|
||||
<echo message="${JQ_PACK} built." />
|
||||
</target>
|
||||
|
||||
<target name="test" depends="jquery" description="Copy files for the test suite into their own directory.">
|
||||
<echo message="Building Test Suite" />
|
||||
<!--
|
||||
<delete dir="${TEST_DIR}" />
|
||||
<mkdir dir="${TEST_DIR}/data" />
|
||||
<copy todir="${TEST_DIR}/data">
|
||||
<fileset dir="${BUILD_DIR}/test/data/" />
|
||||
</copy>
|
||||
<copy todir="${TEST_DIR}" file="${BUILD_DIR}/test/index.html" />
|
||||
-->
|
||||
<echo message="Test Suite built." />
|
||||
</target>
|
||||
|
||||
<target name="docs" depends="jquery" description="Reads inline docs from source and compiles into xml file">
|
||||
<echo message="Building Documentation" />
|
||||
<delete dir="${DOCS_DIR}" />
|
||||
<mkdir dir="${DOCS_DIR}/data" />
|
||||
<copy todir="${DOCS_DIR}" file="${BUILD_DIR}/docs/.htaccess" />
|
||||
<mkdir dir="${DOCS_DIR}/js" />
|
||||
<copy todir="${DOCS_DIR}/js">
|
||||
<fileset dir="${BUILD_DIR}/docs/js">
|
||||
<include name="**/*.js" />
|
||||
</fileset>
|
||||
</copy>
|
||||
<copy todir="${DOCS_DIR}/style">
|
||||
<fileset dir="${BUILD_DIR}/docs/style">
|
||||
<include name="**" />
|
||||
</fileset>
|
||||
</copy>
|
||||
<java jar="${JAR}" fork="true">
|
||||
<arg value="${BUILD_DIR}/docs/docs.js" />
|
||||
<arg value="${JQ}" />
|
||||
<arg value="${DOCS_DIR}" />
|
||||
</java>
|
||||
<echo message="Documentation built." />
|
||||
</target>
|
||||
|
||||
<!-- TODO refactor to remove duplication with above -->
|
||||
<target name="docs_with_plugins" depends="jquery_with_plugins">
|
||||
<echo message="Building Documentation" />
|
||||
<delete dir="${DOCS_DIR}" />
|
||||
<mkdir dir="${DOCS_DIR}/data" />
|
||||
<copy todir="${DOCS_DIR}" file="${BUILD_DIR}/docs/.htaccess" />
|
||||
<mkdir dir="${DOCS_DIR}/js" />
|
||||
<copy todir="${DOCS_DIR}/js">
|
||||
<fileset dir="${BUILD_DIR}/docs/js">
|
||||
<include name="**/*.js" />
|
||||
</fileset>
|
||||
</copy>
|
||||
<copy todir="${DOCS_DIR}/style">
|
||||
<fileset dir="${BUILD_DIR}/docs/style">
|
||||
<include name="**" />
|
||||
</fileset>
|
||||
</copy>
|
||||
<java jar="${JAR}" fork="true">
|
||||
<arg value="${BUILD_DIR}/docs/docs.js" />
|
||||
<arg value="${JQ}" />
|
||||
<arg value="${DOCS_DIR}" />
|
||||
</java>
|
||||
<echo message="Documentation built." />
|
||||
</target>
|
||||
|
||||
<target name="runtest">
|
||||
<echo message="Running Automated Test Suite" />
|
||||
<java jar="${JAR}" fork="true">
|
||||
|
@ -174,12 +78,10 @@
|
|||
</target>
|
||||
|
||||
<target name="clean">
|
||||
<delete dir="${DOCS_DIR}" />
|
||||
<!-- <delete dir="${TEST_DIR}" /> -->
|
||||
<delete dir="${DIST_DIR}" />
|
||||
</target>
|
||||
|
||||
<target name="all" depends="clean,jquery,lite,min,pack,docs">
|
||||
<target name="all" depends="clean,jquery,min,pack">
|
||||
<echo message="Build complete." />
|
||||
</target>
|
||||
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
load("build/js/writeFile.js");
|
||||
|
||||
var blockMatch = /\s*\/\*\*\s*((.|\n|\r\n)*?)\s*\*\/\n*/g;
|
||||
var f = readFile(arguments[0]).replace( blockMatch, "\n" ).replace( /\n\n+/g, "\n\n" );
|
||||
|
||||
writeFile( arguments[1], f );
|
4
build/build/version.js
Normal file
4
build/build/version.js
Normal file
|
@ -0,0 +1,4 @@
|
|||
load("build/js/writeFile.js");
|
||||
|
||||
var file = arguments[0];
|
||||
writeFile(file, readFile(file).replace("@VERSION", readFile("version.txt").replace( /^\s+|\s+$/g, "" )));
|
|
@ -1 +0,0 @@
|
|||
DirectoryIndex index.xml
|
|
@ -1,30 +0,0 @@
|
|||
load("build/js/json.js", "build/js/xml.js", "build/js/writeFile.js", "build/js/parse.js");
|
||||
|
||||
var dir = arguments[1];
|
||||
|
||||
var c = parse( read(arguments[0]) );
|
||||
output( c, "docs" );
|
||||
|
||||
c = categorize( c );
|
||||
output( c, "cat" );
|
||||
|
||||
function output( c, n ) {
|
||||
var json = Object.toJSON( c );
|
||||
|
||||
writeFile( dir + "/data/jquery-" + n + "-json.js", json );
|
||||
writeFile( dir + "/data/jquery-" + n + "-jsonp.js", "docsLoaded(" + json + ")" );
|
||||
|
||||
Object.toXML.force = { desc: 1, code: 1, before: 1, result: 1 };
|
||||
|
||||
var xml = Object.toXML( n == "docs" ? { method: c } : c, "docs" );
|
||||
|
||||
xml = xml.replace("<docs>", "<docs version='" + read("version.txt").slice(0,-1) + "'>");
|
||||
|
||||
writeFile( dir + "/data/jquery-" + n + "-xml.xml",
|
||||
"<?xml version='1.0' encoding='ISO-8859-1'?>\n" + xml );
|
||||
|
||||
writeFile( dir + "/" + ( n == "docs" ? "index" : n ) + ".xml",
|
||||
"<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
|
||||
"<?xml-stylesheet type='text/xsl' href='style/" + n + ".xsl'?>\n" + xml
|
||||
);
|
||||
}
|
|
@ -1,80 +0,0 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
my @stuff = split(",", "blur,focus,load,resize,scroll,unload,click,dblclick," .
|
||||
"mousedown,mouseup,mousemove,mouseover,mouseout,change,reset,select," .
|
||||
"submit,keydown,keypress,keyup,error");
|
||||
|
||||
foreach (@stuff) {
|
||||
|
||||
print qq~
|
||||
/**
|
||||
* Bind a function to the $_ event of each matched element.
|
||||
*
|
||||
* \@example \$("p").$_( function() { alert("Hello"); } );
|
||||
* \@before <p>Hello</p>
|
||||
* \@result <p on$_="alert('Hello');">Hello</p>
|
||||
*
|
||||
* \@name $_
|
||||
* \@type jQuery
|
||||
* \@param Function fn A function to bind to the $_ event on each of the matched elements.
|
||||
* \@cat Events
|
||||
*/
|
||||
|
||||
/**
|
||||
* Trigger the $_ event of each matched element. This causes all of the functions
|
||||
* that have been bound to thet $_ event to be executed.
|
||||
*
|
||||
* \@example \$("p").$_();
|
||||
* \@before <p on$_="alert('Hello');">Hello</p>
|
||||
* \@result alert('Hello');
|
||||
*
|
||||
* \@name $_
|
||||
* \@type jQuery
|
||||
* \@cat Events
|
||||
*/
|
||||
|
||||
/**
|
||||
* Bind a function to the $_ event of each matched element, which will only be executed once.
|
||||
* Unlike a call to the normal .$_() method, calling .one$_() causes the bound function to be
|
||||
* only executed the first time it is triggered, and never again (unless it is re-bound).
|
||||
*
|
||||
* \@example \$("p").one$_( function() { alert("Hello"); } );
|
||||
* \@before <p on$_="alert('Hello');">Hello</p>
|
||||
* \@result alert('Hello'); // Only executed for the first $_
|
||||
*
|
||||
* \@name one$_
|
||||
* \@type jQuery
|
||||
* \@param Function fn A function to bind to the $_ event on each of the matched elements.
|
||||
* \@cat Events
|
||||
*/
|
||||
|
||||
/**
|
||||
* Removes a bound $_ event from each of the matched
|
||||
* elements. You must pass the identical function that was used in the original
|
||||
* bind method.
|
||||
*
|
||||
* \@example \$("p").un$_( myFunction );
|
||||
* \@before <p on$_="myFunction">Hello</p>
|
||||
* \@result <p>Hello</p>
|
||||
*
|
||||
* \@name un$_
|
||||
* \@type jQuery
|
||||
* \@param Function fn A function to unbind from the $_ event on each of the matched elements.
|
||||
* \@cat Events
|
||||
*/
|
||||
|
||||
/**
|
||||
* Removes all bound $_ events from each of the matched elements.
|
||||
*
|
||||
* \@example \$("p").un$_();
|
||||
* \@before <p on$_="alert('Hello');">Hello</p>
|
||||
* \@result <p>Hello</p>
|
||||
*
|
||||
* \@name un$_
|
||||
* \@type jQuery
|
||||
* \@cat Events
|
||||
*/
|
||||
~;
|
||||
|
||||
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
var types = {
|
||||
jQuery: "A jQuery object.",
|
||||
Object: "A simple Javascript object. For example, it could be a String or a Number.",
|
||||
String: "A string of characters.",
|
||||
Number: "A numeric valid.",
|
||||
Element: "The Javascript object representation of a DOM Element.",
|
||||
Map: "A Javascript object that contains key/value pairs in the form of properties and values.",
|
||||
"Array<Element>": "An Array of DOM Elements.",
|
||||
"Array<String>": "An Array of strings.",
|
||||
Function: "A reference to a Javascript function.",
|
||||
XMLHttpRequest: "An XMLHttpRequest object (referencing a HTTP request).",
|
||||
"<Content>": "A String (to generate HTML on-the-fly), a DOM Element, an Array of DOM Elements or a jQuery object"
|
||||
};
|
||||
|
||||
$(document).ready(function(){
|
||||
var tooltips = $("span.tooltip").each(function() {
|
||||
var type = this.innerHTML;
|
||||
if( type.indexOf("|") != -1 ) {
|
||||
var $this = $(this).empty();
|
||||
$.each(type.split("\|"), function(i, n) {
|
||||
var title = types[n] && " title=\"" + types[n] + "\"" || "";
|
||||
var pipe = i != 0 ? "|" : "";
|
||||
$this.append( pipe + "<span class=\"tooltip\" " + title + ">" + n + "</span>" );
|
||||
});
|
||||
} else if ( types[ this.innerHTML ] )
|
||||
this.title = types[ this.innerHTML ];
|
||||
})
|
||||
tooltips.add($("span.tooltip", tooltips)).ToolTipDemo('#fff');
|
||||
|
||||
$("a.name").click(function(){
|
||||
$("div.more,div.short",this.parentNode.parentNode).toggle();
|
||||
return false;
|
||||
});
|
||||
|
||||
$("#docs").alphaPager(function(a){
|
||||
return $.fn.text.apply( [a.getElementsByTagName("span")[2]] ).replace(/^\$\./,"").substr(0,1).toUpperCase();
|
||||
});
|
||||
});
|
|
@ -1,113 +0,0 @@
|
|||
$.fn.alphaPager = function(fn,type) {
|
||||
type = type || "char";
|
||||
|
||||
if ( fn == undefined ) {
|
||||
fn = function(a){ return _clean( $.fn.text.apply( a.childNodes ) ); };
|
||||
} else if ( fn.constructor == Number ) {
|
||||
var n = fn;
|
||||
fn = function(a){ return _clean( $.fn.text.apply( [a.childNodes[ n ]] ) ); };
|
||||
}
|
||||
|
||||
function _clean(a){
|
||||
switch (type) {
|
||||
case "char":
|
||||
return a.substr(0,1).toUpperCase();
|
||||
case "word":
|
||||
return /^([a-z0-9]+)/.exec(a)[1];
|
||||
}
|
||||
return a;
|
||||
}
|
||||
|
||||
return this.pager( fn );
|
||||
};
|
||||
|
||||
|
||||
$.fn.pager = function(step) {
|
||||
var types = {
|
||||
UL: "li",
|
||||
OL: "li",
|
||||
DL: "dt",
|
||||
TABLE: "tr"
|
||||
};
|
||||
|
||||
return this.each(function(){
|
||||
var type = types[this.nodeName];
|
||||
var pagedUI = type == "tr" ? $("tbody",this) : $(this);
|
||||
var rows = $(type, pagedUI);
|
||||
var curPage = 0;
|
||||
var names = [], num = [];
|
||||
|
||||
if ( !step || step.constructor != Function ) {
|
||||
step = step || 10;
|
||||
|
||||
if (rows.length > step)
|
||||
for ( var i = 0; i <= rows.length; i += step ) {
|
||||
names.push( names.length + 1 );
|
||||
num.push( [ i, step ] );
|
||||
}
|
||||
} else {
|
||||
var last;
|
||||
rows.each(function(){
|
||||
var l = step( this );
|
||||
if ( l != last ) {
|
||||
names.push( l );
|
||||
var pre = num.length ? num[ num.length - 1 ][0] + num[ num.length - 1 ][1] : 0;
|
||||
|
||||
num.push( [ pre, 0 ] );
|
||||
last = l;
|
||||
}
|
||||
|
||||
num[ num.length - 1 ][1]++;
|
||||
});
|
||||
}
|
||||
|
||||
if ( names.length > 1 ) {
|
||||
var pager = $(this).prev("ul.nav-page").empty();
|
||||
|
||||
if ( !pager.length )
|
||||
pager = $("<ul class='nav-page'></ul>");
|
||||
|
||||
for ( var i = 0; i < names.length; i++ )
|
||||
$("<a href=''></a>").attr({
|
||||
rel: i, innerHTML: names[i]
|
||||
}).click(function() {
|
||||
return handleCrop( this.rel );
|
||||
}).wrap("<li></li>").parent().appendTo(pager);
|
||||
|
||||
pager.insertBefore( this );
|
||||
|
||||
var prev = $("<a href=''>« Prev</a>").click(function(){
|
||||
return handleCrop( --curPage );
|
||||
}).wrap("<li class='prev'></li>").parent().prependTo(pager);
|
||||
|
||||
var next = $("<a href=''>Next »</a>").click(function(){
|
||||
return handleCrop( ++curPage );
|
||||
}).wrap("<li class='next'></li>").parent().appendTo(pager);
|
||||
|
||||
handleCrop( 0 );
|
||||
}
|
||||
|
||||
function handleCrop( page ) {
|
||||
curPage = page - 0;
|
||||
var s = num[ curPage ][0];
|
||||
var e = num[ curPage ][1];
|
||||
|
||||
if ( !curPage ) prev.hide();
|
||||
else prev.show();
|
||||
|
||||
if ( curPage == names.length - 1 ) next.hide();
|
||||
else next.show();
|
||||
|
||||
$("li",pager)
|
||||
.removeClass("cur")
|
||||
.eq( curPage + 1 )
|
||||
.addClass("cur");
|
||||
|
||||
pagedUI.empty().append(
|
||||
jQuery.makeArray( rows ).slice( s, s + e )
|
||||
);
|
||||
|
||||
return false;
|
||||
}
|
||||
});
|
||||
};
|
|
@ -1,72 +0,0 @@
|
|||
/*
|
||||
Description:
|
||||
|
||||
jQuery ToolTip Demo. Demo of how to add elements and get mouse coordinates
|
||||
There is also a ToolTip plugin found at http://www.eyecon.ro/interface/,
|
||||
which uses a CSS class to style the tooltip, but shows it below the input/anchor, rather than where the mouse is
|
||||
|
||||
Usage:
|
||||
|
||||
$(window).load(
|
||||
function()
|
||||
{
|
||||
$("a,input").ToolTipDemo('#fff');
|
||||
}
|
||||
);
|
||||
|
||||
Parameters:
|
||||
|
||||
bgcolour : Background colour
|
||||
*/
|
||||
$.fn.ToolTipDemo = function(bgcolour)
|
||||
{
|
||||
this.mouseover(
|
||||
function(e)
|
||||
{
|
||||
if((!this.title && !this.alt) && !this.tooltipset) return;
|
||||
// get mouse coordinates
|
||||
// based on code from http://www.quirksmode.org/js/events_properties.html
|
||||
var mouseX = e.pageX || (e.clientX ? e.clientX + document.body.scrollLeft : 0);
|
||||
var mouseY = e.pageY || (e.clientY ? e.clientY + document.body.scrollTop : 0);
|
||||
mouseX += 10;
|
||||
mouseY += 10;
|
||||
bgcolour = bgcolour || "#eee";
|
||||
// if there is no sibling after this one, or the next siblings className is not tooltipdemo
|
||||
if(!this.nextSibling || this.nextSibling.className != "tooltipdemo")
|
||||
{
|
||||
// create a div and style it
|
||||
var div = document.createElement("div");
|
||||
$(div).css(
|
||||
{
|
||||
border: "2px outset #ddd",
|
||||
padding: "2px",
|
||||
backgroundColor: bgcolour,
|
||||
position: "absolute"
|
||||
})
|
||||
// add the title/alt attribute to it
|
||||
.html((this.title || this.alt)).addClass("tooltipdemo");
|
||||
this.title = "";
|
||||
this.alt = "";
|
||||
if(this.nextSibling)
|
||||
{
|
||||
this.parentNode.insertBefore(div, this.nextSibling);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.parentNode.appendChild(div);
|
||||
}
|
||||
this.tooltipset = true;
|
||||
}
|
||||
$(this.nextSibling).show().css({left: mouseX + "px", top: mouseY + 3 + "px"});
|
||||
}
|
||||
).mouseout(
|
||||
function()
|
||||
{
|
||||
if(this.nextSibling && this.nextSibling.className == "tooltipdemo")
|
||||
{
|
||||
$(this.nextSibling).hide();
|
||||
}
|
||||
}
|
||||
);
|
||||
return this;
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
html, body {
|
||||
background: #FFF;
|
||||
color: #000;
|
||||
font-family: Arial;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
clear: both;
|
||||
border-bottom: 1px solid #EEE;
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style: none;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
li {
|
||||
float: left;
|
||||
width: 20%;
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
|
||||
<xsl:output method="html"/>
|
||||
<xsl:template match="/docs">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>jQuery Printable API</title>
|
||||
<link rel="stylesheet" href="style/cat.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<h1>jQuery Printable API</h1>
|
||||
<xsl:apply-templates/>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="cat">
|
||||
<h2><xsl:value-of select="@value"/></h2>
|
||||
<ul class="list">
|
||||
<xsl:for-each select="method[not(@private)]">
|
||||
<xsl:sort select="@name"/>
|
||||
<xsl:sort select="count(params)"/>
|
||||
<li>
|
||||
<xsl:value-of select="@name"/>(<xsl:for-each select="params">
|
||||
<xsl:value-of select="@name"/>
|
||||
<xsl:if test="position() != last()">, </xsl:if>
|
||||
</xsl:for-each>)
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
<xsl:apply-templates select="cat"/>
|
||||
</ul>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
|
@ -1,87 +0,0 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<xsl:template match="/*">
|
||||
<html>
|
||||
<head>
|
||||
<title>jQuery Docs - <xsl:value-of select="/docs/@version"/> API</title>
|
||||
<link rel="stylesheet" href="style/style.css"/>
|
||||
<script src="../dist/jquery.js"></script>
|
||||
<script src="js/tooltip.js"></script>
|
||||
<script src="js/pager.js"></script>
|
||||
<script src="js/doc.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>jQuery Docs - <xsl:value-of select="/docs/@version"/> API</h1>
|
||||
<ul id="docs">
|
||||
<xsl:for-each select="method[not(@private)]">
|
||||
<xsl:sort select="translate(@name,'$.','')"/>
|
||||
<xsl:sort select="count(params)"/>
|
||||
<li>
|
||||
<span class='type'><span class='tooltip'><xsl:value-of select="@type"/></span></span>
|
||||
<span class='fn'>
|
||||
<a href='#{@name}' class='name' title=''><xsl:value-of select="@name"/></a>
|
||||
<xsl:if test="not(@property)">(
|
||||
<xsl:for-each select="params">
|
||||
<span class='arg-type tooltip'><xsl:value-of select="@type"/></span><xsl:text> </xsl:text>
|
||||
<span class='arg-name tooltip' title='{desc}'><xsl:value-of select="@name"/></span>
|
||||
<xsl:if test="position() != last()">
|
||||
<xsl:if test="@any"> or </xsl:if>
|
||||
<xsl:if test="not(@any)">, </xsl:if>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
)</xsl:if>
|
||||
</span> returns <span class='tooltip'><xsl:value-of select="@type"/></span>
|
||||
<div class='short'>
|
||||
<xsl:value-of select="@short"/>
|
||||
</div>
|
||||
<div class='more'>
|
||||
<div class='desc'>
|
||||
<xsl:for-each select="desc">
|
||||
<xsl:call-template name="break" />
|
||||
</xsl:for-each>
|
||||
</div>
|
||||
<xsl:for-each select="examples">
|
||||
<div class='example'>
|
||||
<h5>Example:</h5>
|
||||
<xsl:if test="desc">
|
||||
<p><xsl:value-of select="desc"/></p>
|
||||
</xsl:if>
|
||||
<pre><xsl:value-of select="code"/></pre>
|
||||
<xsl:if test="before">
|
||||
<b>HTML:</b>
|
||||
<pre><xsl:value-of select="before"/></pre>
|
||||
</xsl:if>
|
||||
<xsl:if test="result">
|
||||
<b>Result:</b>
|
||||
<pre><xsl:value-of select="result"/></pre>
|
||||
</xsl:if>
|
||||
</div>
|
||||
</xsl:for-each>
|
||||
</div>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
|
||||
<p class="raw"><b>Raw Data:</b><xsl:text> </xsl:text><a href="data/jquery-docs-json.js">JSON</a>, <a href="data/jquery-docs-jsonp.js">JSONP</a>, <a href="data/jquery-docs-xml.xml">XML</a></p>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="break">
|
||||
<xsl:param name="text" select="." />
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($text, '

')">
|
||||
<xsl:value-of select="substring-before($text, '

')" />
|
||||
<br /><br />
|
||||
<xsl:call-template name="break">
|
||||
<xsl:with-param name="text" select="substring-after($text, '

')" />
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$text" />
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
|
@ -1,143 +0,0 @@
|
|||
html, body {
|
||||
background: #212121;
|
||||
font-family: Arial;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 15px auto;
|
||||
text-align: left;
|
||||
width: 600px;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
ul.nav-page {
|
||||
margin: 15px auto;
|
||||
width: 600px;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
ul.nav-page li {
|
||||
padding: 0 3px;
|
||||
display: inline;
|
||||
}
|
||||
|
||||
ul.nav-page li.cur a {
|
||||
font-weight: bold;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
ul.nav-page li a {
|
||||
font-size: 14px;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
ul.nav-page li.prev {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
}
|
||||
|
||||
ul.nav-page li.next {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
right: 0px;
|
||||
}
|
||||
|
||||
ul.nav-page li.next a, ul.nav-page li.prev a {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
ul#docs {
|
||||
list-style: none;
|
||||
margin: 0 auto;
|
||||
padding: 8px;
|
||||
width: 600px;
|
||||
background: #FFF;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
ul#docs li {
|
||||
margin: 5px 0;
|
||||
width: 600px;
|
||||
}
|
||||
|
||||
ul#docs li span.tooltip {
|
||||
border-bottom: 1px dashed #666;
|
||||
}
|
||||
|
||||
ul#docs li a.name {
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
ul#docs li span.type {
|
||||
display: none;
|
||||
float: left;
|
||||
color: #666;
|
||||
width: 100px;
|
||||
margin-right: 10px;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
font-family: Courier;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
ul#docs li span.arg-type {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
ul#docs li div.short {
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
margin-left: 10px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
ul#docs span.fn {
|
||||
font-family: Courier;
|
||||
}
|
||||
|
||||
ul#docs div.tooltipdemo {
|
||||
font-size: 12px;
|
||||
font-family: Arial;
|
||||
}
|
||||
|
||||
ul#docs li div.more {
|
||||
display: none;
|
||||
margin-left: 10px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
ul#docs li div.example {
|
||||
border-top: 1px solid #DDD;
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
ul#docs li div.example h5 {
|
||||
font-size: 16px;
|
||||
margin: 10px 0 0 0;
|
||||
}
|
||||
|
||||
ul#docs li div.example pre {
|
||||
color: #000;
|
||||
background: #EEE;
|
||||
padding: 5px;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
p.raw {
|
||||
font-size: 11px;
|
||||
color: #FFF;
|
||||
margin: 5px auto;
|
||||
width: 600px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
p.raw a {
|
||||
color: #FFF;
|
||||
}
|
48
test/fix.html
Normal file
48
test/fix.html
Normal file
|
@ -0,0 +1,48 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta name="generator"
|
||||
content="HTML Tidy, see www.w3.org" />
|
||||
|
||||
<title>Tester</title>
|
||||
<style type="text/css">
|
||||
#container { background:yellow; width:400px; height:400px; }
|
||||
|
||||
</style>
|
||||
<script type="text/javascript" src="../dist/jquery.js">
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
function doIt() {
|
||||
$("#adiv").text("click!");
|
||||
$("#adiv").trigger("acustom.atype");
|
||||
}
|
||||
|
||||
function showMouse(e) {
|
||||
$("#adiv").text("( " + e.pageX + ", " + e.pageY + " )");
|
||||
}
|
||||
|
||||
$(function () {
|
||||
$("#doit").bind('click.mine', doIt);
|
||||
$("#container").mousemove(showMouse);
|
||||
$("#adiv").bind("acustom.atype", function () {
|
||||
//console.log("custom");
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<button id="doit">Do It</button>
|
||||
|
||||
<div id="container">
|
||||
Hi
|
||||
</div>
|
||||
|
||||
<div id="adiv">
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1 +1 @@
|
|||
1.2.2b
|
||||
1.2.2-pre
|
||||
|
|
Loading…
Reference in a new issue