Browse files

new build system based on ant

added two methosd to array: append and prepend
  • Loading branch information...
1 parent 6a9ac21 commit 9ec144504da0201c846f6f9ec8adca549c147176 @alextk committed Aug 1, 2011
Showing with 515 additions and 163 deletions.
  1. +147 −0 build.xml
  2. +3 −0 build/build.number
  3. +5 −0 build/build.properties
  4. +14 −0 build/license.tpl.txt
  5. +3 −3 build/{jslint-check.js → tools/jshint-check.js}
  6. 0 build/{ → tools}/lib/jslint.js
  7. 0 build/{ → tools}/lib/parse-js.js
  8. 0 build/{ → tools}/lib/process.js
  9. 0 build/{ → tools}/lib/squeeze-more.js
  10. 0 build/{ → tools}/packer.js
  11. 0 build/{ → tools}/rhino.jar
  12. 0 build/{ → tools}/uglify.js
  13. 0 build/{ → tools}/yuicompressor.jar
  14. +4 −148 dist/jquery.jqext.js
  15. +6 −4 dist/jquery.jqext.min.js
  16. +6 −4 dist/jquery.jqext.pack.js
  17. 0 {dist → }/docs/closed.gif
  18. 0 {dist → }/docs/closedLarge.gif
  19. 0 {dist → }/docs/index.html
  20. 0 {dist → }/docs/jgdoc.css
  21. 0 {dist → }/docs/jgdoc.js
  22. 0 {dist → }/docs/jgindex.css
  23. +18 −0 {dist → }/docs/jsindex.js
  24. 0 {dist → }/docs/logical/$().html
  25. 0 {dist → }/docs/logical/$.html
  26. 0 {dist → }/docs/logical/$/Event.html
  27. 0 {dist → }/docs/logical/$/Event/Keys.html
  28. 0 {dist → }/docs/logical/$/ext.html
  29. 0 {dist → }/docs/logical/$/ext/Class.html
  30. 0 {dist → }/docs/logical/$/ext/Extender.html
  31. 0 {dist → }/docs/logical/$/ext/mixins.html
  32. 0 {dist → }/docs/logical/$/ext/mixins/Enumerable.html
  33. 0 {dist → }/docs/logical/$/ext/mixins/Observable.html
  34. +120 −0 {dist → }/docs/logical/Array.html
  35. 0 {dist → }/docs/logical/Date.html
  36. 0 {dist → }/docs/logical/Function.html
  37. 0 {dist → }/docs/logical/GLOBAL.html
  38. 0 {dist → }/docs/logical/Object.html
  39. 0 {dist → }/docs/logical/RegExp.html
  40. 0 {dist → }/docs/logical/String.html
  41. 0 {dist → }/docs/logical/System.html
  42. 0 {dist → }/docs/logo.gif
  43. 0 {dist → }/docs/navTree.js
  44. 0 {dist → }/docs/node.gif
  45. 0 {dist → }/docs/open.gif
  46. 0 {dist → }/docs/openLarge.gif
  47. 0 {dist → }/docs/physical/file-base.js.html
  48. +120 −0 {dist → }/docs/physical/file-core/array.js.html
  49. 0 {dist → }/docs/physical/file-core/date.js.html
  50. 0 {dist → }/docs/physical/file-core/enumerable.js.html
  51. 0 {dist → }/docs/physical/file-core/event.js.html
  52. 0 {dist → }/docs/physical/file-core/function.js.html
  53. 0 {dist → }/docs/physical/file-core/is.js.html
  54. 0 {dist → }/docs/physical/file-core/object.js.html
  55. 0 {dist → }/docs/physical/file-core/regexp.js.html
  56. 0 {dist → }/docs/physical/file-core/string.js.html
  57. 0 {dist → }/docs/physical/file-oop/inheritance.js.html
  58. 0 {dist → }/docs/physical/file-oop/observable.js.html
  59. 0 {dist → }/docs/physical/file-utils/sorting.js.html
  60. 0 {dist → }/docs/physical/file-utils/system-info.js.html
  61. 0 {dist → }/docs/physical/file-wrapped-set/dimensions.js.html
  62. 0 {dist → }/docs/physical/file-wrapped-set/event.js.html
  63. 0 {dist → }/docs/theme.css
  64. +4 −3 license.txt
  65. +50 −0 src/core/array.js
  66. +15 −0 test/unit/core/array-test.js
  67. +0 −1 version.txt
