From ba9c14a589caab13b5754273ff916d492dafa86b Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=B6rn=20Zaefferer?= Date: Wed, 19 Dec 2007 22:26:05 +0000 Subject: [PATCH] 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) --- build.xml | 132 ++++++---------------------------------- build/build/lite.js | 6 -- build/build/version.js | 4 ++ build/docs/.htaccess | 1 - build/docs/docs.js | 30 ---------- build/docs/gen-events.pl | 80 ------------------------- build/docs/js/doc.js | 38 ------------ build/docs/js/pager.js | 113 ---------------------------------- build/docs/js/tooltip.js | 72 ---------------------- build/docs/style/cat.css | 22 ------- build/docs/style/cat.xsl | 33 ---------- build/docs/style/docs.xsl | 87 --------------------------- build/docs/style/style.css | 143 -------------------------------------------- test/fix.html | 48 +++++++++++++++ version.txt | 2 +- 15 files changed, 70 insertions(+), 741 deletions(-) delete mode 100644 build/build/lite.js create mode 100644 build/build/version.js delete mode 100644 build/docs/.htaccess delete mode 100644 build/docs/docs.js delete mode 100644 build/docs/gen-events.pl delete mode 100644 build/docs/js/doc.js delete mode 100644 build/docs/js/pager.js delete mode 100644 build/docs/js/tooltip.js delete mode 100644 build/docs/style/cat.css delete mode 100644 build/docs/style/cat.xsl delete mode 100644 build/docs/style/docs.xsl delete mode 100644 build/docs/style/style.css create mode 100644 test/fix.html diff --git a/build.xml b/build.xml index a49ad65..ddc23bf 100644 --- a/build.xml +++ b/build.xml @@ -1,36 +1,25 @@ - + - + - - - - - - - - + @@ -40,7 +29,7 @@ - + @@ -51,29 +40,16 @@ - - - - - - - - - - - - - - + + - - + - + @@ -93,78 +69,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -174,12 +78,10 @@ - - - + diff --git a/build/build/lite.js b/build/build/lite.js deleted file mode 100644 index d5fc19c..0000000 --- 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 0000000..8d6158c --- /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 40fddde..0000000 --- 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 86b48ee..0000000 --- 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("", ""); - - writeFile( dir + "/data/jquery-" + n + "-xml.xml", - "\n" + xml ); - - writeFile( dir + "/" + ( n == "docs" ? "index" : n ) + ".xml", - "\n" + - "\n" + xml - ); -} diff --git a/build/docs/gen-events.pl b/build/docs/gen-events.pl deleted file mode 100644 index 5e92df9..0000000 --- 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

Hello

- * \@result

Hello

- * - * \@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

Hello

- * \@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

Hello

- * \@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

Hello

- * \@result

Hello

- * - * \@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

Hello

- * \@result

Hello

- * - * \@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 b0d6989..0000000 --- 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<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 + "" + n + "" ); - }); - } 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 44f2e69..0000000 --- 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 = $(""); - - for ( var i = 0; i < names.length; i++ ) - $("").attr({ - rel: i, innerHTML: names[i] - }).click(function() { - return handleCrop( this.rel ); - }).wrap("
  • ").parent().appendTo(pager); - - pager.insertBefore( this ); - - var prev = $("« Prev").click(function(){ - return handleCrop( --curPage ); - }).wrap("").parent().prependTo(pager); - - var next = $("Next »").click(function(){ - return handleCrop( ++curPage ); - }).wrap("").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 e8330e3..0000000 --- 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 e84f08f..0000000 --- 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 c4a20a4..0000000 --- a/build/docs/style/cat.xsl +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - jQuery Printable API - - - -

    jQuery Printable API

    - - - -
    - - -

    -
      - - - -
    • - ( - - , - ) -
    • -
      - -
    -
    -
    diff --git a/build/docs/style/docs.xsl b/build/docs/style/docs.xsl deleted file mode 100644 index 9c0735a..0000000 --- a/build/docs/style/docs.xsl +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - jQuery Docs - <xsl:value-of select="/docs/@version"/> API - - - - - - - -

    jQuery Docs - API

    -
      - - - -
    • - - - - ( - - - - - or - , - - - ) - returns -
      - -
      -
      -
      - - - -
      - -
      -
      Example:
      - -

      -
      -
      - - HTML: -
      -
      - - Result: -
      -
      -
      -
      -
      -
    • -
      -
    - -

    Raw Data: JSON, JSONP, XML

    - - -
    - - - - - - -

    - - - -
    - - - -
    -
    - -
    diff --git a/build/docs/style/style.css b/build/docs/style/style.css deleted file mode 100644 index 3e84aab..0000000 --- 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; -} diff --git a/test/fix.html b/test/fix.html new file mode 100644 index 0000000..f4edab7 --- /dev/null +++ b/test/fix.html @@ -0,0 +1,48 @@ + + + + + + + Tester + + + + + + + + +
    + Hi +
    + +
    +
    + + + diff --git a/version.txt b/version.txt index 6a09a16..0172abc 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.2.2b +1.2.2-pre -- 1.7.10.4