aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2007-12-19 22:26:05 +0000
committerJörn Zaefferer <joern.zaefferer@gmail.com>2007-12-19 22:26:05 +0000
commitba9c14a589caab13b5754273ff916d492dafa86b (patch)
tree06c6ce029d801fc14b6bfcb97f59be4377d1d066 /build
parente2fc993334698b2a66dd24a671a9c23705df0fc3 (diff)
downloadjquery-ba9c14a589caab13b5754273ff916d492dafa86b.tar.gz
jquery-ba9c14a589caab13b5754273ff916d492dafa86b.zip
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)
Diffstat (limited to 'build')
-rw-r--r--build/build/lite.js6
-rw-r--r--build/build/version.js4
-rw-r--r--build/docs/.htaccess1
-rw-r--r--build/docs/docs.js30
-rw-r--r--build/docs/gen-events.pl80
-rw-r--r--build/docs/js/doc.js38
-rw-r--r--build/docs/js/pager.js113
-rw-r--r--build/docs/js/tooltip.js72
-rw-r--r--build/docs/style/cat.css22
-rw-r--r--build/docs/style/cat.xsl33
-rw-r--r--build/docs/style/docs.xsl87
-rw-r--r--build/docs/style/style.css143
12 files changed, 4 insertions, 625 deletions
diff --git a/build/build/lite.js b/build/build/lite.js
deleted file mode 100644
index d5fc19c72..000000000
--- a/build/build/lite.js
+++ /dev/null
@@ -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 );
diff --git a/build/build/version.js b/build/build/version.js
new file mode 100644
index 000000000..8d6158ca5
--- /dev/null
+++ b/build/build/version.js
@@ -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, "" )));
diff --git a/build/docs/.htaccess b/build/docs/.htaccess
deleted file mode 100644
index 40fddde1f..000000000
--- a/build/docs/.htaccess
+++ /dev/null
@@ -1 +0,0 @@
-DirectoryIndex index.xml
diff --git a/build/docs/docs.js b/build/docs/docs.js
deleted file mode 100644
index 86b48ee45..000000000
--- a/build/docs/docs.js
+++ /dev/null
@@ -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
- );
-}
diff --git a/build/docs/gen-events.pl b/build/docs/gen-events.pl
deleted file mode 100644
index 5e92df927..000000000
--- a/build/docs/gen-events.pl
+++ /dev/null
@@ -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
- */
-~;
-
-
-}
diff --git a/build/docs/js/doc.js b/build/docs/js/doc.js
deleted file mode 100644
index b0d698992..000000000
--- a/build/docs/js/doc.js
+++ /dev/null
@@ -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&lt;Element&gt;": "An Array of DOM Elements.",
- "Array&lt;String&gt;": "An Array of strings.",
- Function: "A reference to a Javascript function.",
- XMLHttpRequest: "An XMLHttpRequest object (referencing a HTTP request).",
- "&lt;Content&gt;": "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();
- });
-});
diff --git a/build/docs/js/pager.js b/build/docs/js/pager.js
deleted file mode 100644
index 44f2e6942..000000000
--- a/build/docs/js/pager.js
+++ /dev/null
@@ -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=''>&laquo; Prev</a>").click(function(){
- return handleCrop( --curPage );
- }).wrap("<li class='prev'></li>").parent().prependTo(pager);
-
- var next = $("<a href=''>Next &raquo;</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;
- }
- });
-};
diff --git a/build/docs/js/tooltip.js b/build/docs/js/tooltip.js
deleted file mode 100644
index e8330e349..000000000
--- a/build/docs/js/tooltip.js
+++ /dev/null
@@ -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;
-}
diff --git a/build/docs/style/cat.css b/build/docs/style/cat.css
deleted file mode 100644
index e84f08f27..000000000
--- a/build/docs/style/cat.css
+++ /dev/null
@@ -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%;
-}
diff --git a/build/docs/style/cat.xsl b/build/docs/style/cat.xsl
deleted file mode 100644
index c4a20a407..000000000
--- a/build/docs/style/cat.xsl
+++ /dev/null
@@ -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>
diff --git a/build/docs/style/docs.xsl b/build/docs/style/docs.xsl
deleted file mode 100644
index 9c0735a8f..000000000
--- a/build/docs/style/docs.xsl
+++ /dev/null
@@ -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, '&#xa;&#xa;')">
- <xsl:value-of select="substring-before($text, '&#xa;&#xa;')" />
- <br /><br />
- <xsl:call-template name="break">
- <xsl:with-param name="text" select="substring-after($text, '&#xa;&#xa;')" />
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$text" />
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
-</xsl:stylesheet>
diff --git a/build/docs/style/style.css b/build/docs/style/style.css
deleted file mode 100644
index 3e84aab02..000000000
--- a/build/docs/style/style.css
+++ /dev/null
@@ -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;
-}