View
147 build.xml
@@ -0,0 +1,147 @@
+<project default="all" basedir=".">
+ <!-- set global properties for this build -->
+ <property prefix="project" file="build/build.properties"/>
+ <property name="srcDir" location="src"/>
+ <property name="distDir" location="dist"/>
+ <property name="distFilePath" location="${distDir}/${project.fileName}"/>
+ <property name="buildDir" location="build"/>
+ <property name="buildTools.nodejs" value="c:/mingw/bin/node.exe"/>
+ <property name="licenseFile" location="${basedir}/license.txt"/>
+ <property name="jGrouseDoc" location="c:/devl/js/tools/jGrouseDoc-2.1"/>
+
+ <target name="init" description="create dist directory structure">
+ <mkdir dir="${distDir}"/>
+ <tstamp>
+ <format property="datetime.now" pattern="dd/MM/yyyy HH:mm:ss"/>
+ </tstamp>
+ <echo message="Datetime: ${datetime.now}, project.name=${project.version}"/>
+ <buildnumber file="${buildDir}/build.number"/>
+ <copy file="${buildDir}/license.tpl.txt" tofile="${licenseFile}" overwrite="true"/>
+ <!--First copy license.txt and replace version numbers in it including some other vars-->
+ <replace file="${licenseFile}" value="">
+ <replacefilter token="@project.name" value="${project.name}"/>
+ <replacefilter token="@project.description" value="${project.description}"/>
+ <replacefilter token="@date" value="${datetime.now}"/>
+ <replacefilter token="@project.version" value="${project.version}"/>
+ <replacefilter token="@build.number" value="${build.number}"/>
+ </replace>
+ </target>
+
+ <target name="all" depends="clean, pack, doc"/>
+
+ <target name="js" depends="init" description="join all javascript files into one, add version and license to the head of the joined file">
+ <echo message="Building single js file: ${distFilePath}.js"/>
+ <concat destfile="${distFilePath}.js">
+ <fileset file="${licenseFile}"/>
+ <fileset dir="${srcDir}" includes="base.js"/>
+ <fileset dir="${srcDir}" includes="core/object.js"/>
+ <fileset dir="${srcDir}" includes="core/is.js"/>
+ <fileset dir="${srcDir}" includes="core/enumerable.js"/>
+ <fileset dir="${srcDir}" includes="core/date.js"/>
+ <fileset dir="${srcDir}" includes="core/function.js"/>
+ <fileset dir="${srcDir}" includes="core/regexp.js"/>
+ <fileset dir="${srcDir}" includes="core/string.js"/>
+ <fileset dir="${srcDir}" includes="core/event.js"/>
+ <fileset dir="${srcDir}" includes="utils/system-info.js"/>
+ <fileset dir="${srcDir}" includes="oop/observable.js"/>
+ <fileset dir="${srcDir}" includes="oop/inheritance.js"/>
+ <fileset dir="${srcDir}" includes="wrapped-set/event.js"/>
+ <fileset dir="${srcDir}" includes="wrapped-set/dimensions.js"/>
+ </concat>
+ </target>
+
+ <target name="hint" depends="js" description="Run JSHint checks on the joined javsacript file">
+ <echo message="Running JSHint on ${distFilePath}.js ..."/>
+ <exec executable="cmd.exe" outputproperty="output">
+ <arg line="/c ${buildTools.nodejs} ${buildDir}/tools/jshint-check.js ${distFilePath}.js"/>
+ </exec>
+ <echo message="${output}"/>
+ </target>
+
+ <target name="min" depends="js" description="run node.js with uglify script that compresses the js, remove all comments. add copyright notice to the head of the file">
+ <echo message="Minifying: creating ${distFilePath}.min.js..."/>
+ <echo message="${buildTools.nodejs} ${buildDir}/tools/uglify.js --unsafe"/>
+
+ <exec executable="cmd.exe" outputproperty="output">
+ <arg line="/c ${buildTools.nodejs} ${buildDir}/tools/uglify.js --unsafe ${distFilePath}.js > ${distDir}/tmp.min.js"/>
+ </exec>
+ <echo message="${output}"/>
+
+ <concat destfile="${distFilePath}.min.js">
+ <fileset file="${licenseFile}"/>
+ <fileset file="${distDir}/tmp.min.js"/>
+ </concat>
+ <delete file="${distDir}/tmp.min.js"/>
+ </target>
+
+ <target name="pack" depends="min" description="run rhino server and pack minified js file into even smaller size. add copyright notice at the start">
+ <echo message="Packing: creating ${distFilePath}.pack.js..."/>
+
+ <java
+ dir="${buildDir}/tools"
+ jar="${buildDir}/tools/rhino.jar"
+ fork="true"
+ failonerror="true"
+ maxmemory="128m"
+ >
+ <arg value="${buildDir}/tools/packer.js"/>
+ <arg value="${distFilePath}.min.js"/>
+ <arg value="${distDir}/tmp.pack.js"/>
+ <classpath>
+ <pathelement location="${buildDir}/tools/rhino.jar"/>
+ <pathelement path="${java.class.path}"/>
+ </classpath>
+ </java>
+
+ <concat destfile="${distFilePath}.pack.js">
+ <fileset file="${licenseFile}"/>
+ <fileset file="${distDir}/tmp.pack.js"/>
+ </concat>
+
+ <delete file="${distDir}/tmp.pack.js"/>
+ </target>
+
+ <target name="doc" description="Create documentation using jGrouseDoc-2.1 toolkit">
+ <echo message="Creating documentation using jGrouseDoc-2.1 toolkit into ${distDir}/doc"/>
+
+ <ant antfile="${jGrouseDoc}/build.xml" dir="${basedir}">
+ <property name="jGrouseHome" value="${jGrouseDoc}"/>
+ <property name="inputDir" value="${srcDir}"/>
+ <property name="outputDir" value="${basedir}/docs"/>
+ </ant>
+ </target>
+
+ <target name="version">
+ <input message="Please provide new version for this project (current version is ${project.version}:" addproperty="project.newVersion"/>
+ <propertyfile file="${buildDir}/build.properties">
+ <entry key="version" value="${project.newVersion}"/>
+ </propertyfile>
+ </target>
+
+ <target name="release" depends="pack" description="This command creates new git tag with project version, and pushes the tag to git">
+ <echo message="Adding files for committ..."/>
+ <exec executable="git" dir="${basedir}" failonerror="true">
+ <arg line="add -A" />
+ </exec>
+ <echo message="Committing files before release..."/>
+ <exec executable="git" dir="${basedir}" failonerror="true">
+ <arg line="commit -m 'commiting files for release of version ${project.version}'" />
+ </exec>
+ <echo message="Pushing version release to master..."/>
+ <exec executable="git" dir="${basedir}" inputstring="${passphrase}">
+ <arg line="push" />
+ </exec>
+ <echo message="Creating git tag for version ${project.version}..."/>
+ <exec executable="git" dir="${basedir}" failonerror="true">
+ <arg line="tag 'v${project.version}'" />
+ </exec>
+ <echo message="Pushing tags to github..."/>
+ <exec executable="git" dir="${basedir}" inputstring="${passphrase}">
+ <arg line="push --tags" />
+ </exec>
+ </target>
+
+ <target name="clean" description="clean up dist directory">
+ <delete dir="${distDir}"/>
+ </target>
+</project>
View
3 build/build.number
@@ -0,0 +1,3 @@
+#Build Number for ANT. Do not edit!
+#Mon Aug 01 15:30:26 IDT 2011
+build.number=2
View
5 build/build.properties
@@ -0,0 +1,5 @@
+#Thu, 28 Jul 2011 18:17:09 +0300
+version=0.0.1
+name=jqExt
+description=jQuery extensions and native javascript extensions
+fileName=jquery.jqext
View
14 build/license.tpl.txt
@@ -0,0 +1,14 @@
+/*
+* @project.name - @project.description
+*
+* Version: @project.version
+* Build: @build.number
+* Copyright 2011 Alex Tkachev
+*
+* Dual licensed under MIT or GPLv2 licenses
+* http://en.wikipedia.org/wiki/MIT_License
+* http://en.wikipedia.org/wiki/GNU_General_Public_License
+*
+* Date: @date
+*/
+
View
6 build/jslint-check.js → build/tools/jshint-check.js
@@ -1,4 +1,4 @@
-var JSLINT = require("./lib/jslint").JSLINT,
+var JSHINT = require("./lib/jshint").JSHINT,
print = require("sys").print;
if(process.argv.length < 3){
@@ -8,7 +8,7 @@ if(process.argv.length < 3){
var src = require("fs").readFileSync(process.argv[2], "utf8");
-JSLINT(src, { evil: true, forin: true, maxerr: 100, 'continue': true });
+JSHINT(src, {evil: true, eqeqeq: false, forin: false, maxerr: 100, 'continue':true});
// All of the following are known issues that we think are 'ok'
// (in contradiction with JSLint) more information here:
@@ -21,7 +21,7 @@ var ok = {
'Missing "use strict" statement.': true
};
-var e = JSLINT.errors, found = 0, w;
+var e = JSHINT.errors, found = 0, w;
for ( var i = 0; i < e.length; i++ ) {
w = e[i];
View
0 build/lib/jslint.js → build/tools/lib/jslint.js
File renamed without changes.
View
0 build/lib/parse-js.js → build/tools/lib/parse-js.js
File renamed without changes.
View
0 build/lib/process.js → build/tools/lib/process.js
File renamed without changes.
View
0 build/lib/squeeze-more.js → build/tools/lib/squeeze-more.js
File renamed without changes.
View
0 build/packer.js → build/tools/packer.js
File renamed without changes.
View
0 build/rhino.jar → build/tools/rhino.jar
File renamed without changes.
View
0 build/uglify.js → build/tools/uglify.js
File renamed without changes.
View
0 build/yuicompressor.jar → build/tools/yuicompressor.jar
File renamed without changes.
View
152 dist/jquery.jqext.js
@@ -1,14 +1,15 @@
/*
-* jqExt - jQuery framework extensions
+* jqExt - jQuery extensions and native javascript extensions
*
-* Version: 0.0.1a
+* Version: 0.0.1
+* Build: 1
* Copyright 2011 Alex Tkachev
*
* Dual licensed under MIT or GPLv2 licenses
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*
-* Date: Tue Jul 5 14:47:46 2011 +0300
+* Date: 01/08/2011 15:30:26
*/
/**
@@ -444,151 +445,6 @@ jQuery.ext.Extender.addUtilityMethods({
$.ext.mixins.Enumerable = Enumerable;
-})(jQuery);(function($) {
-
- /**
- * @namespace Array
- * <p>@depends $.ext.mixins.Enumerable</p>
- */
- var mixin = {
-
- /**
- * <h6>Example:</h6>
- * <pre>
- * var stuff = ['Apple', 'Orange', 'Juice', 'Blue'];
- * stuff.clear();
- * // -> []
- * stuff
- * // -> []
- * </pre>
- *
- * @function {public Array} ?
- * Clears the array (makes it empty) and returns the array reference.
- *
- * @returns new string with all whiteshapce removed from the start and end of this string
- */
- clear: function() {
- this.length = 0;
- return this;
- },
-
- /**
- * @function {public Array} ?
- * Returns a duplicate of the array, leaving the original array intact.
- **/
- clone: function() {
- return Array.prototype.slice.call(this, 0);
- },
-
- /**
- * @function {public ?} ?
- * Returns array's first item (e.g. <tt>array[0]</tt>).
- **/
- first: function() {
- return this[0];
- },
-
- /**
- * @function {public ?} ?
- * Returns array's last item (e.g. <tt>array[array.length - 1]</tt>).
- **/
- last: function() {
- return this[this.length - 1];
- },
-
- /**
- * <h6>Example:</h6>
- * <pre>
- * [3, 5, 6, 1, 20].indexOf(1)
- * // -> 3
- *
- * [3, 5, 6, 1, 20].indexOf(90)
- * // -> -1 (not found)
- *
- * ['1', '2', '3'].indexOf(1);
- * // -> -1 (not found, 1 !== '1')
- * </pre>
- *
- * @function {public int} ?
- * Returns the index of the first occurrence of <tt>item</tt> within the array,
- * or <tt>-1</tt> if <tt>item</tt> doesn't exist in the array. Compares items using *strict equality* (===).
- * @param {?} item - value that may or may not be in the array.
- * @param {optional int} offset - number of initial items to skip before beginning the search.
- * @returns index of first occurence of <tt>item</tt> in the array or <tt>-1</tt> if not found.
- **/
- indexOf: function(item, i) {
- i = i || 0;
- var length = this.length;
- if (i < 0) i = length + i;
- for (; i < length; i++)
- if (this[i] === item) return i;
- return -1;
- },
-
- /**
- * @function {public int} ?
- * Returns the position of the last occurrence of <tt>item</tt> within the array or <tt>-1</tt> if <tt>item</tt> doesn't exist in the array.
- * @param {?} item - value that may or may not be in the array.
- * @param {optional int} offset - number of items at the end to skip before beginning the search.
- * @returns position of the last occurrence of <tt>item</tt> within the array or <tt>-1</tt> if not found
- * @see indexOf
- **/
- lastIndexOf: function(item, i) {
- i = isNaN(i) ? this.length : (i < 0 ? this.length + i : i) + 1;
- var n = this.slice(0, i).reverse().indexOf(item);
- return (n < 0) ? n : i - n - 1;
- },
-
- /**
- * @function {public Array} ?
- * Remove item at specified index. Modifies this instance of array.
- * @param {int} index - index to remove item at
- * @return this array instance
- */
- removeAt: function(index) {
- if (index < 0) throw 'index cant be negative';
- var rest = this.slice(index + 1);
- this.length = index;
- this.push.apply(this, rest);
- return this;
- },
-
- /**
- * @function {public Array} ?
- * Remove given item from this array instance. Note if multiple occurences of this item are present, only the first one is removed.
- * @param {?} item - remove this item from array
- * @returns this array instance
- */
- remove: function(item) {
- var index = this.indexOf(item);
- if (index >= 0) this.removeAt(index);
- return this;
- },
-
- /**
- * @function {public void} ?
- * This method is required for mixin in the enumerable module. Uses javascript 1.6 native implementation if present.
- * @param iterator
- * @param context
- */
- _each: function(iterator, context) {
- for (var i = 0, length = this.length >>> 0; i < length; i++) {
- if (i in this) iterator.call(context, this[i], i, this);
- }
- }
-
- };
-
- // use native browser JS 1.6 implementation if available
- if (Array.prototype.indexOf){ delete mixin.indexOf; }
- if (Array.prototype.lastIndexOf){ delete mixin.lastIndexOf; }
- if (Array.prototype.forEach){ mixin._each = Array.prototype.forEach; }
-
-
- $.extend(Array.prototype, mixin);
- $.extend(Array.prototype, $.ext.mixins.Enumerable);
-
-
})(jQuery);jQuery.extend(Date.prototype, /** @scope Date */{
/**
View
10 dist/jquery.jqext.min.js
@@ -1,13 +1,15 @@
/*
-* jqExt - jQuery framework extensions
+* jqExt - jQuery extensions and native javascript extensions
*
-* Version: 0.0.1a
+* Version: 0.0.1
+* Build: 1
* Copyright 2011 Alex Tkachev
*
* Dual licensed under MIT or GPLv2 licenses
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*
-* Date: Tue Jul 5 14:47:46 2011 +0300
+* Date: 01/08/2011 15:30:26
*/
-(function(a){a.ext={$break:{}},a.ext.mixins={},a.ext.Extender={addWrapedSetMethods:function(a,b){for(var c in a)b&&jQuery.fn[c]&&(jQuery.fn["jq_original_"+c]=jQuery.fn[c]),jQuery.fn[c]=a[c]},addUtilityMethods:function(a){for(var b in a)jQuery[b]=a[b]}}})(jQuery),function(a){var b={keys:function(){var a=[];for(var b in obj)obj.hasOwnProperty(b)&&a.push(b);return a}};Object.keys&&delete b.keys,a.extend(Object,b)}(jQuery),jQuery.ext.Extender.addUtilityMethods({isBoolean:function(a){return jQuery.type(a)==="boolean"},isNumber:function(a){return jQuery.type(a)==="number"},isDate:function(a){return jQuery.type(a)==="date"},isString:function(a){return jQuery.type(a)==="string"},isUndefined:function(a){return jQuery.type(a)==="undefined"}}),function(a){var b={each:function(b,c){var d=0;try{this._each(function(a){b.call(c,a,d++)})}catch(e){if(e!=a.ext.$break)throw e}return this},collect:function(a,b){var c=[];this.each(function(d,e){c.push(a.call(b,d,e))});return c},findIndex:function(b,c){var d=-1;this.each(function(e,f){if(b.call(c,e,f)){d=f;throw a.ext.$break}});return d},include:function(b){if(a.isFunction(this.indexOf))return this.indexOf(b)!=-1;var c=!1;this.each(function(d){if(d==b){c=!0;throw a.ext.$break}});return c},invoke:function(b){var c=a.makeArray(arguments).slice(1);return this.map(function(a){return a[b].apply(a,c)})},max:function(a,b){a=a||Function.identityFn;var c;this.each(function(d,e){d=a.call(b,d,e);if(c==null||d>=c)c=d});return c},min:function(a,b){a=a||Function.identityFn;var c;this.each(function(d,e){d=a.call(b,d,e);if(c==null||d<c)c=d});return c},property:function(a){var b=[];this.each(function(c){b.push(c[a])});return b},select:function(a,b){var c=[];this.each(function(d,e){a.call(b,d,e)&&c.push(d)});return c},sum:function(a,b){a=a||Function.identityFn;var c=0;this.each(function(d,e){d=a.call(b,d,e),c+=d});return c}};b.map=b.collect,a.ext.mixins.Enumerable=b}(jQuery),function(a){var b={clear:function(){this.length=0;return this},clone:function(){return Array.prototype.slice.call(this,0)},first:function(){return this[0]},last:function(){return this[this.length-1]},indexOf:function(a,b){b=b||0;var c=this.length;b<0&&(b=c+b);for(;b<c;b++)if(this[b]===a)return b;return-1},lastIndexOf:function(a,b){b=isNaN(b)?this.length:(b<0?this.length+b:b)+1;var c=this.slice(0,b).reverse().indexOf(a);return c<0?c:b-c-1},removeAt:function(a){if(a<0)throw"index cant be negative";var b=this.slice(a+1);this.length=a,this.push.apply(this,b);return this},remove:function(a){var b=this.indexOf(a);b>=0&&this.removeAt(b);return this},_each:function(a,b){for(var c=0,d=this.length>>>0;c<d;c++)c in this&&a.call(b,this[c],c,this)}};Array.prototype.indexOf&&delete b.indexOf,Array.prototype.lastIndexOf&&delete b.lastIndexOf,Array.prototype.forEach&&(b._each=Array.prototype.forEach),a.extend(Array.prototype,b),a.extend(Array.prototype,a.ext.mixins.Enumerable)}(jQuery),jQuery.extend(Date.prototype,{getElapsed:function(a){return Math.abs((a||new Date).getTime()-this.getTime())}}),function(a){a.extend(Function,{emptyFn:function(){},identityFn:function(a){return a}}),a.extend(Function.prototype,{bind:function(b){if(arguments.length<2&&a.isUndefined(arguments[0]))return this;var c=this,d=null;arguments.length>1&&(d=Array.prototype.slice.call(arguments,1));return function(){var a=arguments;if(d){a=d;if(arguments.length>0){var e=a.length,f=arguments.length;while(f--)a[e+f]=arguments[f]}}return c.apply(b,a)}}})}(jQuery),jQuery.extend(RegExp,{escape:function(a){return a.replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1")}}),jQuery.extend(String.prototype,{capitalize:function(){return this.charAt(0).toUpperCase()+this.substring(1).toLowerCase()},format:function(){var a=this;for(var b=0;b<arguments.length;b++){var c=new RegExp("\\{"+b+"\\}","gm");a=a.replace(c,arguments[b])}return a},startsWith:function(a){return this.lastIndexOf(a,0)===0},contains:function(a){return this.indexOf(a)!=-1},endsWith:function(a){var b=this.length-a.length;return b>=0&&this.indexOf(a,b)===b},trim:function(){return this.replace(/^\s*/,"").replace(/\s*$/,"")},underscore:function(){return this.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/-/g,"_").toLowerCase()}}),function(a){a.Event.Keys={BACKSPACE:8,TAB:9,RETURN:13,ENTER:13,ESC:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,HOME:36,END:35,PAGE_UP:33,PAGE_DOWN:34,INSERT:45},a.extend(a.Event.prototype,{stopEvent:function(){this.preventDefault(),this.stopPropagation()},isSpecialKey:function(){var b=this.which;return this.ctrlKey||this.isNavKeyPress()||b==a.Event.Keys.BACKSPACE||b>=16&&b<=20||b>=44&&b<=46},isNavKeyPress:function(){var b=this.which;return b>=33&&b<=40||b==a.Event.Keys.RETURN||b==a.Event.Keys.TAB||b==a.Event.Keys.ESC},isBackspaceKey:function(){return this.which==a.Event.Keys.BACKSPACE},isDeleteKey:function(){return this.which==a.Event.Keys.DELETE},isTabKey:function(){return this.which==a.Event.Keys.TAB},isEnterKey:function(){return this.which==a.Event.Keys.RETURN},isEscKey:function(){return this.which==a.Event.Keys.ESC},isUpKey:function(){return this.which==a.Event.Keys.UP},isDownKey:function(){return this.which==a.Event.Keys.DOWN}})}(jQuery),jQuery.ext.Extender.addUtilityMethods({systemInfo:function(){var a=navigator.userAgent.toLowerCase(),b=function(b){return b.test(a)},c={browser:{},os:{}};c.browser.isStrict=document.compatMode=="CSS1Compat",c.browser.isSecure=/^https/i.test(window.location.protocol),c.browser.isOpera=b(/opera/),c.browser.isChrome=b(/\bchrome\b/),c.browser.isWebKit=b(/webkit/),c.browser.isSafari=!c.browser.isChrome&&b(/safari/),c.browser.isSafari2=c.browser.isSafari&&b(/applewebkit\/4/),c.browser.isSafari3=c.browser.isSafari&&b(/version\/3/),c.browser.isSafari4=c.browser.isSafari&&b(/version\/4/),c.browser.isIE=!c.browser.isOpera&&b(/msie/),c.browser.isIE7=c.browser.isIE&&b(/msie 7/),c.browser.isIE8=c.browser.isIE&&b(/msie 8/),c.browser.isIE6=c.browser.isIE&&!c.browser.isIE7&&!c.browser.isIE8,c.browser.isGecko=!c.browser.isWebKit&&b(/gecko/),c.browser.isGecko2=c.browser.isGecko&&b(/rv:1\.8/),c.browser.isGecko3=c.browser.isGecko&&b(/rv:1\.9/),c.browser.isBorderBox=c.browser.isIE&&!c.browser.isStrict,c.os.isWindows=b(/windows|win32/),c.os.isMac=b(/macintosh|mac os x/),c.os.isAir=b(/adobeair/),c.os.isLinux=b(/linux/);return c}()},!0),function(a){var b={__initListeners:function(a){this.__listeners=this.__listeners||{},this.__listeners[a]=this.__listeners[a]||[]},addListener:function(b,c,d,e){if(a.type(b)==="string"&&b.length>0)if(b.indexOf(" ")==-1){c=c||null;var f={fn:c,scope:d||this,args:e||null};this.hasListener(b,f.fn,f.scope,f.args)||(this.__initListeners(b),this.__listeners[b].push(f))}else{var g=b.split(" ");for(var h=0;h<g.length;h++)this.addListener.call(this,g[h],c,d,e)}else{var i=b;for(var j in i)if(j!="scope"&&j!="args"){var k=i[j];this.addListener(j,k.fn||k,k.scope||i.scope,{args:k.args||i.args})}}return this},removeListener:function(b,c,d){if(a.type(b)==="string"&&b.length>0)if(b.indexOf(" ")==-1){this.__initListeners(b);if(arguments.length==1)this.__listeners[b].clear();else{d=d||{};var e=this.findListener(b,c,d.scope||this,d.args||null);e!==null&&this.__listeners[b].remove(e)}}else{var f=b.split(" ");for(var g=0;g<f.length;g++)this.removeListener.call(this,f[g],c,d)}else{var h=b;for(var i in h)if(i!="scope"&&i!="args"){var j=h[i];this.removeListener(i,j.fn||j,j.scope||h.scope,{args:j.args||h.args})}}return this},hasListener:function(a,b,c,d){return this.findListener(a,b,c,d)!==null},findListener:function(a,b,c,d){this.__initListeners(a);var e=this.__listeners[a];for(var f=0;f<e.length;f++){var g=e[f];if(g.fn==b&&g.scope==c&&g.args==d)return g}return null},fireListener:function(b){this.__initListeners(b);var c=[],d=a.makeArray(arguments).slice(1),e={eventName:b,source:this,bindArgs:null};d.unshift(e);for(var f=0;f<this.__listeners[b].length;++f){var g=this.__listeners[b][f];e.bindArgs=g.args;var h=g.fn.apply(g.scope,d)||null;if(h==a.ext.$break)return!1;c.push(h)}return c}};b.on=b.addListener,b.un=b.removeListener,b.fire=b.fireListener,a.ext.mixins.Observable=b}(jQuery),function(a){a.ext=a.ext||{},a.ext.Class=function(){var a={},b={getSuperClassMetaData:function(){return this.getClassMetaData().superClassMetaData},getClassMetaData:function(){return this.__clsMetaData},getClassConstructor:function(){return this.getClassMetaData().classConstructor},getClassName:function(a){var b=this.getClassMetaData();return a?b.fullClassName:b.className},getNamespace:function(){return this.getClassMetaData().namespace},instanceOf:function(a){return typeof a=="string"?this.__instanceOfByString(a):this.__instanceOfByClass(a)},__instanceOfByString:function(a){if(this.getClassName(!0)==a)return!0;var b=this.getSuperClassMetaData();while(b){if(b.fullClassName==a)return!0;b=b.superClassMetaData}return!1},__instanceOfByClass:function(a){if(this.getClassConstructor()==a)return!0;var b=this.getSuperClassMetaData();while(b){if(b.classConstructor==a)return!0;b=b.superClassMetaData}return!1}},c={create:function(d,e,f){arguments.length==1?(f=d,e=null,d="Object"):arguments.length==2&&(typeof d=="function"?(f=e,e=d,d="Object"):typeof d=="string"&&(f=e,e=null));var g=function(){arguments[0]!=a&&this.initialize.apply(this,arguments)};g.prototype.initialize=function(){},typeof e=="function"&&(g.prototype=new e(a),g.prototype.superClass=e.prototype),g.prototype.__clsMetaData={classConstructor:g,superClassMetaData:g.prototype.__clsMetaData||null,fullClassName:d,className:function(){var a=d.lastIndexOf(".");return a==-1?d:d.substring(a+1)}(),namespace:function(){var a=d.lastIndexOf(".");return a==-1?"":d.substring(0,a)}()};var h=[];g.prototype.getClassName||h.push(b),f&&f.include&&(f.include.reverse?h=h.concat(f.include.reverse()):h.push(f.include),delete f.include),f&&c.inherit(g.prototype,f);for(var i=0;mixin=h[i];i++)c.mixin(g.prototype,mixin);if(g.prototype.__clsMetaData.namespace.length>0){var j=c.namespace(g.prototype.__clsMetaData.namespace);j[g.prototype.__clsMetaData.className]=g}return g},mixin:function(a,b,c){c=c||!1;if(typeof b!="undefined"&&b!==null)for(var d in b)if(c||!a[d]&&typeof b[d]=="function")a[d]=b[d];return a},inherit:function(a,b,d){if(arguments.length==3){var e=a[d],f=b[d],g=f;f=function(){var a=this.superMethod;this.superMethod=e;var b=g.apply(this,arguments);a?this.superMethod=a:delete this.superMethod;return b},f.valueOf=function(){return g},f.toString=function(){return g+""},a[d]=f}else for(var h in b)a[h]&&typeof b[h]=="function"?c.inherit(a,b,h):a[h]=b[h];return a},singleton:function(){var b=arguments;if(b.length==2&&b[0].getInstance){var d=b[0].getInstance(a);d&&(b[0]=d)}return function(b){var d=!1,e=c.create.apply(b.callee,b);return{getInstance:function(){if(arguments[0]==a)return e;if(d)return d;return d=new e}}}(b)},namespace:function(a){a=a||"";var b=a.split("."),c=b[0],d=window[c]=window[c]||{},e=b.slice(1);for(var f=0;f<e.length;f++){var g=e[f];d=d[g]=d[g]||{}}return d}};return c}()}(jQuery),jQuery.ext.Extender.addWrapedSetMethods({bindLater:function(a,b,c,d){var e=200;arguments.length==4?e=Array.prototype.pop.call(arguments):arguments.length==3&&jQuery.isFunction(b)&&jQuery.isNumber(c)?e=Array.prototype.pop.call(arguments):arguments.length==2&&typeof a==="object"&&jQuery.isNumber(b)&&(e=Array.prototype.pop.call(arguments));var f=this,g=arguments;window.setTimeout(function(){f.bind.apply(f,g)},e);return this}},!0),jQuery.ext.Extender.addWrapedSetMethods({region:function(a){var b=jQuery(this),c=b.offset(),d=Math.ceil(c.top),e=Math.ceil(c.left),f,g;a===!1?(f=b.width(),g=b.height()):(f=b.outerWidth(),g=b.outerHeight());return{top:d,left:e,right:e+f,bottom:d+g}},outerHeight:function(a,b){if(!this[0])return null;if(jQuery.isNumber(a)){var c=this.jq_original_outerHeight(b)-this.height();return this.height(a-c)}return this.jq_original_outerHeight.apply(this,arguments)},outerWidth:function(a,b){if(!this[0])return null;if(jQuery.isNumber(a)){var c=this.jq_original_outerWidth(b)-this.width();return this.width(a-c)}return this.jq_original_outerWidth.apply(this,arguments)},containedIn:function(a){if(!this[0])return null;jQuery.isArray(a)||(a=[a]);var b=this[0];for(var c=0;c<a.length;c++){var d=a[c];d instanceof jQuery&&(d=a[c].get(0));if(jQuery.contains(d,b))return!0}return!1}},!0)
+
+(function(a){a.ext={$break:{}},a.ext.mixins={},a.ext.Extender={addWrapedSetMethods:function(a,b){for(var c in a)b&&jQuery.fn[c]&&(jQuery.fn["jq_original_"+c]=jQuery.fn[c]),jQuery.fn[c]=a[c]},addUtilityMethods:function(a){for(var b in a)jQuery[b]=a[b]}}})(jQuery),function(a){var b={keys:function(){var a=[];for(var b in obj)obj.hasOwnProperty(b)&&a.push(b);return a}};Object.keys&&delete b.keys,a.extend(Object,b)}(jQuery),jQuery.ext.Extender.addUtilityMethods({isBoolean:function(a){return jQuery.type(a)==="boolean"},isNumber:function(a){return jQuery.type(a)==="number"},isDate:function(a){return jQuery.type(a)==="date"},isString:function(a){return jQuery.type(a)==="string"},isUndefined:function(a){return jQuery.type(a)==="undefined"}}),function(a){var b={each:function(b,c){var d=0;try{this._each(function(a){b.call(c,a,d++)})}catch(e){if(e!=a.ext.$break)throw e}return this},collect:function(a,b){var c=[];this.each(function(d,e){c.push(a.call(b,d,e))});return c},findIndex:function(b,c){var d=-1;this.each(function(e,f){if(b.call(c,e,f)){d=f;throw a.ext.$break}});return d},include:function(b){if(a.isFunction(this.indexOf))return this.indexOf(b)!=-1;var c=!1;this.each(function(d){if(d==b){c=!0;throw a.ext.$break}});return c},invoke:function(b){var c=a.makeArray(arguments).slice(1);return this.map(function(a){return a[b].apply(a,c)})},max:function(a,b){a=a||Function.identityFn;var c;this.each(function(d,e){d=a.call(b,d,e);if(c==null||d>=c)c=d});return c},min:function(a,b){a=a||Function.identityFn;var c;this.each(function(d,e){d=a.call(b,d,e);if(c==null||d<c)c=d});return c},property:function(a){var b=[];this.each(function(c){b.push(c[a])});return b},select:function(a,b){var c=[];this.each(function(d,e){a.call(b,d,e)&&c.push(d)});return c},sum:function(a,b){a=a||Function.identityFn;var c=0;this.each(function(d,e){d=a.call(b,d,e),c+=d});return c}};b.map=b.collect,a.ext.mixins.Enumerable=b}(jQuery),jQuery.extend(Date.prototype,{getElapsed:function(a){return Math.abs((a||new Date).getTime()-this.getTime())}}),function(a){a.extend(Function,{emptyFn:function(){},identityFn:function(a){return a}}),a.extend(Function.prototype,{bind:function(b){if(arguments.length<2&&a.isUndefined(arguments[0]))return this;var c=this,d=null;arguments.length>1&&(d=Array.prototype.slice.call(arguments,1));return function(){var a=arguments;if(d){a=d;if(arguments.length>0){var e=a.length,f=arguments.length;while(f--)a[e+f]=arguments[f]}}return c.apply(b,a)}}})}(jQuery),jQuery.extend(RegExp,{escape:function(a){return a.replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1")}}),jQuery.extend(String.prototype,{capitalize:function(){return this.charAt(0).toUpperCase()+this.substring(1).toLowerCase()},format:function(){var a=this;for(var b=0;b<arguments.length;b++){var c=new RegExp("\\{"+b+"\\}","gm");a=a.replace(c,arguments[b])}return a},startsWith:function(a){return this.lastIndexOf(a,0)===0},contains:function(a){return this.indexOf(a)!=-1},endsWith:function(a){var b=this.length-a.length;return b>=0&&this.indexOf(a,b)===b},trim:function(){return this.replace(/^\s*/,"").replace(/\s*$/,"")},underscore:function(){return this.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/-/g,"_").toLowerCase()}}),function(a){a.Event.Keys={BACKSPACE:8,TAB:9,RETURN:13,ENTER:13,ESC:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,HOME:36,END:35,PAGE_UP:33,PAGE_DOWN:34,INSERT:45},a.extend(a.Event.prototype,{stopEvent:function(){this.preventDefault(),this.stopPropagation()},isSpecialKey:function(){var b=this.which;return this.ctrlKey||this.isNavKeyPress()||b==a.Event.Keys.BACKSPACE||b>=16&&b<=20||b>=44&&b<=46},isNavKeyPress:function(){var b=this.which;return b>=33&&b<=40||b==a.Event.Keys.RETURN||b==a.Event.Keys.TAB||b==a.Event.Keys.ESC},isBackspaceKey:function(){return this.which==a.Event.Keys.BACKSPACE},isDeleteKey:function(){return this.which==a.Event.Keys.DELETE},isTabKey:function(){return this.which==a.Event.Keys.TAB},isEnterKey:function(){return this.which==a.Event.Keys.RETURN},isEscKey:function(){return this.which==a.Event.Keys.ESC},isUpKey:function(){return this.which==a.Event.Keys.UP},isDownKey:function(){return this.which==a.Event.Keys.DOWN}})}(jQuery),jQuery.ext.Extender.addUtilityMethods({systemInfo:function(){var a=navigator.userAgent.toLowerCase(),b=function(b){return b.test(a)},c={browser:{},os:{}};c.browser.isStrict=document.compatMode=="CSS1Compat",c.browser.isSecure=/^https/i.test(window.location.protocol),c.browser.isOpera=b(/opera/),c.browser.isChrome=b(/\bchrome\b/),c.browser.isWebKit=b(/webkit/),c.browser.isSafari=!c.browser.isChrome&&b(/safari/),c.browser.isSafari2=c.browser.isSafari&&b(/applewebkit\/4/),c.browser.isSafari3=c.browser.isSafari&&b(/version\/3/),c.browser.isSafari4=c.browser.isSafari&&b(/version\/4/),c.browser.isIE=!c.browser.isOpera&&b(/msie/),c.browser.isIE7=c.browser.isIE&&b(/msie 7/),c.browser.isIE8=c.browser.isIE&&b(/msie 8/),c.browser.isIE6=c.browser.isIE&&!c.browser.isIE7&&!c.browser.isIE8,c.browser.isGecko=!c.browser.isWebKit&&b(/gecko/),c.browser.isGecko2=c.browser.isGecko&&b(/rv:1\.8/),c.browser.isGecko3=c.browser.isGecko&&b(/rv:1\.9/),c.browser.isBorderBox=c.browser.isIE&&!c.browser.isStrict,c.os.isWindows=b(/windows|win32/),c.os.isMac=b(/macintosh|mac os x/),c.os.isAir=b(/adobeair/),c.os.isLinux=b(/linux/);return c}()},!0),function(a){var b={__initListeners:function(a){this.__listeners=this.__listeners||{},this.__listeners[a]=this.__listeners[a]||[]},addListener:function(b,c,d,e){if(a.type(b)==="string"&&b.length>0)if(b.indexOf(" ")==-1){c=c||null;var f={fn:c,scope:d||this,args:e||null};this.hasListener(b,f.fn,f.scope,f.args)||(this.__initListeners(b),this.__listeners[b].push(f))}else{var g=b.split(" ");for(var h=0;h<g.length;h++)this.addListener.call(this,g[h],c,d,e)}else{var i=b;for(var j in i)if(j!="scope"&&j!="args"){var k=i[j];this.addListener(j,k.fn||k,k.scope||i.scope,{args:k.args||i.args})}}return this},removeListener:function(b,c,d){if(a.type(b)==="string"&&b.length>0)if(b.indexOf(" ")==-1){this.__initListeners(b);if(arguments.length==1)this.__listeners[b].clear();else{d=d||{};var e=this.findListener(b,c,d.scope||this,d.args||null);e!==null&&this.__listeners[b].remove(e)}}else{var f=b.split(" ");for(var g=0;g<f.length;g++)this.removeListener.call(this,f[g],c,d)}else{var h=b;for(var i in h)if(i!="scope"&&i!="args"){var j=h[i];this.removeListener(i,j.fn||j,j.scope||h.scope,{args:j.args||h.args})}}return this},hasListener:function(a,b,c,d){return this.findListener(a,b,c,d)!==null},findListener:function(a,b,c,d){this.__initListeners(a);var e=this.__listeners[a];for(var f=0;f<e.length;f++){var g=e[f];if(g.fn==b&&g.scope==c&&g.args==d)return g}return null},fireListener:function(b){this.__initListeners(b);var c=[],d=a.makeArray(arguments).slice(1),e={eventName:b,source:this,bindArgs:null};d.unshift(e);for(var f=0;f<this.__listeners[b].length;++f){var g=this.__listeners[b][f];e.bindArgs=g.args;var h=g.fn.apply(g.scope,d)||null;if(h==a.ext.$break)return!1;c.push(h)}return c}};b.on=b.addListener,b.un=b.removeListener,b.fire=b.fireListener,a.ext.mixins.Observable=b}(jQuery),function(a){a.ext=a.ext||{},a.ext.Class=function(){var a={},b={getSuperClassMetaData:function(){return this.getClassMetaData().superClassMetaData},getClassMetaData:function(){return this.__clsMetaData},getClassConstructor:function(){return this.getClassMetaData().classConstructor},getClassName:function(a){var b=this.getClassMetaData();return a?b.fullClassName:b.className},getNamespace:function(){return this.getClassMetaData().namespace},instanceOf:function(a){return typeof a=="string"?this.__instanceOfByString(a):this.__instanceOfByClass(a)},__instanceOfByString:function(a){if(this.getClassName(!0)==a)return!0;var b=this.getSuperClassMetaData();while(b){if(b.fullClassName==a)return!0;b=b.superClassMetaData}return!1},__instanceOfByClass:function(a){if(this.getClassConstructor()==a)return!0;var b=this.getSuperClassMetaData();while(b){if(b.classConstructor==a)return!0;b=b.superClassMetaData}return!1}},c={create:function(d,e,f){arguments.length==1?(f=d,e=null,d="Object"):arguments.length==2&&(typeof d=="function"?(f=e,e=d,d="Object"):typeof d=="string"&&(f=e,e=null));var g=function(){arguments[0]!=a&&this.initialize.apply(this,arguments)};g.prototype.initialize=function(){},typeof e=="function"&&(g.prototype=new e(a),g.prototype.superClass=e.prototype),g.prototype.__clsMetaData={classConstructor:g,superClassMetaData:g.prototype.__clsMetaData||null,fullClassName:d,className:function(){var a=d.lastIndexOf(".");return a==-1?d:d.substring(a+1)}(),namespace:function(){var a=d.lastIndexOf(".");return a==-1?"":d.substring(0,a)}()};var h=[];g.prototype.getClassName||h.push(b),f&&f.include&&(f.include.reverse?h=h.concat(f.include.reverse()):h.push(f.include),delete f.include),f&&c.inherit(g.prototype,f);for(var i=0;mixin=h[i];i++)c.mixin(g.prototype,mixin);if(g.prototype.__clsMetaData.namespace.length>0){var j=c.namespace(g.prototype.__clsMetaData.namespace);j[g.prototype.__clsMetaData.className]=g}return g},mixin:function(a,b,c){c=c||!1;if(typeof b!="undefined"&&b!==null)for(var d in b)if(c||!a[d]&&typeof b[d]=="function")a[d]=b[d];return a},inherit:function(a,b,d){if(arguments.length==3){var e=a[d],f=b[d],g=f;f=function(){var a=this.superMethod;this.superMethod=e;var b=g.apply(this,arguments);a?this.superMethod=a:delete this.superMethod;return b},f.valueOf=function(){return g},f.toString=function(){return g+""},a[d]=f}else for(var h in b)a[h]&&typeof b[h]=="function"?c.inherit(a,b,h):a[h]=b[h];return a},singleton:function(){var b=arguments;if(b.length==2&&b[0].getInstance){var d=b[0].getInstance(a);d&&(b[0]=d)}return function(b){var d=!1,e=c.create.apply(b.callee,b);return{getInstance:function(){if(arguments[0]==a)return e;if(d)return d;return d=new e}}}(b)},namespace:function(a){a=a||"";var b=a.split("."),c=b[0],d=window[c]=window[c]||{},e=b.slice(1);for(var f=0;f<e.length;f++){var g=e[f];d=d[g]=d[g]||{}}return d}};return c}()}(jQuery),jQuery.ext.Extender.addWrapedSetMethods({bindLater:function(a,b,c,d){var e=200;arguments.length==4?e=Array.prototype.pop.call(arguments):arguments.length==3&&jQuery.isFunction(b)&&jQuery.isNumber(c)?e=Array.prototype.pop.call(arguments):arguments.length==2&&typeof a==="object"&&jQuery.isNumber(b)&&(e=Array.prototype.pop.call(arguments));var f=this,g=arguments;window.setTimeout(function(){f.bind.apply(f,g)},e);return this}},!0),jQuery.ext.Extender.addWrapedSetMethods({region:function(a){var b=jQuery(this),c=b.offset(),d=Math.ceil(c.top),e=Math.ceil(c.left),f,g;a===!1?(f=b.width(),g=b.height()):(f=b.outerWidth(),g=b.outerHeight());return{top:d,left:e,right:e+f,bottom:d+g}},outerHeight:function(a,b){if(!this[0])return null;if(jQuery.isNumber(a)){var c=this.jq_original_outerHeight(b)-this.height();return this.height(a-c)}return this.jq_original_outerHeight.apply(this,arguments)},outerWidth:function(a,b){if(!this[0])return null;if(jQuery.isNumber(a)){var c=this.jq_original_outerWidth(b)-this.width();return this.width(a-c)}return this.jq_original_outerWidth.apply(this,arguments)},containedIn:function(a){if(!this[0])return null;jQuery.isArray(a)||(a=[a]);var b=this[0];for(var c=0;c<a.length;c++){var d=a[c];d instanceof jQuery&&(d=a[c].get(0));if(jQuery.contains(d,b))return!0}return!1}},!0)
View
10 dist/jquery.jqext.pack.js
@@ -1,13 +1,15 @@
/*
-* jqExt - jQuery framework extensions
+* jqExt - jQuery extensions and native javascript extensions
*
-* Version: 0.0.1a
+* Version: 0.0.1
+* Build: 1
* Copyright 2011 Alex Tkachev
*
* Dual licensed under MIT or GPLv2 licenses
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*
-* Date: Tue Jul 5 14:47:46 2011 +0300
+* Date: 01/08/2011 15:30:26
*/
-eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(6(a){a.v={$15:{}},a.v.1l={},a.v.14={1F:6(a,b){w(m c O a)b&&o.I[c]&&(o.I["47"+c]=o.I[c]),o.I[c]=a[c]},1o:6(a){w(m b O a)o[b]=a[b]}}})(o),6(a){m b={1L:6(){m a=[];w(m b O 2l)2l.4z(b)&&a.N(b);l a}};1g.1L&&17 b.1L,a.M(1g,b)}(o),o.v.14.1o({49:6(a){l o.R(a)==="4b"},11:6(a){l o.R(a)==="4d"},3Y:6(a){l o.R(a)==="4e"},4G:6(a){l o.R(a)==="12"},2v:6(a){l o.R(a)==="1R"}}),6(a){m b={L:6(b,c){m d=0;3S{5.1n(6(a){b.y(c,a,d++)})}4h(e){n(e!=a.v.$15)1e e}l 5},2k:6(a,b){m c=[];5.L(6(d,e){c.N(a.y(b,d,e))});l c},4i:6(b,c){m d=-1;5.L(6(e,f){n(b.y(c,e,f)){d=f;1e a.v.$15}});l d},W:6(b){n(a.1V(5.F))l 5.F(b)!=-1;m c=!1;5.L(6(d){n(d==b){c=!0;1e a.v.$15}});l c},3T:6(b){m c=a.2s(r).S(1);l 5.2t(6(a){l a[b].H(a,c)})},4H:6(a,b){a=a||1a.1m;m c;5.L(6(d,e){d=a.y(b,d,e);n(c==u||d>=c)c=d});l c},3g:6(a,b){a=a||1a.1m;m c;5.L(6(d,e){d=a.y(b,d,e);n(c==u||d<c)c=d});l c},4m:6(a){m b=[];5.L(6(c){b.N(c[a])});l b},3l:6(a,b){m c=[];5.L(6(d,e){a.y(b,d,e)&&c.N(d)});l c},3q:6(a,b){a=a||1a.1m;m c=0;5.L(6(d,e){d=a.y(b,d,e),c+=d});l c}};b.2t=b.2k,a.v.1l.2y=b}(o),6(a){m b={1P:6(){5.q=0;l 5},4t:6(){l E.t.S.y(5,0)},2Y:6(){l 5[0]},4u:6(){l 5[5.q-1]},F:6(a,b){b=b||0;m c=5.q;b<0&&(b=c+b);w(;b<c;b++)n(5[b]===a)l b;l-1},U:6(a,b){b=3f(b)?5.q:(b<0?5.q+b:b)+1;m c=5.S(0,b).1E().F(a);l c<0?c:b-c-1},2r:6(a){n(a<0)1e"2S 4x 2V 2P";m b=5.S(a+1);5.q=a,5.N.H(5,b);l 5},1Q:6(a){m b=5.F(a);b>=0&&5.2r(b);l 5},1n:6(a,b){w(m c=0,d=5.q>>>0;c<d;c++)c O 5&&a.y(b,5[c],c,5)}};E.t.F&&17 b.F,E.t.U&&17 b.U,E.t.2x&&(b.1n=E.t.2x),a.M(E.t,b),a.M(E.t,a.v.1l.2y)}(o),o.M(1Y.t,{4E:6(a){l 1t.4F((a||1k 1Y).1O()-5.1O())}}),6(a){a.M(1a,{2A:6(){},1m:6(a){l a}}),a.M(1a.t,{26:6(b){n(r.q<2&&a.2v(r[0]))l 5;m c=5,d=u;r.q>1&&(d=E.t.S.y(r,1));l 6(){m a=r;n(d){a=d;n(r.q>0){m e=a.q,f=r.q;1q(f--)a[e+f]=r[f]}}l c.H(b,a)}}})}(o),o.M(2z,{2B:6(a){l a.Q(/([-.*+?^${}()|[\\]\\/\\\\])/g,"\\\\$1")}}),o.M(2C.t,{4A:6(){l 5.2E(0).2F()+5.1C(1).1z()},2G:6(){m a=5;w(m b=0;b<r.q;b++){m c=1k 2z("\\\\{"+b+"\\\\}","2H");a=a.Q(c,r[b])}l a},2I:6(a){l 5.U(a,0)===0},2c:6(a){l 5.F(a)!=-1},2J:6(a){m b=5.q-a.q;l b>=0&&5.F(a,b)===b},4s:6(){l 5.Q(/^\\s*/,"").Q(/\\s*$/,"")},2M:6(){l 5.Q(/::/g,"/").Q(/([A-Z]+)([A-Z][a-z])/g,"$2q$2").Q(/([a-z\\d])([A-Z])/g,"$2q$2").Q(/-/g,"4k").1z()}}),6(a){a.C.D={1v:8,1N:9,1D:13,2Q:13,1B:27,2T:37,23:38,2U:39,24:40,2a:46,2W:36,2X:35,30:33,31:34,41:45},a.M(a.C.t,{3a:6(){5.3W(),5.3b()},3c:6(){m b=5.K;l 5.3d||5.1X()||b==a.C.D.1v||b>=16&&b<=20||b>=44&&b<=46},1X:6(){m b=5.K;l b>=33&&b<=40||b==a.C.D.1D||b==a.C.D.1N||b==a.C.D.1B},3j:6(){l 5.K==a.C.D.1v},3m:6(){l 5.K==a.C.D.2a},3n:6(){l 5.K==a.C.D.1N},3o:6(){l 5.K==a.C.D.1D},3p:6(){l 5.K==a.C.D.1B},3r:6(){l 5.K==a.C.D.23},3s:6(){l 5.K==a.C.D.24}})}(o),o.v.14.1o({3t:6(){m a=3v.3w.1z(),b=6(b){l b.28(a)},c={p:{},X:{}};c.p.2o=3y.3z=="3A",c.p.3B=/^3C/i.28(1h.3D.3E),c.p.2f=b(/3F/),c.p.2b=b(/\\3G\\b/),c.p.2j=b(/3H/),c.p.1i=!c.p.2b&&b(/3J/),c.p.3K=c.p.1i&&b(/3L\\/4/),c.p.3N=c.p.1i&&b(/2d\\/3/),c.p.3O=c.p.1i&&b(/2d\\/4/),c.p.18=!c.p.2f&&b(/1H/),c.p.2h=c.p.18&&b(/1H 7/),c.p.2i=c.p.18&&b(/1H 8/),c.p.3V=c.p.18&&!c.p.2h&&!c.p.2i,c.p.1K=!c.p.2j&&b(/3X/),c.p.3Z=c.p.1K&&b(/2m:1\\.8/),c.p.42=c.p.1K&&b(/2m:1\\.9/),c.p.48=c.p.18&&!c.p.2o,c.X.4g=b(/4j|4l/),c.X.4n=b(/4o|4p X x/),c.X.4v=b(/4w/),c.X.4B=b(/4C/);l c}()},!0),6(a){m b={19:6(a){5.J=5.J||{},5.J[a]=5.J[a]||[]},1j:6(b,c,d,e){n(a.R(b)==="12"&&b.q>0)n(b.F(" ")==-1){c=c||u;m f={I:c,G:d||5,B:e||u};5.2u(b,f.I,f.G,f.B)||(5.19(b),5.J[b].N(f))}V{m g=b.1p(" ");w(m h=0;h<g.q;h++)5.1j.y(5,g[h],c,d,e)}V{m i=b;w(m j O i)n(j!="G"&&j!="B"){m k=i[j];5.1j(j,k.I||k,k.G||i.G,{B:k.B||i.B})}}l 5},1d:6(b,c,d){n(a.R(b)==="12"&&b.q>0)n(b.F(" ")==-1){5.19(b);n(r.q==1)5.J[b].1P();V{d=d||{};m e=5.1J(b,c,d.G||5,d.B||u);e!==u&&5.J[b].1Q(e)}}V{m f=b.1p(" ");w(m g=0;g<f.q;g++)5.1d.y(5,f[g],c,d)}V{m h=b;w(m i O h)n(i!="G"&&i!="B"){m j=h[i];5.1d(i,j.I||j,j.G||h.G,{B:j.B||h.B})}}l 5},2u:6(a,b,c,d){l 5.1J(a,b,c,d)!==u},1J:6(a,b,c,d){5.19(a);m e=5.J[a];w(m f=0;f<e.q;f++){m g=e[f];n(g.I==b&&g.G==c&&g.B==d)l g}l u},1W:6(b){5.19(b);m c=[],d=a.2s(r).S(1),e={2K:b,2L:5,1U:u};d.2N(e);w(m f=0;f<5.J[b].q;++f){m g=5.J[b][f];e.1U=g.B;m h=g.I.H(g.G,d)||u;n(h==a.v.$15)l!1;c.N(h)}l c}};b.4c=b.1j,b.2Z=b.1d,b.32=b.1W,a.v.1l.3e=b}(o),6(a){a.v=a.v||{},a.v.3R=6(){m a={},b={1G:6(){l 5.10().1f},10:6(){l 5.Y},21:6(){l 5.10().1y},1u:6(a){m b=5.10();l a?b.1A:b.1r},3i:6(){l 5.10().T},3M:6(a){l P a=="12"?5.29(a):5.1Z(a)},29:6(a){n(5.1u(!0)==a)l!0;m b=5.1G();1q(b){n(b.1A==a)l!0;b=b.1f}l!1},1Z:6(a){n(5.21()==a)l!0;m b=5.1G();1q(b){n(b.1y==a)l!0;b=b.1f}l!1}},c={2w:6(d,e,f){r.q==1?(f=d,e=u,d="1g"):r.q==2&&(P d=="6"?(f=e,e=d,d="1g"):P d=="12"&&(f=e,e=u));m g=6(){r[0]!=a&&5.25.H(5,r)};g.t.25=6(){},P e=="6"&&(g.t=1k e(a),g.t.3u=e.t),g.t.Y={1y:g,1f:g.t.Y||u,1A:d,1r:6(){m a=d.U(".");l a==-1?d:d.1C(a+1)}(),T:6(){m a=d.U(".");l a==-1?"":d.1C(0,a)}()};m h=[];g.t.1u||h.N(b),f&&f.W&&(f.W.1E?h=h.3I(f.W.1E()):h.N(f.W),17 f.W),f&&c.1I(g.t,f);w(m i=0;1c=h[i];i++)c.1c(g.t,1c);n(g.t.Y.T.q>0){m j=c.T(g.t.Y.T);j[g.t.Y.1r]=g}l g},1c:6(a,b,c){c=c||!1;n(P b!="1R"&&b!==u)w(m d O b)n(c||!a[d]&&P b[d]=="6")a[d]=b[d];l a},1I:6(a,b,d){n(r.q==3){m e=a[d],f=b[d],g=f;f=6(){m a=5.1b;5.1b=e;m b=g.H(5,r);a?5.1b=a:17 5.1b;l b},f.4a=6(){l g},f.4f=6(){l g+""},a[d]=f}V w(m h O b)a[h]&&P b[h]=="6"?c.1I(a,b,h):a[h]=b[h];l a},4y:6(){m b=r;n(b.q==2&&b[0].1M){m d=b[0].1M(a);d&&(b[0]=d)}l 6(b){m d=!1,e=c.2w.H(b.4D,b);l{1M:6(){n(r[0]==a)l e;n(d)l d;l d=1k e}}}(b)},T:6(a){a=a||"";m b=a.1p("."),c=b[0],d=1h[c]=1h[c]||{},e=b.S(1);w(m f=0;f<e.q;f++){m g=e[f];d=d[g]=d[g]||{}}l d}};l c}()}(o),o.v.14.1F({2O:6(a,b,c,d){m e=2R;r.q==4?e=E.t.1x.y(r):r.q==3&&o.1V(b)&&o.11(c)?e=E.t.1x.y(r):r.q==2&&P a==="3h"&&o.11(b)&&(e=E.t.1x.y(r));m f=5,g=r;1h.3x(6(){f.26.H(f,g)},e);l 5}},!0),o.v.14.1F({3P:6(a){m b=o(5),c=b.3U(),d=1t.1S(c.2n),e=1t.1S(c.2e),f,g;a===!1?(f=b.1w(),g=b.1s()):(f=b.2g(),g=b.1T());l{2n:d,2e:e,4q:e+f,2D:d+g}},1T:6(a,b){n(!5[0])l u;n(o.11(a)){m c=5.2p(b)-5.1s();l 5.1s(a-c)}l 5.2p.H(5,r)},2g:6(a,b){n(!5[0])l u;n(o.11(a)){m c=5.22(b)-5.1w();l 5.1w(a-c)}l 5.22.H(5,r)},3Q:6(a){n(!5[0])l u;o.4r(a)||(a=[a]);m b=5[0];w(m c=0;c<a.q;c++){m d=a[c];d 3k o&&(d=a[c].43(0));n(o.2c(d,b))l!0}l!1}},!0)',62,292,'|||||this|function|||||||||||||||return|var|if|jQuery|browser|length|arguments||prototype|null|ext|for||call|||args|Event|Keys|Array|indexOf|scope|apply|fn|__listeners|which|each|extend|push|in|typeof|replace|type|slice|namespace|lastIndexOf|else|include|os|__clsMetaData||getClassMetaData|isNumber|string||Extender|break||delete|isIE|__initListeners|Function|superMethod|mixin|removeListener|throw|superClassMetaData|Object|window|isSafari|addListener|new|mixins|identityFn|_each|addUtilityMethods|split|while|className|height|Math|getClassName|BACKSPACE|width|pop|classConstructor|toLowerCase|fullClassName|ESC|substring|RETURN|reverse|addWrapedSetMethods|getSuperClassMetaData|msie|inherit|findListener|isGecko|keys|getInstance|TAB|getTime|clear|remove|undefined|ceil|outerHeight|bindArgs|isFunction|fireListener|isNavKeyPress|Date|__instanceOfByClass||getClassConstructor|jq_original_outerWidth|UP|DOWN|initialize|bind||test|__instanceOfByString|DELETE|isChrome|contains|version|left|isOpera|outerWidth|isIE7|isIE8|isWebKit|collect|obj|rv|top|isStrict|jq_original_outerHeight|1_|removeAt|makeArray|map|hasListener|isUndefined|create|forEach|Enumerable|RegExp|emptyFn|escape|String|bottom|charAt|toUpperCase|format|gm|startsWith|endsWith|eventName|source|underscore|unshift|bindLater|negative|ENTER|200|index|LEFT|RIGHT|be|HOME|END|first|un|PAGE_UP|PAGE_DOWN|fire||||||||stopEvent|stopPropagation|isSpecialKey|ctrlKey|Observable|isNaN|min|object|getNamespace|isBackspaceKey|instanceof|select|isDeleteKey|isTabKey|isEnterKey|isEscKey|sum|isUpKey|isDownKey|systemInfo|superClass|navigator|userAgent|setTimeout|document|compatMode|CSS1Compat|isSecure|https|location|protocol|opera|bchrome|webkit|concat|safari|isSafari2|applewebkit|instanceOf|isSafari3|isSafari4|region|containedIn|Class|try|invoke|offset|isIE6|preventDefault|gecko|isDate|isGecko2||INSERT|isGecko3|get||||jq_original_|isBorderBox|isBoolean|valueOf|boolean|on|number|date|toString|isWindows|catch|findIndex|windows|_|win32|property|isMac|macintosh|mac|right|isArray|trim|clone|last|isAir|adobeair|cant|singleton|hasOwnProperty|capitalize|isLinux|linux|callee|getElapsed|abs|isString|max'.split('|'),0,{}))
+
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(6(a){a.v={$12:{}},a.v.1k={},a.v.Y={1B:6(a,b){w(m c N a)b&&o.G[c]&&(o.G["4i"+c]=o.G[c]),o.G[c]=a[c]},1u:6(a){w(m b N a)o[b]=a[b]}}})(o),6(a){m b={1L:6(){m a=[];w(m b N 28)28.43(b)&&a.K(b);l a}};1c.1L&&1m b.1L,a.P(1c,b)}(o),o.v.Y.1u({4w:6(a){l o.O(a)==="3X"},11:6(a){l o.O(a)==="4a"},3O:6(a){l o.O(a)==="3Y"},4x:6(a){l o.O(a)==="X"},2p:6(a){l o.O(a)==="2g"}}),6(a){m b={I:6(b,c){m d=0;4e{5.3K(6(a){b.C(c,a,d++)})}3u(e){n(e!=a.v.$12)1o e}l 5},2t:6(a,b){m c=[];5.I(6(d,e){c.K(a.C(b,d,e))});l c},4j:6(b,c){m d=-1;5.I(6(e,f){n(b.C(c,e,f)){d=f;1o a.v.$12}});l d},S:6(b){n(a.1R(5.Q))l 5.Q(b)!=-1;m c=!1;5.I(6(d){n(d==b){c=!0;1o a.v.$12}});l c},3a:6(b){m c=a.2s(q).1i(1);l 5.2n(6(a){l a[b].J(a,c)})},3c:6(a,b){a=a||15.17;m c;5.I(6(d,e){d=a.C(b,d,e);n(c==u||d>=c)c=d});l c},4m:6(a,b){a=a||15.17;m c;5.I(6(d,e){d=a.C(b,d,e);n(c==u||d<c)c=d});l c},4n:6(a){m b=[];5.I(6(c){b.K(c[a])});l b},32:6(a,b){m c=[];5.I(6(d,e){a.C(b,d,e)&&c.K(d)});l c},2V:6(a,b){a=a||15.17;m c=0;5.I(6(d,e){d=a.C(b,d,e),c+=d});l c}};b.2n=b.2t,a.v.1k.4r=b}(o),o.P(1P.t,{4u:6(a){l 1H.4v((a||1e 1P).1M()-5.1M())}}),6(a){a.P(15,{2u:6(){},17:6(a){l a}}),a.P(15.t,{23:6(b){n(q.r<2&&a.2p(q[0]))l 5;m c=5,d=u;q.r>1&&(d=1b.t.1i.C(q,1));l 6(){m a=q;n(d){a=d;n(q.r>0){m e=a.r,f=q.r;1x(f--)a[e+f]=q[f]}}l c.J(b,a)}}})}(o),o.P(2q,{2x:6(a){l a.M(/([-.*+?^${}()|[\\]\\/\\\\])/g,"\\\\$1")}}),o.P(2y.t,{2H:6(){l 5.2A(0).2B()+5.1y(1).1v()},2C:6(){m a=5;w(m b=0;b<q.r;b++){m c=1e 2q("\\\\{"+b+"\\\\}","2D");a=a.M(c,q[b])}l a},2E:6(a){l 5.1n(a,0)===0},2b:6(a){l 5.Q(a)!=-1},2F:6(a){m b=5.r-a.r;l b>=0&&5.Q(a,b)===b},4s:6(){l 5.M(/^\\s*/,"").M(/\\s*$/,"")},2J:6(){l 5.M(/::/g,"/").M(/([A-Z]+)([A-Z][a-z])/g,"$1N$2").M(/([a-z\\d])([A-Z])/g,"$1N$2").M(/-/g,"2M").1v()}}),6(a){a.B.D={1E:8,1C:9,1q:13,2N:13,1A:27,2P:37,1Z:38,2Q:39,21:40,1V:46,2R:36,2S:35,2T:33,2U:34,41:45},a.P(a.B.t,{2X:6(){5.3W(),5.2Y()},2Z:6(){m b=5.H;l 5.30||5.1T()||b==a.B.D.1E||b>=16&&b<=20||b>=44&&b<=46},1T:6(){m b=5.H;l b>=33&&b<=40||b==a.B.D.1q||b==a.B.D.1C||b==a.B.D.1A},3e:6(){l 5.H==a.B.D.1E},3g:6(){l 5.H==a.B.D.1V},3h:6(){l 5.H==a.B.D.1C},3i:6(){l 5.H==a.B.D.1q},3j:6(){l 5.H==a.B.D.1A},3k:6(){l 5.H==a.B.D.1Z},3l:6(){l 5.H==a.B.D.21}})}(o),o.v.Y.1u({3t:6(){m a=3n.3o.1v(),b=6(b){l b.24(a)},c={p:{},R:{}};c.p.2l=3q.3r=="3s",c.p.3v=/^3w/i.24(1f.3x.3y),c.p.2a=b(/3z/),c.p.25=b(/\\3A\\b/),c.p.2e=b(/3B/),c.p.1a=!c.p.25&&b(/3D/),c.p.3E=c.p.1a&&b(/3F\\/4/),c.p.3G=c.p.1a&&b(/29\\/3/),c.p.3H=c.p.1a&&b(/29\\/4/),c.p.10=!c.p.2a&&b(/1G/),c.p.2c=c.p.10&&b(/1G 7/),c.p.2d=c.p.10&&b(/1G 8/),c.p.3M=c.p.10&&!c.p.2c&&!c.p.2d,c.p.1I=!c.p.2e&&b(/3N/),c.p.3P=c.p.1I&&b(/2h:1\\.8/),c.p.3S=c.p.1I&&b(/2h:1\\.9/),c.p.3U=c.p.10&&!c.p.2l,c.R.42=b(/47|49/),c.R.4b=b(/4d|4f R x/),c.R.4k=b(/4l/),c.R.4p=b(/4q/);l c}()},!0),6(a){m b={14:6(a){5.F=5.F||{},5.F[a]=5.F[a]||[]},18:6(b,c,d,e){n(a.O(b)==="X"&&b.r>0)n(b.Q(" ")==-1){c=c||u;m f={G:c,E:d||5,y:e||u};5.1Q(b,f.G,f.E,f.y)||(5.14(b),5.F[b].K(f))}V{m g=b.1K(" ");w(m h=0;h<g.r;h++)5.18.C(5,g[h],c,d,e)}V{m i=b;w(m j N i)n(j!="E"&&j!="y"){m k=i[j];5.18(j,k.G||k,k.E||i.E,{y:k.y||i.y})}}l 5},1h:6(b,c,d){n(a.O(b)==="X"&&b.r>0)n(b.Q(" ")==-1){5.14(b);n(q.r==1)5.F[b].2v();V{d=d||{};m e=5.1J(b,c,d.E||5,d.y||u);e!==u&&5.F[b].2w(e)}}V{m f=b.1K(" ");w(m g=0;g<f.r;g++)5.1h.C(5,f[g],c,d)}V{m h=b;w(m i N h)n(i!="E"&&i!="y"){m j=h[i];5.1h(i,j.G||j,j.E||h.E,{y:j.y||h.y})}}l 5},1Q:6(a,b,c,d){l 5.1J(a,b,c,d)!==u},1J:6(a,b,c,d){5.14(a);m e=5.F[a];w(m f=0;f<e.r;f++){m g=e[f];n(g.G==b&&g.E==c&&g.y==d)l g}l u},1S:6(b){5.14(b);m c=[],d=a.2s(q).1i(1),e={2G:b,2I:5,1O:u};d.2K(e);w(m f=0;f<5.F[b].r;++f){m g=5.F[b][f];e.1O=g.y;m h=g.G.J(g.E,d)||u;n(h==a.v.$12)l!1;c.K(h)}l c}};b.4c=b.18,b.48=b.1h,b.2W=b.1S,a.v.1k.31=b}(o),6(a){a.v=a.v||{},a.v.3R=6(){m a={},b={1z:6(){l 5.W().19},W:6(){l 5.U},1X:6(){l 5.W().1j},1t:6(a){m b=5.W();l a?b.1w:b.1p},3b:6(){l 5.W().T},3d:6(a){l L a=="X"?5.1U(a):5.1W(a)},1U:6(a){n(5.1t(!0)==a)l!0;m b=5.1z();1x(b){n(b.1w==a)l!0;b=b.19}l!1},1W:6(a){n(5.1X()==a)l!0;m b=5.1z();1x(b){n(b.1j==a)l!0;b=b.19}l!1}},c={2r:6(d,e,f){q.r==1?(f=d,e=u,d="1c"):q.r==2&&(L d=="6"?(f=e,e=d,d="1c"):L d=="X"&&(f=e,e=u));m g=6(){q[0]!=a&&5.22.J(5,q)};g.t.22=6(){},L e=="6"&&(g.t=1e e(a),g.t.3m=e.t),g.t.U={1j:g,19:g.t.U||u,1w:d,1p:6(){m a=d.1n(".");l a==-1?d:d.1y(a+1)}(),T:6(){m a=d.1n(".");l a==-1?"":d.1y(0,a)}()};m h=[];g.t.1t||h.K(b),f&&f.S&&(f.S.26?h=h.3C(f.S.26()):h.K(f.S),1m f.S),f&&c.1D(g.t,f);w(m i=0;1d=h[i];i++)c.1d(g.t,1d);n(g.t.U.T.r>0){m j=c.T(g.t.U.T);j[g.t.U.1p]=g}l g},1d:6(a,b,c){c=c||!1;n(L b!="2g"&&b!==u)w(m d N b)n(c||!a[d]&&L b[d]=="6")a[d]=b[d];l a},1D:6(a,b,d){n(q.r==3){m e=a[d],f=b[d],g=f;f=6(){m a=5.1g;5.1g=e;m b=g.J(5,q);a?5.1g=a:1m 5.1g;l b},f.3V=6(){l g},f.3Z=6(){l g+""},a[d]=f}V w(m h N b)a[h]&&L b[h]=="6"?c.1D(a,b,h):a[h]=b[h];l a},4o:6(){m b=q;n(b.r==2&&b[0].1F){m d=b[0].1F(a);d&&(b[0]=d)}l 6(b){m d=!1,e=c.2r.J(b.4t,b);l{1F:6(){n(q[0]==a)l e;n(d)l d;l d=1e e}}}(b)},T:6(a){a=a||"";m b=a.1K("."),c=b[0],d=1f[c]=1f[c]||{},e=b.1i(1);w(m f=0;f<e.r;f++){m g=e[f];d=d[g]=d[g]||{}}l d}};l c}()}(o),o.v.Y.1B({2L:6(a,b,c,d){m e=2O;q.r==4?e=1b.t.1r.C(q):q.r==3&&o.1R(b)&&o.11(c)?e=1b.t.1r.C(q):q.r==2&&L a==="3Q"&&o.11(b)&&(e=1b.t.1r.C(q));m f=5,g=q;1f.3p(6(){f.23.J(f,g)},e);l 5}},!0),o.v.Y.1B({3I:6(a){m b=o(5),c=b.3L(),d=1H.2f(c.2i),e=1H.2f(c.2m),f,g;a===!1?(f=b.1s(),g=b.1l()):(f=b.2k(),g=b.2j());l{2i:d,2m:e,4g:e+f,2z:d+g}},2j:6(a,b){n(!5[0])l u;n(o.11(a)){m c=5.2o(b)-5.1l();l 5.1l(a-c)}l 5.2o.J(5,q)},2k:6(a,b){n(!5[0])l u;n(o.11(a)){m c=5.1Y(b)-5.1s();l 5.1s(a-c)}l 5.1Y.J(5,q)},3J:6(a){n(!5[0])l u;o.4h(a)||(a=[a]);m b=5[0];w(m c=0;c<a.r;c++){m d=a[c];d 3f o&&(d=a[c].3T(0));n(o.2b(d,b))l!0}l!1}},!0)',62,282,'|||||this|function|||||||||||||||return|var|if|jQuery|browser|arguments|length||prototype|null|ext|for||args|||Event|call|Keys|scope|__listeners|fn|which|each|apply|push|typeof|replace|in|type|extend|indexOf|os|include|namespace|__clsMetaData|else|getClassMetaData|string|Extender||isIE|isNumber|break||__initListeners|Function||identityFn|addListener|superClassMetaData|isSafari|Array|Object|mixin|new|window|superMethod|removeListener|slice|classConstructor|mixins|height|delete|lastIndexOf|throw|className|RETURN|pop|width|getClassName|addUtilityMethods|toLowerCase|fullClassName|while|substring|getSuperClassMetaData|ESC|addWrapedSetMethods|TAB|inherit|BACKSPACE|getInstance|msie|Math|isGecko|findListener|split|keys|getTime|1_|bindArgs|Date|hasListener|isFunction|fireListener|isNavKeyPress|__instanceOfByString|DELETE|__instanceOfByClass|getClassConstructor|jq_original_outerWidth|UP||DOWN|initialize|bind|test|isChrome|reverse||obj|version|isOpera|contains|isIE7|isIE8|isWebKit|ceil|undefined|rv|top|outerHeight|outerWidth|isStrict|left|map|jq_original_outerHeight|isUndefined|RegExp|create|makeArray|collect|emptyFn|clear|remove|escape|String|bottom|charAt|toUpperCase|format|gm|startsWith|endsWith|eventName|capitalize|source|underscore|unshift|bindLater|_|ENTER|200|LEFT|RIGHT|HOME|END|PAGE_UP|PAGE_DOWN|sum|fire|stopEvent|stopPropagation|isSpecialKey|ctrlKey|Observable|select||||||||invoke|getNamespace|max|instanceOf|isBackspaceKey|instanceof|isDeleteKey|isTabKey|isEnterKey|isEscKey|isUpKey|isDownKey|superClass|navigator|userAgent|setTimeout|document|compatMode|CSS1Compat|systemInfo|catch|isSecure|https|location|protocol|opera|bchrome|webkit|concat|safari|isSafari2|applewebkit|isSafari3|isSafari4|region|containedIn|_each|offset|isIE6|gecko|isDate|isGecko2|object|Class|isGecko3|get|isBorderBox|valueOf|preventDefault|boolean|date|toString||INSERT|isWindows|hasOwnProperty||||windows|un|win32|number|isMac|on|macintosh|try|mac|right|isArray|jq_original_|findIndex|isAir|adobeair|min|property|singleton|isLinux|linux|Enumerable|trim|callee|getElapsed|abs|isBoolean|isString'.split('|'),0,{}))
View
0 dist/docs/closed.gif → docs/closed.gif
File renamed without changes
View
0 dist/docs/closedLarge.gif → docs/closedLarge.gif
File renamed without changes
View
0 dist/docs/index.html → docs/index.html
File renamed without changes.
View
0 dist/docs/jgdoc.css → docs/jgdoc.css
File renamed without changes.
View
0 dist/docs/jgdoc.js → docs/jgdoc.js
File renamed without changes.
View
0 dist/docs/jgindex.css → docs/jgindex.css
File renamed without changes.
View
18 dist/docs/jsindex.js → docs/jsindex.js
@@ -614,6 +614,15 @@
elementType : "function"
} ,
{
+ localName : "append",
+ fullName : "Array.append",
+ summary : "public function Array append(... -)",
+ ref : "logical/Array.html#___append",
+ parent : "Array",
+ type : "function",
+ elementType : "function"
+ } ,
+ {
localName : "clear",
fullName : "Array.clear",
summary : "public function Array clear()",
@@ -668,6 +677,15 @@
elementType : "function"
} ,
{
+ localName : "prepend",
+ fullName : "Array.prepend",
+ summary : "public function Array prepend(... -)",
+ ref : "logical/Array.html#___prepend",
+ parent : "Array",
+ type : "function",
+ elementType : "function"
+ } ,
+ {
localName : "remove",
fullName : "Array.remove",
summary : "public function Array remove(? item)",
View
0 dist/docs/logical/$().html → docs/logical/$().html
File renamed without changes.
View
0 dist/docs/logical/$.html → docs/logical/$.html
File renamed without changes.
View
0 dist/docs/logical/$/Event.html → docs/logical/$/Event.html
File renamed without changes.
View
0 dist/docs/logical/$/Event/Keys.html → docs/logical/$/Event/Keys.html
File renamed without changes.
View
0 dist/docs/logical/$/ext.html → docs/logical/$/ext.html
File renamed without changes.
View
0 dist/docs/logical/$/ext/Class.html → docs/logical/$/ext/Class.html
File renamed without changes.
View
0 dist/docs/logical/$/ext/Extender.html → docs/logical/$/ext/Extender.html
File renamed without changes.
View
0 dist/docs/logical/$/ext/mixins.html → docs/logical/$/ext/mixins.html
File renamed without changes.
View
0 ...docs/logical/$/ext/mixins/Enumerable.html → docs/logical/$/ext/mixins/Enumerable.html
File renamed without changes.
View
0 ...docs/logical/$/ext/mixins/Observable.html → docs/logical/$/ext/mixins/Observable.html
File renamed without changes.
View
120 dist/docs/logical/Array.html → docs/logical/Array.html
@@ -100,6 +100,17 @@ <h1 class="projectName">
This method is required for mixin in the enumerable module. Uses javascript 1.6 native implementation if present. </div>
</div>
<div class="summaryItem">
+ <div class="summaryItemDef">
+ <span class="modifiers">public</span>
+ <span class="type"><a href="logical/Array.html">Array</a></span>
+ <a href="logical/Array.html#___append"><span class="elementName">append</span></a>
+ (<span class="type">...</span>
+ -)
+ </div>
+ <div class="summaryItemDesc">
+ Add items to the end of this array and returns the array (for chaining) </div>
+ </div>
+ <div class="summaryItem">
<div class="summaryItemDef">
<span class="modifiers">public</span>
<span class="type"><a href="logical/Array.html">Array</a></span>
@@ -164,6 +175,17 @@ <h1 class="projectName">
<div class="summaryItemDef">
<span class="modifiers">public</span>
<span class="type"><a href="logical/Array.html">Array</a></span>
+ <a href="logical/Array.html#___prepend"><span class="elementName">prepend</span></a>
+ (<span class="type">...</span>
+ -)
+ </div>
+ <div class="summaryItemDesc">
+ Add items to the start of this array and returns the array (for chaining) </div>
+ </div>
+ <div class="summaryItem">
+ <div class="summaryItemDef">
+ <span class="modifiers">public</span>
+ <span class="type"><a href="logical/Array.html">Array</a></span>
<a href="logical/Array.html#___remove"><span class="elementName">remove</span></a>
(<span class="type">?</span>
item)
@@ -225,6 +247,55 @@ <h2 class="sectionHeader">Function Details</h2>
</div>
<hr/>
<h3>
+ <a name="___append">
+ <span class="objType">function</span>
+ <span class="objName">append</span>
+ </a>
+ </h3>
+ <div>
+ <code>
+ <span class="modifiers">public</span>
+ <span class="type"><a href="logical/Array.html">Array</a></span>
+ append(<span class="type">...</span>
+ -)
+ </code>
+ </div>
+ <div class="comment">
+ Add items to the end of this array and returns the array (for chaining)
+
+ <h6>Examples:</h6>
+ <pre>
+ [1, 3, 4].append(10, 20, 30)
+ // -> [1, 3, 4, 10, 20 ,30]
+
+ a = ['hello', 'world']
+ a.append('!', '!!!']
+ a
+ // -> ['hello', 'world', '!', '!!!']
+
+ </pre>
+
+ </div>
+ <div class="parameters">
+ <span class="descSection">Parameters:</span><br/>
+ <div>
+ <div class="paramset"></div>
+ <div>
+ <div class="param paddedDetails">
+ <code>
+ - </code>
+ variable list of items to append to the end of array </div>
+ </div>
+ </div>
+ </div>
+ <div class="returns">
+ <span class="descSection">Returns:</span><br/>
+ <div class="paddedDetails">
+ this array instance modified to include passed items. Note that no new array instance is created
+ </div>
+ </div>
+ <hr/>
+ <h3>
<a name="___clear">
<span class="objType">function</span>
<span class="objName">clear</span>
@@ -413,6 +484,55 @@ <h2 class="sectionHeader">Function Details</h2>
</div>
<hr/>
<h3>
+ <a name="___prepend">
+ <span class="objType">function</span>
+ <span class="objName">prepend</span>
+ </a>
+ </h3>
+ <div>
+ <code>
+ <span class="modifiers">public</span>
+ <span class="type"><a href="logical/Array.html">Array</a></span>
+ prepend(<span class="type">...</span>
+ -)
+ </code>
+ </div>
+ <div class="comment">
+ Add items to the start of this array and returns the array (for chaining)
+
+ <h6>Examples:</h6>
+ <pre>
+ [1, 3, 4].prepend(10, 20, 30)
+ // -> [10, 20 ,30, 1, 3, 4]
+
+ a = ['hello', 'world']
+ a.append('!', '!!!']
+ a
+ // -> ['!', '!!!', 'hello', 'world']
+
+ </pre>
+
+ </div>
+ <div class="parameters">
+ <span class="descSection">Parameters:</span><br/>
+ <div>
+ <div class="paramset"></div>
+ <div>
+ <div class="param paddedDetails">
+ <code>
+ - </code>
+ variable list of items to add to the start of array </div>
+ </div>
+ </div>
+ </div>
+ <div class="returns">
+ <span class="descSection">Returns:</span><br/>
+ <div class="paddedDetails">
+ this array instance modified to include passed items. Note that no new array instance is created
+ </div>
+ </div>
+ <hr/>
+ <h3>
<a name="___remove">
<span class="objType">function</span>
<span class="objName">remove</span>
View
0 dist/docs/logical/Date.html → docs/logical/Date.html
File renamed without changes.
View
0 dist/docs/logical/Function.html → docs/logical/Function.html
File renamed without changes.
View
0 dist/docs/logical/GLOBAL.html → docs/logical/GLOBAL.html
File renamed without changes.
View
0 dist/docs/logical/Object.html → docs/logical/Object.html
File renamed without changes.
View
0 dist/docs/logical/RegExp.html → docs/logical/RegExp.html
File renamed without changes.
View
0 dist/docs/logical/String.html → docs/logical/String.html
File renamed without changes.
View
0 dist/docs/logical/System.html → docs/logical/System.html
File renamed without changes.
View
0 dist/docs/logo.gif → docs/logo.gif
File renamed without changes
View
0 dist/docs/navTree.js → docs/navTree.js
File renamed without changes.
View
0 dist/docs/node.gif → docs/node.gif
File renamed without changes
View
0 dist/docs/open.gif → docs/open.gif
File renamed without changes
View
0 dist/docs/openLarge.gif → docs/openLarge.gif
File renamed without changes
View
0 dist/docs/physical/file-base.js.html → docs/physical/file-base.js.html
File renamed without changes.
View
120 dist/docs/physical/file-core/array.js.html → docs/physical/file-core/array.js.html
@@ -97,6 +97,17 @@ <h1 class="projectName">
This method is required for mixin in the enumerable module. Uses javascript 1.6 native implementation if present. </div>
</div>
<div class="summaryItem">
+ <div class="summaryItemDef">
+ <span class="modifiers">public</span>
+ <span class="type"><a href="logical/Array.html">Array</a></span>
+ <a href="logical/Array.html#___append"><span class="elementName">append</span></a>
+ (<span class="type">...</span>
+ -)
+ </div>
+ <div class="summaryItemDesc">
+ Add items to the end of this array and returns the array (for chaining) </div>
+ </div>
+ <div class="summaryItem">
<div class="summaryItemDef">
<span class="modifiers">public</span>
<span class="type"><a href="logical/Array.html">Array</a></span>
@@ -161,6 +172,17 @@ <h1 class="projectName">
<div class="summaryItemDef">
<span class="modifiers">public</span>
<span class="type"><a href="logical/Array.html">Array</a></span>
+ <a href="logical/Array.html#___prepend"><span class="elementName">prepend</span></a>
+ (<span class="type">...</span>
+ -)
+ </div>
+ <div class="summaryItemDesc">
+ Add items to the start of this array and returns the array (for chaining) </div>
+ </div>
+ <div class="summaryItem">
+ <div class="summaryItemDef">
+ <span class="modifiers">public</span>
+ <span class="type"><a href="logical/Array.html">Array</a></span>
<a href="logical/Array.html#___remove"><span class="elementName">remove</span></a>
(<span class="type">?</span>
item)
@@ -222,6 +244,55 @@ <h2 class="sectionHeader">Function Details</h2>
</div>
<hr/>
<h3>
+ <a name="___append">
+ <span class="objType">function</span>
+ <span class="objName">append</span>
+ </a>
+ </h3>
+ <div>
+ <code>
+ <span class="modifiers">public</span>
+ <span class="type"><a href="logical/Array.html">Array</a></span>
+ append(<span class="type">...</span>
+ -)
+ </code>
+ </div>
+ <div class="comment">
+ Add items to the end of this array and returns the array (for chaining)
+
+ <h6>Examples:</h6>
+ <pre>
+ [1, 3, 4].append(10, 20, 30)
+ // -> [1, 3, 4, 10, 20 ,30]
+
+ a = ['hello', 'world']
+ a.append('!', '!!!']
+ a
+ // -> ['hello', 'world', '!', '!!!']
+
+ </pre>
+
+ </div>
+ <div class="parameters">
+ <span class="descSection">Parameters:</span><br/>
+ <div>
+ <div class="paramset"></div>
+ <div>
+ <div class="param paddedDetails">
+ <code>
+ - </code>
+ variable list of items to append to the end of array </div>
+ </div>
+ </div>
+ </div>
+ <div class="returns">
+ <span class="descSection">Returns:</span><br/>
+ <div class="paddedDetails">
+ this array instance modified to include passed items. Note that no new array instance is created
+ </div>
+ </div>
+ <hr/>
+ <h3>
<a name="___clear">
<span class="objType">function</span>
<span class="objName">clear</span>
@@ -410,6 +481,55 @@ <h2 class="sectionHeader">Function Details</h2>
</div>
<hr/>
<h3>
+ <a name="___prepend">
+ <span class="objType">function</span>
+ <span class="objName">prepend</span>
+ </a>
+ </h3>
+ <div>
+ <code>
+ <span class="modifiers">public</span>
+ <span class="type"><a href="logical/Array.html">Array</a></span>
+ prepend(<span class="type">...</span>
+ -)
+ </code>
+ </div>
+ <div class="comment">
+ Add items to the start of this array and returns the array (for chaining)
+
+ <h6>Examples:</h6>
+ <pre>
+ [1, 3, 4].prepend(10, 20, 30)
+ // -> [10, 20 ,30, 1, 3, 4]
+
+ a = ['hello', 'world']
+ a.append('!', '!!!']
+ a
+ // -> ['!', '!!!', 'hello', 'world']
+
+ </pre>
+
+ </div>
+ <div class="parameters">
+ <span class="descSection">Parameters:</span><br/>
+ <div>
+ <div class="paramset"></div>
+ <div>
+ <div class="param paddedDetails">
+ <code>
+ - </code>
+ variable list of items to add to the start of array </div>
+ </div>
+ </div>
+ </div>
+ <div class="returns">
+ <span class="descSection">Returns:</span><br/>
+ <div class="paddedDetails">
+ this array instance modified to include passed items. Note that no new array instance is created
+ </div>
+ </div>
+ <hr/>
+ <h3>
<a name="___remove">
<span class="objType">function</span>
<span class="objName">remove</span>
View
0 dist/docs/physical/file-core/date.js.html → docs/physical/file-core/date.js.html
File renamed without changes.
View
0 ...ocs/physical/file-core/enumerable.js.html → docs/physical/file-core/enumerable.js.html
File renamed without changes.
View
0 dist/docs/physical/file-core/event.js.html → docs/physical/file-core/event.js.html
File renamed without changes.
View
0 .../docs/physical/file-core/function.js.html → docs/physical/file-core/function.js.html
File renamed without changes.
View
0 dist/docs/physical/file-core/is.js.html → docs/physical/file-core/is.js.html
File renamed without changes.
View
0 dist/docs/physical/file-core/object.js.html → docs/physical/file-core/object.js.html
File renamed without changes.
View
0 dist/docs/physical/file-core/regexp.js.html → docs/physical/file-core/regexp.js.html
File renamed without changes.
View
0 dist/docs/physical/file-core/string.js.html → docs/physical/file-core/string.js.html
File renamed without changes.
View
0 ...ocs/physical/file-oop/inheritance.js.html → docs/physical/file-oop/inheritance.js.html
File renamed without changes.
View
0 ...docs/physical/file-oop/observable.js.html → docs/physical/file-oop/observable.js.html
File renamed without changes.
View
0 .../docs/physical/file-utils/sorting.js.html → docs/physical/file-utils/sorting.js.html
File renamed without changes.
View
0 ...s/physical/file-utils/system-info.js.html → docs/physical/file-utils/system-info.js.html
File renamed without changes.
View
0 ...sical/file-wrapped-set/dimensions.js.html → ...sical/file-wrapped-set/dimensions.js.html
File renamed without changes.
View
0 ...s/physical/file-wrapped-set/event.js.html → docs/physical/file-wrapped-set/event.js.html
File renamed without changes.
View
0 dist/docs/theme.css → docs/theme.css
File renamed without changes.
View
7 license.txt
@@ -1,13 +1,14 @@
/*
-* jqExt - jQuery framework extensions
+* jqExt - jQuery extensions and native javascript extensions
*
-* Version: @VERSION
+* Version: 0.0.1
+* Build: 1
* Copyright 2011 Alex Tkachev
*
* Dual licensed under MIT or GPLv2 licenses
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*
-* Date: @DATE
+* Date: 01/08/2011 15:30:26
*/
View
50 src/core/array.js
@@ -120,6 +120,56 @@
},
/**
+ * <h6>Examples:</h6>
+ * <pre>
+ * [1, 3, 4].append(10, 20, 30)
+ * // -> [1, 3, 4, 10, 20 ,30]
+ *
+ * a = ['hello', 'world']
+ * a.append('!', '!!!']
+ * a
+ * // -> ['hello', 'world', '!', '!!!']
+ *
+ * </pre>
+ *
+ * @function {public Array} ?
+ * Add items to the end of this array and returns the array (for chaining)
+ * @param {...} - variable list of items to append to the end of array
+ * @returns this array instance modified to include passed items. Note that no new array instance is created
+ **/
+ append: function(){
+ for(var i=0; i<arguments.length; i++){
+ this.push(arguments[i]);
+ }
+ return this;
+ },
+
+ /**
+ * <h6>Examples:</h6>
+ * <pre>
+ * [1, 3, 4].prepend(10, 20, 30)
+ * // -> [10, 20 ,30, 1, 3, 4]
+ *
+ * a = ['hello', 'world']
+ * a.append('!', '!!!']
+ * a
+ * // -> ['!', '!!!', 'hello', 'world']
+ *
+ * </pre>
+ *
+ * @function {public Array} ?
+ * Add items to the start of this array and returns the array (for chaining)
+ * @param {...} - variable list of items to add to the start of array
+ * @returns this array instance modified to include passed items. Note that no new array instance is created
+ **/
+ prepend: function(){
+ for(var i=arguments.length-1; i>=0; i--){
+ this.unshift(arguments[i]);
+ }
+ return this;
+ },
+
+ /**
* @function {public void} ?
* This method is required for mixin in the enumerable module. Uses javascript 1.6 native implementation if present.
* @param iterator
View
15 test/unit/core/array-test.js
@@ -99,3 +99,18 @@ test("remove()", function() {
equal(23, arr[2]);
equal(2, arr[arr.length-1]);
});
+
+test("append()", function() {
+ var arr = [1,2,3];
+ ok($.isArray(arr.append(10, 11, 222)));
+ equal(arr.length, 6);
+ equal(arr.last(), 222);
+});
+
+test("prepend()", function() {
+ var arr = [1,2,3];
+ ok($.isArray(arr.prepend(10, 11, 222)));
+ equal(arr.length, 6);
+ equal(arr.first(), 10);
+ equal(arr.last(), 3);
+});
View
1 version.txt
@@ -1 +0,0 @@
-0.0.1a

0 comments on commit 9ec1445

Please sign in to comment.