aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--template-common/lib/jquery.js7041
-rw-r--r--template-common/lib/jquery.packed.js12
-rw-r--r--template-common/lib/ui/effects.blind.js18
-rw-r--r--template-common/lib/ui/effects.bounce.js10
-rw-r--r--template-common/lib/ui/effects.clip.js20
-rw-r--r--template-common/lib/ui/effects.core.js250
-rw-r--r--template-common/lib/ui/effects.drop.js18
-rw-r--r--template-common/lib/ui/effects.explode.js32
-rw-r--r--template-common/lib/ui/effects.fold.js25
-rw-r--r--template-common/lib/ui/effects.highlight.js24
-rw-r--r--template-common/lib/ui/effects.pulsate.js25
-rw-r--r--template-common/lib/ui/effects.scale.js46
-rw-r--r--template-common/lib/ui/effects.shake.js16
-rw-r--r--template-common/lib/ui/effects.slide.js18
-rw-r--r--template-common/lib/ui/effects.transfer.js70
-rw-r--r--template-common/lib/ui/i18n/ui.datepicker-ar.js21
-rw-r--r--template-common/lib/ui/i18n/ui.datepicker-bg.js16
-rw-r--r--template-common/lib/ui/i18n/ui.datepicker-ca.js19
-rw-r--r--template-common/lib/ui/i18n/ui.datepicker-cs.js17
-rw-r--r--template-common/lib/ui/i18n/ui.datepicker-da.js23
-rw-r--r--template-common/lib/ui/i18n/ui.datepicker-de.js17
-rw-r--r--template-common/lib/ui/i18n/ui.datepicker-es.js21
-rw-r--r--template-common/lib/ui/i18n/ui.datepicker-fi.js19
-rw-r--r--template-common/lib/ui/i18n/ui.datepicker-fr.js17
-rw-r--r--template-common/lib/ui/i18n/ui.datepicker-he.js21
-rw-r--r--template-common/lib/ui/i18n/ui.datepicker-hu.js17
-rw-r--r--template-common/lib/ui/i18n/ui.datepicker-hy.js17
-rw-r--r--template-common/lib/ui/i18n/ui.datepicker-id.js17
-rw-r--r--template-common/lib/ui/i18n/ui.datepicker-is.js17
-rw-r--r--template-common/lib/ui/i18n/ui.datepicker-it.js17
-rw-r--r--template-common/lib/ui/i18n/ui.datepicker-ja.js36
-rw-r--r--template-common/lib/ui/i18n/ui.datepicker-ko.js21
-rw-r--r--template-common/lib/ui/i18n/ui.datepicker-lt.js24
-rw-r--r--template-common/lib/ui/i18n/ui.datepicker-lv.js22
-rw-r--r--template-common/lib/ui/i18n/ui.datepicker-nl.js36
-rw-r--r--template-common/lib/ui/i18n/ui.datepicker-no.js26
-rw-r--r--template-common/lib/ui/i18n/ui.datepicker-pl.js17
-rw-r--r--template-common/lib/ui/i18n/ui.datepicker-pt-BR.js17
-rw-r--r--template-common/lib/ui/i18n/ui.datepicker-ro.js38
-rw-r--r--template-common/lib/ui/i18n/ui.datepicker-ru.js17
-rw-r--r--template-common/lib/ui/i18n/ui.datepicker-sk.js17
-rw-r--r--template-common/lib/ui/i18n/ui.datepicker-sv.js23
-rw-r--r--template-common/lib/ui/i18n/ui.datepicker-th.js17
-rw-r--r--template-common/lib/ui/i18n/ui.datepicker-tr.js17
-rw-r--r--template-common/lib/ui/i18n/ui.datepicker-uk.js13
-rw-r--r--template-common/lib/ui/i18n/ui.datepicker-zh-CN.js17
-rw-r--r--template-common/lib/ui/i18n/ui.datepicker-zh-TW.js16
-rw-r--r--template-common/lib/ui/jquery.ui.all.js7584
-rw-r--r--template-common/lib/ui/minified/effects.blind.min.js2
-rw-r--r--template-common/lib/ui/minified/effects.bounce.min.js2
-rw-r--r--template-common/lib/ui/minified/effects.clip.min.js2
-rw-r--r--template-common/lib/ui/minified/effects.core.min.js1
-rw-r--r--template-common/lib/ui/minified/effects.drop.min.js2
-rw-r--r--template-common/lib/ui/minified/effects.explode.min.js2
-rw-r--r--template-common/lib/ui/minified/effects.fold.min.js2
-rw-r--r--template-common/lib/ui/minified/effects.highlight.min.js2
-rw-r--r--template-common/lib/ui/minified/effects.pulsate.min.js2
-rw-r--r--template-common/lib/ui/minified/effects.scale.min.js2
-rw-r--r--template-common/lib/ui/minified/effects.shake.min.js2
-rw-r--r--template-common/lib/ui/minified/effects.slide.min.js2
-rw-r--r--template-common/lib/ui/minified/effects.transfer.min.js2
-rw-r--r--template-common/lib/ui/minified/ui.accordion.min.js2
-rw-r--r--template-common/lib/ui/minified/ui.core.min.js1
-rw-r--r--template-common/lib/ui/minified/ui.datepicker.min.js2
-rw-r--r--template-common/lib/ui/minified/ui.dialog.min.js2
-rw-r--r--template-common/lib/ui/minified/ui.draggable.min.js2
-rw-r--r--template-common/lib/ui/minified/ui.droppable.min.js2
-rw-r--r--template-common/lib/ui/minified/ui.resizable.min.js2
-rw-r--r--template-common/lib/ui/minified/ui.selectable.min.js2
-rw-r--r--template-common/lib/ui/minified/ui.slider.min.js2
-rw-r--r--template-common/lib/ui/minified/ui.sortable.min.js2
-rw-r--r--template-common/lib/ui/minified/ui.tabs.min.js2
-rw-r--r--template-common/lib/ui/packed/effects.blind.packed.js3
-rw-r--r--template-common/lib/ui/packed/effects.bounce.packed.js3
-rw-r--r--template-common/lib/ui/packed/effects.clip.packed.js3
-rw-r--r--template-common/lib/ui/packed/effects.core.packed.js1
-rw-r--r--template-common/lib/ui/packed/effects.drop.packed.js3
-rw-r--r--template-common/lib/ui/packed/effects.explode.packed.js3
-rw-r--r--template-common/lib/ui/packed/effects.fold.packed.js3
-rw-r--r--template-common/lib/ui/packed/effects.highlight.packed.js3
-rw-r--r--template-common/lib/ui/packed/effects.pulsate.packed.js3
-rw-r--r--template-common/lib/ui/packed/effects.scale.packed.js3
-rw-r--r--template-common/lib/ui/packed/effects.shake.packed.js3
-rw-r--r--template-common/lib/ui/packed/effects.slide.packed.js3
-rw-r--r--template-common/lib/ui/packed/effects.transfer.packed.js3
-rw-r--r--template-common/lib/ui/packed/ui.accordion.packed.js3
-rw-r--r--template-common/lib/ui/packed/ui.core.packed.js3
-rw-r--r--template-common/lib/ui/packed/ui.datepicker.packed.js3
-rw-r--r--template-common/lib/ui/packed/ui.dialog.packed.js3
-rw-r--r--template-common/lib/ui/packed/ui.draggable.packed.js3
-rw-r--r--template-common/lib/ui/packed/ui.droppable.packed.js3
-rw-r--r--template-common/lib/ui/packed/ui.resizable.packed.js3
-rw-r--r--template-common/lib/ui/packed/ui.selectable.packed.js3
-rw-r--r--template-common/lib/ui/packed/ui.slider.packed.js3
-rw-r--r--template-common/lib/ui/packed/ui.sortable.packed.js3
-rw-r--r--template-common/lib/ui/packed/ui.tabs.packed.js3
-rw-r--r--template-common/lib/ui/theme/ui.datepicker.css250
-rw-r--r--template-common/lib/ui/ui.accordion.js590
-rw-r--r--template-common/lib/ui/ui.core.js498
-rw-r--r--template-common/lib/ui/ui.datepicker.js873
-rw-r--r--template-common/lib/ui/ui.dialog.js754
-rw-r--r--template-common/lib/ui/ui.draggable.js1026
-rw-r--r--template-common/lib/ui/ui.droppable.js283
-rw-r--r--template-common/lib/ui/ui.resizable.js1098
-rw-r--r--template-common/lib/ui/ui.selectable.js165
-rw-r--r--template-common/lib/ui/ui.slider.js852
-rw-r--r--template-common/lib/ui/ui.sortable.js1318
-rw-r--r--template-common/lib/ui/ui.tabs.js864
108 files changed, 10441 insertions, 14105 deletions
diff --git a/template-common/lib/jquery.js b/template-common/lib/jquery.js
index 159bd53d7..109701084 100644
--- a/template-common/lib/jquery.js
+++ b/template-common/lib/jquery.js
@@ -1,120 +1,222 @@
-(function(){
-/*
- * jQuery 1.2.6 - New Wave Javascript
+/*!
+ * jQuery JavaScript Library v1.4.1
+ * http://jquery.com/
+ *
+ * Copyright 2010, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
*
- * Copyright (c) 2008 John Resig (jquery.com)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2010, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
*
- * $Date: 2008-08-28T01:26:26.034575Z $
- * $Rev: 6329 $
+ * Date: Mon Jan 25 19:43:33 2010 -0500
*/
+(function( window, undefined ) {
-// Map over jQuery in case of overwrite
-var _jQuery = window.jQuery,
-// Map over the $ in case of overwrite
- _$ = window.$;
+// Define a local copy of jQuery
+var jQuery = function( selector, context ) {
+ // The jQuery object is actually just the init constructor 'enhanced'
+ return new jQuery.fn.init( selector, context );
+ },
-var jQuery = window.jQuery = window.$ = function( selector, context ) {
- // The jQuery object is actually just the init constructor 'enhanced'
- return new jQuery.fn.init( selector, context );
-};
+ // Map over jQuery in case of overwrite
+ _jQuery = window.jQuery,
+
+ // Map over the $ in case of overwrite
+ _$ = window.$,
+
+ // Use the correct document accordingly with window argument (sandbox)
+ document = window.document,
+
+ // A central reference to the root jQuery(document)
+ rootjQuery,
+
+ // A simple way to check for HTML strings or ID strings
+ // (both of which we optimize for)
+ quickExpr = /^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,
+
+ // Is it a simple selector
+ isSimple = /^.[^:#\[\.,]*$/,
-// A simple way to check for HTML strings or ID strings
-// (both of which we optimize for)
-var quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/,
+ // Check if a string has a non-whitespace character in it
+ rnotwhite = /\S/,
-// Is it a simple selector
- isSimple = /^.[^:#\[\.]*$/,
+ // Used for trimming whitespace
+ rtrim = /^(\s|\u00A0)+|(\s|\u00A0)+$/g,
-// Will speed up references to undefined, and allows munging its name.
- undefined;
+ // Match a standalone tag
+ rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
+
+ // Keep a UserAgent string for use with jQuery.browser
+ userAgent = navigator.userAgent,
+
+ // For matching the engine and version of the browser
+ browserMatch,
+
+ // Has the ready events already been bound?
+ readyBound = false,
+
+ // The functions to execute on DOM ready
+ readyList = [],
+
+ // The ready event handler
+ DOMContentLoaded,
+
+ // Save a reference to some core methods
+ toString = Object.prototype.toString,
+ hasOwnProperty = Object.prototype.hasOwnProperty,
+ push = Array.prototype.push,
+ slice = Array.prototype.slice,
+ indexOf = Array.prototype.indexOf;
jQuery.fn = jQuery.prototype = {
init: function( selector, context ) {
- // Make sure that a selection was provided
- selector = selector || document;
+ var match, elem, ret, doc;
+
+ // Handle $(""), $(null), or $(undefined)
+ if ( !selector ) {
+ return this;
+ }
// Handle $(DOMElement)
if ( selector.nodeType ) {
- this[0] = selector;
+ this.context = this[0] = selector;
this.length = 1;
return this;
}
+
// Handle HTML strings
- if ( typeof selector == "string" ) {
+ if ( typeof selector === "string" ) {
// Are we dealing with HTML string or an ID?
- var match = quickExpr.exec( selector );
+ match = quickExpr.exec( selector );
// Verify a match, and that no context was specified for #id
if ( match && (match[1] || !context) ) {
// HANDLE: $(html) -> $(array)
- if ( match[1] )
- selector = jQuery.clean( [ match[1] ], context );
+ if ( match[1] ) {
+ doc = (context ? context.ownerDocument || context : document);
+
+ // If a single string is passed in and it's a single tag
+ // just do a createElement and skip the rest
+ ret = rsingleTag.exec( selector );
+
+ if ( ret ) {
+ if ( jQuery.isPlainObject( context ) ) {
+ selector = [ document.createElement( ret[1] ) ];
+ jQuery.fn.attr.call( selector, context, true );
+
+ } else {
+ selector = [ doc.createElement( ret[1] ) ];
+ }
+
+ } else {
+ ret = buildFragment( [ match[1] ], [ doc ] );
+ selector = (ret.cacheable ? ret.fragment.cloneNode(true) : ret.fragment).childNodes;
+ }
// HANDLE: $("#id")
- else {
- var elem = document.getElementById( match[3] );
+ } else {
+ elem = document.getElementById( match[2] );
- // Make sure an element was located
- if ( elem ){
+ if ( elem ) {
// Handle the case where IE and Opera return items
// by name instead of ID
- if ( elem.id != match[3] )
- return jQuery().find( selector );
+ if ( elem.id !== match[2] ) {
+ return rootjQuery.find( selector );
+ }
// Otherwise, we inject the element directly into the jQuery object
- return jQuery( elem );
+ this.length = 1;
+ this[0] = elem;
}
- selector = [];
+
+ this.context = document;
+ this.selector = selector;
+ return this;
}
- // HANDLE: $(expr, [context])
- // (which is just equivalent to: $(content).find(expr)
- } else
+ // HANDLE: $("TAG")
+ } else if ( !context && /^\w+$/.test( selector ) ) {
+ this.selector = selector;
+ this.context = document;
+ selector = document.getElementsByTagName( selector );
+
+ // HANDLE: $(expr, $(...))
+ } else if ( !context || context.jquery ) {
+ return (context || rootjQuery).find( selector );
+
+ // HANDLE: $(expr, context)
+ // (which is just equivalent to: $(context).find(expr)
+ } else {
return jQuery( context ).find( selector );
+ }
// HANDLE: $(function)
// Shortcut for document ready
- } else if ( jQuery.isFunction( selector ) )
- return jQuery( document )[ jQuery.fn.ready ? "ready" : "load" ]( selector );
+ } else if ( jQuery.isFunction( selector ) ) {
+ return rootjQuery.ready( selector );
+ }
- return this.setArray(jQuery.makeArray(selector));
+ if (selector.selector !== undefined) {
+ this.selector = selector.selector;
+ this.context = selector.context;
+ }
+
+ return jQuery.isArray( selector ) ?
+ this.setArray( selector ) :
+ jQuery.makeArray( selector, this );
},
+ // Start with an empty selector
+ selector: "",
+
// The current version of jQuery being used
- jquery: "1.2.6",
+ jquery: "1.4.1",
+
+ // The default length of a jQuery object is 0
+ length: 0,
// The number of elements contained in the matched element set
size: function() {
return this.length;
},
- // The number of elements contained in the matched element set
- length: 0,
+ toArray: function() {
+ return slice.call( this, 0 );
+ },
// Get the Nth element in the matched element set OR
// Get the whole matched element set as a clean array
get: function( num ) {
- return num == undefined ?
+ return num == null ?
// Return a 'clean' array
- jQuery.makeArray( this ) :
+ this.toArray() :
// Return just the object
- this[ num ];
+ ( num < 0 ? this.slice(num)[ 0 ] : this[ num ] );
},
// Take an array of elements and push it onto the stack
// (returning the new matched element set)
- pushStack: function( elems ) {
+ pushStack: function( elems, name, selector ) {
// Build a new jQuery matched element set
- var ret = jQuery( elems );
+ var ret = jQuery( elems || null );
// Add the old object onto the stack (as a reference)
ret.prevObject = this;
+ ret.context = this.context;
+
+ if ( name === "find" ) {
+ ret.selector = this.selector + (this.selector ? " " : "") + selector;
+ } else if ( name ) {
+ ret.selector = this.selector + "." + name + "(" + selector + ")";
+ }
+
// Return the newly-formed element set
return ret;
},
@@ -126,7 +228,7 @@ jQuery.fn = jQuery.prototype = {
// Resetting the length to 0, then using the native Array push
// is a super-fast way to populate an object with array-like properties
this.length = 0;
- Array.prototype.push.apply( this, elems );
+ push.apply( this, elems );
return this;
},
@@ -137,570 +239,808 @@ jQuery.fn = jQuery.prototype = {
each: function( callback, args ) {
return jQuery.each( this, callback, args );
},
+
+ ready: function( fn ) {
+ // Attach the listeners
+ jQuery.bindReady();
- // Determine the position of an element within
- // the matched set of elements
- index: function( elem ) {
- var ret = -1;
+ // If the DOM is already ready
+ if ( jQuery.isReady ) {
+ // Execute the function immediately
+ fn.call( document, jQuery );
- // Locate the position of the desired element
- return jQuery.inArray(
- // If it receives a jQuery object, the first element is used
- elem && elem.jquery ? elem[0] : elem
- , this );
- },
+ // Otherwise, remember the function for later
+ } else if ( readyList ) {
+ // Add the function to the wait list
+ readyList.push( fn );
+ }
- attr: function( name, value, type ) {
- var options = name;
+ return this;
+ },
+
+ eq: function( i ) {
+ return i === -1 ?
+ this.slice( i ) :
+ this.slice( i, +i + 1 );
+ },
- // Look for the case where we're accessing a style value
- if ( name.constructor == String )
- if ( value === undefined )
- return this[0] && jQuery[ type || "attr" ]( this[0], name );
+ first: function() {
+ return this.eq( 0 );
+ },
- else {
- options = {};
- options[ name ] = value;
- }
+ last: function() {
+ return this.eq( -1 );
+ },
- // Check to see if we're setting style values
- return this.each(function(i){
- // Set all the styles
- for ( name in options )
- jQuery.attr(
- type ?
- this.style :
- this,
- name, jQuery.prop( this, options[ name ], type, i, name )
- );
- });
+ slice: function() {
+ return this.pushStack( slice.apply( this, arguments ),
+ "slice", slice.call(arguments).join(",") );
},
- css: function( key, value ) {
- // ignore negative width and height values
- if ( (key == 'width' || key == 'height') && parseFloat(value) < 0 )
- value = undefined;
- return this.attr( key, value, "curCSS" );
+ map: function( callback ) {
+ return this.pushStack( jQuery.map(this, function( elem, i ) {
+ return callback.call( elem, i, elem );
+ }));
+ },
+
+ end: function() {
+ return this.prevObject || jQuery(null);
},
- text: function( text ) {
- if ( typeof text != "object" && text != null )
- return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) );
+ // For internal use only.
+ // Behaves like an Array's method, not like a jQuery method.
+ push: push,
+ sort: [].sort,
+ splice: [].splice
+};
- var ret = "";
+// Give the init function the jQuery prototype for later instantiation
+jQuery.fn.init.prototype = jQuery.fn;
- jQuery.each( text || this, function(){
- jQuery.each( this.childNodes, function(){
- if ( this.nodeType != 8 )
- ret += this.nodeType != 1 ?
- this.nodeValue :
- jQuery.fn.text( [ this ] );
- });
- });
+jQuery.extend = jQuery.fn.extend = function() {
+ // copy reference to target object
+ var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options, name, src, copy;
- return ret;
- },
+ // Handle a deep copy situation
+ if ( typeof target === "boolean" ) {
+ deep = target;
+ target = arguments[1] || {};
+ // skip the boolean and the target
+ i = 2;
+ }
- wrapAll: function( html ) {
- if ( this[0] )
- // The elements to wrap the target around
- jQuery( html, this[0].ownerDocument )
- .clone()
- .insertBefore( this[0] )
- .map(function(){
- var elem = this;
+ // Handle case when target is a string or something (possible in deep copy)
+ if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
+ target = {};
+ }
- while ( elem.firstChild )
- elem = elem.firstChild;
+ // extend jQuery itself if only one argument is passed
+ if ( length === i ) {
+ target = this;
+ --i;
+ }
- return elem;
- })
- .append(this);
+ for ( ; i < length; i++ ) {
+ // Only deal with non-null/undefined values
+ if ( (options = arguments[ i ]) != null ) {
+ // Extend the base object
+ for ( name in options ) {
+ src = target[ name ];
+ copy = options[ name ];
- return this;
- },
+ // Prevent never-ending loop
+ if ( target === copy ) {
+ continue;
+ }
- wrapInner: function( html ) {
- return this.each(function(){
- jQuery( this ).contents().wrapAll( html );
- });
- },
+ // Recurse if we're merging object literal values or arrays
+ if ( deep && copy && ( jQuery.isPlainObject(copy) || jQuery.isArray(copy) ) ) {
+ var clone = src && ( jQuery.isPlainObject(src) || jQuery.isArray(src) ) ? src
+ : jQuery.isArray(copy) ? [] : {};
- wrap: function( html ) {
- return this.each(function(){
- jQuery( this ).wrapAll( html );
- });
- },
+ // Never move original objects, clone them
+ target[ name ] = jQuery.extend( deep, clone, copy );
- append: function() {
- return this.domManip(arguments, true, false, function(elem){
- if (this.nodeType == 1)
- this.appendChild( elem );
- });
- },
+ // Don't bring in undefined values
+ } else if ( copy !== undefined ) {
+ target[ name ] = copy;
+ }
+ }
+ }
+ }
- prepend: function() {
- return this.domManip(arguments, true, true, function(elem){
- if (this.nodeType == 1)
- this.insertBefore( elem, this.firstChild );
- });
- },
+ // Return the modified object
+ return target;
+};
- before: function() {
- return this.domManip(arguments, false, false, function(elem){
- this.parentNode.insertBefore( elem, this );
- });
- },
+jQuery.extend({
+ noConflict: function( deep ) {
+ window.$ = _$;
- after: function() {
- return this.domManip(arguments, false, true, function(elem){
- this.parentNode.insertBefore( elem, this.nextSibling );
- });
- },
+ if ( deep ) {
+ window.jQuery = _jQuery;
+ }
- end: function() {
- return this.prevObject || jQuery( [] );
+ return jQuery;
},
+
+ // Is the DOM ready to be used? Set to true once it occurs.
+ isReady: false,
+
+ // Handle when the DOM is ready
+ ready: function() {
+ // Make sure that the DOM is not already loaded
+ if ( !jQuery.isReady ) {
+ // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+ if ( !document.body ) {
+ return setTimeout( jQuery.ready, 13 );
+ }
- find: function( selector ) {
- var elems = jQuery.map(this, function(elem){
- return jQuery.find( selector, elem );
- });
+ // Remember that the DOM is ready
+ jQuery.isReady = true;
+
+ // If there are functions bound, to execute
+ if ( readyList ) {
+ // Execute all of them
+ var fn, i = 0;
+ while ( (fn = readyList[ i++ ]) ) {
+ fn.call( document, jQuery );
+ }
- return this.pushStack( /[^+>] [^+>]/.test( selector ) || selector.indexOf("..") > -1 ?
- jQuery.unique( elems ) :
- elems );
+ // Reset the list of functions
+ readyList = null;
+ }
+
+ // Trigger any bound ready events
+ if ( jQuery.fn.triggerHandler ) {
+ jQuery( document ).triggerHandler( "ready" );
+ }
+ }
},
+
+ bindReady: function() {
+ if ( readyBound ) {
+ return;
+ }
- clone: function( events ) {
- // Do the clone
- var ret = this.map(function(){
- if ( jQuery.browser.msie && !jQuery.isXMLDoc(this) ) {
- // IE copies events bound via attachEvent when
- // using cloneNode. Calling detachEvent on the
- // clone will also remove the events from the orignal
- // In order to get around this, we use innerHTML.
- // Unfortunately, this means some modifications to
- // attributes in IE that are actually only stored
- // as properties will not be copied (such as the
- // the name attribute on an input).
- var clone = this.cloneNode(true),
- container = document.createElement("div");
- container.appendChild(clone);
- return jQuery.clean([container.innerHTML])[0];
- } else
- return this.cloneNode(true);
- });
+ readyBound = true;
- // Need to set the expando to null on the cloned set if it exists
- // removeData doesn't work here, IE removes it from the original as well
- // this is primarily for IE but the data expando shouldn't be copied over in any browser
- var clone = ret.find("*").andSelf().each(function(){
- if ( this[ expando ] != undefined )
- this[ expando ] = null;
- });
+ // Catch cases where $(document).ready() is called after the
+ // browser event has already occurred.
+ if ( document.readyState === "complete" ) {
+ return jQuery.ready();
+ }
- // Copy the events from the original to the clone
- if ( events === true )
- this.find("*").andSelf().each(function(i){
- if (this.nodeType == 3)
- return;
- var events = jQuery.data( this, "events" );
+ // Mozilla, Opera and webkit nightlies currently support this event
+ if ( document.addEventListener ) {
+ // Use the handy event callback
+ document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
+
+ // A fallback to window.onload, that will always work
+ window.addEventListener( "load", jQuery.ready, false );
+
+ // If IE event model is used
+ } else if ( document.attachEvent ) {
+ // ensure firing before onload,
+ // maybe late but safe also for iframes
+ document.attachEvent("onreadystatechange", DOMContentLoaded);
+
+ // A fallback to window.onload, that will always work
+ window.attachEvent( "onload", jQuery.ready );
- for ( var type in events )
- for ( var handler in events[ type ] )
- jQuery.event.add( clone[ i ], type, events[ type ][ handler ], events[ type ][ handler ].data );
- });
+ // If IE and not a frame
+ // continually check to see if the document is ready
+ var toplevel = false;
- // Return the cloned set
- return ret;
- },
+ try {
+ toplevel = window.frameElement == null;
+ } catch(e) {}
- filter: function( selector ) {
- return this.pushStack(
- jQuery.isFunction( selector ) &&
- jQuery.grep(this, function(elem, i){
- return selector.call( elem, i );
- }) ||
+ if ( document.documentElement.doScroll && toplevel ) {
+ doScrollCheck();
+ }
+ }
+ },
- jQuery.multiFilter( selector, this ) );
+ // See test/unit/core.js for details concerning isFunction.
+ // Since version 1.3, DOM methods and functions like alert
+ // aren't supported. They return false on IE (#2968).
+ isFunction: function( obj ) {
+ return toString.call(obj) === "[object Function]";
},
- not: function( selector ) {
- if ( selector.constructor == String )
- // test special case where just one selector is passed in
- if ( isSimple.test( selector ) )
- return this.pushStack( jQuery.multiFilter( selector, this, true ) );
- else
- selector = jQuery.multiFilter( selector, this );
-
- var isArrayLike = selector.length && selector[selector.length - 1] !== undefined && !selector.nodeType;
- return this.filter(function() {
- return isArrayLike ? jQuery.inArray( this, selector ) < 0 : this != selector;
- });
+ isArray: function( obj ) {
+ return toString.call(obj) === "[object Array]";
},
- add: function( selector ) {
- return this.pushStack( jQuery.unique( jQuery.merge(
- this.get(),
- typeof selector == 'string' ?
- jQuery( selector ) :
- jQuery.makeArray( selector )
- )));
+ isPlainObject: function( obj ) {
+ // Must be an Object.
+ // Because of IE, we also have to check the presence of the constructor property.
+ // Make sure that DOM nodes and window objects don't pass through, as well
+ if ( !obj || toString.call(obj) !== "[object Object]" || obj.nodeType || obj.setInterval ) {
+ return false;
+ }
+
+ // Not own constructor property must be Object
+ if ( obj.constructor
+ && !hasOwnProperty.call(obj, "constructor")
+ && !hasOwnProperty.call(obj.constructor.prototype, "isPrototypeOf") ) {
+ return false;
+ }
+
+ // Own properties are enumerated firstly, so to speed up,
+ // if last one is own, then all properties are own.
+
+ var key;
+ for ( key in obj ) {}
+
+ return key === undefined || hasOwnProperty.call( obj, key );
},
- is: function( selector ) {
- return !!selector && jQuery.multiFilter( selector, this ).length > 0;
+ isEmptyObject: function( obj ) {
+ for ( var name in obj ) {
+ return false;
+ }
+ return true;
},
+
+ error: function( msg ) {
+ throw msg;
+ },
+
+ parseJSON: function( data ) {
+ if ( typeof data !== "string" || !data ) {
+ return null;
+ }
+
+ // Make sure the incoming data is actual JSON
+ // Logic borrowed from http://json.org/json2.js
+ if ( /^[\],:{}\s]*$/.test(data.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, "@")
+ .replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]")
+ .replace(/(?:^|:|,)(?:\s*\[)+/g, "")) ) {
+
+ // Try to use the native JSON parser first
+ return window.JSON && window.JSON.parse ?
+ window.JSON.parse( data ) :
+ (new Function("return " + data))();
- hasClass: function( selector ) {
- return this.is( "." + selector );
+ } else {
+ jQuery.error( "Invalid JSON: " + data );
+ }
},
- val: function( value ) {
- if ( value == undefined ) {
+ noop: function() {},
- if ( this.length ) {
- var elem = this[0];
+ // Evalulates a script in a global context
+ globalEval: function( data ) {
+ if ( data && rnotwhite.test(data) ) {
+ // Inspired by code by Andrea Giammarchi
+ // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html
+ var head = document.getElementsByTagName("head")[0] || document.documentElement,
+ script = document.createElement("script");
- // We need to handle select boxes special
- if ( jQuery.nodeName( elem, "select" ) ) {
- var index = elem.selectedIndex,
- values = [],
- options = elem.options,
- one = elem.type == "select-one";
+ script.type = "text/javascript";
- // Nothing was selected
- if ( index < 0 )
- return null;
+ if ( jQuery.support.scriptEval ) {
+ script.appendChild( document.createTextNode( data ) );
+ } else {
+ script.text = data;
+ }
- // Loop through all the selected options
- for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) {
- var option = options[ i ];
+ // Use insertBefore instead of appendChild to circumvent an IE6 bug.
+ // This arises when a base node is used (#2709).
+ head.insertBefore( script, head.firstChild );
+ head.removeChild( script );
+ }
+ },
- if ( option.selected ) {
- // Get the specifc value for the option
- value = jQuery.browser.msie && !option.attributes.value.specified ? option.text : option.value;
+ nodeName: function( elem, name ) {
+ return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase();
+ },
- // We don't need an array for one selects
- if ( one )
- return value;
+ // args is for internal usage only
+ each: function( object, callback, args ) {
+ var name, i = 0,
+ length = object.length,
+ isObj = length === undefined || jQuery.isFunction(object);
- // Multi-Selects return an array
- values.push( value );
- }
+ if ( args ) {
+ if ( isObj ) {
+ for ( name in object ) {
+ if ( callback.apply( object[ name ], args ) === false ) {
+ break;
}
+ }
+ } else {
+ for ( ; i < length; ) {
+ if ( callback.apply( object[ i++ ], args ) === false ) {
+ break;
+ }
+ }
+ }
- return values;
+ // A special, fast, case for the most common use of each
+ } else {
+ if ( isObj ) {
+ for ( name in object ) {
+ if ( callback.call( object[ name ], name, object[ name ] ) === false ) {
+ break;
+ }
+ }
+ } else {
+ for ( var value = object[0];
+ i < length && callback.call( value, i, value ) !== false; value = object[++i] ) {}
+ }
+ }
- // Everything else, we just grab the value
- } else
- return (this[0].value || "").replace(/\r/g, "");
+ return object;
+ },
- }
+ trim: function( text ) {
+ return (text || "").replace( rtrim, "" );
+ },
- return undefined;
+ // results is for internal usage only
+ makeArray: function( array, results ) {
+ var ret = results || [];
+
+ if ( array != null ) {
+ // The window, strings (and functions) also have 'length'
+ // The extra typeof function check is to prevent crashes
+ // in Safari 2 (See: #3039)
+ if ( array.length == null || typeof array === "string" || jQuery.isFunction(array) || (typeof array !== "function" && array.setInterval) ) {
+ push.call( ret, array );
+ } else {
+ jQuery.merge( ret, array );
+ }
}
- if( value.constructor == Number )
- value += '';
+ return ret;
+ },
- return this.each(function(){
- if ( this.nodeType != 1 )
- return;
+ inArray: function( elem, array ) {
+ if ( array.indexOf ) {
+ return array.indexOf( elem );
+ }
- if ( value.constructor == Array && /radio|checkbox/.test( this.type ) )
- this.checked = (jQuery.inArray(this.value, value) >= 0 ||
- jQuery.inArray(this.name, value) >= 0);
+ for ( var i = 0, length = array.length; i < length; i++ ) {
+ if ( array[ i ] === elem ) {
+ return i;
+ }
+ }
- else if ( jQuery.nodeName( this, "select" ) ) {
- var values = jQuery.makeArray(value);
+ return -1;
+ },
- jQuery( "option", this ).each(function(){
- this.selected = (jQuery.inArray( this.value, values ) >= 0 ||
- jQuery.inArray( this.text, values ) >= 0);
- });
+ merge: function( first, second ) {
+ var i = first.length, j = 0;
- if ( !values.length )
- this.selectedIndex = -1;
+ if ( typeof second.length === "number" ) {
+ for ( var l = second.length; j < l; j++ ) {
+ first[ i++ ] = second[ j ];
+ }
+ } else {
+ while ( second[j] !== undefined ) {
+ first[ i++ ] = second[ j++ ];
+ }
+ }
- } else
- this.value = value;
- });
- },
+ first.length = i;
- html: function( value ) {
- return value == undefined ?
- (this[0] ?
- this[0].innerHTML :
- null) :
- this.empty().append( value );
+ return first;
},
- replaceWith: function( value ) {
- return this.after( value ).remove();
- },
+ grep: function( elems, callback, inv ) {
+ var ret = [];
- eq: function( i ) {
- return this.slice( i, i + 1 );
- },
+ // Go through the array, only saving the items
+ // that pass the validator function
+ for ( var i = 0, length = elems.length; i < length; i++ ) {
+ if ( !inv !== !callback( elems[ i ], i ) ) {
+ ret.push( elems[ i ] );
+ }
+ }
- slice: function() {
- return this.pushStack( Array.prototype.slice.apply( this, arguments ) );
+ return ret;
},
- map: function( callback ) {
- return this.pushStack( jQuery.map(this, function(elem, i){
- return callback.call( elem, i, elem );
- }));
- },
+ // arg is for internal usage only
+ map: function( elems, callback, arg ) {
+ var ret = [], value;
- andSelf: function() {
- return this.add( this.prevObject );
+ // Go through the array, translating each of the items to their
+ // new value (or values).
+ for ( var i = 0, length = elems.length; i < length; i++ ) {
+ value = callback( elems[ i ], i, arg );
+
+ if ( value != null ) {
+ ret[ ret.length ] = value;
+ }
+ }
+
+ return ret.concat.apply( [], ret );
},
- data: function( key, value ){
- var parts = key.split(".");
- parts[1] = parts[1] ? "." + parts[1] : "";
+ // A global GUID counter for objects
+ guid: 1,
- if ( value === undefined ) {
- var data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]);
+ proxy: function( fn, proxy, thisObject ) {
+ if ( arguments.length === 2 ) {
+ if ( typeof proxy === "string" ) {
+ thisObject = fn;
+ fn = thisObject[ proxy ];
+ proxy = undefined;
- if ( data === undefined && this.length )
- data = jQuery.data( this[0], key );
+ } else if ( proxy && !jQuery.isFunction( proxy ) ) {
+ thisObject = proxy;
+ proxy = undefined;
+ }
+ }
- return data === undefined && parts[1] ?
- this.data( parts[0] ) :
- data;
- } else
- return this.trigger("setData" + parts[1] + "!", [parts[0], value]).each(function(){
- jQuery.data( this, key, value );
- });
- },
+ if ( !proxy && fn ) {
+ proxy = function() {
+ return fn.apply( thisObject || this, arguments );
+ };
+ }
- removeData: function( key ){
- return this.each(function(){
- jQuery.removeData( this, key );
- });
+ // Set the guid of unique handler to the same of original handler, so it can be removed
+ if ( fn ) {
+ proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++;
+ }
+
+ // So proxy can be declared as an argument
+ return proxy;
},
- domManip: function( args, table, reverse, callback ) {
- var clone = this.length > 1, elems;
+ // Use of jQuery.browser is frowned upon.
+ // More details: http://docs.jquery.com/Utilities/jQuery.browser
+ uaMatch: function( ua ) {
+ ua = ua.toLowerCase();
- return this.each(function(){
- if ( !elems ) {
- elems = jQuery.clean( args, this.ownerDocument );
+ var match = /(webkit)[ \/]([\w.]+)/.exec( ua ) ||
+ /(opera)(?:.*version)?[ \/]([\w.]+)/.exec( ua ) ||
+ /(msie) ([\w.]+)/.exec( ua ) ||
+ !/compatible/.test( ua ) && /(mozilla)(?:.*? rv:([\w.]+))?/.exec( ua ) ||
+ [];
- if ( reverse )
- elems.reverse();
- }
+ return { browser: match[1] || "", version: match[2] || "0" };
+ },
- var obj = this;
+ browser: {}
+});
- if ( table && jQuery.nodeName( this, "table" ) && jQuery.nodeName( elems[0], "tr" ) )
- obj = this.getElementsByTagName("tbody")[0] || this.appendChild( this.ownerDocument.createElement("tbody") );
+browserMatch = jQuery.uaMatch( userAgent );
+if ( browserMatch.browser ) {
+ jQuery.browser[ browserMatch.browser ] = true;
+ jQuery.browser.version = browserMatch.version;
+}
- var scripts = jQuery( [] );
+// Deprecated, use jQuery.browser.webkit instead
+if ( jQuery.browser.webkit ) {
+ jQuery.browser.safari = true;
+}
- jQuery.each(elems, function(){
- var elem = clone ?
- jQuery( this ).clone( true )[0] :
- this;
+if ( indexOf ) {
+ jQuery.inArray = function( elem, array ) {
+ return indexOf.call( array, elem );
+ };
+}
- // execute all scripts after the elements have been injected
- if ( jQuery.nodeName( elem, "script" ) )
- scripts = scripts.add( elem );
- else {
- // Remove any inner scripts for later evaluation
- if ( elem.nodeType == 1 )
- scripts = scripts.add( jQuery( "script", elem ).remove() );
+// All jQuery objects should point back to these
+rootjQuery = jQuery(document);
- // Inject the elements into the document
- callback.call( obj, elem );
- }
- });
+// Cleanup functions for the document ready method
+if ( document.addEventListener ) {
+ DOMContentLoaded = function() {
+ document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false );
+ jQuery.ready();
+ };
- scripts.each( evalScript );
- });
+} else if ( document.attachEvent ) {
+ DOMContentLoaded = function() {
+ // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+ if ( document.readyState === "complete" ) {
+ document.detachEvent( "onreadystatechange", DOMContentLoaded );
+ jQuery.ready();
+ }
+ };
+}
+
+// The DOM ready check for Internet Explorer
+function doScrollCheck() {
+ if ( jQuery.isReady ) {
+ return;
}
-};
-// Give the init function the jQuery prototype for later instantiation
-jQuery.fn.init.prototype = jQuery.fn;
+ try {
+ // If IE is used, use the trick by Diego Perini
+ // http://javascript.nwbox.com/IEContentLoaded/
+ document.documentElement.doScroll("left");
+ } catch( error ) {
+ setTimeout( doScrollCheck, 1 );
+ return;
+ }
+
+ // and execute any waiting functions
+ jQuery.ready();
+}
function evalScript( i, elem ) {
- if ( elem.src )
+ if ( elem.src ) {
jQuery.ajax({
url: elem.src,
async: false,
dataType: "script"
});
-
- else
+ } else {
jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" );
+ }
- if ( elem.parentNode )
+ if ( elem.parentNode ) {
elem.parentNode.removeChild( elem );
+ }
}
-function now(){
- return +new Date;
+// Mutifunctional method to get and set values to a collection
+// The value/s can be optionally by executed if its a function
+function access( elems, key, value, exec, fn, pass ) {
+ var length = elems.length;
+
+ // Setting many attributes
+ if ( typeof key === "object" ) {
+ for ( var k in key ) {
+ access( elems, k, key[k], exec, fn, value );
+ }
+ return elems;
+ }
+
+ // Setting one attribute
+ if ( value !== undefined ) {
+ // Optionally, function values get executed if exec is true
+ exec = !pass && exec && jQuery.isFunction(value);
+
+ for ( var i = 0; i < length; i++ ) {
+ fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
+ }
+
+ return elems;
+ }
+
+ // Getting an attribute
+ return length ? fn( elems[0], key ) : null;
}
-jQuery.extend = jQuery.fn.extend = function() {
- // copy reference to target object
- var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options;
+function now() {
+ return (new Date).getTime();
+}
+(function() {
- // Handle a deep copy situation
- if ( target.constructor == Boolean ) {
- deep = target;
- target = arguments[1] || {};
- // skip the boolean and the target
- i = 2;
- }
+ jQuery.support = {};
- // Handle case when target is a string or something (possible in deep copy)
- if ( typeof target != "object" && typeof target != "function" )
- target = {};
+ var root = document.documentElement,
+ script = document.createElement("script"),
+ div = document.createElement("div"),
+ id = "script" + now();
- // extend jQuery itself if only one argument is passed
- if ( length == i ) {
- target = this;
- --i;
- }
+ div.style.display = "none";
+ div.innerHTML = " <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
- for ( ; i < length; i++ )
- // Only deal with non-null/undefined values
- if ( (options = arguments[ i ]) != null )
- // Extend the base object
- for ( var name in options ) {
- var src = target[ name ], copy = options[ name ];
+ var all = div.getElementsByTagName("*"),
+ a = div.getElementsByTagName("a")[0];
- // Prevent never-ending loop
- if ( target === copy )
- continue;
+ // Can't get basic test support
+ if ( !all || !all.length || !a ) {
+ return;
+ }
- // Recurse if we're merging object values
- if ( deep && copy && typeof copy == "object" && !copy.nodeType )
- target[ name ] = jQuery.extend( deep,
- // Never move original objects, clone them
- src || ( copy.length != null ? [ ] : { } )
- , copy );
+ jQuery.support = {
+ // IE strips leading whitespace when .innerHTML is used
+ leadingWhitespace: div.firstChild.nodeType === 3,
+
+ // Make sure that tbody elements aren't automatically inserted
+ // IE will insert them into empty tables
+ tbody: !div.getElementsByTagName("tbody").length,
+
+ // Make sure that link elements get serialized correctly by innerHTML
+ // This requires a wrapper element in IE
+ htmlSerialize: !!div.getElementsByTagName("link").length,
+
+ // Get the style information from getAttribute
+ // (IE uses .cssText insted)
+ style: /red/.test( a.getAttribute("style") ),
+
+ // Make sure that URLs aren't manipulated
+ // (IE normalizes it by default)
+ hrefNormalized: a.getAttribute("href") === "/a",
+
+ // Make sure that element opacity exists
+ // (IE uses filter instead)
+ // Use a regex to work around a WebKit issue. See #5145
+ opacity: /^0.55$/.test( a.style.opacity ),
+
+ // Verify style float existence
+ // (IE uses styleFloat instead of cssFloat)
+ cssFloat: !!a.style.cssFloat,
+
+ // Make sure that if no value is specified for a checkbox
+ // that it defaults to "on".
+ // (WebKit defaults to "" instead)
+ checkOn: div.getElementsByTagName("input")[0].value === "on",
+
+ // Make sure that a selected-by-default option has a working selected property.
+ // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
+ optSelected: document.createElement("select").appendChild( document.createElement("option") ).selected,
+
+ // Will be defined later
+ checkClone: false,
+ scriptEval: false,
+ noCloneEvent: true,
+ boxModel: null
+ };
- // Don't bring in undefined values
- else if ( copy !== undefined )
- target[ name ] = copy;
+ script.type = "text/javascript";
+ try {
+ script.appendChild( document.createTextNode( "window." + id + "=1;" ) );
+ } catch(e) {}
- }
+ root.insertBefore( script, root.firstChild );
- // Return the modified object
- return target;
-};
+ // Make sure that the execution of code works by injecting a script
+ // tag with appendChild/createTextNode
+ // (IE doesn't support this, fails, and uses .text instead)
+ if ( window[ id ] ) {
+ jQuery.support.scriptEval = true;
+ delete window[ id ];
+ }
-var expando = "jQuery" + now(), uuid = 0, windowData = {},
- // exclude the following css properties to add px
- exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i,
- // cache defaultView
- defaultView = document.defaultView || {};
+ root.removeChild( script );
-jQuery.extend({
- noConflict: function( deep ) {
- window.$ = _$;
-
- if ( deep )
- window.jQuery = _jQuery;
+ if ( div.attachEvent && div.fireEvent ) {
+ div.attachEvent("onclick", function click() {
+ // Cloning a node shouldn't copy over any
+ // bound event handlers (IE does this)
+ jQuery.support.noCloneEvent = false;
+ div.detachEvent("onclick", click);
+ });
+ div.cloneNode(true).fireEvent("onclick");
+ }
- return jQuery;
- },
+ div = document.createElement("div");
+ div.innerHTML = "<input type='radio' name='radiotest' checked='checked'/>";
- // See test/unit/core.js for details concerning this function.
- isFunction: function( fn ) {
- return !!fn && typeof fn != "string" && !fn.nodeName &&
- fn.constructor != Array && /^[\s[]?function/.test( fn + "" );
- },
+ var fragment = document.createDocumentFragment();
+ fragment.appendChild( div.firstChild );
- // check if an element is in a (or is an) XML document
- isXMLDoc: function( elem ) {
- return elem.documentElement && !elem.body ||
- elem.tagName && elem.ownerDocument && !elem.ownerDocument.body;
- },
+ // WebKit doesn't clone checked state correctly in fragments
+ jQuery.support.checkClone = fragment.cloneNode(true).cloneNode(true).lastChild.checked;
- // Evalulates a script in a global context
- globalEval: function( data ) {
- data = jQuery.trim( data );
+ // Figure out if the W3C box model works as expected
+ // document.body must exist before we can do this
+ jQuery(function() {
+ var div = document.createElement("div");
+ div.style.width = div.style.paddingLeft = "1px";
- if ( data ) {
- // Inspired by code by Andrea Giammarchi
- // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html
- var head = document.getElementsByTagName("head")[0] || document.documentElement,
- script = document.createElement("script");
+ document.body.appendChild( div );
+ jQuery.boxModel = jQuery.support.boxModel = div.offsetWidth === 2;
+ document.body.removeChild( div ).style.display = 'none';
+ div = null;
+ });
- script.type = "text/javascript";
- if ( jQuery.browser.msie )
- script.text = data;
- else
- script.appendChild( document.createTextNode( data ) );
+ // Technique from Juriy Zaytsev
+ // http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/
+ var eventSupported = function( eventName ) {
+ var el = document.createElement("div");
+ eventName = "on" + eventName;
- // Use insertBefore instead of appendChild to circumvent an IE6 bug.
- // This arises when a base node is used (#2709).
- head.insertBefore( script, head.firstChild );
- head.removeChild( script );
- }
- },
+ var isSupported = (eventName in el);
+ if ( !isSupported ) {
+ el.setAttribute(eventName, "return;");
+ isSupported = typeof el[eventName] === "function";
+ }
+ el = null;
- nodeName: function( elem, name ) {
- return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase();
- },
+ return isSupported;
+ };
+
+ jQuery.support.submitBubbles = eventSupported("submit");
+ jQuery.support.changeBubbles = eventSupported("change");
+
+ // release memory in IE
+ root = script = div = all = a = null;
+})();
+
+jQuery.props = {
+ "for": "htmlFor",
+ "class": "className",
+ readonly: "readOnly",
+ maxlength: "maxLength",
+ cellspacing: "cellSpacing",
+ rowspan: "rowSpan",
+ colspan: "colSpan",
+ tabindex: "tabIndex",
+ usemap: "useMap",
+ frameborder: "frameBorder"
+};
+var expando = "jQuery" + now(), uuid = 0, windowData = {};
+var emptyObject = {};
+jQuery.extend({
cache: {},
+
+ expando:expando,
+
+ // The following elements throw uncatchable exceptions if you
+ // attempt to add expando properties to them.
+ noData: {
+ "embed": true,
+ "object": true,
+ "applet": true
+ },
data: function( elem, name, data ) {
+ if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) {
+ return;
+ }
+
elem = elem == window ?
windowData :
elem;
- var id = elem[ expando ];
+ var id = elem[ expando ], cache = jQuery.cache, thisCache;
+
+ // Handle the case where there's no name immediately
+ if ( !name && !id ) {
+ return null;
+ }
// Compute a unique ID for the element
- if ( !id )
- id = elem[ expando ] = ++uuid;
+ if ( !id ) {
+ id = ++uuid;
+ }
- // Only generate the data cache if we're
- // trying to access or manipulate it
- if ( name && !jQuery.cache[ id ] )
- jQuery.cache[ id ] = {};
+ // Avoid generating a new cache unless none exists and we
+ // want to manipulate it.
+ if ( typeof name === "object" ) {
+ elem[ expando ] = id;
+ thisCache = cache[ id ] = jQuery.extend(true, {}, name);
+ } else if ( cache[ id ] ) {
+ thisCache = cache[ id ];
+ } else if ( typeof data === "undefined" ) {
+ thisCache = emptyObject;
+ } else {
+ thisCache = cache[ id ] = {};
+ }
// Prevent overriding the named cache with undefined values
- if ( data !== undefined )
- jQuery.cache[ id ][ name ] = data;
+ if ( data !== undefined ) {
+ elem[ expando ] = id;
+ thisCache[ name ] = data;
+ }
- // Return the named cache data, or the ID for the element
- return name ?
- jQuery.cache[ id ][ name ] :
- id;
+ return typeof name === "string" ? thisCache[ name ] : thisCache;
},
removeData: function( elem, name ) {
+ if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) {
+ return;
+ }
+
elem = elem == window ?
windowData :
elem;
- var id = elem[ expando ];
+ var id = elem[ expando ], cache = jQuery.cache, thisCache = cache[ id ];
// If we want to remove a specific section of the element's data
if ( name ) {
- if ( jQuery.cache[ id ] ) {
+ if ( thisCache ) {
// Remove the section of cache data
- delete jQuery.cache[ id ][ name ];
+ delete thisCache[ name ];
// If we've removed all the data, remove the element's cache
- name = "";
-
- for ( name in jQuery.cache[ id ] )
- break;
-
- if ( !name )
+ if ( jQuery.isEmptyObject(thisCache) ) {
jQuery.removeData( elem );
+ }
}
// Otherwise, we want to remove all of the element's data
@@ -708,1095 +1048,2792 @@ jQuery.extend({
// Clean up the element expando
try {
delete elem[ expando ];
- } catch(e){
+ } catch( e ) {
// IE has trouble directly removing the expando
// but it's ok with using removeAttribute
- if ( elem.removeAttribute )
+ if ( elem.removeAttribute ) {
elem.removeAttribute( expando );
+ }
}
// Completely remove the data cache
- delete jQuery.cache[ id ];
+ delete cache[ id ];
}
- },
-
- // args is for internal usage only
- each: function( object, callback, args ) {
- var name, i = 0, length = object.length;
+ }
+});
- if ( args ) {
- if ( length == undefined ) {
- for ( name in object )
- if ( callback.apply( object[ name ], args ) === false )
- break;
- } else
- for ( ; i < length; )
- if ( callback.apply( object[ i++ ], args ) === false )
- break;
+jQuery.fn.extend({
+ data: function( key, value ) {
+ if ( typeof key === "undefined" && this.length ) {
+ return jQuery.data( this[0] );
- // A special, fast, case for the most common use of each
- } else {
- if ( length == undefined ) {
- for ( name in object )
- if ( callback.call( object[ name ], name, object[ name ] ) === false )
- break;
- } else
- for ( var value = object[0];
- i < length && callback.call( value, i, value ) !== false; value = object[++i] ){}
+ } else if ( typeof key === "object" ) {
+ return this.each(function() {
+ jQuery.data( this, key );
+ });
}
- return object;
- },
-
- prop: function( elem, value, type, i, name ) {
- // Handle executable functions
- if ( jQuery.isFunction( value ) )
- value = value.call( elem, i );
+ var parts = key.split(".");
+ parts[1] = parts[1] ? "." + parts[1] : "";
- // Handle passing in a number to a CSS property
- return value && value.constructor == Number && type == "curCSS" && !exclude.test( name ) ?
- value + "px" :
- value;
- },
+ if ( value === undefined ) {
+ var data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]);
- className: {
- // internal only, use addClass("class")
- add: function( elem, classNames ) {
- jQuery.each((classNames || "").split(/\s+/), function(i, className){
- if ( elem.nodeType == 1 && !jQuery.className.has( elem.className, className ) )
- elem.className += (elem.className ? " " : "") + className;
+ if ( data === undefined && this.length ) {
+ data = jQuery.data( this[0], key );
+ }
+ return data === undefined && parts[1] ?
+ this.data( parts[0] ) :
+ data;
+ } else {
+ return this.trigger("setData" + parts[1] + "!", [parts[0], value]).each(function() {
+ jQuery.data( this, key, value );
});
- },
-
- // internal only, use removeClass("class")
- remove: function( elem, classNames ) {
- if (elem.nodeType == 1)
- elem.className = classNames != undefined ?
- jQuery.grep(elem.className.split(/\s+/), function(className){
- return !jQuery.className.has( classNames, className );
- }).join(" ") :
- "";
- },
-
- // internal only, use hasClass("class")
- has: function( elem, className ) {
- return jQuery.inArray( className, (elem.className || elem).toString().split(/\s+/) ) > -1;
}
},
- // A method for quickly swapping in/out CSS properties to get correct calculations
- swap: function( elem, options, callback ) {
- var old = {};
- // Remember the old values, and insert the new ones
- for ( var name in options ) {
- old[ name ] = elem.style[ name ];
- elem.style[ name ] = options[ name ];
+ removeData: function( key ) {
+ return this.each(function() {
+ jQuery.removeData( this, key );
+ });
+ }
+});
+jQuery.extend({
+ queue: function( elem, type, data ) {
+ if ( !elem ) {
+ return;
}
- callback.call( elem );
-
- // Revert the old values
- for ( var name in options )
- elem.style[ name ] = old[ name ];
- },
+ type = (type || "fx") + "queue";
+ var q = jQuery.data( elem, type );
- css: function( elem, name, force ) {
- if ( name == "width" || name == "height" ) {
- var val, props = { position: "absolute", visibility: "hidden", display:"block" }, which = name == "width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ];
-
- function getWH() {
- val = name == "width" ? elem.offsetWidth : elem.offsetHeight;
- var padding = 0, border = 0;
- jQuery.each( which, function() {
- padding += parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0;
- border += parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0;
- });
- val -= Math.round(padding + border);
- }
+ // Speed up dequeue by getting out quickly if this is just a lookup
+ if ( !data ) {
+ return q || [];
+ }
- if ( jQuery(elem).is(":visible") )
- getWH();
- else
- jQuery.swap( elem, props, getWH );
+ if ( !q || jQuery.isArray(data) ) {
+ q = jQuery.data( elem, type, jQuery.makeArray(data) );
- return Math.max(0, val);
+ } else {
+ q.push( data );
}
- return jQuery.curCSS( elem, name, force );
+ return q;
},
- curCSS: function( elem, name, force ) {
- var ret, style = elem.style;
+ dequeue: function( elem, type ) {
+ type = type || "fx";
- // A helper method for determining if an element's values are broken
- function color( elem ) {
- if ( !jQuery.browser.safari )
- return false;
+ var queue = jQuery.queue( elem, type ), fn = queue.shift();
- // defaultView is cached
- var ret = defaultView.getComputedStyle( elem, null );
- return !ret || ret.getPropertyValue("color") == "";
+ // If the fx queue is dequeued, always remove the progress sentinel
+ if ( fn === "inprogress" ) {
+ fn = queue.shift();
}
- // We need to handle opacity special in IE
- if ( name == "opacity" && jQuery.browser.msie ) {
- ret = jQuery.attr( style, "opacity" );
+ if ( fn ) {
+ // Add a progress sentinel to prevent the fx queue from being
+ // automatically dequeued
+ if ( type === "fx" ) {
+ queue.unshift("inprogress");
+ }
- return ret == "" ?
- "1" :
- ret;
+ fn.call(elem, function() {
+ jQuery.dequeue(elem, type);
+ });
}
- // Opera sometimes will give the wrong display answer, this fixes it, see #2037
- if ( jQuery.browser.opera && name == "display" ) {
- var save = style.outline;
- style.outline = "0 solid black";
- style.outline = save;
+ }
+});
+
+jQuery.fn.extend({
+ queue: function( type, data ) {
+ if ( typeof type !== "string" ) {
+ data = type;
+ type = "fx";
}
- // Make sure we're using the right name for getting the float value
- if ( name.match( /float/i ) )
- name = styleFloat;
+ if ( data === undefined ) {
+ return jQuery.queue( this[0], type );
+ }
+ return this.each(function( i, elem ) {
+ var queue = jQuery.queue( this, type, data );
- if ( !force && style && style[ name ] )
- ret = style[ name ];
+ if ( type === "fx" && queue[0] !== "inprogress" ) {
+ jQuery.dequeue( this, type );
+ }
+ });
+ },
+ dequeue: function( type ) {
+ return this.each(function() {
+ jQuery.dequeue( this, type );
+ });
+ },
- else if ( defaultView.getComputedStyle ) {
+ // Based off of the plugin by Clint Helfers, with permission.
+ // http://blindsignals.com/index.php/2009/07/jquery-delay/
+ delay: function( time, type ) {
+ time = jQuery.fx ? jQuery.fx.speeds[time] || time : time;
+ type = type || "fx";
- // Only "float" is needed here
- if ( name.match( /float/i ) )
- name = "float";
+ return this.queue( type, function() {
+ var elem = this;
+ setTimeout(function() {
+ jQuery.dequeue( elem, type );
+ }, time );
+ });
+ },
- name = name.replace( /([A-Z])/g, "-$1" ).toLowerCase();
+ clearQueue: function( type ) {
+ return this.queue( type || "fx", [] );
+ }
+});
+var rclass = /[\n\t]/g,
+ rspace = /\s+/,
+ rreturn = /\r/g,
+ rspecialurl = /href|src|style/,
+ rtype = /(button|input)/i,
+ rfocusable = /(button|input|object|select|textarea)/i,
+ rclickable = /^(a|area)$/i,
+ rradiocheck = /radio|checkbox/;
- var computedStyle = defaultView.getComputedStyle( elem, null );
+jQuery.fn.extend({
+ attr: function( name, value ) {
+ return access( this, name, value, true, jQuery.attr );
+ },
- if ( computedStyle && !color( elem ) )
- ret = computedStyle.getPropertyValue( name );
+ removeAttr: function( name, fn ) {
+ return this.each(function(){
+ jQuery.attr( this, name, "" );
+ if ( this.nodeType === 1 ) {
+ this.removeAttribute( name );
+ }
+ });
+ },
- // If the element isn't reporting its values properly in Safari
- // then some display: none elements are involved
- else {
- var swap = [], stack = [], a = elem, i = 0;
-
- // Locate all of the parent display: none elements
- for ( ; a && color(a); a = a.parentNode )
- stack.unshift(a);
-
- // Go through and make them visible, but in reverse
- // (It would be better if we knew the exact display type that they had)
- for ( ; i < stack.length; i++ )
- if ( color( stack[ i ] ) ) {
- swap[ i ] = stack[ i ].style.display;
- stack[ i ].style.display = "block";
- }
+ addClass: function( value ) {
+ if ( jQuery.isFunction(value) ) {
+ return this.each(function(i) {
+ var self = jQuery(this);
+ self.addClass( value.call(this, i, self.attr("class")) );
+ });
+ }
- // Since we flip the display style, we have to handle that
- // one special, otherwise get the value
- ret = name == "display" && swap[ stack.length - 1 ] != null ?
- "none" :
- ( computedStyle && computedStyle.getPropertyValue( name ) ) || "";
+ if ( value && typeof value === "string" ) {
+ var classNames = (value || "").split( rspace );
- // Finally, revert the display styles back
- for ( i = 0; i < swap.length; i++ )
- if ( swap[ i ] != null )
- stack[ i ].style.display = swap[ i ];
+ for ( var i = 0, l = this.length; i < l; i++ ) {
+ var elem = this[i];
+
+ if ( elem.nodeType === 1 ) {
+ if ( !elem.className ) {
+ elem.className = value;
+
+ } else {
+ var className = " " + elem.className + " ";
+ for ( var c = 0, cl = classNames.length; c < cl; c++ ) {
+ if ( className.indexOf( " " + classNames[c] + " " ) < 0 ) {
+ elem.className += " " + classNames[c];
+ }
+ }
+ }
+ }
}
+ }
- // We should always get a number back from opacity
- if ( name == "opacity" && ret == "" )
- ret = "1";
+ return this;
+ },
- } else if ( elem.currentStyle ) {
- var camelCase = name.replace(/\-(\w)/g, function(all, letter){
- return letter.toUpperCase();
+ removeClass: function( value ) {
+ if ( jQuery.isFunction(value) ) {
+ return this.each(function(i) {
+ var self = jQuery(this);
+ self.removeClass( value.call(this, i, self.attr("class")) );
});
+ }
- ret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ];
-
- // From the awesome hack by Dean Edwards
- // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
+ if ( (value && typeof value === "string") || value === undefined ) {
+ var classNames = (value || "").split(rspace);
- // If we're not dealing with a regular pixel number
- // but a number that has a weird ending, we need to convert it to pixels
- if ( !/^\d+(px)?$/i.test( ret ) && /^\d/.test( ret ) ) {
- // Remember the original values
- var left = style.left, rsLeft = elem.runtimeStyle.left;
+ for ( var i = 0, l = this.length; i < l; i++ ) {
+ var elem = this[i];
- // Put in the new values to get a computed value out
- elem.runtimeStyle.left = elem.currentStyle.left;
- style.left = ret || 0;
- ret = style.pixelLeft + "px";
+ if ( elem.nodeType === 1 && elem.className ) {
+ if ( value ) {
+ var className = (" " + elem.className + " ").replace(rclass, " ");
+ for ( var c = 0, cl = classNames.length; c < cl; c++ ) {
+ className = className.replace(" " + classNames[c] + " ", " ");
+ }
+ elem.className = className.substring(1, className.length - 1);
- // Revert the changed values
- style.left = left;
- elem.runtimeStyle.left = rsLeft;
+ } else {
+ elem.className = "";
+ }
+ }
}
}
- return ret;
+ return this;
},
- clean: function( elems, context ) {
- var ret = [];
- context = context || document;
- // !context.createElement fails in IE with an error but returns typeof 'object'
- if (typeof context.createElement == 'undefined')
- context = context.ownerDocument || context[0] && context[0].ownerDocument || document;
+ toggleClass: function( value, stateVal ) {
+ var type = typeof value, isBool = typeof stateVal === "boolean";
- jQuery.each(elems, function(i, elem){
- if ( !elem )
- return;
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function(i) {
+ var self = jQuery(this);
+ self.toggleClass( value.call(this, i, self.attr("class"), stateVal), stateVal );
+ });
+ }
+
+ return this.each(function() {
+ if ( type === "string" ) {
+ // toggle individual class names
+ var className, i = 0, self = jQuery(this),
+ state = stateVal,
+ classNames = value.split( rspace );
+
+ while ( (className = classNames[ i++ ]) ) {
+ // check each className given, space seperated list
+ state = isBool ? state : !self.hasClass( className );
+ self[ state ? "addClass" : "removeClass" ]( className );
+ }
- if ( elem.constructor == Number )
- elem += '';
+ } else if ( type === "undefined" || type === "boolean" ) {
+ if ( this.className ) {
+ // store className if set
+ jQuery.data( this, "__className__", this.className );
+ }
- // Convert html string into DOM nodes
- if ( typeof elem == "string" ) {
- // Fix "XHTML"-style tags in all browsers
- elem = elem.replace(/(<(\w+)[^>]*?)\/>/g, function(all, front, tag){
- return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ?
- all :
- front + "></" + tag + ">";
- });
+ // toggle whole className
+ this.className = this.className || value === false ? "" : jQuery.data( this, "__className__" ) || "";
+ }
+ });
+ },
- // Trim whitespace, otherwise indexOf won't work as expected
- var tags = jQuery.trim( elem ).toLowerCase(), div = context.createElement("div");
+ hasClass: function( selector ) {
+ var className = " " + selector + " ";
+ for ( var i = 0, l = this.length; i < l; i++ ) {
+ if ( (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) {
+ return true;
+ }
+ }
- var wrap =
- // option or optgroup
- !tags.indexOf("<opt") &&
- [ 1, "<select multiple='multiple'>", "</select>" ] ||
+ return false;
+ },
- !tags.indexOf("<leg") &&
- [ 1, "<fieldset>", "</fieldset>" ] ||
+ val: function( value ) {
+ if ( value === undefined ) {
+ var elem = this[0];
- tags.match(/^<(thead|tbody|tfoot|colg|cap)/) &&
- [ 1, "<table>", "</table>" ] ||
+ if ( elem ) {
+ if ( jQuery.nodeName( elem, "option" ) ) {
+ return (elem.attributes.value || {}).specified ? elem.value : elem.text;
+ }
- !tags.indexOf("<tr") &&
- [ 2, "<table><tbody>", "</tbody></table>" ] ||
+ // We need to handle select boxes special
+ if ( jQuery.nodeName( elem, "select" ) ) {
+ var index = elem.selectedIndex,
+ values = [],
+ options = elem.options,
+ one = elem.type === "select-one";
- // <thead> matched above
- (!tags.indexOf("<td") || !tags.indexOf("<th")) &&
- [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ] ||
+ // Nothing was selected
+ if ( index < 0 ) {
+ return null;
+ }
- !tags.indexOf("<col") &&
- [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ] ||
+ // Loop through all the selected options
+ for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) {
+ var option = options[ i ];
- // IE can't serialize <link> and <script> tags normally
- jQuery.browser.msie &&
- [ 1, "div<div>", "</div>" ] ||
+ if ( option.selected ) {
+ // Get the specifc value for the option
+ value = jQuery(option).val();
- [ 0, "", "" ];
+ // We don't need an array for one selects
+ if ( one ) {
+ return value;
+ }
- // Go to html and back, then peel off extra wrappers
- div.innerHTML = wrap[1] + elem + wrap[2];
+ // Multi-Selects return an array
+ values.push( value );
+ }
+ }
- // Move to the right depth
- while ( wrap[0]-- )
- div = div.lastChild;
+ return values;
+ }
- // Remove IE's autoinserted <tbody> from table fragments
- if ( jQuery.browser.msie ) {
+ // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
+ if ( rradiocheck.test( elem.type ) && !jQuery.support.checkOn ) {
+ return elem.getAttribute("value") === null ? "on" : elem.value;
+ }
+
- // String was a <table>, *may* have spurious <tbody>
- var tbody = !tags.indexOf("<table") && tags.indexOf("<tbody") < 0 ?
- div.firstChild && div.firstChild.childNodes :
+ // Everything else, we just grab the value
+ return (elem.value || "").replace(rreturn, "");
- // String was a bare <thead> or <tfoot>
- wrap[1] == "<table>" && tags.indexOf("<tbody") < 0 ?
- div.childNodes :
- [];
+ }
- for ( var j = tbody.length - 1; j >= 0 ; --j )
- if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length )
- tbody[ j ].parentNode.removeChild( tbody[ j ] );
+ return undefined;
+ }
- // IE completely kills leading whitespace when innerHTML is used
- if ( /^\s/.test( elem ) )
- div.insertBefore( context.createTextNode( elem.match(/^\s*/)[0] ), div.firstChild );
+ var isFunction = jQuery.isFunction(value);
- }
+ return this.each(function(i) {
+ var self = jQuery(this), val = value;
- elem = jQuery.makeArray( div.childNodes );
+ if ( this.nodeType !== 1 ) {
+ return;
}
- if ( elem.length === 0 && (!jQuery.nodeName( elem, "form" ) && !jQuery.nodeName( elem, "select" )) )
- return;
+ if ( isFunction ) {
+ val = value.call(this, i, self.val());
+ }
- if ( elem[0] == undefined || jQuery.nodeName( elem, "form" ) || elem.options )
- ret.push( elem );
+ // Typecast each time if the value is a Function and the appended
+ // value is therefore different each time.
+ if ( typeof val === "number" ) {
+ val += "";
+ }
- else
- ret = jQuery.merge( ret, elem );
+ if ( jQuery.isArray(val) && rradiocheck.test( this.type ) ) {
+ this.checked = jQuery.inArray( self.val(), val ) >= 0;
+
+ } else if ( jQuery.nodeName( this, "select" ) ) {
+ var values = jQuery.makeArray(val);
+
+ jQuery( "option", this ).each(function() {
+ this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;
+ });
+
+ if ( !values.length ) {
+ this.selectedIndex = -1;
+ }
+ } else {
+ this.value = val;
+ }
});
+ }
+});
- return ret;
+jQuery.extend({
+ attrFn: {
+ val: true,
+ css: true,
+ html: true,
+ text: true,
+ data: true,
+ width: true,
+ height: true,
+ offset: true
},
-
- attr: function( elem, name, value ) {
+
+ attr: function( elem, name, value, pass ) {
// don't set attributes on text and comment nodes
- if (!elem || elem.nodeType == 3 || elem.nodeType == 8)
+ if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 ) {
return undefined;
+ }
- var notxml = !jQuery.isXMLDoc( elem ),
+ if ( pass && name in jQuery.attrFn ) {
+ return jQuery(elem)[name](value);
+ }
+
+ var notxml = elem.nodeType !== 1 || !jQuery.isXMLDoc( elem ),
// Whether we are setting (or getting)
- set = value !== undefined,
- msie = jQuery.browser.msie;
+ set = value !== undefined;
// Try to normalize/fix the name
name = notxml && jQuery.props[ name ] || name;
// Only do all the following if this is a node (faster for style)
- // IE elem.getAttribute passes even for style
- if ( elem.tagName ) {
-
+ if ( elem.nodeType === 1 ) {
// These attributes require special treatment
- var special = /href|src|style/.test( name );
+ var special = rspecialurl.test( name );
- // Safari mis-reports the default selected property of a hidden option
+ // Safari mis-reports the default selected property of an option
// Accessing the parent's selectedIndex property fixes it
- if ( name == "selected" && jQuery.browser.safari )
- elem.parentNode.selectedIndex;
+ if ( name === "selected" && !jQuery.support.optSelected ) {
+ var parent = elem.parentNode;
+ if ( parent ) {
+ parent.selectedIndex;
+
+ // Make sure that it also works with optgroups, see #5701
+ if ( parent.parentNode ) {
+ parent.parentNode.selectedIndex;
+ }
+ }
+ }
// If applicable, access the attribute via the DOM 0 way
if ( name in elem && notxml && !special ) {
- if ( set ){
+ if ( set ) {
// We can't allow the type property to be changed (since it causes problems in IE)
- if ( name == "type" && jQuery.nodeName( elem, "input" ) && elem.parentNode )
- throw "type property can't be changed";
+ if ( name === "type" && rtype.test( elem.nodeName ) && elem.parentNode ) {
+ jQuery.error( "type property can't be changed" );
+ }
elem[ name ] = value;
}
// browsers index elements by id/name on forms, give priority to attributes.
- if( jQuery.nodeName( elem, "form" ) && elem.getAttributeNode(name) )
+ if ( jQuery.nodeName( elem, "form" ) && elem.getAttributeNode(name) ) {
return elem.getAttributeNode( name ).nodeValue;
+ }
+
+ // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
+ // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
+ if ( name === "tabIndex" ) {
+ var attributeNode = elem.getAttributeNode( "tabIndex" );
+
+ return attributeNode && attributeNode.specified ?
+ attributeNode.value :
+ rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
+ 0 :
+ undefined;
+ }
return elem[ name ];
}
- if ( msie && notxml && name == "style" )
- return jQuery.attr( elem.style, "cssText", value );
+ if ( !jQuery.support.style && notxml && name === "style" ) {
+ if ( set ) {
+ elem.style.cssText = "" + value;
+ }
+
+ return elem.style.cssText;
+ }
- if ( set )
+ if ( set ) {
// convert the value to a string (all browsers do this but IE) see #1070
elem.setAttribute( name, "" + value );
+ }
- var attr = msie && notxml && special
+ var attr = !jQuery.support.hrefNormalized && notxml && special ?
// Some attributes require a special call on IE
- ? elem.getAttribute( name, 2 )
- : elem.getAttribute( name );
+ elem.getAttribute( name, 2 ) :
+ elem.getAttribute( name );
// Non-existent attributes return null, we normalize to undefined
return attr === null ? undefined : attr;
}
// elem is actually elem.style ... set the style
+ // Using attr for specific style information is now deprecated. Use style insead.
+ return jQuery.style( elem, name, value );
+ }
+});
+var fcleanup = function( nm ) {
+ return nm.replace(/[^\w\s\.\|`]/g, function( ch ) {
+ return "\\" + ch;
+ });
+};
- // IE uses filters for opacity
- if ( msie && name == "opacity" ) {
- if ( set ) {
- // IE has trouble with opacity if it does not have layout
- // Force it by setting the zoom level
- elem.zoom = 1;
+/*
+ * A number of helper functions used for managing events.
+ * Many of the ideas behind this code originated from
+ * Dean Edwards' addEvent library.
+ */
+jQuery.event = {
- // Set the alpha filter to set the opacity
- elem.filter = (elem.filter || "").replace( /alpha\([^)]*\)/, "" ) +
- (parseInt( value ) + '' == "NaN" ? "" : "alpha(opacity=" + value * 100 + ")");
- }
+ // Bind an event to an element
+ // Original by Dean Edwards
+ add: function( elem, types, handler, data ) {
+ if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
+ return;
+ }
- return elem.filter && elem.filter.indexOf("opacity=") >= 0 ?
- (parseFloat( elem.filter.match(/opacity=([^)]*)/)[1] ) / 100) + '':
- "";
+ // For whatever reason, IE has trouble passing the window object
+ // around, causing it to be cloned in the process
+ if ( elem.setInterval && ( elem !== window && !elem.frameElement ) ) {
+ elem = window;
}
- name = name.replace(/-([a-z])/ig, function(all, letter){
- return letter.toUpperCase();
- });
+ // Make sure that the function being executed has a unique ID
+ if ( !handler.guid ) {
+ handler.guid = jQuery.guid++;
+ }
- if ( set )
- elem[ name ] = value;
+ // if data is passed, bind to handler
+ if ( data !== undefined ) {
+ // Create temporary function pointer to original handler
+ var fn = handler;
- return elem[ name ];
- },
+ // Create unique handler function, wrapped around original handler
+ handler = jQuery.proxy( fn );
- trim: function( text ) {
- return (text || "").replace( /^\s+|\s+$/g, "" );
- },
+ // Store data in unique handler
+ handler.data = data;
+ }
- makeArray: function( array ) {
- var ret = [];
+ // Init the element's event structure
+ var events = jQuery.data( elem, "events" ) || jQuery.data( elem, "events", {} ),
+ handle = jQuery.data( elem, "handle" ), eventHandle;
+
+ if ( !handle ) {
+ eventHandle = function() {
+ // Handle the second event of a trigger and when
+ // an event is called after a page has unloaded
+ return typeof jQuery !== "undefined" && !jQuery.event.triggered ?
+ jQuery.event.handle.apply( eventHandle.elem, arguments ) :
+ undefined;
+ };
- if( array != null ){
- var i = array.length;
- //the window, strings and functions also have 'length'
- if( i == null || array.split || array.setInterval || array.call )
- ret[0] = array;
- else
- while( i )
- ret[--i] = array[i];
+ handle = jQuery.data( elem, "handle", eventHandle );
}
- return ret;
- },
+ // If no handle is found then we must be trying to bind to one of the
+ // banned noData elements
+ if ( !handle ) {
+ return;
+ }
- inArray: function( elem, array ) {
- for ( var i = 0, length = array.length; i < length; i++ )
- // Use === because on IE, window == document
- if ( array[ i ] === elem )
- return i;
+ // Add elem as a property of the handle function
+ // This is to prevent a memory leak with non-native
+ // event in IE.
+ handle.elem = elem;
- return -1;
+ // Handle multiple events separated by a space
+ // jQuery(...).bind("mouseover mouseout", fn);
+ types = types.split( /\s+/ );
+
+ var type, i = 0;
+
+ while ( (type = types[ i++ ]) ) {
+ // Namespaced event handlers
+ var namespaces = type.split(".");
+ type = namespaces.shift();
+
+ if ( i > 1 ) {
+ handler = jQuery.proxy( handler );
+
+ if ( data !== undefined ) {
+ handler.data = data;
+ }
+ }
+
+ handler.type = namespaces.slice(0).sort().join(".");
+
+ // Get the current list of functions bound to this event
+ var handlers = events[ type ],
+ special = this.special[ type ] || {};
+
+ // Init the event handler queue
+ if ( !handlers ) {
+ handlers = events[ type ] = {};
+
+ // Check for a special event handler
+ // Only use addEventListener/attachEvent if the special
+ // events handler returns false
+ if ( !special.setup || special.setup.call( elem, data, namespaces, handler) === false ) {
+ // Bind the global event handler to the element
+ if ( elem.addEventListener ) {
+ elem.addEventListener( type, handle, false );
+ } else if ( elem.attachEvent ) {
+ elem.attachEvent( "on" + type, handle );
+ }
+ }
+ }
+
+ if ( special.add ) {
+ var modifiedHandler = special.add.call( elem, handler, data, namespaces, handlers );
+ if ( modifiedHandler && jQuery.isFunction( modifiedHandler ) ) {
+ modifiedHandler.guid = modifiedHandler.guid || handler.guid;
+ modifiedHandler.data = modifiedHandler.data || handler.data;
+ modifiedHandler.type = modifiedHandler.type || handler.type;
+ handler = modifiedHandler;
+ }
+ }
+
+ // Add the function to the element's handler list
+ handlers[ handler.guid ] = handler;
+
+ // Keep track of which events have been used, for global triggering
+ this.global[ type ] = true;
+ }
+
+ // Nullify elem to prevent memory leaks in IE
+ elem = null;
},
- merge: function( first, second ) {
- // We have to loop this way because IE & Opera overwrite the length
- // expando of getElementsByTagName
- var i = 0, elem, pos = first.length;
- // Also, we need to make sure that the correct elements are being returned
- // (IE returns comment nodes in a '*' query)
- if ( jQuery.browser.msie ) {
- while ( elem = second[ i++ ] )
- if ( elem.nodeType != 8 )
- first[ pos++ ] = elem;
-
- } else
- while ( elem = second[ i++ ] )
- first[ pos++ ] = elem;
+ global: {},
- return first;
+ // Detach an event or set of events from an element
+ remove: function( elem, types, handler ) {
+ // don't do events on text and comment nodes
+ if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
+ return;
+ }
+
+ var events = jQuery.data( elem, "events" ), ret, type, fn;
+
+ if ( events ) {
+ // Unbind all events for the element
+ if ( types === undefined || (typeof types === "string" && types.charAt(0) === ".") ) {
+ for ( type in events ) {
+ this.remove( elem, type + (types || "") );
+ }
+ } else {
+ // types is actually an event object here
+ if ( types.type ) {
+ handler = types.handler;
+ types = types.type;
+ }
+
+ // Handle multiple events separated by a space
+ // jQuery(...).unbind("mouseover mouseout", fn);
+ types = types.split(/\s+/);
+ var i = 0;
+ while ( (type = types[ i++ ]) ) {
+ // Namespaced event handlers
+ var namespaces = type.split(".");
+ type = namespaces.shift();
+ var all = !namespaces.length,
+ cleaned = jQuery.map( namespaces.slice(0).sort(), fcleanup ),
+ namespace = new RegExp("(^|\\.)" + cleaned.join("\\.(?:.*\\.)?") + "(\\.|$)"),
+ special = this.special[ type ] || {};
+
+ if ( events[ type ] ) {
+ // remove the given handler for the given type
+ if ( handler ) {
+ fn = events[ type ][ handler.guid ];
+ delete events[ type ][ handler.guid ];
+
+ // remove all handlers for the given type
+ } else {
+ for ( var handle in events[ type ] ) {
+ // Handle the removal of namespaced events
+ if ( all || namespace.test( events[ type ][ handle ].type ) ) {
+ delete events[ type ][ handle ];
+ }
+ }
+ }
+
+ if ( special.remove ) {
+ special.remove.call( elem, namespaces, fn);
+ }
+
+ // remove generic event handler if no more handlers exist
+ for ( ret in events[ type ] ) {
+ break;
+ }
+ if ( !ret ) {
+ if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) {
+ if ( elem.removeEventListener ) {
+ elem.removeEventListener( type, jQuery.data( elem, "handle" ), false );
+ } else if ( elem.detachEvent ) {
+ elem.detachEvent( "on" + type, jQuery.data( elem, "handle" ) );
+ }
+ }
+ ret = null;
+ delete events[ type ];
+ }
+ }
+ }
+ }
+
+ // Remove the expando if it's no longer used
+ for ( ret in events ) {
+ break;
+ }
+ if ( !ret ) {
+ var handle = jQuery.data( elem, "handle" );
+ if ( handle ) {
+ handle.elem = null;
+ }
+ jQuery.removeData( elem, "events" );
+ jQuery.removeData( elem, "handle" );
+ }
+ }
},
- unique: function( array ) {
- var ret = [], done = {};
+ // bubbling is internal
+ trigger: function( event, data, elem /*, bubbling */ ) {
+ // Event object or event type
+ var type = event.type || event,
+ bubbling = arguments[3];
+
+ if ( !bubbling ) {
+ event = typeof event === "object" ?
+ // jQuery.Event object
+ event[expando] ? event :
+ // Object literal
+ jQuery.extend( jQuery.Event(type), event ) :
+ // Just the event type (string)
+ jQuery.Event(type);
+
+ if ( type.indexOf("!") >= 0 ) {
+ event.type = type = type.slice(0, -1);
+ event.exclusive = true;
+ }
+
+ // Handle a global trigger
+ if ( !elem ) {
+ // Don't bubble custom events when global (to avoid too much overhead)
+ event.stopPropagation();
+ // Only trigger if we've ever bound an event for it
+ if ( this.global[ type ] ) {
+ jQuery.each( jQuery.cache, function() {
+ if ( this.events && this.events[type] ) {
+ jQuery.event.trigger( event, data, this.handle.elem );
+ }
+ });
+ }
+ }
+
+ // Handle triggering a single element
+
+ // don't do events on text and comment nodes
+ if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 ) {
+ return undefined;
+ }
+
+ // Clean up in case it is reused
+ event.result = undefined;
+ event.target = elem;
+
+ // Clone the incoming data, if any
+ data = jQuery.makeArray( data );
+ data.unshift( event );
+ }
+
+ event.currentTarget = elem;
+
+ // Trigger the event, it is assumed that "handle" is a function
+ var handle = jQuery.data( elem, "handle" );
+ if ( handle ) {
+ handle.apply( elem, data );
+ }
+
+ var parent = elem.parentNode || elem.ownerDocument;
+
+ // Trigger an inline bound script
try {
+ if ( !(elem && elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()]) ) {
+ if ( elem[ "on" + type ] && elem[ "on" + type ].apply( elem, data ) === false ) {
+ event.result = false;
+ }
+ }
- for ( var i = 0, length = array.length; i < length; i++ ) {
- var id = jQuery.data( array[ i ] );
+ // prevent IE from throwing an error for some elements with some event types, see #3533
+ } catch (e) {}
- if ( !done[ id ] ) {
- done[ id ] = true;
- ret.push( array[ i ] );
+ if ( !event.isPropagationStopped() && parent ) {
+ jQuery.event.trigger( event, data, parent, true );
+
+ } else if ( !event.isDefaultPrevented() ) {
+ var target = event.target, old,
+ isClick = jQuery.nodeName(target, "a") && type === "click";
+
+ if ( !isClick && !(target && target.nodeName && jQuery.noData[target.nodeName.toLowerCase()]) ) {
+ try {
+ if ( target[ type ] ) {
+ // Make sure that we don't accidentally re-trigger the onFOO events
+ old = target[ "on" + type ];
+
+ if ( old ) {
+ target[ "on" + type ] = null;
+ }
+
+ this.triggered = true;
+ target[ type ]();
+ }
+
+ // prevent IE from throwing an error for some elements with some event types, see #3533
+ } catch (e) {}
+
+ if ( old ) {
+ target[ "on" + type ] = old;
}
+
+ this.triggered = false;
}
+ }
+ },
+
+ handle: function( event ) {
+ // returned undefined or false
+ var all, handlers;
- } catch( e ) {
- ret = array;
+ event = arguments[0] = jQuery.event.fix( event || window.event );
+ event.currentTarget = this;
+
+ // Namespaced event handlers
+ var namespaces = event.type.split(".");
+ event.type = namespaces.shift();
+
+ // Cache this now, all = true means, any handler
+ all = !namespaces.length && !event.exclusive;
+
+ var namespace = new RegExp("(^|\\.)" + namespaces.slice(0).sort().join("\\.(?:.*\\.)?") + "(\\.|$)");
+
+ handlers = ( jQuery.data(this, "events") || {} )[ event.type ];
+
+ for ( var j in handlers ) {
+ var handler = handlers[ j ];
+
+ // Filter the functions by class
+ if ( all || namespace.test(handler.type) ) {
+ // Pass in a reference to the handler function itself
+ // So that we can later remove it
+ event.handler = handler;
+ event.data = handler.data;
+
+ var ret = handler.apply( this, arguments );
+
+ if ( ret !== undefined ) {
+ event.result = ret;
+ if ( ret === false ) {
+ event.preventDefault();
+ event.stopPropagation();
+ }
+ }
+
+ if ( event.isImmediatePropagationStopped() ) {
+ break;
+ }
+
+ }
}
- return ret;
+ return event.result;
},
- grep: function( elems, callback, inv ) {
- var ret = [];
+ props: "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
- // Go through the array, only saving the items
- // that pass the validator function
- for ( var i = 0, length = elems.length; i < length; i++ )
- if ( !inv != !callback( elems[ i ], i ) )
- ret.push( elems[ i ] );
+ fix: function( event ) {
+ if ( event[ expando ] ) {
+ return event;
+ }
- return ret;
+ // store a copy of the original event object
+ // and "clone" to set read-only properties
+ var originalEvent = event;
+ event = jQuery.Event( originalEvent );
+
+ for ( var i = this.props.length, prop; i; ) {
+ prop = this.props[ --i ];
+ event[ prop ] = originalEvent[ prop ];
+ }
+
+ // Fix target property, if necessary
+ if ( !event.target ) {
+ event.target = event.srcElement || document; // Fixes #1925 where srcElement might not be defined either
+ }
+
+ // check if target is a textnode (safari)
+ if ( event.target.nodeType === 3 ) {
+ event.target = event.target.parentNode;
+ }
+
+ // Add relatedTarget, if necessary
+ if ( !event.relatedTarget && event.fromElement ) {
+ event.relatedTarget = event.fromElement === event.target ? event.toElement : event.fromElement;
+ }
+
+ // Calculate pageX/Y if missing and clientX/Y available
+ if ( event.pageX == null && event.clientX != null ) {
+ var doc = document.documentElement, body = document.body;
+ event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);
+ event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0);
+ }
+
+ // Add which for key events
+ if ( !event.which && ((event.charCode || event.charCode === 0) ? event.charCode : event.keyCode) ) {
+ event.which = event.charCode || event.keyCode;
+ }
+
+ // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs)
+ if ( !event.metaKey && event.ctrlKey ) {
+ event.metaKey = event.ctrlKey;
+ }
+
+ // Add which for click: 1 === left; 2 === middle; 3 === right
+ // Note: button is not normalized, so don't use it
+ if ( !event.which && event.button !== undefined ) {
+ event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) ));
+ }
+
+ return event;
},
- map: function( elems, callback ) {
- var ret = [];
+ // Deprecated, use jQuery.guid instead
+ guid: 1E8,
- // Go through the array, translating each of the items to their
- // new value (or values).
- for ( var i = 0, length = elems.length; i < length; i++ ) {
- var value = callback( elems[ i ], i );
+ // Deprecated, use jQuery.proxy instead
+ proxy: jQuery.proxy,
- if ( value != null )
- ret[ ret.length ] = value;
+ special: {
+ ready: {
+ // Make sure the ready event is setup
+ setup: jQuery.bindReady,
+ teardown: jQuery.noop
+ },
+
+ live: {
+ add: function( proxy, data, namespaces, live ) {
+ jQuery.extend( proxy, data || {} );
+
+ proxy.guid += data.selector + data.live;
+ data.liveProxy = proxy;
+
+ jQuery.event.add( this, data.live, liveHandler, data );
+
+ },
+
+ remove: function( namespaces ) {
+ if ( namespaces.length ) {
+ var remove = 0, name = new RegExp("(^|\\.)" + namespaces[0] + "(\\.|$)");
+
+ jQuery.each( (jQuery.data(this, "events").live || {}), function() {
+ if ( name.test(this.type) ) {
+ remove++;
+ }
+ });
+
+ if ( remove < 1 ) {
+ jQuery.event.remove( this, namespaces[0], liveHandler );
+ }
+ }
+ },
+ special: {}
+ },
+ beforeunload: {
+ setup: function( data, namespaces, fn ) {
+ // We only want to do this special case on windows
+ if ( this.setInterval ) {
+ this.onbeforeunload = fn;
+ }
+
+ return false;
+ },
+ teardown: function( namespaces, fn ) {
+ if ( this.onbeforeunload === fn ) {
+ this.onbeforeunload = null;
+ }
+ }
}
+ }
+};
- return ret.concat.apply( [], ret );
+jQuery.Event = function( src ) {
+ // Allow instantiation without the 'new' keyword
+ if ( !this.preventDefault ) {
+ return new jQuery.Event( src );
+ }
+
+ // Event object
+ if ( src && src.type ) {
+ this.originalEvent = src;
+ this.type = src.type;
+ // Event type
+ } else {
+ this.type = src;
}
-});
-var userAgent = navigator.userAgent.toLowerCase();
+ // timeStamp is buggy for some events on Firefox(#3843)
+ // So we won't rely on the native value
+ this.timeStamp = now();
-// Figure out what browser is being used
-jQuery.browser = {
- version: (userAgent.match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [])[1],
- safari: /webkit/.test( userAgent ),
- opera: /opera/.test( userAgent ),
- msie: /msie/.test( userAgent ) && !/opera/.test( userAgent ),
- mozilla: /mozilla/.test( userAgent ) && !/(compatible|webkit)/.test( userAgent )
+ // Mark it as fixed
+ this[ expando ] = true;
};
-var styleFloat = jQuery.browser.msie ?
- "styleFloat" :
- "cssFloat";
+function returnFalse() {
+ return false;
+}
+function returnTrue() {
+ return true;
+}
-jQuery.extend({
- // Check to see if the W3C box model is being used
- boxModel: !jQuery.browser.msie || document.compatMode == "CSS1Compat",
+// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
+// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
+jQuery.Event.prototype = {
+ preventDefault: function() {
+ this.isDefaultPrevented = returnTrue;
- props: {
- "for": "htmlFor",
- "class": "className",
- "float": styleFloat,
- cssFloat: styleFloat,
- styleFloat: styleFloat,
- readonly: "readOnly",
- maxlength: "maxLength",
- cellspacing: "cellSpacing"
+ var e = this.originalEvent;
+ if ( !e ) {
+ return;
+ }
+
+ // if preventDefault exists run it on the original event
+ if ( e.preventDefault ) {
+ e.preventDefault();
+ }
+ // otherwise set the returnValue property of the original event to false (IE)
+ e.returnValue = false;
+ },
+ stopPropagation: function() {
+ this.isPropagationStopped = returnTrue;
+
+ var e = this.originalEvent;
+ if ( !e ) {
+ return;
+ }
+ // if stopPropagation exists run it on the original event
+ if ( e.stopPropagation ) {
+ e.stopPropagation();
+ }
+ // otherwise set the cancelBubble property of the original event to true (IE)
+ e.cancelBubble = true;
+ },
+ stopImmediatePropagation: function() {
+ this.isImmediatePropagationStopped = returnTrue;
+ this.stopPropagation();
+ },
+ isDefaultPrevented: returnFalse,
+ isPropagationStopped: returnFalse,
+ isImmediatePropagationStopped: returnFalse
+};
+
+// Checks if an event happened on an element within another element
+// Used in jQuery.event.special.mouseenter and mouseleave handlers
+var withinElement = function( event ) {
+ // Check if mouse(over|out) are still within the same parent element
+ var parent = event.relatedTarget;
+
+ // Traverse up the tree
+ while ( parent && parent !== this ) {
+ // Firefox sometimes assigns relatedTarget a XUL element
+ // which we cannot access the parentNode property of
+ try {
+ parent = parent.parentNode;
+
+ // assuming we've left the element since we most likely mousedover a xul element
+ } catch(e) {
+ break;
+ }
}
-});
-jQuery.each({
- parent: function(elem){return elem.parentNode;},
- parents: function(elem){return jQuery.dir(elem,"parentNode");},
- next: function(elem){return jQuery.nth(elem,2,"nextSibling");},
- prev: function(elem){return jQuery.nth(elem,2,"previousSibling");},
- nextAll: function(elem){return jQuery.dir(elem,"nextSibling");},
- prevAll: function(elem){return jQuery.dir(elem,"previousSibling");},
- siblings: function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);},
- children: function(elem){return jQuery.sibling(elem.firstChild);},
- contents: function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);}
-}, function(name, fn){
- jQuery.fn[ name ] = function( selector ) {
- var ret = jQuery.map( this, fn );
+ if ( parent !== this ) {
+ // set the correct event type
+ event.type = event.data;
- if ( selector && typeof selector == "string" )
- ret = jQuery.multiFilter( selector, ret );
+ // handle event if we actually just moused on to a non sub-element
+ jQuery.event.handle.apply( this, arguments );
+ }
- return this.pushStack( jQuery.unique( ret ) );
- };
-});
+},
-jQuery.each({
- appendTo: "append",
- prependTo: "prepend",
- insertBefore: "before",
- insertAfter: "after",
- replaceAll: "replaceWith"
-}, function(name, original){
- jQuery.fn[ name ] = function() {
- var args = arguments;
+// In case of event delegation, we only need to rename the event.type,
+// liveHandler will take care of the rest.
+delegate = function( event ) {
+ event.type = event.data;
+ jQuery.event.handle.apply( this, arguments );
+};
- return this.each(function(){
- for ( var i = 0, length = args.length; i < length; i++ )
- jQuery( args[ i ] )[ original ]( this );
- });
+// Create mouseenter and mouseleave events
+jQuery.each({
+ mouseenter: "mouseover",
+ mouseleave: "mouseout"
+}, function( orig, fix ) {
+ jQuery.event.special[ orig ] = {
+ setup: function( data ) {
+ jQuery.event.add( this, fix, data && data.selector ? delegate : withinElement, orig );
+ },
+ teardown: function( data ) {
+ jQuery.event.remove( this, fix, data && data.selector ? delegate : withinElement );
+ }
};
});
-jQuery.each({
- removeAttr: function( name ) {
- jQuery.attr( this, name, "" );
- if (this.nodeType == 1)
- this.removeAttribute( name );
- },
+// submit delegation
+if ( !jQuery.support.submitBubbles ) {
+
+jQuery.event.special.submit = {
+ setup: function( data, namespaces, fn ) {
+ if ( this.nodeName.toLowerCase() !== "form" ) {
+ jQuery.event.add(this, "click.specialSubmit." + fn.guid, function( e ) {
+ var elem = e.target, type = elem.type;
+
+ if ( (type === "submit" || type === "image") && jQuery( elem ).closest("form").length ) {
+ return trigger( "submit", this, arguments );
+ }
+ });
+
+ jQuery.event.add(this, "keypress.specialSubmit." + fn.guid, function( e ) {
+ var elem = e.target, type = elem.type;
+
+ if ( (type === "text" || type === "password") && jQuery( elem ).closest("form").length && e.keyCode === 13 ) {
+ return trigger( "submit", this, arguments );
+ }
+ });
- addClass: function( classNames ) {
- jQuery.className.add( this, classNames );
+ } else {
+ return false;
+ }
},
- removeClass: function( classNames ) {
- jQuery.className.remove( this, classNames );
+ remove: function( namespaces, fn ) {
+ jQuery.event.remove( this, "click.specialSubmit" + (fn ? "."+fn.guid : "") );
+ jQuery.event.remove( this, "keypress.specialSubmit" + (fn ? "."+fn.guid : "") );
+ }
+};
+
+}
+
+// change delegation, happens here so we have bind.
+if ( !jQuery.support.changeBubbles ) {
+
+var formElems = /textarea|input|select/i;
+
+function getVal( elem ) {
+ var type = elem.type, val = elem.value;
+
+ if ( type === "radio" || type === "checkbox" ) {
+ val = elem.checked;
+
+ } else if ( type === "select-multiple" ) {
+ val = elem.selectedIndex > -1 ?
+ jQuery.map( elem.options, function( elem ) {
+ return elem.selected;
+ }).join("-") :
+ "";
+
+ } else if ( elem.nodeName.toLowerCase() === "select" ) {
+ val = elem.selectedIndex;
+ }
+
+ return val;
+}
+
+function testChange( e ) {
+ var elem = e.target, data, val;
+
+ if ( !formElems.test( elem.nodeName ) || elem.readOnly ) {
+ return;
+ }
+
+ data = jQuery.data( elem, "_change_data" );
+ val = getVal(elem);
+
+ // the current data will be also retrieved by beforeactivate
+ if ( e.type !== "focusout" || elem.type !== "radio" ) {
+ jQuery.data( elem, "_change_data", val );
+ }
+
+ if ( data === undefined || val === data ) {
+ return;
+ }
+
+ if ( data != null || val ) {
+ e.type = "change";
+ return jQuery.event.trigger( e, arguments[1], elem );
+ }
+}
+
+jQuery.event.special.change = {
+ filters: {
+ focusout: testChange,
+
+ click: function( e ) {
+ var elem = e.target, type = elem.type;
+
+ if ( type === "radio" || type === "checkbox" || elem.nodeName.toLowerCase() === "select" ) {
+ return testChange.call( this, e );
+ }
+ },
+
+ // Change has to be called before submit
+ // Keydown will be called before keypress, which is used in submit-event delegation
+ keydown: function( e ) {
+ var elem = e.target, type = elem.type;
+
+ if ( (e.keyCode === 13 && elem.nodeName.toLowerCase() !== "textarea") ||
+ (e.keyCode === 32 && (type === "checkbox" || type === "radio")) ||
+ type === "select-multiple" ) {
+ return testChange.call( this, e );
+ }
+ },
+
+ // Beforeactivate happens also before the previous element is blurred
+ // with this event you can't trigger a change event, but you can store
+ // information/focus[in] is not needed anymore
+ beforeactivate: function( e ) {
+ var elem = e.target;
+
+ if ( elem.nodeName.toLowerCase() === "input" && elem.type === "radio" ) {
+ jQuery.data( elem, "_change_data", getVal(elem) );
+ }
+ }
},
+ setup: function( data, namespaces, fn ) {
+ for ( var type in changeFilters ) {
+ jQuery.event.add( this, type + ".specialChange." + fn.guid, changeFilters[type] );
+ }
- toggleClass: function( classNames ) {
- jQuery.className[ jQuery.className.has( this, classNames ) ? "remove" : "add" ]( this, classNames );
+ return formElems.test( this.nodeName );
},
+ remove: function( namespaces, fn ) {
+ for ( var type in changeFilters ) {
+ jQuery.event.remove( this, type + ".specialChange" + (fn ? "."+fn.guid : ""), changeFilters[type] );
+ }
+
+ return formElems.test( this.nodeName );
+ }
+};
+
+var changeFilters = jQuery.event.special.change.filters;
- remove: function( selector ) {
- if ( !selector || jQuery.filter( selector, [ this ] ).r.length ) {
- // Prevent memory leaks
- jQuery( "*", this ).add(this).each(function(){
- jQuery.event.remove(this);
- jQuery.removeData(this);
+}
+
+function trigger( type, elem, args ) {
+ args[0].type = type;
+ return jQuery.event.handle.apply( elem, args );
+}
+
+// Create "bubbling" focus and blur events
+if ( document.addEventListener ) {
+ jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
+ jQuery.event.special[ fix ] = {
+ setup: function() {
+ this.addEventListener( orig, handler, true );
+ },
+ teardown: function() {
+ this.removeEventListener( orig, handler, true );
+ }
+ };
+
+ function handler( e ) {
+ e = jQuery.event.fix( e );
+ e.type = fix;
+ return jQuery.event.handle.call( this, e );
+ }
+ });
+}
+
+jQuery.each(["bind", "one"], function( i, name ) {
+ jQuery.fn[ name ] = function( type, data, fn ) {
+ // Handle object literals
+ if ( typeof type === "object" ) {
+ for ( var key in type ) {
+ this[ name ](key, data, type[key], fn);
+ }
+ return this;
+ }
+
+ if ( jQuery.isFunction( data ) ) {
+ fn = data;
+ data = undefined;
+ }
+
+ var handler = name === "one" ? jQuery.proxy( fn, function( event ) {
+ jQuery( this ).unbind( event, handler );
+ return fn.apply( this, arguments );
+ }) : fn;
+
+ return type === "unload" && name !== "one" ?
+ this.one( type, data, fn ) :
+ this.each(function() {
+ jQuery.event.add( this, type, handler, data );
});
- if (this.parentNode)
- this.parentNode.removeChild( this );
+ };
+});
+
+jQuery.fn.extend({
+ unbind: function( type, fn ) {
+ // Handle object literals
+ if ( typeof type === "object" && !type.preventDefault ) {
+ for ( var key in type ) {
+ this.unbind(key, type[key]);
+ }
+ return this;
}
+
+ return this.each(function() {
+ jQuery.event.remove( this, type, fn );
+ });
+ },
+ trigger: function( type, data ) {
+ return this.each(function() {
+ jQuery.event.trigger( type, data, this );
+ });
},
- empty: function() {
- // Remove element nodes and prevent memory leaks
- jQuery( ">*", this ).remove();
+ triggerHandler: function( type, data ) {
+ if ( this[0] ) {
+ var event = jQuery.Event( type );
+ event.preventDefault();
+ event.stopPropagation();
+ jQuery.event.trigger( event, data, this[0] );
+ return event.result;
+ }
+ },
- // Remove any remaining nodes
- while ( this.firstChild )
- this.removeChild( this.firstChild );
+ toggle: function( fn ) {
+ // Save reference to arguments for access in closure
+ var args = arguments, i = 1;
+
+ // link all the functions, so any of them can unbind this click handler
+ while ( i < args.length ) {
+ jQuery.proxy( fn, args[ i++ ] );
+ }
+
+ return this.click( jQuery.proxy( fn, function( event ) {
+ // Figure out which function to execute
+ var lastToggle = ( jQuery.data( this, "lastToggle" + fn.guid ) || 0 ) % i;
+ jQuery.data( this, "lastToggle" + fn.guid, lastToggle + 1 );
+
+ // Make sure that clicks stop
+ event.preventDefault();
+
+ // and execute the function
+ return args[ lastToggle ].apply( this, arguments ) || false;
+ }));
+ },
+
+ hover: function( fnOver, fnOut ) {
+ return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
}
-}, function(name, fn){
- jQuery.fn[ name ] = function(){
- return this.each( fn, arguments );
- };
});
-jQuery.each([ "Height", "Width" ], function(i, name){
- var type = name.toLowerCase();
+jQuery.each(["live", "die"], function( i, name ) {
+ jQuery.fn[ name ] = function( types, data, fn ) {
+ var type, i = 0;
- jQuery.fn[ type ] = function( size ) {
- // Get window width or height
- return this[0] == window ?
- // Opera reports document.body.client[Width/Height] properly in both quirks and standards
- jQuery.browser.opera && document.body[ "client" + name ] ||
+ if ( jQuery.isFunction( data ) ) {
+ fn = data;
+ data = undefined;
+ }
- // Safari reports inner[Width/Height] just fine (Mozilla and Opera include scroll bar widths)
- jQuery.browser.safari && window[ "inner" + name ] ||
+ types = (types || "").split( /\s+/ );
- // Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
- document.compatMode == "CSS1Compat" && document.documentElement[ "client" + name ] || document.body[ "client" + name ] :
+ while ( (type = types[ i++ ]) != null ) {
+ type = type === "focus" ? "focusin" : // focus --> focusin
+ type === "blur" ? "focusout" : // blur --> focusout
+ type === "hover" ? types.push("mouseleave") && "mouseenter" : // hover support
+ type;
+
+ if ( name === "live" ) {
+ // bind live handler
+ jQuery( this.context ).bind( liveConvert( type, this.selector ), {
+ data: data, selector: this.selector, live: type
+ }, fn );
- // Get document width or height
- this[0] == document ?
- // Either scroll[Width/Height] or offset[Width/Height], whichever is greater
- Math.max(
- Math.max(document.body["scroll" + name], document.documentElement["scroll" + name]),
- Math.max(document.body["offset" + name], document.documentElement["offset" + name])
- ) :
+ } else {
+ // unbind live handler
+ jQuery( this.context ).unbind( liveConvert( type, this.selector ), fn ? { guid: fn.guid + this.selector + type } : null );
+ }
+ }
+
+ return this;
+ }
+});
- // Get or set width or height on the element
- size == undefined ?
- // Get width or height on the element
- (this.length ? jQuery.css( this[0], type ) : null) :
+function liveHandler( event ) {
+ var stop, elems = [], selectors = [], args = arguments,
+ related, match, fn, elem, j, i, l, data,
+ live = jQuery.extend({}, jQuery.data( this, "events" ).live);
- // Set the width or height on the element (default to pixels if value is unitless)
- this.css( type, size.constructor == String ? size : size + "px" );
+ // Make sure we avoid non-left-click bubbling in Firefox (#3861)
+ if ( event.button && event.type === "click" ) {
+ return;
+ }
+
+ for ( j in live ) {
+ fn = live[j];
+ if ( fn.live === event.type ||
+ fn.altLive && jQuery.inArray(event.type, fn.altLive) > -1 ) {
+
+ data = fn.data;
+ if ( !(data.beforeFilter && data.beforeFilter[event.type] &&
+ !data.beforeFilter[event.type](event)) ) {
+ selectors.push( fn.selector );
+ }
+ } else {
+ delete live[j];
+ }
+ }
+
+ match = jQuery( event.target ).closest( selectors, event.currentTarget );
+
+ for ( i = 0, l = match.length; i < l; i++ ) {
+ for ( j in live ) {
+ fn = live[j];
+ elem = match[i].elem;
+ related = null;
+
+ if ( match[i].selector === fn.selector ) {
+ // Those two events require additional checking
+ if ( fn.live === "mouseenter" || fn.live === "mouseleave" ) {
+ related = jQuery( event.relatedTarget ).closest( fn.selector )[0];
+ }
+
+ if ( !related || related !== elem ) {
+ elems.push({ elem: elem, fn: fn });
+ }
+ }
+ }
+ }
+
+ for ( i = 0, l = elems.length; i < l; i++ ) {
+ match = elems[i];
+ event.currentTarget = match.elem;
+ event.data = match.fn.data;
+ if ( match.fn.apply( match.elem, args ) === false ) {
+ stop = false;
+ break;
+ }
+ }
+
+ return stop;
+}
+
+function liveConvert( type, selector ) {
+ return "live." + (type ? type + "." : "") + selector.replace(/\./g, "`").replace(/ /g, "&");
+}
+
+jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
+ "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
+ "change select submit keydown keypress keyup error").split(" "), function( i, name ) {
+
+ // Handle event binding
+ jQuery.fn[ name ] = function( fn ) {
+ return fn ? this.bind( name, fn ) : this.trigger( name );
};
+
+ if ( jQuery.attrFn ) {
+ jQuery.attrFn[ name ] = true;
+ }
});
-// Helper function used by the dimensions and offset modules
-function num(elem, prop) {
- return elem[0] && parseInt( jQuery.curCSS(elem[0], prop, true), 10 ) || 0;
-}var chars = jQuery.browser.safari && parseInt(jQuery.browser.version) < 417 ?
- "(?:[\\w*_-]|\\\\.)" :
- "(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",
- quickChild = new RegExp("^>\\s*(" + chars + "+)"),
- quickID = new RegExp("^(" + chars + "+)(#)(" + chars + "+)"),
- quickClass = new RegExp("^([#.]?)(" + chars + "*)");
+// Prevent memory leaks in IE
+// Window isn't included so as not to unbind existing unload events
+// More info:
+// - http://isaacschlueter.com/2006/10/msie-memory-leaks/
+if ( window.attachEvent && !window.addEventListener ) {
+ window.attachEvent("onunload", function() {
+ for ( var id in jQuery.cache ) {
+ if ( jQuery.cache[ id ].handle ) {
+ // Try/Catch is to handle iframes being unloaded, see #4280
+ try {
+ jQuery.event.remove( jQuery.cache[ id ].handle.elem );
+ } catch(e) {}
+ }
+ }
+ });
+}
+/*!
+ * Sizzle CSS Selector Engine - v1.0
+ * Copyright 2009, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ * More information: http://sizzlejs.com/
+ */
+(function(){
-jQuery.extend({
- expr: {
- "": function(a,i,m){return m[2]=="*"||jQuery.nodeName(a,m[2]);},
- "#": function(a,i,m){return a.getAttribute("id")==m[2];},
- ":": {
- // Position Checks
- lt: function(a,i,m){return i<m[3]-0;},
- gt: function(a,i,m){return i>m[3]-0;},
- nth: function(a,i,m){return m[3]-0==i;},
- eq: function(a,i,m){return m[3]-0==i;},
- first: function(a,i){return i==0;},
- last: function(a,i,m,r){return i==r.length-1;},
- even: function(a,i){return i%2==0;},
- odd: function(a,i){return i%2;},
-
- // Child Checks
- "first-child": function(a){return a.parentNode.getElementsByTagName("*")[0]==a;},
- "last-child": function(a){return jQuery.nth(a.parentNode.lastChild,1,"previousSibling")==a;},
- "only-child": function(a){return !jQuery.nth(a.parentNode.lastChild,2,"previousSibling");},
-
- // Parent Checks
- parent: function(a){return a.firstChild;},
- empty: function(a){return !a.firstChild;},
-
- // Text Check
- contains: function(a,i,m){return (a.textContent||a.innerText||jQuery(a).text()||"").indexOf(m[3])>=0;},
-
- // Visibility
- visible: function(a){return "hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden";},
- hidden: function(a){return "hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden";},
-
- // Form attributes
- enabled: function(a){return !a.disabled;},
- disabled: function(a){return a.disabled;},
- checked: function(a){return a.checked;},
- selected: function(a){return a.selected||jQuery.attr(a,"selected");},
-
- // Form elements
- text: function(a){return "text"==a.type;},
- radio: function(a){return "radio"==a.type;},
- checkbox: function(a){return "checkbox"==a.type;},
- file: function(a){return "file"==a.type;},
- password: function(a){return "password"==a.type;},
- submit: function(a){return "submit"==a.type;},
- image: function(a){return "image"==a.type;},
- reset: function(a){return "reset"==a.type;},
- button: function(a){return "button"==a.type||jQuery.nodeName(a,"button");},
- input: function(a){return /input|select|textarea|button/i.test(a.nodeName);},
-
- // :has()
- has: function(a,i,m){return jQuery.find(m[3],a).length;},
-
- // :header
- header: function(a){return /h\d/i.test(a.nodeName);},
-
- // :animated
- animated: function(a){return jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length;}
- }
- },
-
- // The regular expressions that power the parsing engine
- parse: [
- // Match: [@value='test'], [@foo]
- /^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,
-
- // Match: :contains('foo')
- /^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,
-
- // Match: :even, :last-child, #id, .class
- new RegExp("^([:.#]*)(" + chars + "+)")
- ],
-
- multiFilter: function( expr, elems, not ) {
- var old, cur = [];
-
- while ( expr && expr != old ) {
- old = expr;
- var f = jQuery.filter( expr, elems, not );
- expr = f.t.replace(/^\s*,\s*/, "" );
- cur = not ? elems = f.r : jQuery.merge( cur, f.r );
+var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
+ done = 0,
+ toString = Object.prototype.toString,
+ hasDuplicate = false,
+ baseHasDuplicate = true;
+
+// Here we check if the JavaScript engine is using some sort of
+// optimization where it does not always call our comparision
+// function. If that is the case, discard the hasDuplicate value.
+// Thus far that includes Google Chrome.
+[0, 0].sort(function(){
+ baseHasDuplicate = false;
+ return 0;
+});
+
+var Sizzle = function(selector, context, results, seed) {
+ results = results || [];
+ var origContext = context = context || document;
+
+ if ( context.nodeType !== 1 && context.nodeType !== 9 ) {
+ return [];
+ }
+
+ if ( !selector || typeof selector !== "string" ) {
+ return results;
+ }
+
+ var parts = [], m, set, checkSet, extra, prune = true, contextXML = isXML(context),
+ soFar = selector;
+
+ // Reset the position of the chunker regexp (start from head)
+ while ( (chunker.exec(""), m = chunker.exec(soFar)) !== null ) {
+ soFar = m[3];
+
+ parts.push( m[1] );
+
+ if ( m[2] ) {
+ extra = m[3];
+ break;
}
+ }
- return cur;
- },
+ if ( parts.length > 1 && origPOS.exec( selector ) ) {
+ if ( parts.length === 2 && Expr.relative[ parts[0] ] ) {
+ set = posProcess( parts[0] + parts[1], context );
+ } else {
+ set = Expr.relative[ parts[0] ] ?
+ [ context ] :
+ Sizzle( parts.shift(), context );
- find: function( t, context ) {
- // Quickly handle non-string expressions
- if ( typeof t != "string" )
- return [ t ];
+ while ( parts.length ) {
+ selector = parts.shift();
- // check to make sure context is a DOM element or a document
- if ( context && context.nodeType != 1 && context.nodeType != 9)
- return [ ];
+ if ( Expr.relative[ selector ] ) {
+ selector += parts.shift();
+ }
+
+ set = posProcess( selector, set );
+ }
+ }
+ } else {
+ // Take a shortcut and set the context if the root selector is an ID
+ // (but not if it'll be faster if the inner selector is an ID)
+ if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML &&
+ Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) {
+ var ret = Sizzle.find( parts.shift(), context, contextXML );
+ context = ret.expr ? Sizzle.filter( ret.expr, ret.set )[0] : ret.set[0];
+ }
- // Set the correct context (if none is provided)
- context = context || document;
+ if ( context ) {
+ var ret = seed ?
+ { expr: parts.pop(), set: makeArray(seed) } :
+ Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML );
+ set = ret.expr ? Sizzle.filter( ret.expr, ret.set ) : ret.set;
- // Initialize the search
- var ret = [context], done = [], last, nodeName;
+ if ( parts.length > 0 ) {
+ checkSet = makeArray(set);
+ } else {
+ prune = false;
+ }
- // Continue while a selector expression exists, and while
- // we're no longer looping upon ourselves
- while ( t && last != t ) {
- var r = [];
- last = t;
+ while ( parts.length ) {
+ var cur = parts.pop(), pop = cur;
- t = jQuery.trim(t);
+ if ( !Expr.relative[ cur ] ) {
+ cur = "";
+ } else {
+ pop = parts.pop();
+ }
- var foundToken = false,
+ if ( pop == null ) {
+ pop = context;
+ }
- // An attempt at speeding up child selectors that
- // point to a specific element tag
- re = quickChild,
+ Expr.relative[ cur ]( checkSet, pop, contextXML );
+ }
+ } else {
+ checkSet = parts = [];
+ }
+ }
- m = re.exec(t);
+ if ( !checkSet ) {
+ checkSet = set;
+ }
- if ( m ) {
- nodeName = m[1].toUpperCase();
+ if ( !checkSet ) {
+ Sizzle.error( cur || selector );
+ }
- // Perform our own iteration and filter
- for ( var i = 0; ret[i]; i++ )
- for ( var c = ret[i].firstChild; c; c = c.nextSibling )
- if ( c.nodeType == 1 && (nodeName == "*" || c.nodeName.toUpperCase() == nodeName) )
- r.push( c );
+ if ( toString.call(checkSet) === "[object Array]" ) {
+ if ( !prune ) {
+ results.push.apply( results, checkSet );
+ } else if ( context && context.nodeType === 1 ) {
+ for ( var i = 0; checkSet[i] != null; i++ ) {
+ if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && contains(context, checkSet[i])) ) {
+ results.push( set[i] );
+ }
+ }
+ } else {
+ for ( var i = 0; checkSet[i] != null; i++ ) {
+ if ( checkSet[i] && checkSet[i].nodeType === 1 ) {
+ results.push( set[i] );
+ }
+ }
+ }
+ } else {
+ makeArray( checkSet, results );
+ }
- ret = r;
- t = t.replace( re, "" );
- if ( t.indexOf(" ") == 0 ) continue;
- foundToken = true;
- } else {
- re = /^([>+~])\s*(\w*)/i;
+ if ( extra ) {
+ Sizzle( extra, origContext, results, seed );
+ Sizzle.uniqueSort( results );
+ }
- if ( (m = re.exec(t)) != null ) {
- r = [];
+ return results;
+};
+
+Sizzle.uniqueSort = function(results){
+ if ( sortOrder ) {
+ hasDuplicate = baseHasDuplicate;
+ results.sort(sortOrder);
- var merge = {};
- nodeName = m[2].toUpperCase();
- m = m[1];
+ if ( hasDuplicate ) {
+ for ( var i = 1; i < results.length; i++ ) {
+ if ( results[i] === results[i-1] ) {
+ results.splice(i--, 1);
+ }
+ }
+ }
+ }
- for ( var j = 0, rl = ret.length; j < rl; j++ ) {
- var n = m == "~" || m == "+" ? ret[j].nextSibling : ret[j].firstChild;
- for ( ; n; n = n.nextSibling )
- if ( n.nodeType == 1 ) {
- var id = jQuery.data(n);
+ return results;
+};
- if ( m == "~" && merge[id] ) break;
+Sizzle.matches = function(expr, set){
+ return Sizzle(expr, null, null, set);
+};
- if (!nodeName || n.nodeName.toUpperCase() == nodeName ) {
- if ( m == "~" ) merge[id] = true;
- r.push( n );
- }
+Sizzle.find = function(expr, context, isXML){
+ var set, match;
+
+ if ( !expr ) {
+ return [];
+ }
+
+ for ( var i = 0, l = Expr.order.length; i < l; i++ ) {
+ var type = Expr.order[i], match;
+
+ if ( (match = Expr.leftMatch[ type ].exec( expr )) ) {
+ var left = match[1];
+ match.splice(1,1);
+
+ if ( left.substr( left.length - 1 ) !== "\\" ) {
+ match[1] = (match[1] || "").replace(/\\/g, "");
+ set = Expr.find[ type ]( match, context, isXML );
+ if ( set != null ) {
+ expr = expr.replace( Expr.match[ type ], "" );
+ break;
+ }
+ }
+ }
+ }
+
+ if ( !set ) {
+ set = context.getElementsByTagName("*");
+ }
- if ( m == "+" ) break;
+ return {set: set, expr: expr};
+};
+
+Sizzle.filter = function(expr, set, inplace, not){
+ var old = expr, result = [], curLoop = set, match, anyFound,
+ isXMLFilter = set && set[0] && isXML(set[0]);
+
+ while ( expr && set.length ) {
+ for ( var type in Expr.filter ) {
+ if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) {
+ var filter = Expr.filter[ type ], found, item, left = match[1];
+ anyFound = false;
+
+ match.splice(1,1);
+
+ if ( left.substr( left.length - 1 ) === "\\" ) {
+ continue;
+ }
+
+ if ( curLoop === result ) {
+ result = [];
+ }
+
+ if ( Expr.preFilter[ type ] ) {
+ match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter );
+
+ if ( !match ) {
+ anyFound = found = true;
+ } else if ( match === true ) {
+ continue;
+ }
+ }
+
+ if ( match ) {
+ for ( var i = 0; (item = curLoop[i]) != null; i++ ) {
+ if ( item ) {
+ found = filter( item, match, i, curLoop );
+ var pass = not ^ !!found;
+
+ if ( inplace && found != null ) {
+ if ( pass ) {
+ anyFound = true;
+ } else {
+ curLoop[i] = false;
+ }
+ } else if ( pass ) {
+ result.push( item );
+ anyFound = true;
}
+ }
+ }
+ }
+
+ if ( found !== undefined ) {
+ if ( !inplace ) {
+ curLoop = result;
}
- ret = r;
+ expr = expr.replace( Expr.match[ type ], "" );
- // And remove the token
- t = jQuery.trim( t.replace( re, "" ) );
- foundToken = true;
+ if ( !anyFound ) {
+ return [];
+ }
+
+ break;
}
}
+ }
- // See if there's still an expression, and that we haven't already
- // matched a token
- if ( t && !foundToken ) {
- // Handle multiple expressions
- if ( !t.indexOf(",") ) {
- // Clean the result set
- if ( context == ret[0] ) ret.shift();
+ // Improper expression
+ if ( expr === old ) {
+ if ( anyFound == null ) {
+ Sizzle.error( expr );
+ } else {
+ break;
+ }
+ }
- // Merge the result sets
- done = jQuery.merge( done, ret );
+ old = expr;
+ }
- // Reset the context
- r = ret = [context];
+ return curLoop;
+};
- // Touch up the selector string
- t = " " + t.substr(1,t.length);
+Sizzle.error = function( msg ) {
+ throw "Syntax error, unrecognized expression: " + msg;
+};
- } else {
- // Optimize for the case nodeName#idName
- var re2 = quickID;
- var m = re2.exec(t);
+var Expr = Sizzle.selectors = {
+ order: [ "ID", "NAME", "TAG" ],
+ match: {
+ ID: /#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,
+ CLASS: /\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,
+ NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,
+ ATTR: /\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,
+ TAG: /^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,
+ CHILD: /:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,
+ POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,
+ PSEUDO: /:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/
+ },
+ leftMatch: {},
+ attrMap: {
+ "class": "className",
+ "for": "htmlFor"
+ },
+ attrHandle: {
+ href: function(elem){
+ return elem.getAttribute("href");
+ }
+ },
+ relative: {
+ "+": function(checkSet, part){
+ var isPartStr = typeof part === "string",
+ isTag = isPartStr && !/\W/.test(part),
+ isPartStrNotTag = isPartStr && !isTag;
+
+ if ( isTag ) {
+ part = part.toLowerCase();
+ }
- // Re-organize the results, so that they're consistent
- if ( m ) {
- m = [ 0, m[2], m[3], m[1] ];
+ for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) {
+ if ( (elem = checkSet[i]) ) {
+ while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {}
- } else {
- // Otherwise, do a traditional filter check for
- // ID, class, and element selectors
- re2 = quickClass;
- m = re2.exec(t);
+ checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ?
+ elem || false :
+ elem === part;
+ }
+ }
+
+ if ( isPartStrNotTag ) {
+ Sizzle.filter( part, checkSet, true );
+ }
+ },
+ ">": function(checkSet, part){
+ var isPartStr = typeof part === "string";
+
+ if ( isPartStr && !/\W/.test(part) ) {
+ part = part.toLowerCase();
+
+ for ( var i = 0, l = checkSet.length; i < l; i++ ) {
+ var elem = checkSet[i];
+ if ( elem ) {
+ var parent = elem.parentNode;
+ checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false;
}
+ }
+ } else {
+ for ( var i = 0, l = checkSet.length; i < l; i++ ) {
+ var elem = checkSet[i];
+ if ( elem ) {
+ checkSet[i] = isPartStr ?
+ elem.parentNode :
+ elem.parentNode === part;
+ }
+ }
- m[2] = m[2].replace(/\\/g, "");
+ if ( isPartStr ) {
+ Sizzle.filter( part, checkSet, true );
+ }
+ }
+ },
+ "": function(checkSet, part, isXML){
+ var doneName = done++, checkFn = dirCheck;
- var elem = ret[ret.length-1];
+ if ( typeof part === "string" && !/\W/.test(part) ) {
+ var nodeCheck = part = part.toLowerCase();
+ checkFn = dirNodeCheck;
+ }
- // Try to do a global search by ID, where we can
- if ( m[1] == "#" && elem && elem.getElementById && !jQuery.isXMLDoc(elem) ) {
- // Optimization for HTML document case
- var oid = elem.getElementById(m[2]);
+ checkFn("parentNode", part, doneName, checkSet, nodeCheck, isXML);
+ },
+ "~": function(checkSet, part, isXML){
+ var doneName = done++, checkFn = dirCheck;
- // Do a quick check for the existence of the actual ID attribute
- // to avoid selecting by the name attribute in IE
- // also check to insure id is a string to avoid selecting an element with the name of 'id' inside a form
- if ( (jQuery.browser.msie||jQuery.browser.opera) && oid && typeof oid.id == "string" && oid.id != m[2] )
- oid = jQuery('[@id="'+m[2]+'"]', elem)[0];
+ if ( typeof part === "string" && !/\W/.test(part) ) {
+ var nodeCheck = part = part.toLowerCase();
+ checkFn = dirNodeCheck;
+ }
- // Do a quick check for node name (where applicable) so
- // that div#foo searches will be really fast
- ret = r = oid && (!m[3] || jQuery.nodeName(oid, m[3])) ? [oid] : [];
- } else {
- // We need to find all descendant elements
- for ( var i = 0; ret[i]; i++ ) {
- // Grab the tag name being searched for
- var tag = m[1] == "#" && m[3] ? m[3] : m[1] != "" || m[0] == "" ? "*" : m[2];
+ checkFn("previousSibling", part, doneName, checkSet, nodeCheck, isXML);
+ }
+ },
+ find: {
+ ID: function(match, context, isXML){
+ if ( typeof context.getElementById !== "undefined" && !isXML ) {
+ var m = context.getElementById(match[1]);
+ return m ? [m] : [];
+ }
+ },
+ NAME: function(match, context){
+ if ( typeof context.getElementsByName !== "undefined" ) {
+ var ret = [], results = context.getElementsByName(match[1]);
+
+ for ( var i = 0, l = results.length; i < l; i++ ) {
+ if ( results[i].getAttribute("name") === match[1] ) {
+ ret.push( results[i] );
+ }
+ }
+
+ return ret.length === 0 ? null : ret;
+ }
+ },
+ TAG: function(match, context){
+ return context.getElementsByTagName(match[1]);
+ }
+ },
+ preFilter: {
+ CLASS: function(match, curLoop, inplace, result, not, isXML){
+ match = " " + match[1].replace(/\\/g, "") + " ";
- // Handle IE7 being really dumb about <object>s
- if ( tag == "*" && ret[i].nodeName.toLowerCase() == "object" )
- tag = "param";
+ if ( isXML ) {
+ return match;
+ }
- r = jQuery.merge( r, ret[i].getElementsByTagName( tag ));
+ for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) {
+ if ( elem ) {
+ if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n]/g, " ").indexOf(match) >= 0) ) {
+ if ( !inplace ) {
+ result.push( elem );
}
+ } else if ( inplace ) {
+ curLoop[i] = false;
+ }
+ }
+ }
- // It's faster to filter by class and be done with it
- if ( m[1] == "." )
- r = jQuery.classFilter( r, m[2] );
+ return false;
+ },
+ ID: function(match){
+ return match[1].replace(/\\/g, "");
+ },
+ TAG: function(match, curLoop){
+ return match[1].toLowerCase();
+ },
+ CHILD: function(match){
+ if ( match[1] === "nth" ) {
+ // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'
+ var test = /(-?)(\d*)n((?:\+|-)?\d*)/.exec(
+ match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" ||
+ !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]);
+
+ // calculate the numbers (first)n+(last) including if they are negative
+ match[2] = (test[1] + (test[2] || 1)) - 0;
+ match[3] = test[3] - 0;
+ }
- // Same with ID filtering
- if ( m[1] == "#" ) {
- var tmp = [];
+ // TODO: Move to normal caching system
+ match[0] = done++;
- // Try to find the element with the ID
- for ( var i = 0; r[i]; i++ )
- if ( r[i].getAttribute("id") == m[2] ) {
- tmp = [ r[i] ];
- break;
- }
+ return match;
+ },
+ ATTR: function(match, curLoop, inplace, result, not, isXML){
+ var name = match[1].replace(/\\/g, "");
+
+ if ( !isXML && Expr.attrMap[name] ) {
+ match[1] = Expr.attrMap[name];
+ }
+
+ if ( match[2] === "~=" ) {
+ match[4] = " " + match[4] + " ";
+ }
+
+ return match;
+ },
+ PSEUDO: function(match, curLoop, inplace, result, not){
+ if ( match[1] === "not" ) {
+ // If we're dealing with a complex expression, or a simple one
+ if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) {
+ match[3] = Sizzle(match[3], null, null, curLoop);
+ } else {
+ var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not);
+ if ( !inplace ) {
+ result.push.apply( result, ret );
+ }
+ return false;
+ }
+ } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {
+ return true;
+ }
+
+ return match;
+ },
+ POS: function(match){
+ match.unshift( true );
+ return match;
+ }
+ },
+ filters: {
+ enabled: function(elem){
+ return elem.disabled === false && elem.type !== "hidden";
+ },
+ disabled: function(elem){
+ return elem.disabled === true;
+ },
+ checked: function(elem){
+ return elem.checked === true;
+ },
+ selected: function(elem){
+ // Accessing this property makes selected-by-default
+ // options in Safari work properly
+ elem.parentNode.selectedIndex;
+ return elem.selected === true;
+ },
+ parent: function(elem){
+ return !!elem.firstChild;
+ },
+ empty: function(elem){
+ return !elem.firstChild;
+ },
+ has: function(elem, i, match){
+ return !!Sizzle( match[3], elem ).length;
+ },
+ header: function(elem){
+ return /h\d/i.test( elem.nodeName );
+ },
+ text: function(elem){
+ return "text" === elem.type;
+ },
+ radio: function(elem){
+ return "radio" === elem.type;
+ },
+ checkbox: function(elem){
+ return "checkbox" === elem.type;
+ },
+ file: function(elem){
+ return "file" === elem.type;
+ },
+ password: function(elem){
+ return "password" === elem.type;
+ },
+ submit: function(elem){
+ return "submit" === elem.type;
+ },
+ image: function(elem){
+ return "image" === elem.type;
+ },
+ reset: function(elem){
+ return "reset" === elem.type;
+ },
+ button: function(elem){
+ return "button" === elem.type || elem.nodeName.toLowerCase() === "button";
+ },
+ input: function(elem){
+ return /input|select|textarea|button/i.test(elem.nodeName);
+ }
+ },
+ setFilters: {
+ first: function(elem, i){
+ return i === 0;
+ },
+ last: function(elem, i, match, array){
+ return i === array.length - 1;
+ },
+ even: function(elem, i){
+ return i % 2 === 0;
+ },
+ odd: function(elem, i){
+ return i % 2 === 1;
+ },
+ lt: function(elem, i, match){
+ return i < match[3] - 0;
+ },
+ gt: function(elem, i, match){
+ return i > match[3] - 0;
+ },
+ nth: function(elem, i, match){
+ return match[3] - 0 === i;
+ },
+ eq: function(elem, i, match){
+ return match[3] - 0 === i;
+ }
+ },
+ filter: {
+ PSEUDO: function(elem, match, i, array){
+ var name = match[1], filter = Expr.filters[ name ];
+
+ if ( filter ) {
+ return filter( elem, i, match, array );
+ } else if ( name === "contains" ) {
+ return (elem.textContent || elem.innerText || getText([ elem ]) || "").indexOf(match[3]) >= 0;
+ } else if ( name === "not" ) {
+ var not = match[3];
+
+ for ( var i = 0, l = not.length; i < l; i++ ) {
+ if ( not[i] === elem ) {
+ return false;
+ }
+ }
- r = tmp;
+ return true;
+ } else {
+ Sizzle.error( "Syntax error, unrecognized expression: " + name );
+ }
+ },
+ CHILD: function(elem, match){
+ var type = match[1], node = elem;
+ switch (type) {
+ case 'only':
+ case 'first':
+ while ( (node = node.previousSibling) ) {
+ if ( node.nodeType === 1 ) {
+ return false;
}
+ }
+ if ( type === "first" ) {
+ return true;
+ }
+ node = elem;
+ case 'last':
+ while ( (node = node.nextSibling) ) {
+ if ( node.nodeType === 1 ) {
+ return false;
+ }
+ }
+ return true;
+ case 'nth':
+ var first = match[2], last = match[3];
- ret = r;
+ if ( first === 1 && last === 0 ) {
+ return true;
}
+
+ var doneName = match[0],
+ parent = elem.parentNode;
+
+ if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) {
+ var count = 0;
+ for ( node = parent.firstChild; node; node = node.nextSibling ) {
+ if ( node.nodeType === 1 ) {
+ node.nodeIndex = ++count;
+ }
+ }
+ parent.sizcache = doneName;
+ }
+
+ var diff = elem.nodeIndex - last;
+ if ( first === 0 ) {
+ return diff === 0;
+ } else {
+ return ( diff % first === 0 && diff / first >= 0 );
+ }
+ }
+ },
+ ID: function(elem, match){
+ return elem.nodeType === 1 && elem.getAttribute("id") === match;
+ },
+ TAG: function(elem, match){
+ return (match === "*" && elem.nodeType === 1) || elem.nodeName.toLowerCase() === match;
+ },
+ CLASS: function(elem, match){
+ return (" " + (elem.className || elem.getAttribute("class")) + " ")
+ .indexOf( match ) > -1;
+ },
+ ATTR: function(elem, match){
+ var name = match[1],
+ result = Expr.attrHandle[ name ] ?
+ Expr.attrHandle[ name ]( elem ) :
+ elem[ name ] != null ?
+ elem[ name ] :
+ elem.getAttribute( name ),
+ value = result + "",
+ type = match[2],
+ check = match[4];
+
+ return result == null ?
+ type === "!=" :
+ type === "=" ?
+ value === check :
+ type === "*=" ?
+ value.indexOf(check) >= 0 :
+ type === "~=" ?
+ (" " + value + " ").indexOf(check) >= 0 :
+ !check ?
+ value && result !== false :
+ type === "!=" ?
+ value !== check :
+ type === "^=" ?
+ value.indexOf(check) === 0 :
+ type === "$=" ?
+ value.substr(value.length - check.length) === check :
+ type === "|=" ?
+ value === check || value.substr(0, check.length + 1) === check + "-" :
+ false;
+ },
+ POS: function(elem, match, i, array){
+ var name = match[2], filter = Expr.setFilters[ name ];
+
+ if ( filter ) {
+ return filter( elem, i, match, array );
+ }
+ }
+ }
+};
+
+var origPOS = Expr.match.POS;
+
+for ( var type in Expr.match ) {
+ Expr.match[ type ] = new RegExp( Expr.match[ type ].source + /(?![^\[]*\])(?![^\(]*\))/.source );
+ Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, function(all, num){
+ return "\\" + (num - 0 + 1);
+ }));
+}
- t = t.replace( re2, "" );
+var makeArray = function(array, results) {
+ array = Array.prototype.slice.call( array, 0 );
+
+ if ( results ) {
+ results.push.apply( results, array );
+ return results;
+ }
+
+ return array;
+};
+
+// Perform a simple check to determine if the browser is capable of
+// converting a NodeList to an array using builtin methods.
+try {
+ Array.prototype.slice.call( document.documentElement.childNodes, 0 );
+
+// Provide a fallback method if it does not work
+} catch(e){
+ makeArray = function(array, results) {
+ var ret = results || [];
+
+ if ( toString.call(array) === "[object Array]" ) {
+ Array.prototype.push.apply( ret, array );
+ } else {
+ if ( typeof array.length === "number" ) {
+ for ( var i = 0, l = array.length; i < l; i++ ) {
+ ret.push( array[i] );
+ }
+ } else {
+ for ( var i = 0; array[i]; i++ ) {
+ ret.push( array[i] );
}
+ }
+ }
+ return ret;
+ };
+}
+
+var sortOrder;
+
+if ( document.documentElement.compareDocumentPosition ) {
+ sortOrder = function( a, b ) {
+ if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) {
+ if ( a == b ) {
+ hasDuplicate = true;
+ }
+ return a.compareDocumentPosition ? -1 : 1;
+ }
+
+ var ret = a.compareDocumentPosition(b) & 4 ? -1 : a === b ? 0 : 1;
+ if ( ret === 0 ) {
+ hasDuplicate = true;
+ }
+ return ret;
+ };
+} else if ( "sourceIndex" in document.documentElement ) {
+ sortOrder = function( a, b ) {
+ if ( !a.sourceIndex || !b.sourceIndex ) {
+ if ( a == b ) {
+ hasDuplicate = true;
}
+ return a.sourceIndex ? -1 : 1;
+ }
- // If a selector string still exists
- if ( t ) {
- // Attempt to filter it
- var val = jQuery.filter(t,r);
- ret = r = val.r;
- t = jQuery.trim(val.t);
+ var ret = a.sourceIndex - b.sourceIndex;
+ if ( ret === 0 ) {
+ hasDuplicate = true;
+ }
+ return ret;
+ };
+} else if ( document.createRange ) {
+ sortOrder = function( a, b ) {
+ if ( !a.ownerDocument || !b.ownerDocument ) {
+ if ( a == b ) {
+ hasDuplicate = true;
}
+ return a.ownerDocument ? -1 : 1;
}
- // An error occurred with the selector;
- // just return an empty set instead
- if ( t )
- ret = [];
+ var aRange = a.ownerDocument.createRange(), bRange = b.ownerDocument.createRange();
+ aRange.setStart(a, 0);
+ aRange.setEnd(a, 0);
+ bRange.setStart(b, 0);
+ bRange.setEnd(b, 0);
+ var ret = aRange.compareBoundaryPoints(Range.START_TO_END, bRange);
+ if ( ret === 0 ) {
+ hasDuplicate = true;
+ }
+ return ret;
+ };
+}
- // Remove the root context
- if ( ret && context == ret[0] )
- ret.shift();
+// Utility function for retreiving the text value of an array of DOM nodes
+function getText( elems ) {
+ var ret = "", elem;
- // And combine the results
- done = jQuery.merge( done, ret );
+ for ( var i = 0; elems[i]; i++ ) {
+ elem = elems[i];
- return done;
- },
+ // Get the text from text nodes and CDATA nodes
+ if ( elem.nodeType === 3 || elem.nodeType === 4 ) {
+ ret += elem.nodeValue;
- classFilter: function(r,m,not){
- m = " " + m + " ";
- var tmp = [];
- for ( var i = 0; r[i]; i++ ) {
- var pass = (" " + r[i].className + " ").indexOf( m ) >= 0;
- if ( !not && pass || not && !pass )
- tmp.push( r[i] );
+ // Traverse everything else, except comment nodes
+ } else if ( elem.nodeType !== 8 ) {
+ ret += getText( elem.childNodes );
}
- return tmp;
- },
+ }
+
+ return ret;
+}
- filter: function(t,r,not) {
- var last;
+// Check to see if the browser returns elements by name when
+// querying by getElementById (and provide a workaround)
+(function(){
+ // We're going to inject a fake input element with a specified name
+ var form = document.createElement("div"),
+ id = "script" + (new Date).getTime();
+ form.innerHTML = "<a name='" + id + "'/>";
+
+ // Inject it into the root element, check its status, and remove it quickly
+ var root = document.documentElement;
+ root.insertBefore( form, root.firstChild );
+
+ // The workaround has to do additional checks after a getElementById
+ // Which slows things down for other browsers (hence the branching)
+ if ( document.getElementById( id ) ) {
+ Expr.find.ID = function(match, context, isXML){
+ if ( typeof context.getElementById !== "undefined" && !isXML ) {
+ var m = context.getElementById(match[1]);
+ return m ? m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? [m] : undefined : [];
+ }
+ };
- // Look for common filter expressions
- while ( t && t != last ) {
- last = t;
+ Expr.filter.ID = function(elem, match){
+ var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
+ return elem.nodeType === 1 && node && node.nodeValue === match;
+ };
+ }
- var p = jQuery.parse, m;
+ root.removeChild( form );
+ root = form = null; // release memory in IE
+})();
- for ( var i = 0; p[i]; i++ ) {
- m = p[i].exec( t );
+(function(){
+ // Check to see if the browser returns only elements
+ // when doing getElementsByTagName("*")
- if ( m ) {
- // Remove what we just matched
- t = t.substring( m[0].length );
+ // Create a fake element
+ var div = document.createElement("div");
+ div.appendChild( document.createComment("") );
- m[2] = m[2].replace(/\\/g, "");
- break;
+ // Make sure no comments are found
+ if ( div.getElementsByTagName("*").length > 0 ) {
+ Expr.find.TAG = function(match, context){
+ var results = context.getElementsByTagName(match[1]);
+
+ // Filter out possible comments
+ if ( match[1] === "*" ) {
+ var tmp = [];
+
+ for ( var i = 0; results[i]; i++ ) {
+ if ( results[i].nodeType === 1 ) {
+ tmp.push( results[i] );
+ }
}
+
+ results = tmp;
}
- if ( !m )
- break;
+ return results;
+ };
+ }
- // :not() is a special case that can be optimized by
- // keeping it out of the expression list
- if ( m[1] == ":" && m[2] == "not" )
- // optimize if only one selector found (most common case)
- r = isSimple.test( m[3] ) ?
- jQuery.filter(m[3], r, true).r :
- jQuery( r ).not( m[3] );
+ // Check to see if an attribute returns normalized href attributes
+ div.innerHTML = "<a href='#'></a>";
+ if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" &&
+ div.firstChild.getAttribute("href") !== "#" ) {
+ Expr.attrHandle.href = function(elem){
+ return elem.getAttribute("href", 2);
+ };
+ }
- // We can get a big speed boost by filtering by class here
- else if ( m[1] == "." )
- r = jQuery.classFilter(r, m[2], not);
+ div = null; // release memory in IE
+})();
- else if ( m[1] == "[" ) {
- var tmp = [], type = m[3];
+if ( document.querySelectorAll ) {
+ (function(){
+ var oldSizzle = Sizzle, div = document.createElement("div");
+ div.innerHTML = "<p class='TEST'></p>";
- for ( var i = 0, rl = r.length; i < rl; i++ ) {
- var a = r[i], z = a[ jQuery.props[m[2]] || m[2] ];
+ // Safari can't handle uppercase or unicode characters when
+ // in quirks mode.
+ if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) {
+ return;
+ }
+
+ Sizzle = function(query, context, extra, seed){
+ context = context || document;
- if ( z == null || /href|src|selected/.test(m[2]) )
- z = jQuery.attr(a,m[2]) || '';
+ // Only use querySelectorAll on non-XML documents
+ // (ID selectors don't work in non-HTML documents)
+ if ( !seed && context.nodeType === 9 && !isXML(context) ) {
+ try {
+ return makeArray( context.querySelectorAll(query), extra );
+ } catch(e){}
+ }
+
+ return oldSizzle(query, context, extra, seed);
+ };
- if ( (type == "" && !!z ||
- type == "=" && z == m[5] ||
- type == "!=" && z != m[5] ||
- type == "^=" && z && !z.indexOf(m[5]) ||
- type == "$=" && z.substr(z.length - m[5].length) == m[5] ||
- (type == "*=" || type == "~=") && z.indexOf(m[5]) >= 0) ^ not )
- tmp.push( a );
+ for ( var prop in oldSizzle ) {
+ Sizzle[ prop ] = oldSizzle[ prop ];
+ }
+
+ div = null; // release memory in IE
+ })();
+}
+
+(function(){
+ var div = document.createElement("div");
+
+ div.innerHTML = "<div class='test e'></div><div class='test'></div>";
+
+ // Opera can't find a second classname (in 9.6)
+ // Also, make sure that getElementsByClassName actually exists
+ if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) {
+ return;
+ }
+
+ // Safari caches class attributes, doesn't catch changes (in 3.2)
+ div.lastChild.className = "e";
+
+ if ( div.getElementsByClassName("e").length === 1 ) {
+ return;
+ }
+
+ Expr.order.splice(1, 0, "CLASS");
+ Expr.find.CLASS = function(match, context, isXML) {
+ if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) {
+ return context.getElementsByClassName(match[1]);
+ }
+ };
+
+ div = null; // release memory in IE
+})();
+
+function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
+ for ( var i = 0, l = checkSet.length; i < l; i++ ) {
+ var elem = checkSet[i];
+ if ( elem ) {
+ elem = elem[dir];
+ var match = false;
+
+ while ( elem ) {
+ if ( elem.sizcache === doneName ) {
+ match = checkSet[elem.sizset];
+ break;
}
- r = tmp;
+ if ( elem.nodeType === 1 && !isXML ){
+ elem.sizcache = doneName;
+ elem.sizset = i;
+ }
- // We can get a speed boost by handling nth-child here
- } else if ( m[1] == ":" && m[2] == "nth-child" ) {
- var merge = {}, tmp = [],
- // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'
- test = /(-?)(\d*)n((?:\+|-)?\d*)/.exec(
- m[3] == "even" && "2n" || m[3] == "odd" && "2n+1" ||
- !/\D/.test(m[3]) && "0n+" + m[3] || m[3]),
- // calculate the numbers (first)n+(last) including if they are negative
- first = (test[1] + (test[2] || 1)) - 0, last = test[3] - 0;
+ if ( elem.nodeName.toLowerCase() === cur ) {
+ match = elem;
+ break;
+ }
- // loop through all the elements left in the jQuery object
- for ( var i = 0, rl = r.length; i < rl; i++ ) {
- var node = r[i], parentNode = node.parentNode, id = jQuery.data(parentNode);
+ elem = elem[dir];
+ }
- if ( !merge[id] ) {
- var c = 1;
+ checkSet[i] = match;
+ }
+ }
+}
+
+function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
+ for ( var i = 0, l = checkSet.length; i < l; i++ ) {
+ var elem = checkSet[i];
+ if ( elem ) {
+ elem = elem[dir];
+ var match = false;
+
+ while ( elem ) {
+ if ( elem.sizcache === doneName ) {
+ match = checkSet[elem.sizset];
+ break;
+ }
- for ( var n = parentNode.firstChild; n; n = n.nextSibling )
- if ( n.nodeType == 1 )
- n.nodeIndex = c++;
+ if ( elem.nodeType === 1 ) {
+ if ( !isXML ) {
+ elem.sizcache = doneName;
+ elem.sizset = i;
+ }
+ if ( typeof cur !== "string" ) {
+ if ( elem === cur ) {
+ match = true;
+ break;
+ }
- merge[id] = true;
+ } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) {
+ match = elem;
+ break;
}
+ }
- var add = false;
+ elem = elem[dir];
+ }
+
+ checkSet[i] = match;
+ }
+ }
+}
+
+var contains = document.compareDocumentPosition ? function(a, b){
+ return a.compareDocumentPosition(b) & 16;
+} : function(a, b){
+ return a !== b && (a.contains ? a.contains(b) : true);
+};
+
+var isXML = function(elem){
+ // documentElement is verified for cases where it doesn't yet exist
+ // (such as loading iframes in IE - #4833)
+ var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement;
+ return documentElement ? documentElement.nodeName !== "HTML" : false;
+};
- if ( first == 0 ) {
- if ( node.nodeIndex == last )
- add = true;
- } else if ( (node.nodeIndex - last) % first == 0 && (node.nodeIndex - last) / first >= 0 )
- add = true;
+var posProcess = function(selector, context){
+ var tmpSet = [], later = "", match,
+ root = context.nodeType ? [context] : context;
- if ( add ^ not )
- tmp.push( node );
+ // Position selectors must be done after the filter
+ // And so must :not(positional) so we move all PSEUDOs to the end
+ while ( (match = Expr.match.PSEUDO.exec( selector )) ) {
+ later += match[0];
+ selector = selector.replace( Expr.match.PSEUDO, "" );
+ }
+
+ selector = Expr.relative[selector] ? selector + "*" : selector;
+
+ for ( var i = 0, l = root.length; i < l; i++ ) {
+ Sizzle( selector, root[i], tmpSet );
+ }
+
+ return Sizzle.filter( later, tmpSet );
+};
+
+// EXPOSE
+jQuery.find = Sizzle;
+jQuery.expr = Sizzle.selectors;
+jQuery.expr[":"] = jQuery.expr.filters;
+jQuery.unique = Sizzle.uniqueSort;
+jQuery.getText = getText;
+jQuery.isXMLDoc = isXML;
+jQuery.contains = contains;
+
+return;
+
+window.Sizzle = Sizzle;
+
+})();
+var runtil = /Until$/,
+ rparentsprev = /^(?:parents|prevUntil|prevAll)/,
+ // Note: This RegExp should be improved, or likely pulled from Sizzle
+ rmultiselector = /,/,
+ slice = Array.prototype.slice;
+
+// Implement the identical functionality for filter and not
+var winnow = function( elements, qualifier, keep ) {
+ if ( jQuery.isFunction( qualifier ) ) {
+ return jQuery.grep(elements, function( elem, i ) {
+ return !!qualifier.call( elem, i, elem ) === keep;
+ });
+
+ } else if ( qualifier.nodeType ) {
+ return jQuery.grep(elements, function( elem, i ) {
+ return (elem === qualifier) === keep;
+ });
+
+ } else if ( typeof qualifier === "string" ) {
+ var filtered = jQuery.grep(elements, function( elem ) {
+ return elem.nodeType === 1;
+ });
+
+ if ( isSimple.test( qualifier ) ) {
+ return jQuery.filter(qualifier, filtered, !keep);
+ } else {
+ qualifier = jQuery.filter( qualifier, filtered );
+ }
+ }
+
+ return jQuery.grep(elements, function( elem, i ) {
+ return (jQuery.inArray( elem, qualifier ) >= 0) === keep;
+ });
+};
+
+jQuery.fn.extend({
+ find: function( selector ) {
+ var ret = this.pushStack( "", "find", selector ), length = 0;
+
+ for ( var i = 0, l = this.length; i < l; i++ ) {
+ length = ret.length;
+ jQuery.find( selector, this[i], ret );
+
+ if ( i > 0 ) {
+ // Make sure that the results are unique
+ for ( var n = length; n < ret.length; n++ ) {
+ for ( var r = 0; r < length; r++ ) {
+ if ( ret[r] === ret[n] ) {
+ ret.splice(n--, 1);
+ break;
+ }
+ }
}
+ }
+ }
- r = tmp;
+ return ret;
+ },
- // Otherwise, find the expression to execute
- } else {
- var fn = jQuery.expr[ m[1] ];
- if ( typeof fn == "object" )
- fn = fn[ m[2] ];
+ has: function( target ) {
+ var targets = jQuery( target );
+ return this.filter(function() {
+ for ( var i = 0, l = targets.length; i < l; i++ ) {
+ if ( jQuery.contains( this, targets[i] ) ) {
+ return true;
+ }
+ }
+ });
+ },
- if ( typeof fn == "string" )
- fn = eval("false||function(a,i){return " + fn + ";}");
+ not: function( selector ) {
+ return this.pushStack( winnow(this, selector, false), "not", selector);
+ },
- // Execute it against the current filter
- r = jQuery.grep( r, function(elem, i){
- return fn(elem, i, m, r);
- }, not );
+ filter: function( selector ) {
+ return this.pushStack( winnow(this, selector, true), "filter", selector );
+ },
+
+ is: function( selector ) {
+ return !!selector && jQuery.filter( selector, this ).length > 0;
+ },
+
+ closest: function( selectors, context ) {
+ if ( jQuery.isArray( selectors ) ) {
+ var ret = [], cur = this[0], match, matches = {}, selector;
+
+ if ( cur && selectors.length ) {
+ for ( var i = 0, l = selectors.length; i < l; i++ ) {
+ selector = selectors[i];
+
+ if ( !matches[selector] ) {
+ matches[selector] = jQuery.expr.match.POS.test( selector ) ?
+ jQuery( selector, context || this.context ) :
+ selector;
+ }
+ }
+
+ while ( cur && cur.ownerDocument && cur !== context ) {
+ for ( selector in matches ) {
+ match = matches[selector];
+
+ if ( match.jquery ? match.index(cur) > -1 : jQuery(cur).is(match) ) {
+ ret.push({ selector: selector, elem: cur });
+ delete matches[selector];
+ }
+ }
+ cur = cur.parentNode;
+ }
}
+
+ return ret;
}
- // Return an array of filtered elements (r)
- // and the modified expression string (t)
- return { r: r, t: t };
+ var pos = jQuery.expr.match.POS.test( selectors ) ?
+ jQuery( selectors, context || this.context ) : null;
+
+ return this.map(function( i, cur ) {
+ while ( cur && cur.ownerDocument && cur !== context ) {
+ if ( pos ? pos.index(cur) > -1 : jQuery(cur).is(selectors) ) {
+ return cur;
+ }
+ cur = cur.parentNode;
+ }
+ return null;
+ });
+ },
+
+ // Determine the position of an element within
+ // the matched set of elements
+ index: function( elem ) {
+ if ( !elem || typeof elem === "string" ) {
+ return jQuery.inArray( this[0],
+ // If it receives a string, the selector is used
+ // If it receives nothing, the siblings are used
+ elem ? jQuery( elem ) : this.parent().children() );
+ }
+ // Locate the position of the desired element
+ return jQuery.inArray(
+ // If it receives a jQuery object, the first element is used
+ elem.jquery ? elem[0] : elem, this );
+ },
+
+ add: function( selector, context ) {
+ var set = typeof selector === "string" ?
+ jQuery( selector, context || this.context ) :
+ jQuery.makeArray( selector ),
+ all = jQuery.merge( this.get(), set );
+
+ return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ?
+ all :
+ jQuery.unique( all ) );
+ },
+
+ andSelf: function() {
+ return this.add( this.prevObject );
+ }
+});
+
+// A painfully simple check to see if an element is disconnected
+// from a document (should be improved, where feasible).
+function isDisconnected( node ) {
+ return !node || !node.parentNode || node.parentNode.nodeType === 11;
+}
+
+jQuery.each({
+ parent: function( elem ) {
+ var parent = elem.parentNode;
+ return parent && parent.nodeType !== 11 ? parent : null;
+ },
+ parents: function( elem ) {
+ return jQuery.dir( elem, "parentNode" );
+ },
+ parentsUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "parentNode", until );
+ },
+ next: function( elem ) {
+ return jQuery.nth( elem, 2, "nextSibling" );
+ },
+ prev: function( elem ) {
+ return jQuery.nth( elem, 2, "previousSibling" );
+ },
+ nextAll: function( elem ) {
+ return jQuery.dir( elem, "nextSibling" );
+ },
+ prevAll: function( elem ) {
+ return jQuery.dir( elem, "previousSibling" );
+ },
+ nextUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "nextSibling", until );
+ },
+ prevUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "previousSibling", until );
+ },
+ siblings: function( elem ) {
+ return jQuery.sibling( elem.parentNode.firstChild, elem );
},
+ children: function( elem ) {
+ return jQuery.sibling( elem.firstChild );
+ },
+ contents: function( elem ) {
+ return jQuery.nodeName( elem, "iframe" ) ?
+ elem.contentDocument || elem.contentWindow.document :
+ jQuery.makeArray( elem.childNodes );
+ }
+}, function( name, fn ) {
+ jQuery.fn[ name ] = function( until, selector ) {
+ var ret = jQuery.map( this, fn, until );
+
+ if ( !runtil.test( name ) ) {
+ selector = until;
+ }
+
+ if ( selector && typeof selector === "string" ) {
+ ret = jQuery.filter( selector, ret );
+ }
- dir: function( elem, dir ){
- var matched = [],
- cur = elem[dir];
- while ( cur && cur != document ) {
- if ( cur.nodeType == 1 )
+ ret = this.length > 1 ? jQuery.unique( ret ) : ret;
+
+ if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) {
+ ret = ret.reverse();
+ }
+
+ return this.pushStack( ret, name, slice.call(arguments).join(",") );
+ };
+});
+
+jQuery.extend({
+ filter: function( expr, elems, not ) {
+ if ( not ) {
+ expr = ":not(" + expr + ")";
+ }
+
+ return jQuery.find.matches(expr, elems);
+ },
+
+ dir: function( elem, dir, until ) {
+ var matched = [], cur = elem[dir];
+ while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
+ if ( cur.nodeType === 1 ) {
matched.push( cur );
+ }
cur = cur[dir];
}
return matched;
},
- nth: function(cur,result,dir,elem){
+ nth: function( cur, result, dir, elem ) {
result = result || 1;
var num = 0;
- for ( ; cur; cur = cur[dir] )
- if ( cur.nodeType == 1 && ++num == result )
+ for ( ; cur; cur = cur[dir] ) {
+ if ( cur.nodeType === 1 && ++num === result ) {
break;
+ }
+ }
return cur;
},
@@ -1805,635 +3842,804 @@ jQuery.extend({
var r = [];
for ( ; n; n = n.nextSibling ) {
- if ( n.nodeType == 1 && n != elem )
+ if ( n.nodeType === 1 && n !== elem ) {
r.push( n );
+ }
}
return r;
}
});
-/*
- * A number of helper functions used for managing events.
- * Many of the ideas behind this code orignated from
- * Dean Edwards' addEvent library.
- */
-jQuery.event = {
+var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
+ rleadingWhitespace = /^\s+/,
+ rxhtmlTag = /(<([\w:]+)[^>]*?)\/>/g,
+ rselfClosing = /^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,
+ rtagName = /<([\w:]+)/,
+ rtbody = /<tbody/i,
+ rhtml = /<|&\w+;/,
+ rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, // checked="checked" or checked (html5)
+ fcloseTag = function( all, front, tag ) {
+ return rselfClosing.test( tag ) ?
+ all :
+ front + "></" + tag + ">";
+ },
+ wrapMap = {
+ option: [ 1, "<select multiple='multiple'>", "</select>" ],
+ legend: [ 1, "<fieldset>", "</fieldset>" ],
+ thead: [ 1, "<table>", "</table>" ],
+ tr: [ 2, "<table><tbody>", "</tbody></table>" ],
+ td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
+ col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
+ area: [ 1, "<map>", "</map>" ],
+ _default: [ 0, "", "" ]
+ };
- // Bind an event to an element
- // Original by Dean Edwards
- add: function(elem, types, handler, data) {
- if ( elem.nodeType == 3 || elem.nodeType == 8 )
- return;
+wrapMap.optgroup = wrapMap.option;
+wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
+wrapMap.th = wrapMap.td;
- // For whatever reason, IE has trouble passing the window object
- // around, causing it to be cloned in the process
- if ( jQuery.browser.msie && elem.setInterval )
- elem = window;
+// IE can't serialize <link> and <script> tags normally
+if ( !jQuery.support.htmlSerialize ) {
+ wrapMap._default = [ 1, "div<div>", "</div>" ];
+}
- // Make sure that the function being executed has a unique ID
- if ( !handler.guid )
- handler.guid = this.guid++;
+jQuery.fn.extend({
+ text: function( text ) {
+ if ( jQuery.isFunction(text) ) {
+ return this.each(function(i) {
+ var self = jQuery(this);
+ self.text( text.call(this, i, self.text()) );
+ });
+ }
- // if data is passed, bind to handler
- if( data != undefined ) {
- // Create temporary function pointer to original handler
- var fn = handler;
+ if ( typeof text !== "object" && text !== undefined ) {
+ return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) );
+ }
- // Create unique handler function, wrapped around original handler
- handler = this.proxy( fn, function() {
- // Pass arguments and context to original handler
- return fn.apply(this, arguments);
+ return jQuery.getText( this );
+ },
+
+ wrapAll: function( html ) {
+ if ( jQuery.isFunction( html ) ) {
+ return this.each(function(i) {
+ jQuery(this).wrapAll( html.call(this, i) );
});
+ }
- // Store data in unique handler
- handler.data = data;
+ if ( this[0] ) {
+ // The elements to wrap the target around
+ var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
+
+ if ( this[0].parentNode ) {
+ wrap.insertBefore( this[0] );
+ }
+
+ wrap.map(function() {
+ var elem = this;
+
+ while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
+ elem = elem.firstChild;
+ }
+
+ return elem;
+ }).append(this);
}
- // Init the element's event structure
- var events = jQuery.data(elem, "events") || jQuery.data(elem, "events", {}),
- handle = jQuery.data(elem, "handle") || jQuery.data(elem, "handle", function(){
- // Handle the second event of a trigger and when
- // an event is called after a page has unloaded
- if ( typeof jQuery != "undefined" && !jQuery.event.triggered )
- return jQuery.event.handle.apply(arguments.callee.elem, arguments);
+ return this;
+ },
+
+ wrapInner: function( html ) {
+ if ( jQuery.isFunction( html ) ) {
+ return this.each(function(i) {
+ jQuery(this).wrapInner( html.call(this, i) );
});
- // Add elem as a property of the handle function
- // This is to prevent a memory leak with non-native
- // event in IE.
- handle.elem = elem;
+ }
- // Handle multiple events separated by a space
- // jQuery(...).bind("mouseover mouseout", fn);
- jQuery.each(types.split(/\s+/), function(index, type) {
- // Namespaced event handlers
- var parts = type.split(".");
- type = parts[0];
- handler.type = parts[1];
+ return this.each(function() {
+ var self = jQuery( this ), contents = self.contents();
- // Get the current list of functions bound to this event
- var handlers = events[type];
+ if ( contents.length ) {
+ contents.wrapAll( html );
- // Init the event handler queue
- if (!handlers) {
- handlers = events[type] = {};
+ } else {
+ self.append( html );
+ }
+ });
+ },
- // Check for a special event handler
- // Only use addEventListener/attachEvent if the special
- // events handler returns false
- if ( !jQuery.event.special[type] || jQuery.event.special[type].setup.call(elem) === false ) {
- // Bind the global event handler to the element
- if (elem.addEventListener)
- elem.addEventListener(type, handle, false);
- else if (elem.attachEvent)
- elem.attachEvent("on" + type, handle);
- }
+ wrap: function( html ) {
+ return this.each(function() {
+ jQuery( this ).wrapAll( html );
+ });
+ },
+
+ unwrap: function() {
+ return this.parent().each(function() {
+ if ( !jQuery.nodeName( this, "body" ) ) {
+ jQuery( this ).replaceWith( this.childNodes );
}
+ }).end();
+ },
- // Add the function to the element's handler list
- handlers[handler.guid] = handler;
+ append: function() {
+ return this.domManip(arguments, true, function( elem ) {
+ if ( this.nodeType === 1 ) {
+ this.appendChild( elem );
+ }
+ });
+ },
- // Keep track of which events have been used, for global triggering
- jQuery.event.global[type] = true;
+ prepend: function() {
+ return this.domManip(arguments, true, function( elem ) {
+ if ( this.nodeType === 1 ) {
+ this.insertBefore( elem, this.firstChild );
+ }
});
+ },
- // Nullify elem to prevent memory leaks in IE
- elem = null;
+ before: function() {
+ if ( this[0] && this[0].parentNode ) {
+ return this.domManip(arguments, false, function( elem ) {
+ this.parentNode.insertBefore( elem, this );
+ });
+ } else if ( arguments.length ) {
+ var set = jQuery(arguments[0]);
+ set.push.apply( set, this.toArray() );
+ return this.pushStack( set, "before", arguments );
+ }
},
- guid: 1,
- global: {},
+ after: function() {
+ if ( this[0] && this[0].parentNode ) {
+ return this.domManip(arguments, false, function( elem ) {
+ this.parentNode.insertBefore( elem, this.nextSibling );
+ });
+ } else if ( arguments.length ) {
+ var set = this.pushStack( this, "after", arguments );
+ set.push.apply( set, jQuery(arguments[0]).toArray() );
+ return set;
+ }
+ },
- // Detach an event or set of events from an element
- remove: function(elem, types, handler) {
- // don't do events on text and comment nodes
- if ( elem.nodeType == 3 || elem.nodeType == 8 )
- return;
+ clone: function( events ) {
+ // Do the clone
+ var ret = this.map(function() {
+ if ( !jQuery.support.noCloneEvent && !jQuery.isXMLDoc(this) ) {
+ // IE copies events bound via attachEvent when
+ // using cloneNode. Calling detachEvent on the
+ // clone will also remove the events from the orignal
+ // In order to get around this, we use innerHTML.
+ // Unfortunately, this means some modifications to
+ // attributes in IE that are actually only stored
+ // as properties will not be copied (such as the
+ // the name attribute on an input).
+ var html = this.outerHTML, ownerDocument = this.ownerDocument;
+ if ( !html ) {
+ var div = ownerDocument.createElement("div");
+ div.appendChild( this.cloneNode(true) );
+ html = div.innerHTML;
+ }
- var events = jQuery.data(elem, "events"), ret, index;
+ return jQuery.clean([html.replace(rinlinejQuery, "")
+ .replace(rleadingWhitespace, "")], ownerDocument)[0];
+ } else {
+ return this.cloneNode(true);
+ }
+ });
- if ( events ) {
- // Unbind all events for the element
- if ( types == undefined || (typeof types == "string" && types.charAt(0) == ".") )
- for ( var type in events )
- this.remove( elem, type + (types || "") );
- else {
- // types is actually an event object here
- if ( types.type ) {
- handler = types.handler;
- types = types.type;
- }
+ // Copy the events from the original to the clone
+ if ( events === true ) {
+ cloneCopyEvent( this, ret );
+ cloneCopyEvent( this.find("*"), ret.find("*") );
+ }
- // Handle multiple events seperated by a space
- // jQuery(...).unbind("mouseover mouseout", fn);
- jQuery.each(types.split(/\s+/), function(index, type){
- // Namespaced event handlers
- var parts = type.split(".");
- type = parts[0];
+ // Return the cloned set
+ return ret;
+ },
- if ( events[type] ) {
- // remove the given handler for the given type
- if ( handler )
- delete events[type][handler.guid];
+ html: function( value ) {
+ if ( value === undefined ) {
+ return this[0] && this[0].nodeType === 1 ?
+ this[0].innerHTML.replace(rinlinejQuery, "") :
+ null;
- // remove all handlers for the given type
- else
- for ( handler in events[type] )
- // Handle the removal of namespaced events
- if ( !parts[1] || events[type][handler].type == parts[1] )
- delete events[type][handler];
+ // See if we can take a shortcut and just use innerHTML
+ } else if ( typeof value === "string" && !/<script/i.test( value ) &&
+ (jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value )) &&
+ !wrapMap[ (rtagName.exec( value ) || ["", ""])[1].toLowerCase() ] ) {
- // remove generic event handler if no more handlers exist
- for ( ret in events[type] ) break;
- if ( !ret ) {
- if ( !jQuery.event.special[type] || jQuery.event.special[type].teardown.call(elem) === false ) {
- if (elem.removeEventListener)
- elem.removeEventListener(type, jQuery.data(elem, "handle"), false);
- else if (elem.detachEvent)
- elem.detachEvent("on" + type, jQuery.data(elem, "handle"));
- }
- ret = null;
- delete events[type];
- }
+ value = value.replace(rxhtmlTag, fcloseTag);
+
+ try {
+ for ( var i = 0, l = this.length; i < l; i++ ) {
+ // Remove element nodes and prevent memory leaks
+ if ( this[i].nodeType === 1 ) {
+ jQuery.cleanData( this[i].getElementsByTagName("*") );
+ this[i].innerHTML = value;
}
- });
- }
+ }
- // Remove the expando if it's no longer used
- for ( ret in events ) break;
- if ( !ret ) {
- var handle = jQuery.data( elem, "handle" );
- if ( handle ) handle.elem = null;
- jQuery.removeData( elem, "events" );
- jQuery.removeData( elem, "handle" );
+ // If using innerHTML throws an exception, use the fallback method
+ } catch(e) {
+ this.empty().append( value );
}
- }
- },
- trigger: function(type, data, elem, donative, extra) {
- // Clone the incoming data, if any
- data = jQuery.makeArray(data);
+ } else if ( jQuery.isFunction( value ) ) {
+ this.each(function(i){
+ var self = jQuery(this), old = self.html();
+ self.empty().append(function(){
+ return value.call( this, i, old );
+ });
+ });
- if ( type.indexOf("!") >= 0 ) {
- type = type.slice(0, -1);
- var exclusive = true;
+ } else {
+ this.empty().append( value );
}
- // Handle a global trigger
- if ( !elem ) {
- // Only trigger if we've ever bound an event for it
- if ( this.global[type] )
- jQuery("*").add([window, document]).trigger(type, data);
+ return this;
+ },
- // Handle triggering a single element
- } else {
- // don't do events on text and comment nodes
- if ( elem.nodeType == 3 || elem.nodeType == 8 )
- return undefined;
+ replaceWith: function( value ) {
+ if ( this[0] && this[0].parentNode ) {
+ // Make sure that the elements are removed from the DOM before they are inserted
+ // this can help fix replacing a parent with child elements
+ if ( !jQuery.isFunction( value ) ) {
+ value = jQuery( value ).detach();
- var val, ret, fn = jQuery.isFunction( elem[ type ] || null ),
- // Check to see if we need to provide a fake event, or not
- event = !data[0] || !data[0].preventDefault;
-
- // Pass along a fake event
- if ( event ) {
- data.unshift({
- type: type,
- target: elem,
- preventDefault: function(){},
- stopPropagation: function(){},
- timeStamp: now()
+ } else {
+ return this.each(function(i) {
+ var self = jQuery(this), old = self.html();
+ self.replaceWith( value.call( this, i, old ) );
});
- data[0][expando] = true; // no need to fix fake event
}
- // Enforce the right trigger type
- data[0].type = type;
- if ( exclusive )
- data[0].exclusive = true;
+ return this.each(function() {
+ var next = this.nextSibling, parent = this.parentNode;
- // Trigger the event, it is assumed that "handle" is a function
- var handle = jQuery.data(elem, "handle");
- if ( handle )
- val = handle.apply( elem, data );
+ jQuery(this).remove();
- // Handle triggering native .onfoo handlers (and on links since we don't call .click() for links)
- if ( (!fn || (jQuery.nodeName(elem, 'a') && type == "click")) && elem["on"+type] && elem["on"+type].apply( elem, data ) === false )
- val = false;
+ if ( next ) {
+ jQuery(next).before( value );
+ } else {
+ jQuery(parent).append( value );
+ }
+ });
+ } else {
+ return this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value );
+ }
+ },
- // Extra functions don't get the custom event object
- if ( event )
- data.shift();
+ detach: function( selector ) {
+ return this.remove( selector, true );
+ },
- // Handle triggering of extra function
- if ( extra && jQuery.isFunction( extra ) ) {
- // call the extra function and tack the current return value on the end for possible inspection
- ret = extra.apply( elem, val == null ? data : data.concat( val ) );
- // if anything is returned, give it precedence and have it overwrite the previous value
- if (ret !== undefined)
- val = ret;
- }
+ domManip: function( args, table, callback ) {
+ var results, first, value = args[0], scripts = [];
- // Trigger the native events (except for clicks on links)
- if ( fn && donative !== false && val !== false && !(jQuery.nodeName(elem, 'a') && type == "click") ) {
- this.triggered = true;
- try {
- elem[ type ]();
- // prevent IE from throwing an error for some hidden elements
- } catch (e) {}
- }
+ // We can't cloneNode fragments that contain checked, in WebKit
+ if ( !jQuery.support.checkClone && arguments.length === 3 && typeof value === "string" && rchecked.test( value ) ) {
+ return this.each(function() {
+ jQuery(this).domManip( args, table, callback, true );
+ });
+ }
- this.triggered = false;
+ if ( jQuery.isFunction(value) ) {
+ return this.each(function(i) {
+ var self = jQuery(this);
+ args[0] = value.call(this, i, table ? self.html() : undefined);
+ self.domManip( args, table, callback );
+ });
}
- return val;
- },
+ if ( this[0] ) {
+ // If we're in a fragment, just use that instead of building a new one
+ if ( args[0] && args[0].parentNode && args[0].parentNode.nodeType === 11 ) {
+ results = { fragment: args[0].parentNode };
+ } else {
+ results = buildFragment( args, this, scripts );
+ }
- handle: function(event) {
- // returned undefined or false
- var val, ret, namespace, all, handlers;
+ first = results.fragment.firstChild;
- event = arguments[0] = jQuery.event.fix( event || window.event );
+ if ( first ) {
+ table = table && jQuery.nodeName( first, "tr" );
- // Namespaced event handlers
- namespace = event.type.split(".");
- event.type = namespace[0];
- namespace = namespace[1];
- // Cache this now, all = true means, any handler
- all = !namespace && !event.exclusive;
+ for ( var i = 0, l = this.length; i < l; i++ ) {
+ callback.call(
+ table ?
+ root(this[i], first) :
+ this[i],
+ results.cacheable || this.length > 1 || i > 0 ?
+ results.fragment.cloneNode(true) :
+ results.fragment
+ );
+ }
+ }
- handlers = ( jQuery.data(this, "events") || {} )[event.type];
+ if ( scripts ) {
+ jQuery.each( scripts, evalScript );
+ }
+ }
- for ( var j in handlers ) {
- var handler = handlers[j];
+ return this;
- // Filter the functions by class
- if ( all || handler.type == namespace ) {
- // Pass in a reference to the handler function itself
- // So that we can later remove it
- event.handler = handler;
- event.data = handler.data;
+ function root( elem, cur ) {
+ return jQuery.nodeName(elem, "table") ?
+ (elem.getElementsByTagName("tbody")[0] ||
+ elem.appendChild(elem.ownerDocument.createElement("tbody"))) :
+ elem;
+ }
+ }
+});
+
+function cloneCopyEvent(orig, ret) {
+ var i = 0;
- ret = handler.apply( this, arguments );
+ ret.each(function() {
+ if ( this.nodeName !== (orig[i] && orig[i].nodeName) ) {
+ return;
+ }
- if ( val !== false )
- val = ret;
+ var oldData = jQuery.data( orig[i++] ), curData = jQuery.data( this, oldData ), events = oldData && oldData.events;
- if ( ret === false ) {
- event.preventDefault();
- event.stopPropagation();
+ if ( events ) {
+ delete curData.handle;
+ curData.events = {};
+
+ for ( var type in events ) {
+ for ( var handler in events[ type ] ) {
+ jQuery.event.add( this, type, events[ type ][ handler ], events[ type ][ handler ].data );
}
}
}
+ });
+}
- return val;
- },
+function buildFragment( args, nodes, scripts ) {
+ var fragment, cacheable, cacheresults, doc;
- fix: function(event) {
- if ( event[expando] == true )
- return event;
+ // webkit does not clone 'checked' attribute of radio inputs on cloneNode, so don't cache if string has a checked
+ if ( args.length === 1 && typeof args[0] === "string" && args[0].length < 512 && args[0].indexOf("<option") < 0 && (jQuery.support.checkClone || !rchecked.test( args[0] )) ) {
+ cacheable = true;
+ cacheresults = jQuery.fragments[ args[0] ];
+ if ( cacheresults ) {
+ if ( cacheresults !== 1 ) {
+ fragment = cacheresults;
+ }
+ }
+ }
- // store a copy of the original event object
- // and "clone" to set read-only properties
- var originalEvent = event;
- event = { originalEvent: originalEvent };
- var props = "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target timeStamp toElement type view wheelDelta which".split(" ");
- for ( var i=props.length; i; i-- )
- event[ props[i] ] = originalEvent[ props[i] ];
-
- // Mark it as fixed
- event[expando] = true;
-
- // add preventDefault and stopPropagation since
- // they will not work on the clone
- event.preventDefault = function() {
- // if preventDefault exists run it on the original event
- if (originalEvent.preventDefault)
- originalEvent.preventDefault();
- // otherwise set the returnValue property of the original event to false (IE)
- originalEvent.returnValue = false;
- };
- event.stopPropagation = function() {
- // if stopPropagation exists run it on the original event
- if (originalEvent.stopPropagation)
- originalEvent.stopPropagation();
- // otherwise set the cancelBubble property of the original event to true (IE)
- originalEvent.cancelBubble = true;
- };
+ if ( !fragment ) {
+ doc = (nodes && nodes[0] ? nodes[0].ownerDocument || nodes[0] : document);
+ fragment = doc.createDocumentFragment();
+ jQuery.clean( args, doc, fragment, scripts );
+ }
- // Fix timeStamp
- event.timeStamp = event.timeStamp || now();
+ if ( cacheable ) {
+ jQuery.fragments[ args[0] ] = cacheresults ? fragment : 1;
+ }
- // Fix target property, if necessary
- if ( !event.target )
- event.target = event.srcElement || document; // Fixes #1925 where srcElement might not be defined either
+ return { fragment: fragment, cacheable: cacheable };
+}
- // check if target is a textnode (safari)
- if ( event.target.nodeType == 3 )
- event.target = event.target.parentNode;
+jQuery.fragments = {};
- // Add relatedTarget, if necessary
- if ( !event.relatedTarget && event.fromElement )
- event.relatedTarget = event.fromElement == event.target ? event.toElement : event.fromElement;
+jQuery.each({
+ appendTo: "append",
+ prependTo: "prepend",
+ insertBefore: "before",
+ insertAfter: "after",
+ replaceAll: "replaceWith"
+}, function( name, original ) {
+ jQuery.fn[ name ] = function( selector ) {
+ var ret = [], insert = jQuery( selector );
- // Calculate pageX/Y if missing and clientX/Y available
- if ( event.pageX == null && event.clientX != null ) {
- var doc = document.documentElement, body = document.body;
- event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc.clientLeft || 0);
- event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc.clientTop || 0);
+ for ( var i = 0, l = insert.length; i < l; i++ ) {
+ var elems = (i > 0 ? this.clone(true) : this).get();
+ jQuery.fn[ original ].apply( jQuery(insert[i]), elems );
+ ret = ret.concat( elems );
}
+ return this.pushStack( ret, name, insert.selector );
+ };
+});
- // Add which for key events
- if ( !event.which && ((event.charCode || event.charCode === 0) ? event.charCode : event.keyCode) )
- event.which = event.charCode || event.keyCode;
+jQuery.each({
+ // keepData is for internal use only--do not document
+ remove: function( selector, keepData ) {
+ if ( !selector || jQuery.filter( selector, [ this ] ).length ) {
+ if ( !keepData && this.nodeType === 1 ) {
+ jQuery.cleanData( this.getElementsByTagName("*") );
+ jQuery.cleanData( [ this ] );
+ }
- // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs)
- if ( !event.metaKey && event.ctrlKey )
- event.metaKey = event.ctrlKey;
+ if ( this.parentNode ) {
+ this.parentNode.removeChild( this );
+ }
+ }
+ },
- // Add which for click: 1 == left; 2 == middle; 3 == right
- // Note: button is not normalized, so don't use it
- if ( !event.which && event.button )
- event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) ));
+ empty: function() {
+ // Remove element nodes and prevent memory leaks
+ if ( this.nodeType === 1 ) {
+ jQuery.cleanData( this.getElementsByTagName("*") );
+ }
- return event;
- },
+ // Remove any remaining nodes
+ while ( this.firstChild ) {
+ this.removeChild( this.firstChild );
+ }
+ }
+}, function( name, fn ) {
+ jQuery.fn[ name ] = function() {
+ return this.each( fn, arguments );
+ };
+});
- proxy: function( fn, proxy ){
- // Set the guid of unique handler to the same of original handler, so it can be removed
- proxy.guid = fn.guid = fn.guid || proxy.guid || this.guid++;
- // So proxy can be declared as an argument
- return proxy;
- },
+jQuery.extend({
+ clean: function( elems, context, fragment, scripts ) {
+ context = context || document;
- special: {
- ready: {
- setup: function() {
- // Make sure the ready event is setup
- bindReady();
+ // !context.createElement fails in IE with an error but returns typeof 'object'
+ if ( typeof context.createElement === "undefined" ) {
+ context = context.ownerDocument || context[0] && context[0].ownerDocument || document;
+ }
+
+ var ret = [];
+
+ jQuery.each(elems, function( i, elem ) {
+ if ( typeof elem === "number" ) {
+ elem += "";
+ }
+
+ if ( !elem ) {
return;
- },
+ }
- teardown: function() { return; }
- },
+ // Convert html string into DOM nodes
+ if ( typeof elem === "string" && !rhtml.test( elem ) ) {
+ elem = context.createTextNode( elem );
- mouseenter: {
- setup: function() {
- if ( jQuery.browser.msie ) return false;
- jQuery(this).bind("mouseover", jQuery.event.special.mouseenter.handler);
- return true;
- },
+ } else if ( typeof elem === "string" ) {
+ // Fix "XHTML"-style tags in all browsers
+ elem = elem.replace(rxhtmlTag, fcloseTag);
- teardown: function() {
- if ( jQuery.browser.msie ) return false;
- jQuery(this).unbind("mouseover", jQuery.event.special.mouseenter.handler);
- return true;
- },
+ // Trim whitespace, otherwise indexOf won't work as expected
+ var tag = (rtagName.exec( elem ) || ["", ""])[1].toLowerCase(),
+ wrap = wrapMap[ tag ] || wrapMap._default,
+ depth = wrap[0],
+ div = context.createElement("div");
+
+ // Go to html and back, then peel off extra wrappers
+ div.innerHTML = wrap[1] + elem + wrap[2];
+
+ // Move to the right depth
+ while ( depth-- ) {
+ div = div.lastChild;
+ }
+
+ // Remove IE's autoinserted <tbody> from table fragments
+ if ( !jQuery.support.tbody ) {
+
+ // String was a <table>, *may* have spurious <tbody>
+ var hasBody = rtbody.test(elem),
+ tbody = tag === "table" && !hasBody ?
+ div.firstChild && div.firstChild.childNodes :
+
+ // String was a bare <thead> or <tfoot>
+ wrap[1] === "<table>" && !hasBody ?
+ div.childNodes :
+ [];
- handler: function(event) {
- // If we actually just moused on to a sub-element, ignore it
- if ( withinElement(event, this) ) return true;
- // Execute the right handlers by setting the event type to mouseenter
- event.type = "mouseenter";
- return jQuery.event.handle.apply(this, arguments);
+ for ( var j = tbody.length - 1; j >= 0 ; --j ) {
+ if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) {
+ tbody[ j ].parentNode.removeChild( tbody[ j ] );
+ }
+ }
+
+ }
+
+ // IE completely kills leading whitespace when innerHTML is used
+ if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
+ div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild );
+ }
+
+ elem = jQuery.makeArray( div.childNodes );
}
- },
- mouseleave: {
- setup: function() {
- if ( jQuery.browser.msie ) return false;
- jQuery(this).bind("mouseout", jQuery.event.special.mouseleave.handler);
- return true;
- },
+ if ( elem.nodeType ) {
+ ret.push( elem );
+ } else {
+ ret = jQuery.merge( ret, elem );
+ }
- teardown: function() {
- if ( jQuery.browser.msie ) return false;
- jQuery(this).unbind("mouseout", jQuery.event.special.mouseleave.handler);
- return true;
- },
+ });
- handler: function(event) {
- // If we actually just moused on to a sub-element, ignore it
- if ( withinElement(event, this) ) return true;
- // Execute the right handlers by setting the event type to mouseleave
- event.type = "mouseleave";
- return jQuery.event.handle.apply(this, arguments);
+ if ( fragment ) {
+ for ( var i = 0; ret[i]; i++ ) {
+ if ( scripts && jQuery.nodeName( ret[i], "script" ) && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) {
+ scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] );
+ } else {
+ if ( ret[i].nodeType === 1 ) {
+ ret.splice.apply( ret, [i + 1, 0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))) );
+ }
+ fragment.appendChild( ret[i] );
+ }
}
}
- }
-};
-jQuery.fn.extend({
- bind: function( type, data, fn ) {
- return type == "unload" ? this.one(type, data, fn) : this.each(function(){
- jQuery.event.add( this, type, fn || data, fn && data );
- });
+ return ret;
},
+
+ cleanData: function( elems ) {
+ for ( var i = 0, elem, id; (elem = elems[i]) != null; i++ ) {
+ jQuery.event.remove( elem );
+ jQuery.removeData( elem );
+ }
+ }
+});
+// exclude the following css properties to add px
+var rexclude = /z-?index|font-?weight|opacity|zoom|line-?height/i,
+ ralpha = /alpha\([^)]*\)/,
+ ropacity = /opacity=([^)]*)/,
+ rfloat = /float/i,
+ rdashAlpha = /-([a-z])/ig,
+ rupper = /([A-Z])/g,
+ rnumpx = /^-?\d+(?:px)?$/i,
+ rnum = /^-?\d/,
+
+ cssShow = { position: "absolute", visibility: "hidden", display:"block" },
+ cssWidth = [ "Left", "Right" ],
+ cssHeight = [ "Top", "Bottom" ],
+
+ // cache check for defaultView.getComputedStyle
+ getComputedStyle = document.defaultView && document.defaultView.getComputedStyle,
+ // normalize float css property
+ styleFloat = jQuery.support.cssFloat ? "cssFloat" : "styleFloat",
+ fcamelCase = function( all, letter ) {
+ return letter.toUpperCase();
+ };
- one: function( type, data, fn ) {
- var one = jQuery.event.proxy( fn || data, function(event) {
- jQuery(this).unbind(event, one);
- return (fn || data).apply( this, arguments );
- });
- return this.each(function(){
- jQuery.event.add( this, type, one, fn && data);
- });
- },
+jQuery.fn.css = function( name, value ) {
+ return access( this, name, value, true, function( elem, name, value ) {
+ if ( value === undefined ) {
+ return jQuery.curCSS( elem, name );
+ }
+
+ if ( typeof value === "number" && !rexclude.test(name) ) {
+ value += "px";
+ }
- unbind: function( type, fn ) {
- return this.each(function(){
- jQuery.event.remove( this, type, fn );
- });
- },
+ jQuery.style( elem, name, value );
+ });
+};
- trigger: function( type, data, fn ) {
- return this.each(function(){
- jQuery.event.trigger( type, data, this, true, fn );
- });
- },
+jQuery.extend({
+ style: function( elem, name, value ) {
+ // don't set styles on text and comment nodes
+ if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 ) {
+ return undefined;
+ }
- triggerHandler: function( type, data, fn ) {
- return this[0] && jQuery.event.trigger( type, data, this[0], false, fn );
- },
+ // ignore negative width and height values #1599
+ if ( (name === "width" || name === "height") && parseFloat(value) < 0 ) {
+ value = undefined;
+ }
- toggle: function( fn ) {
- // Save reference to arguments for access in closure
- var args = arguments, i = 1;
+ var style = elem.style || elem, set = value !== undefined;
- // link all the functions, so any of them can unbind this click handler
- while( i < args.length )
- jQuery.event.proxy( fn, args[i++] );
+ // IE uses filters for opacity
+ if ( !jQuery.support.opacity && name === "opacity" ) {
+ if ( set ) {
+ // IE has trouble with opacity if it does not have layout
+ // Force it by setting the zoom level
+ style.zoom = 1;
- return this.click( jQuery.event.proxy( fn, function(event) {
- // Figure out which function to execute
- this.lastToggle = ( this.lastToggle || 0 ) % i;
+ // Set the alpha filter to set the opacity
+ var opacity = parseInt( value, 10 ) + "" === "NaN" ? "" : "alpha(opacity=" + value * 100 + ")";
+ var filter = style.filter || jQuery.curCSS( elem, "filter" ) || "";
+ style.filter = ralpha.test(filter) ? filter.replace(ralpha, opacity) : opacity;
+ }
- // Make sure that clicks stop
- event.preventDefault();
+ return style.filter && style.filter.indexOf("opacity=") >= 0 ?
+ (parseFloat( ropacity.exec(style.filter)[1] ) / 100) + "":
+ "";
+ }
- // and execute the function
- return args[ this.lastToggle++ ].apply( this, arguments ) || false;
- }));
- },
+ // Make sure we're using the right name for getting the float value
+ if ( rfloat.test( name ) ) {
+ name = styleFloat;
+ }
- hover: function(fnOver, fnOut) {
- return this.bind('mouseenter', fnOver).bind('mouseleave', fnOut);
- },
+ name = name.replace(rdashAlpha, fcamelCase);
- ready: function(fn) {
- // Attach the listeners
- bindReady();
+ if ( set ) {
+ style[ name ] = value;
+ }
- // If the DOM is already ready
- if ( jQuery.isReady )
- // Execute the function immediately
- fn.call( document, jQuery );
+ return style[ name ];
+ },
- // Otherwise, remember the function for later
- else
- // Add the function to the wait list
- jQuery.readyList.push( function() { return fn.call(this, jQuery); } );
+ css: function( elem, name, force, extra ) {
+ if ( name === "width" || name === "height" ) {
+ var val, props = cssShow, which = name === "width" ? cssWidth : cssHeight;
- return this;
- }
-});
+ function getWH() {
+ val = name === "width" ? elem.offsetWidth : elem.offsetHeight;
-jQuery.extend({
- isReady: false,
- readyList: [],
- // Handle when the DOM is ready
- ready: function() {
- // Make sure that the DOM is not already loaded
- if ( !jQuery.isReady ) {
- // Remember that the DOM is ready
- jQuery.isReady = true;
+ if ( extra === "border" ) {
+ return;
+ }
- // If there are functions bound, to execute
- if ( jQuery.readyList ) {
- // Execute all of them
- jQuery.each( jQuery.readyList, function(){
- this.call( document );
+ jQuery.each( which, function() {
+ if ( !extra ) {
+ val -= parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0;
+ }
+
+ if ( extra === "margin" ) {
+ val += parseFloat(jQuery.curCSS( elem, "margin" + this, true)) || 0;
+ } else {
+ val -= parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0;
+ }
});
+ }
- // Reset the list of functions
- jQuery.readyList = null;
+ if ( elem.offsetWidth !== 0 ) {
+ getWH();
+ } else {
+ jQuery.swap( elem, props, getWH );
}
- // Trigger any bound ready events
- jQuery(document).triggerHandler("ready");
+ return Math.max(0, Math.round(val));
}
- }
-});
-var readyBound = false;
+ return jQuery.curCSS( elem, name, force );
+ },
-function bindReady(){
- if ( readyBound ) return;
- readyBound = true;
+ curCSS: function( elem, name, force ) {
+ var ret, style = elem.style, filter;
- // Mozilla, Opera (see further below for it) and webkit nightlies currently support this event
- if ( document.addEventListener && !jQuery.browser.opera)
- // Use the handy event callback
- document.addEventListener( "DOMContentLoaded", jQuery.ready, false );
+ // IE uses filters for opacity
+ if ( !jQuery.support.opacity && name === "opacity" && elem.currentStyle ) {
+ ret = ropacity.test(elem.currentStyle.filter || "") ?
+ (parseFloat(RegExp.$1) / 100) + "" :
+ "";
- // If IE is used and is not in a frame
- // Continually check to see if the document is ready
- if ( jQuery.browser.msie && window == top ) (function(){
- if (jQuery.isReady) return;
- try {
- // If IE is used, use the trick by Diego Perini
- // http://javascript.nwbox.com/IEContentLoaded/
- document.documentElement.doScroll("left");
- } catch( error ) {
- setTimeout( arguments.callee, 0 );
- return;
+ return ret === "" ?
+ "1" :
+ ret;
}
- // and execute any waiting functions
- jQuery.ready();
- })();
- if ( jQuery.browser.opera )
- document.addEventListener( "DOMContentLoaded", function () {
- if (jQuery.isReady) return;
- for (var i = 0; i < document.styleSheets.length; i++)
- if (document.styleSheets[i].disabled) {
- setTimeout( arguments.callee, 0 );
- return;
- }
- // and execute any waiting functions
- jQuery.ready();
- }, false);
-
- if ( jQuery.browser.safari ) {
- var numStyles;
- (function(){
- if (jQuery.isReady) return;
- if ( document.readyState != "loaded" && document.readyState != "complete" ) {
- setTimeout( arguments.callee, 0 );
- return;
+ // Make sure we're using the right name for getting the float value
+ if ( rfloat.test( name ) ) {
+ name = styleFloat;
+ }
+
+ if ( !force && style && style[ name ] ) {
+ ret = style[ name ];
+
+ } else if ( getComputedStyle ) {
+
+ // Only "float" is needed here
+ if ( rfloat.test( name ) ) {
+ name = "float";
}
- if ( numStyles === undefined )
- numStyles = jQuery("style, link[rel=stylesheet]").length;
- if ( document.styleSheets.length != numStyles ) {
- setTimeout( arguments.callee, 0 );
- return;
+
+ name = name.replace( rupper, "-$1" ).toLowerCase();
+
+ var defaultView = elem.ownerDocument.defaultView;
+
+ if ( !defaultView ) {
+ return null;
}
- // and execute any waiting functions
- jQuery.ready();
- })();
- }
- // A fallback to window.onload, that will always work
- jQuery.event.add( window, "load", jQuery.ready );
-}
+ var computedStyle = defaultView.getComputedStyle( elem, null );
-jQuery.each( ("blur,focus,load,resize,scroll,unload,click,dblclick," +
- "mousedown,mouseup,mousemove,mouseover,mouseout,change,select," +
- "submit,keydown,keypress,keyup,error").split(","), function(i, name){
+ if ( computedStyle ) {
+ ret = computedStyle.getPropertyValue( name );
+ }
- // Handle event binding
- jQuery.fn[name] = function(fn){
- return fn ? this.bind(name, fn) : this.trigger(name);
- };
-});
+ // We should always get a number back from opacity
+ if ( name === "opacity" && ret === "" ) {
+ ret = "1";
+ }
-// Checks if an event happened on an element within another element
-// Used in jQuery.event.special.mouseenter and mouseleave handlers
-var withinElement = function(event, elem) {
- // Check if mouse(over|out) are still within the same parent element
- var parent = event.relatedTarget;
- // Traverse up the tree
- while ( parent && parent != elem ) try { parent = parent.parentNode; } catch(error) { parent = elem; }
- // Return true if we actually just moused on to a sub-element
- return parent == elem;
-};
+ } else if ( elem.currentStyle ) {
+ var camelCase = name.replace(rdashAlpha, fcamelCase);
-// Prevent memory leaks in IE
-// And prevent errors on refresh with events like mouseover in other browsers
-// Window isn't included so as not to unbind existing unload events
-jQuery(window).bind("unload", function() {
- jQuery("*").add(document).unbind();
+ ret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ];
+
+ // From the awesome hack by Dean Edwards
+ // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
+
+ // If we're not dealing with a regular pixel number
+ // but a number that has a weird ending, we need to convert it to pixels
+ if ( !rnumpx.test( ret ) && rnum.test( ret ) ) {
+ // Remember the original values
+ var left = style.left, rsLeft = elem.runtimeStyle.left;
+
+ // Put in the new values to get a computed value out
+ elem.runtimeStyle.left = elem.currentStyle.left;
+ style.left = camelCase === "fontSize" ? "1em" : (ret || 0);
+ ret = style.pixelLeft + "px";
+
+ // Revert the changed values
+ style.left = left;
+ elem.runtimeStyle.left = rsLeft;
+ }
+ }
+
+ return ret;
+ },
+
+ // A method for quickly swapping in/out CSS properties to get correct calculations
+ swap: function( elem, options, callback ) {
+ var old = {};
+
+ // Remember the old values, and insert the new ones
+ for ( var name in options ) {
+ old[ name ] = elem.style[ name ];
+ elem.style[ name ] = options[ name ];
+ }
+
+ callback.call( elem );
+
+ // Revert the old values
+ for ( var name in options ) {
+ elem.style[ name ] = old[ name ];
+ }
+ }
});
+
+if ( jQuery.expr && jQuery.expr.filters ) {
+ jQuery.expr.filters.hidden = function( elem ) {
+ var width = elem.offsetWidth, height = elem.offsetHeight,
+ skip = elem.nodeName.toLowerCase() === "tr";
+
+ return width === 0 && height === 0 && !skip ?
+ true :
+ width > 0 && height > 0 && !skip ?
+ false :
+ jQuery.curCSS(elem, "display") === "none";
+ };
+
+ jQuery.expr.filters.visible = function( elem ) {
+ return !jQuery.expr.filters.hidden( elem );
+ };
+}
+var jsc = now(),
+ rscript = /<script(.|\s)*?\/script>/gi,
+ rselectTextarea = /select|textarea/i,
+ rinput = /color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,
+ jsre = /=\?(&|$)/,
+ rquery = /\?/,
+ rts = /(\?|&)_=.*?(&|$)/,
+ rurl = /^(\w+:)?\/\/([^\/?#]+)/,
+ r20 = /%20/g;
+
jQuery.fn.extend({
// Keep a copy of the old load
_load: jQuery.fn.load,
load: function( url, params, callback ) {
- if ( typeof url != 'string' )
+ if ( typeof url !== "string" ) {
return this._load( url );
+ // Don't do a request if no elements are being requested
+ } else if ( !this.length ) {
+ return this;
+ }
+
var off = url.indexOf(" ");
if ( off >= 0 ) {
var selector = url.slice(off, url.length);
url = url.slice(0, off);
}
- callback = callback || function(){};
-
// Default to a GET request
var type = "GET";
// If the second parameter was provided
- if ( params )
+ if ( params ) {
// If it's a function
if ( jQuery.isFunction( params ) ) {
// We assume that it's the callback
@@ -2441,10 +4647,11 @@ jQuery.fn.extend({
params = null;
// Otherwise, build a param string
- } else {
- params = jQuery.param( params );
+ } else if ( typeof params === "object" ) {
+ params = jQuery.param( params, jQuery.ajaxSettings.traditional );
type = "POST";
}
+ }
var self = this;
@@ -2454,26 +4661,30 @@ jQuery.fn.extend({
type: type,
dataType: "html",
data: params,
- complete: function(res, status){
+ complete: function( res, status ) {
// If successful, inject the HTML into all the matched elements
- if ( status == "success" || status == "notmodified" )
+ if ( status === "success" || status === "notmodified" ) {
// See if a selector was specified
self.html( selector ?
// Create a dummy div to hold the results
- jQuery("<div/>")
+ jQuery("<div />")
// inject the contents of the document in, removing the scripts
// to avoid any 'Permission Denied' errors in IE
- .append(res.responseText.replace(/<script(.|\s)*?\/script>/g, ""))
+ .append(res.responseText.replace(rscript, ""))
// Locate the specified elements
.find(selector) :
// If not, just inject the full result
res.responseText );
+ }
- self.each( callback, [res.responseText, status, res] );
+ if ( callback ) {
+ self.each( callback, [res.responseText, status, res] );
+ }
}
});
+
return this;
},
@@ -2481,40 +4692,41 @@ jQuery.fn.extend({
return jQuery.param(this.serializeArray());
},
serializeArray: function() {
- return this.map(function(){
- return jQuery.nodeName(this, "form") ?
- jQuery.makeArray(this.elements) : this;
+ return this.map(function() {
+ return this.elements ? jQuery.makeArray(this.elements) : this;
})
- .filter(function(){
+ .filter(function() {
return this.name && !this.disabled &&
- (this.checked || /select|textarea/i.test(this.nodeName) ||
- /text|hidden|password/i.test(this.type));
+ (this.checked || rselectTextarea.test(this.nodeName) ||
+ rinput.test(this.type));
})
- .map(function(i, elem){
+ .map(function( i, elem ) {
var val = jQuery(this).val();
- return val == null ? null :
- val.constructor == Array ?
- jQuery.map( val, function(val, i){
- return {name: elem.name, value: val};
+
+ return val == null ?
+ null :
+ jQuery.isArray(val) ?
+ jQuery.map( val, function( val, i ) {
+ return { name: elem.name, value: val };
}) :
- {name: elem.name, value: val};
+ { name: elem.name, value: val };
}).get();
}
});
// Attach a bunch of functions for handling common AJAX events
-jQuery.each( "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","), function(i,o){
- jQuery.fn[o] = function(f){
+jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), function( i, o ) {
+ jQuery.fn[o] = function( f ) {
return this.bind(o, f);
};
});
-var jsc = now();
-
jQuery.extend({
+
get: function( url, data, callback, type ) {
- // shift arguments if data argument was ommited
+ // shift arguments if data argument was omited
if ( jQuery.isFunction( data ) ) {
+ type = type || callback;
callback = data;
data = null;
}
@@ -2537,7 +4749,9 @@ jQuery.extend({
},
post: function( url, data, callback, type ) {
+ // shift arguments if data argument was omited
if ( jQuery.isFunction( data ) ) {
+ type = type || callback;
callback = data;
data = {};
}
@@ -2559,13 +4773,29 @@ jQuery.extend({
url: location.href,
global: true,
type: "GET",
- timeout: 0,
contentType: "application/x-www-form-urlencoded",
processData: true,
async: true,
+ /*
+ timeout: 0,
data: null,
username: null,
password: null,
+ traditional: false,
+ */
+ // Create the request object; Microsoft failed to properly
+ // implement the XMLHttpRequest in IE7 (can't request local files),
+ // so we use the ActiveXObject when it is available
+ // This function can be overriden by calling jQuery.ajaxSetup
+ xhr: window.XMLHttpRequest && (window.location.protocol !== "file:" || !window.ActiveXObject) ?
+ function() {
+ return new window.XMLHttpRequest();
+ } :
+ function() {
+ try {
+ return new window.ActiveXObject("Microsoft.XMLHTTP");
+ } catch(e) {}
+ },
accepts: {
xml: "application/xml, text/xml",
html: "text/html",
@@ -2578,36 +4808,41 @@ jQuery.extend({
// Last-Modified header cache for next request
lastModified: {},
+ etag: {},
- ajax: function( s ) {
- // Extend the settings, but re-extend 's' so that it can be
- // checked again later (in the test suite, specifically)
- s = jQuery.extend(true, s, jQuery.extend(true, {}, jQuery.ajaxSettings, s));
-
- var jsonp, jsre = /=\?(&|$)/g, status, data,
+ ajax: function( origSettings ) {
+ var s = jQuery.extend(true, {}, jQuery.ajaxSettings, origSettings);
+
+ var jsonp, status, data,
+ callbackContext = origSettings && origSettings.context || s,
type = s.type.toUpperCase();
// convert data if not already a string
- if ( s.data && s.processData && typeof s.data != "string" )
- s.data = jQuery.param(s.data);
+ if ( s.data && s.processData && typeof s.data !== "string" ) {
+ s.data = jQuery.param( s.data, s.traditional );
+ }
// Handle JSONP Parameter Callbacks
- if ( s.dataType == "jsonp" ) {
- if ( type == "GET" ) {
- if ( !s.url.match(jsre) )
- s.url += (s.url.match(/\?/) ? "&" : "?") + (s.jsonp || "callback") + "=?";
- } else if ( !s.data || !s.data.match(jsre) )
+ if ( s.dataType === "jsonp" ) {
+ if ( type === "GET" ) {
+ if ( !jsre.test( s.url ) ) {
+ s.url += (rquery.test( s.url ) ? "&" : "?") + (s.jsonp || "callback") + "=?";
+ }
+ } else if ( !s.data || !jsre.test(s.data) ) {
s.data = (s.data ? s.data + "&" : "") + (s.jsonp || "callback") + "=?";
+ }
s.dataType = "json";
}
// Build temporary JSONP function
- if ( s.dataType == "json" && (s.data && s.data.match(jsre) || s.url.match(jsre)) ) {
- jsonp = "jsonp" + jsc++;
+ if ( s.dataType === "json" && (s.data && jsre.test(s.data) || jsre.test(s.url)) ) {
+ jsonp = s.jsonpCallback || ("jsonp" + jsc++);
// Replace the =? sequence both in the query string and the data
- if ( s.data )
+ if ( s.data ) {
s.data = (s.data + "").replace(jsre, "=" + jsonp + "$1");
+ }
+
s.url = s.url.replace(jsre, "=" + jsonp + "$1");
// We need to make sure
@@ -2615,71 +4850,85 @@ jQuery.extend({
s.dataType = "script";
// Handle JSONP-style loading
- window[ jsonp ] = function(tmp){
+ window[ jsonp ] = window[ jsonp ] || function( tmp ) {
data = tmp;
success();
complete();
// Garbage collect
window[ jsonp ] = undefined;
- try{ delete window[ jsonp ]; } catch(e){}
- if ( head )
+
+ try {
+ delete window[ jsonp ];
+ } catch(e) {}
+
+ if ( head ) {
head.removeChild( script );
+ }
};
}
- if ( s.dataType == "script" && s.cache == null )
+ if ( s.dataType === "script" && s.cache === null ) {
s.cache = false;
+ }
- if ( s.cache === false && type == "GET" ) {
+ if ( s.cache === false && type === "GET" ) {
var ts = now();
+
// try replacing _= if it is there
- var ret = s.url.replace(/(\?|&)_=.*?(&|$)/, "$1_=" + ts + "$2");
+ var ret = s.url.replace(rts, "$1_=" + ts + "$2");
+
// if nothing was replaced, add timestamp to the end
- s.url = ret + ((ret == s.url) ? (s.url.match(/\?/) ? "&" : "?") + "_=" + ts : "");
+ s.url = ret + ((ret === s.url) ? (rquery.test(s.url) ? "&" : "?") + "_=" + ts : "");
}
// If data is available, append data to url for get requests
- if ( s.data && type == "GET" ) {
- s.url += (s.url.match(/\?/) ? "&" : "?") + s.data;
-
- // IE likes to send both get and post data, prevent this
- s.data = null;
+ if ( s.data && type === "GET" ) {
+ s.url += (rquery.test(s.url) ? "&" : "?") + s.data;
}
// Watch for a new set of requests
- if ( s.global && ! jQuery.active++ )
+ if ( s.global && ! jQuery.active++ ) {
jQuery.event.trigger( "ajaxStart" );
+ }
// Matches an absolute URL, and saves the domain
- var remote = /^(?:\w+:)?\/\/([^\/?#]+)/;
+ var parts = rurl.exec( s.url ),
+ remote = parts && (parts[1] && parts[1] !== location.protocol || parts[2] !== location.host);
// If we're requesting a remote document
// and trying to load JSON or Script with a GET
- if ( s.dataType == "script" && type == "GET"
- && remote.test(s.url) && remote.exec(s.url)[1] != location.host ){
- var head = document.getElementsByTagName("head")[0];
+ if ( s.dataType === "script" && type === "GET" && remote ) {
+ var head = document.getElementsByTagName("head")[0] || document.documentElement;
var script = document.createElement("script");
script.src = s.url;
- if (s.scriptCharset)
+ if ( s.scriptCharset ) {
script.charset = s.scriptCharset;
+ }
// Handle Script loading
if ( !jsonp ) {
var done = false;
// Attach handlers for all browsers
- script.onload = script.onreadystatechange = function(){
+ script.onload = script.onreadystatechange = function() {
if ( !done && (!this.readyState ||
- this.readyState == "loaded" || this.readyState == "complete") ) {
+ this.readyState === "loaded" || this.readyState === "complete") ) {
done = true;
success();
complete();
- head.removeChild( script );
+
+ // Handle memory leak in IE
+ script.onload = script.onreadystatechange = null;
+ if ( head && script.parentNode ) {
+ head.removeChild( script );
+ }
}
};
}
- head.appendChild(script);
+ // Use insertBefore instead of appendChild to circumvent an IE6 bug.
+ // This arises when a base node is used (#2709 and #4378).
+ head.insertBefore( script, head.firstChild );
// We handle everything using the script element injection
return undefined;
@@ -2687,153 +4936,200 @@ jQuery.extend({
var requestDone = false;
- // Create the request object; Microsoft failed to properly
- // implement the XMLHttpRequest in IE7, so we use the ActiveXObject when it is available
- var xhr = window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
+ // Create the request object
+ var xhr = s.xhr();
+
+ if ( !xhr ) {
+ return;
+ }
// Open the socket
// Passing null username, generates a login popup on Opera (#2865)
- if( s.username )
+ if ( s.username ) {
xhr.open(type, s.url, s.async, s.username, s.password);
- else
+ } else {
xhr.open(type, s.url, s.async);
+ }
// Need an extra try/catch for cross domain requests in Firefox 3
try {
// Set the correct header, if data is being sent
- if ( s.data )
+ if ( s.data || origSettings && origSettings.contentType ) {
xhr.setRequestHeader("Content-Type", s.contentType);
+ }
+
+ // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+ if ( s.ifModified ) {
+ if ( jQuery.lastModified[s.url] ) {
+ xhr.setRequestHeader("If-Modified-Since", jQuery.lastModified[s.url]);
+ }
- // Set the If-Modified-Since header, if ifModified mode.
- if ( s.ifModified )
- xhr.setRequestHeader("If-Modified-Since",
- jQuery.lastModified[s.url] || "Thu, 01 Jan 1970 00:00:00 GMT" );
+ if ( jQuery.etag[s.url] ) {
+ xhr.setRequestHeader("If-None-Match", jQuery.etag[s.url]);
+ }
+ }
// Set header so the called script knows that it's an XMLHttpRequest
- xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
+ // Only send the header if it's not a remote XHR
+ if ( !remote ) {
+ xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
+ }
// Set the Accepts header for the server, depending on the dataType
xhr.setRequestHeader("Accept", s.dataType && s.accepts[ s.dataType ] ?
s.accepts[ s.dataType ] + ", */*" :
s.accepts._default );
- } catch(e){}
+ } catch(e) {}
+
+ // Allow custom headers/mimetypes and early abort
+ if ( s.beforeSend && s.beforeSend.call(callbackContext, xhr, s) === false ) {
+ // Handle the global AJAX counter
+ if ( s.global && ! --jQuery.active ) {
+ jQuery.event.trigger( "ajaxStop" );
+ }
- // Allow custom headers/mimetypes
- if ( s.beforeSend && s.beforeSend(xhr, s) === false ) {
- // cleanup active request counter
- s.global && jQuery.active--;
// close opended socket
xhr.abort();
return false;
}
- if ( s.global )
- jQuery.event.trigger("ajaxSend", [xhr, s]);
+ if ( s.global ) {
+ trigger("ajaxSend", [xhr, s]);
+ }
// Wait for a response to come back
- var onreadystatechange = function(isTimeout){
+ var onreadystatechange = xhr.onreadystatechange = function( isTimeout ) {
+ // The request was aborted
+ if ( !xhr || xhr.readyState === 0 || isTimeout === "abort" ) {
+ // Opera doesn't call onreadystatechange before this point
+ // so we simulate the call
+ if ( !requestDone ) {
+ complete();
+ }
+
+ requestDone = true;
+ if ( xhr ) {
+ xhr.onreadystatechange = jQuery.noop;
+ }
+
// The transfer is complete and the data is available, or the request timed out
- if ( !requestDone && xhr && (xhr.readyState == 4 || isTimeout == "timeout") ) {
+ } else if ( !requestDone && xhr && (xhr.readyState === 4 || isTimeout === "timeout") ) {
requestDone = true;
+ xhr.onreadystatechange = jQuery.noop;
- // clear poll interval
- if (ival) {
- clearInterval(ival);
- ival = null;
- }
+ status = isTimeout === "timeout" ?
+ "timeout" :
+ !jQuery.httpSuccess( xhr ) ?
+ "error" :
+ s.ifModified && jQuery.httpNotModified( xhr, s.url ) ?
+ "notmodified" :
+ "success";
- status = isTimeout == "timeout" && "timeout" ||
- !jQuery.httpSuccess( xhr ) && "error" ||
- s.ifModified && jQuery.httpNotModified( xhr, s.url ) && "notmodified" ||
- "success";
+ var errMsg;
- if ( status == "success" ) {
+ if ( status === "success" ) {
// Watch for, and catch, XML document parse errors
try {
// process the data (runs the xml through httpData regardless of callback)
- data = jQuery.httpData( xhr, s.dataType, s.dataFilter );
- } catch(e) {
+ data = jQuery.httpData( xhr, s.dataType, s );
+ } catch(err) {
status = "parsererror";
+ errMsg = err;
}
}
// Make sure that the request was successful or notmodified
- if ( status == "success" ) {
- // Cache Last-Modified header, if ifModified mode.
- var modRes;
- try {
- modRes = xhr.getResponseHeader("Last-Modified");
- } catch(e) {} // swallow exception thrown by FF if header is not available
-
- if ( s.ifModified && modRes )
- jQuery.lastModified[s.url] = modRes;
-
+ if ( status === "success" || status === "notmodified" ) {
// JSONP handles its own success callback
- if ( !jsonp )
+ if ( !jsonp ) {
success();
- } else
- jQuery.handleError(s, xhr, status);
+ }
+ } else {
+ jQuery.handleError(s, xhr, status, errMsg);
+ }
// Fire the complete handlers
complete();
+ if ( isTimeout === "timeout" ) {
+ xhr.abort();
+ }
+
// Stop memory leaks
- if ( s.async )
+ if ( s.async ) {
xhr = null;
+ }
}
};
- if ( s.async ) {
- // don't attach the handler to the request, just poll it instead
- var ival = setInterval(onreadystatechange, 13);
-
- // Timeout checker
- if ( s.timeout > 0 )
- setTimeout(function(){
- // Check to see if the request is still happening
- if ( xhr ) {
- // Cancel the request
- xhr.abort();
+ // Override the abort handler, if we can (IE doesn't allow it, but that's OK)
+ // Opera doesn't fire onreadystatechange at all on abort
+ try {
+ var oldAbort = xhr.abort;
+ xhr.abort = function() {
+ if ( xhr ) {
+ oldAbort.call( xhr );
+ }
- if( !requestDone )
- onreadystatechange( "timeout" );
- }
- }, s.timeout);
+ onreadystatechange( "abort" );
+ };
+ } catch(e) { }
+
+ // Timeout checker
+ if ( s.async && s.timeout > 0 ) {
+ setTimeout(function() {
+ // Check to see if the request is still happening
+ if ( xhr && !requestDone ) {
+ onreadystatechange( "timeout" );
+ }
+ }, s.timeout);
}
// Send the data
try {
- xhr.send(s.data);
+ xhr.send( type === "POST" || type === "PUT" || type === "DELETE" ? s.data : null );
} catch(e) {
jQuery.handleError(s, xhr, null, e);
+ // Fire the complete handlers
+ complete();
}
// firefox 1.5 doesn't fire statechange for sync requests
- if ( !s.async )
+ if ( !s.async ) {
onreadystatechange();
+ }
- function success(){
+ function success() {
// If a local callback was specified, fire it and pass it the data
- if ( s.success )
- s.success( data, status );
+ if ( s.success ) {
+ s.success.call( callbackContext, data, status, xhr );
+ }
// Fire the global callback
- if ( s.global )
- jQuery.event.trigger( "ajaxSuccess", [xhr, s] );
+ if ( s.global ) {
+ trigger( "ajaxSuccess", [xhr, s] );
+ }
}
- function complete(){
+ function complete() {
// Process result
- if ( s.complete )
- s.complete(xhr, status);
+ if ( s.complete ) {
+ s.complete.call( callbackContext, xhr, status);
+ }
// The request was completed
- if ( s.global )
- jQuery.event.trigger( "ajaxComplete", [xhr, s] );
+ if ( s.global ) {
+ trigger( "ajaxComplete", [xhr, s] );
+ }
// Handle the global AJAX counter
- if ( s.global && ! --jQuery.active )
+ if ( s.global && ! --jQuery.active ) {
jQuery.event.trigger( "ajaxStop" );
+ }
+ }
+
+ function trigger(type, args) {
+ (s.context ? jQuery(s.context) : jQuery.event).trigger(type, args);
}
// return XMLHttpRequest to allow aborting the request etc.
@@ -2842,11 +5138,14 @@ jQuery.extend({
handleError: function( s, xhr, status, e ) {
// If a local callback was specified, fire it
- if ( s.error ) s.error( xhr, status, e );
+ if ( s.error ) {
+ s.error.call( s.context || s, xhr, status, e );
+ }
// Fire the global callback
- if ( s.global )
- jQuery.event.trigger( "ajaxError", [xhr, s, e] );
+ if ( s.global ) {
+ (s.context ? jQuery(s.context) : jQuery.event).trigger( "ajaxError", [xhr, s, e] );
+ }
},
// Counter for holding the number of active queries
@@ -2856,204 +5155,312 @@ jQuery.extend({
httpSuccess: function( xhr ) {
try {
// IE error sometimes returns 1223 when it should be 204 so treat it as success, see #1450
- return !xhr.status && location.protocol == "file:" ||
- ( xhr.status >= 200 && xhr.status < 300 ) || xhr.status == 304 || xhr.status == 1223 ||
- jQuery.browser.safari && xhr.status == undefined;
- } catch(e){}
+ return !xhr.status && location.protocol === "file:" ||
+ // Opera returns 0 when status is 304
+ ( xhr.status >= 200 && xhr.status < 300 ) ||
+ xhr.status === 304 || xhr.status === 1223 || xhr.status === 0;
+ } catch(e) {}
+
return false;
},
// Determines if an XMLHttpRequest returns NotModified
httpNotModified: function( xhr, url ) {
- try {
- var xhrRes = xhr.getResponseHeader("Last-Modified");
+ var lastModified = xhr.getResponseHeader("Last-Modified"),
+ etag = xhr.getResponseHeader("Etag");
- // Firefox always returns 200. check Last-Modified date
- return xhr.status == 304 || xhrRes == jQuery.lastModified[url] ||
- jQuery.browser.safari && xhr.status == undefined;
- } catch(e){}
- return false;
+ if ( lastModified ) {
+ jQuery.lastModified[url] = lastModified;
+ }
+
+ if ( etag ) {
+ jQuery.etag[url] = etag;
+ }
+
+ // Opera returns 0 when status is 304
+ return xhr.status === 304 || xhr.status === 0;
},
- httpData: function( xhr, type, filter ) {
- var ct = xhr.getResponseHeader("content-type"),
- xml = type == "xml" || !type && ct && ct.indexOf("xml") >= 0,
+ httpData: function( xhr, type, s ) {
+ var ct = xhr.getResponseHeader("content-type") || "",
+ xml = type === "xml" || !type && ct.indexOf("xml") >= 0,
data = xml ? xhr.responseXML : xhr.responseText;
- if ( xml && data.documentElement.tagName == "parsererror" )
- throw "parsererror";
-
+ if ( xml && data.documentElement.nodeName === "parsererror" ) {
+ jQuery.error( "parsererror" );
+ }
+
// Allow a pre-filtering function to sanitize the response
- if( filter )
- data = filter( data, type );
+ // s is checked to keep backwards compatibility
+ if ( s && s.dataFilter ) {
+ data = s.dataFilter( data, type );
+ }
- // If the type is "script", eval it in global context
- if ( type == "script" )
- jQuery.globalEval( data );
+ // The filter can actually parse the response
+ if ( typeof data === "string" ) {
+ // Get the JavaScript object, if JSON is used.
+ if ( type === "json" || !type && ct.indexOf("json") >= 0 ) {
+ data = jQuery.parseJSON( data );
- // Get the JavaScript object, if JSON is used.
- if ( type == "json" )
- data = eval("(" + data + ")");
+ // If the type is "script", eval it in global context
+ } else if ( type === "script" || !type && ct.indexOf("javascript") >= 0 ) {
+ jQuery.globalEval( data );
+ }
+ }
return data;
},
// Serialize an array of form elements or a set of
// key/values into a query string
- param: function( a ) {
+ param: function( a, traditional ) {
var s = [];
-
- // If an array was passed in, assume that it is an array
- // of form elements
- if ( a.constructor == Array || a.jquery )
+
+ // Set traditional to true for jQuery <= 1.3.2 behavior.
+ if ( traditional === undefined ) {
+ traditional = jQuery.ajaxSettings.traditional;
+ }
+
+ // If an array was passed in, assume that it is an array of form elements.
+ if ( jQuery.isArray(a) || a.jquery ) {
// Serialize the form elements
- jQuery.each( a, function(){
- s.push( encodeURIComponent(this.name) + "=" + encodeURIComponent( this.value ) );
+ jQuery.each( a, function() {
+ add( this.name, this.value );
});
-
- // Otherwise, assume that it's an object of key/value pairs
- else
- // Serialize the key/values
- for ( var j in a )
- // If the value is an array then the key names need to be repeated
- if ( a[j] && a[j].constructor == Array )
- jQuery.each( a[j], function(){
- s.push( encodeURIComponent(j) + "=" + encodeURIComponent( this ) );
- });
- else
- s.push( encodeURIComponent(j) + "=" + encodeURIComponent( jQuery.isFunction(a[j]) ? a[j]() : a[j] ) );
+
+ } else {
+ // If traditional, encode the "old" way (the way 1.3.2 or older
+ // did it), otherwise encode params recursively.
+ for ( var prefix in a ) {
+ buildParams( prefix, a[prefix] );
+ }
+ }
// Return the resulting serialization
- return s.join("&").replace(/%20/g, "+");
- }
+ return s.join("&").replace(r20, "+");
+
+ function buildParams( prefix, obj ) {
+ if ( jQuery.isArray(obj) ) {
+ // Serialize array item.
+ jQuery.each( obj, function( i, v ) {
+ if ( traditional ) {
+ // Treat each array item as a scalar.
+ add( prefix, v );
+ } else {
+ // If array item is non-scalar (array or object), encode its
+ // numeric index to resolve deserialization ambiguity issues.
+ // Note that rack (as of 1.0.0) can't currently deserialize
+ // nested arrays properly, and attempting to do so may cause
+ // a server error. Possible fixes are to modify rack's
+ // deserialization algorithm or to provide an option or flag
+ // to force array serialization to be shallow.
+ buildParams( prefix + "[" + ( typeof v === "object" || jQuery.isArray(v) ? i : "" ) + "]", v );
+ }
+ });
+
+ } else if ( !traditional && obj != null && typeof obj === "object" ) {
+ // Serialize object item.
+ jQuery.each( obj, function( k, v ) {
+ buildParams( prefix + "[" + k + "]", v );
+ });
+
+ } else {
+ // Serialize scalar item.
+ add( prefix, obj );
+ }
+ }
+ function add( key, value ) {
+ // If value is a function, invoke it and return its value
+ value = jQuery.isFunction(value) ? value() : value;
+ s[ s.length ] = encodeURIComponent(key) + "=" + encodeURIComponent(value);
+ }
+ }
});
+var elemdisplay = {},
+ rfxtypes = /toggle|show|hide/,
+ rfxnum = /^([+-]=)?([\d+-.]+)(.*)$/,
+ timerId,
+ fxAttrs = [
+ // height animations
+ [ "height", "marginTop", "marginBottom", "paddingTop", "paddingBottom" ],
+ // width animations
+ [ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ],
+ // opacity animations
+ [ "opacity" ]
+ ];
+
jQuery.fn.extend({
- show: function(speed,callback){
- return speed ?
- this.animate({
- height: "show", width: "show", opacity: "show"
- }, speed, callback) :
+ show: function( speed, callback ) {
+ if ( speed || speed === 0) {
+ return this.animate( genFx("show", 3), speed, callback);
+
+ } else {
+ for ( var i = 0, l = this.length; i < l; i++ ) {
+ var old = jQuery.data(this[i], "olddisplay");
+
+ this[i].style.display = old || "";
+
+ if ( jQuery.css(this[i], "display") === "none" ) {
+ var nodeName = this[i].nodeName, display;
+
+ if ( elemdisplay[ nodeName ] ) {
+ display = elemdisplay[ nodeName ];
- this.filter(":hidden").each(function(){
- this.style.display = this.oldblock || "";
- if ( jQuery.css(this,"display") == "none" ) {
- var elem = jQuery("<" + this.tagName + " />").appendTo("body");
- this.style.display = elem.css("display");
- // handle an edge condition where css is - div { display:none; } or similar
- if (this.style.display == "none")
- this.style.display = "block";
- elem.remove();
+ } else {
+ var elem = jQuery("<" + nodeName + " />").appendTo("body");
+
+ display = elem.css("display");
+
+ if ( display === "none" ) {
+ display = "block";
+ }
+
+ elem.remove();
+
+ elemdisplay[ nodeName ] = display;
+ }
+
+ jQuery.data(this[i], "olddisplay", display);
}
- }).end();
+ }
+
+ // Set the display of the elements in a second loop
+ // to avoid the constant reflow
+ for ( var j = 0, k = this.length; j < k; j++ ) {
+ this[j].style.display = jQuery.data(this[j], "olddisplay") || "";
+ }
+
+ return this;
+ }
},
- hide: function(speed,callback){
- return speed ?
- this.animate({
- height: "hide", width: "hide", opacity: "hide"
- }, speed, callback) :
+ hide: function( speed, callback ) {
+ if ( speed || speed === 0 ) {
+ return this.animate( genFx("hide", 3), speed, callback);
+
+ } else {
+ for ( var i = 0, l = this.length; i < l; i++ ) {
+ var old = jQuery.data(this[i], "olddisplay");
+ if ( !old && old !== "none" ) {
+ jQuery.data(this[i], "olddisplay", jQuery.css(this[i], "display"));
+ }
+ }
+
+ // Set the display of the elements in a second loop
+ // to avoid the constant reflow
+ for ( var j = 0, k = this.length; j < k; j++ ) {
+ this[j].style.display = "none";
+ }
- this.filter(":visible").each(function(){
- this.oldblock = this.oldblock || jQuery.css(this,"display");
- this.style.display = "none";
- }).end();
+ return this;
+ }
},
// Save the old toggle function
_toggle: jQuery.fn.toggle,
- toggle: function( fn, fn2 ){
- return jQuery.isFunction(fn) && jQuery.isFunction(fn2) ?
- this._toggle.apply( this, arguments ) :
- fn ?
- this.animate({
- height: "toggle", width: "toggle", opacity: "toggle"
- }, fn, fn2) :
- this.each(function(){
- jQuery(this)[ jQuery(this).is(":hidden") ? "show" : "hide" ]();
- });
- },
-
- slideDown: function(speed,callback){
- return this.animate({height: "show"}, speed, callback);
- },
+ toggle: function( fn, fn2 ) {
+ var bool = typeof fn === "boolean";
- slideUp: function(speed,callback){
- return this.animate({height: "hide"}, speed, callback);
- },
+ if ( jQuery.isFunction(fn) && jQuery.isFunction(fn2) ) {
+ this._toggle.apply( this, arguments );
- slideToggle: function(speed, callback){
- return this.animate({height: "toggle"}, speed, callback);
- },
+ } else if ( fn == null || bool ) {
+ this.each(function() {
+ var state = bool ? fn : jQuery(this).is(":hidden");
+ jQuery(this)[ state ? "show" : "hide" ]();
+ });
- fadeIn: function(speed, callback){
- return this.animate({opacity: "show"}, speed, callback);
- },
+ } else {
+ this.animate(genFx("toggle", 3), fn, fn2);
+ }
- fadeOut: function(speed, callback){
- return this.animate({opacity: "hide"}, speed, callback);
+ return this;
},
- fadeTo: function(speed,to,callback){
- return this.animate({opacity: to}, speed, callback);
+ fadeTo: function( speed, to, callback ) {
+ return this.filter(":hidden").css("opacity", 0).show().end()
+ .animate({opacity: to}, speed, callback);
},
animate: function( prop, speed, easing, callback ) {
var optall = jQuery.speed(speed, easing, callback);
- return this[ optall.queue === false ? "each" : "queue" ](function(){
- if ( this.nodeType != 1)
- return false;
+ if ( jQuery.isEmptyObject( prop ) ) {
+ return this.each( optall.complete );
+ }
+ return this[ optall.queue === false ? "each" : "queue" ](function() {
var opt = jQuery.extend({}, optall), p,
- hidden = jQuery(this).is(":hidden"), self = this;
+ hidden = this.nodeType === 1 && jQuery(this).is(":hidden"),
+ self = this;
for ( p in prop ) {
- if ( prop[p] == "hide" && hidden || prop[p] == "show" && !hidden )
+ var name = p.replace(rdashAlpha, fcamelCase);
+
+ if ( p !== name ) {
+ prop[ name ] = prop[ p ];
+ delete prop[ p ];
+ p = name;
+ }
+
+ if ( prop[p] === "hide" && hidden || prop[p] === "show" && !hidden ) {
return opt.complete.call(this);
+ }
- if ( p == "height" || p == "width" ) {
+ if ( ( p === "height" || p === "width" ) && this.style ) {
// Store display property
opt.display = jQuery.css(this, "display");
// Make sure that nothing sneaks out
opt.overflow = this.style.overflow;
}
+
+ if ( jQuery.isArray( prop[p] ) ) {
+ // Create (if needed) and add to specialEasing
+ (opt.specialEasing = opt.specialEasing || {})[p] = prop[p][1];
+ prop[p] = prop[p][0];
+ }
}
- if ( opt.overflow != null )
+ if ( opt.overflow != null ) {
this.style.overflow = "hidden";
+ }
opt.curAnim = jQuery.extend({}, prop);
- jQuery.each( prop, function(name, val){
+ jQuery.each( prop, function( name, val ) {
var e = new jQuery.fx( self, opt, name );
- if ( /toggle|show|hide/.test(val) )
- e[ val == "toggle" ? hidden ? "show" : "hide" : val ]( prop );
- else {
- var parts = val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),
+ if ( rfxtypes.test(val) ) {
+ e[ val === "toggle" ? hidden ? "show" : "hide" : val ]( prop );
+
+ } else {
+ var parts = rfxnum.exec(val),
start = e.cur(true) || 0;
if ( parts ) {
- var end = parseFloat(parts[2]),
+ var end = parseFloat( parts[2] ),
unit = parts[3] || "px";
// We need to compute starting value
- if ( unit != "px" ) {
+ if ( unit !== "px" ) {
self.style[ name ] = (end || 1) + unit;
start = ((end || 1) / e.cur(true)) * start;
self.style[ name ] = start + unit;
}
// If a +=/-= token was provided, we're doing a relative animation
- if ( parts[1] )
- end = ((parts[1] == "-=" ? -1 : 1) * end) + start;
+ if ( parts[1] ) {
+ end = ((parts[1] === "-=" ? -1 : 1) * end) + start;
+ }
e.custom( start, end, unit );
- } else
+
+ } else {
e.custom( start, val, "" );
+ }
}
});
@@ -3062,101 +5469,71 @@ jQuery.fn.extend({
});
},
- queue: function(type, fn){
- if ( jQuery.isFunction(type) || ( type && type.constructor == Array )) {
- fn = type;
- type = "fx";
- }
-
- if ( !type || (typeof type == "string" && !fn) )
- return queue( this[0], type );
-
- return this.each(function(){
- if ( fn.constructor == Array )
- queue(this, type, fn);
- else {
- queue(this, type).push( fn );
-
- if ( queue(this, type).length == 1 )
- fn.call(this);
- }
- });
- },
-
- stop: function(clearQueue, gotoEnd){
+ stop: function( clearQueue, gotoEnd ) {
var timers = jQuery.timers;
- if (clearQueue)
+ if ( clearQueue ) {
this.queue([]);
+ }
- this.each(function(){
+ this.each(function() {
// go in reverse order so anything added to the queue during the loop is ignored
- for ( var i = timers.length - 1; i >= 0; i-- )
- if ( timers[i].elem == this ) {
- if (gotoEnd)
+ for ( var i = timers.length - 1; i >= 0; i-- ) {
+ if ( timers[i].elem === this ) {
+ if (gotoEnd) {
// force the next step to be the last
timers[i](true);
+ }
+
timers.splice(i, 1);
}
+ }
});
// start the next in the queue if the last step wasn't forced
- if (!gotoEnd)
+ if ( !gotoEnd ) {
this.dequeue();
+ }
return this;
}
});
-var queue = function( elem, type, array ) {
- if ( elem ){
-
- type = type || "fx";
-
- var q = jQuery.data( elem, type + "queue" );
-
- if ( !q || array )
- q = jQuery.data( elem, type + "queue", jQuery.makeArray(array) );
-
- }
- return q;
-};
-
-jQuery.fn.dequeue = function(type){
- type = type || "fx";
-
- return this.each(function(){
- var q = queue(this, type);
-
- q.shift();
-
- if ( q.length )
- q[0].call( this );
- });
-};
+// Generate shortcuts for custom animations
+jQuery.each({
+ slideDown: genFx("show", 1),
+ slideUp: genFx("hide", 1),
+ slideToggle: genFx("toggle", 1),
+ fadeIn: { opacity: "show" },
+ fadeOut: { opacity: "hide" }
+}, function( name, props ) {
+ jQuery.fn[ name ] = function( speed, callback ) {
+ return this.animate( props, speed, callback );
+ };
+});
jQuery.extend({
-
- speed: function(speed, easing, fn) {
- var opt = speed && speed.constructor == Object ? speed : {
+ speed: function( speed, easing, fn ) {
+ var opt = speed && typeof speed === "object" ? speed : {
complete: fn || !fn && easing ||
jQuery.isFunction( speed ) && speed,
duration: speed,
- easing: fn && easing || easing && easing.constructor != Function && easing
+ easing: fn && easing || easing && !jQuery.isFunction(easing) && easing
};
- opt.duration = (opt.duration && opt.duration.constructor == Number ?
- opt.duration :
- jQuery.fx.speeds[opt.duration]) || jQuery.fx.speeds.def;
+ opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
+ jQuery.fx.speeds[opt.duration] || jQuery.fx.speeds._default;
// Queueing
opt.old = opt.complete;
- opt.complete = function(){
- if ( opt.queue !== false )
+ opt.complete = function() {
+ if ( opt.queue !== false ) {
jQuery(this).dequeue();
- if ( jQuery.isFunction( opt.old ) )
+ }
+ if ( jQuery.isFunction( opt.old ) ) {
opt.old.call( this );
+ }
};
return opt;
@@ -3172,99 +5549,84 @@ jQuery.extend({
},
timers: [],
- timerId: null,
- fx: function( elem, options, prop ){
+ fx: function( elem, options, prop ) {
this.options = options;
this.elem = elem;
this.prop = prop;
- if ( !options.orig )
+ if ( !options.orig ) {
options.orig = {};
+ }
}
});
jQuery.fx.prototype = {
-
// Simple function for setting a style value
- update: function(){
- if ( this.options.step )
+ update: function() {
+ if ( this.options.step ) {
this.options.step.call( this.elem, this.now, this );
+ }
(jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this );
// Set display property to block for height/width animations
- if ( this.prop == "height" || this.prop == "width" )
+ if ( ( this.prop === "height" || this.prop === "width" ) && this.elem.style ) {
this.elem.style.display = "block";
+ }
},
// Get the current size
- cur: function(force){
- if ( this.elem[this.prop] != null && this.elem.style[this.prop] == null )
+ cur: function( force ) {
+ if ( this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null) ) {
return this.elem[ this.prop ];
+ }
var r = parseFloat(jQuery.css(this.elem, this.prop, force));
return r && r > -10000 ? r : parseFloat(jQuery.curCSS(this.elem, this.prop)) || 0;
},
// Start an animation from one number to another
- custom: function(from, to, unit){
+ custom: function( from, to, unit ) {
this.startTime = now();
this.start = from;
this.end = to;
this.unit = unit || this.unit || "px";
this.now = this.start;
this.pos = this.state = 0;
- this.update();
var self = this;
- function t(gotoEnd){
+ function t( gotoEnd ) {
return self.step(gotoEnd);
}
t.elem = this.elem;
- jQuery.timers.push(t);
-
- if ( jQuery.timerId == null ) {
- jQuery.timerId = setInterval(function(){
- var timers = jQuery.timers;
-
- for ( var i = 0; i < timers.length; i++ )
- if ( !timers[i]() )
- timers.splice(i--, 1);
-
- if ( !timers.length ) {
- clearInterval( jQuery.timerId );
- jQuery.timerId = null;
- }
- }, 13);
+ if ( t() && jQuery.timers.push(t) && !timerId ) {
+ timerId = setInterval(jQuery.fx.tick, 13);
}
},
// Simple 'show' function
- show: function(){
+ show: function() {
// Remember where we started, so that we can go back to it later
- this.options.orig[this.prop] = jQuery.attr( this.elem.style, this.prop );
+ this.options.orig[this.prop] = jQuery.style( this.elem, this.prop );
this.options.show = true;
// Begin the animation
- this.custom(0, this.cur());
-
// Make sure that we start at a small width/height to avoid any
// flash of content
- if ( this.prop == "width" || this.prop == "height" )
- this.elem.style[this.prop] = "1px";
+ this.custom(this.prop === "width" || this.prop === "height" ? 1 : 0, this.cur());
// Start by showing the element
- jQuery(this.elem).show();
+ jQuery( this.elem ).show();
},
// Simple 'hide' function
- hide: function(){
+ hide: function() {
// Remember where we started, so that we can go back to it later
- this.options.orig[this.prop] = jQuery.attr( this.elem.style, this.prop );
+ this.options.orig[this.prop] = jQuery.style( this.elem, this.prop );
this.options.hide = true;
// Begin the animation
@@ -3272,20 +5634,21 @@ jQuery.fx.prototype = {
},
// Each step of an animation
- step: function(gotoEnd){
- var t = now();
+ step: function( gotoEnd ) {
+ var t = now(), done = true;
- if ( gotoEnd || t > this.options.duration + this.startTime ) {
+ if ( gotoEnd || t >= this.options.duration + this.startTime ) {
this.now = this.end;
this.pos = this.state = 1;
this.update();
this.options.curAnim[ this.prop ] = true;
- var done = true;
- for ( var i in this.options.curAnim )
- if ( this.options.curAnim[i] !== true )
+ for ( var i in this.options.curAnim ) {
+ if ( this.options.curAnim[i] !== true ) {
done = false;
+ }
+ }
if ( done ) {
if ( this.options.display != null ) {
@@ -3293,32 +5656,40 @@ jQuery.fx.prototype = {
this.elem.style.overflow = this.options.overflow;
// Reset the display
- this.elem.style.display = this.options.display;
- if ( jQuery.css(this.elem, "display") == "none" )
+ var old = jQuery.data(this.elem, "olddisplay");
+ this.elem.style.display = old ? old : this.options.display;
+
+ if ( jQuery.css(this.elem, "display") === "none" ) {
this.elem.style.display = "block";
+ }
}
// Hide the element if the "hide" operation was done
- if ( this.options.hide )
- this.elem.style.display = "none";
+ if ( this.options.hide ) {
+ jQuery(this.elem).hide();
+ }
// Reset the properties, if the item has been hidden or shown
- if ( this.options.hide || this.options.show )
- for ( var p in this.options.curAnim )
- jQuery.attr(this.elem.style, p, this.options.orig[p]);
- }
+ if ( this.options.hide || this.options.show ) {
+ for ( var p in this.options.curAnim ) {
+ jQuery.style(this.elem, p, this.options.orig[p]);
+ }
+ }
- if ( done )
// Execute the complete function
this.options.complete.call( this.elem );
+ }
return false;
+
} else {
var n = t - this.startTime;
this.state = n / this.options.duration;
// Perform the easing function, defaults to swing
- this.pos = jQuery.easing[this.options.easing || (jQuery.easing.swing ? "swing" : "linear")](this.state, n, 0, 1, this.options.duration);
+ var specialEasing = this.options.specialEasing && this.options.specialEasing[this.prop];
+ var defaultEasing = this.options.easing || (jQuery.easing.swing ? "swing" : "linear");
+ this.pos = jQuery.easing[specialEasing || defaultEasing](this.state, n, 0, 1, this.options.duration);
this.now = this.start + ((this.end - this.start) * this.pos);
// Perform the next step of the animation
@@ -3327,223 +5698,381 @@ jQuery.fx.prototype = {
return true;
}
-
};
jQuery.extend( jQuery.fx, {
- speeds:{
+ tick: function() {
+ var timers = jQuery.timers;
+
+ for ( var i = 0; i < timers.length; i++ ) {
+ if ( !timers[i]() ) {
+ timers.splice(i--, 1);
+ }
+ }
+
+ if ( !timers.length ) {
+ jQuery.fx.stop();
+ }
+ },
+
+ stop: function() {
+ clearInterval( timerId );
+ timerId = null;
+ },
+
+ speeds: {
slow: 600,
fast: 200,
// Default speed
- def: 400
+ _default: 400
},
- step: {
- scrollLeft: function(fx){
- fx.elem.scrollLeft = fx.now;
- },
-
- scrollTop: function(fx){
- fx.elem.scrollTop = fx.now;
- },
- opacity: function(fx){
- jQuery.attr(fx.elem.style, "opacity", fx.now);
+ step: {
+ opacity: function( fx ) {
+ jQuery.style(fx.elem, "opacity", fx.now);
},
- _default: function(fx){
- fx.elem.style[ fx.prop ] = fx.now + fx.unit;
+ _default: function( fx ) {
+ if ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) {
+ fx.elem.style[ fx.prop ] = (fx.prop === "width" || fx.prop === "height" ? Math.max(0, fx.now) : fx.now) + fx.unit;
+ } else {
+ fx.elem[ fx.prop ] = fx.now;
+ }
}
}
});
-// The Offset Method
-// Originally By Brandon Aaron, part of the Dimension Plugin
-// http://jquery.com/plugins/project/dimensions
-jQuery.fn.offset = function() {
- var left = 0, top = 0, elem = this[0], results;
-
- if ( elem ) with ( jQuery.browser ) {
- var parent = elem.parentNode,
- offsetChild = elem,
- offsetParent = elem.offsetParent,
- doc = elem.ownerDocument,
- safari2 = safari && parseInt(version) < 522 && !/adobeair/i.test(userAgent),
- css = jQuery.curCSS,
- fixed = css(elem, "position") == "fixed";
-
- // Use getBoundingClientRect if available
- if ( elem.getBoundingClientRect ) {
- var box = elem.getBoundingClientRect();
-
- // Add the document scroll offsets
- add(box.left + Math.max(doc.documentElement.scrollLeft, doc.body.scrollLeft),
- box.top + Math.max(doc.documentElement.scrollTop, doc.body.scrollTop));
-
- // IE adds the HTML element's border, by default it is medium which is 2px
- // IE 6 and 7 quirks mode the border width is overwritable by the following css html { border: 0; }
- // IE 7 standards mode, the border is always 2px
- // This border/offset is typically represented by the clientLeft and clientTop properties
- // However, in IE6 and 7 quirks mode the clientLeft and clientTop properties are not updated when overwriting it via CSS
- // Therefore this method will be off by 2px in IE while in quirksmode
- add( -doc.documentElement.clientLeft, -doc.documentElement.clientTop );
-
- // Otherwise loop through the offsetParents and parentNodes
- } else {
- // Initial element offsets
- add( elem.offsetLeft, elem.offsetTop );
+if ( jQuery.expr && jQuery.expr.filters ) {
+ jQuery.expr.filters.animated = function( elem ) {
+ return jQuery.grep(jQuery.timers, function( fn ) {
+ return elem === fn.elem;
+ }).length;
+ };
+}
- // Get parent offsets
- while ( offsetParent ) {
- // Add offsetParent offsets
- add( offsetParent.offsetLeft, offsetParent.offsetTop );
+function genFx( type, num ) {
+ var obj = {};
- // Mozilla and Safari > 2 does not include the border on offset parents
- // However Mozilla adds the border for table or table cells
- if ( mozilla && !/^t(able|d|h)$/i.test(offsetParent.tagName) || safari && !safari2 )
- border( offsetParent );
+ jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice(0,num)), function() {
+ obj[ this ] = type;
+ });
- // Add the document scroll offsets if position is fixed on any offsetParent
- if ( !fixed && css(offsetParent, "position") == "fixed" )
- fixed = true;
+ return obj;
+}
+if ( "getBoundingClientRect" in document.documentElement ) {
+ jQuery.fn.offset = function( options ) {
+ var elem = this[0];
- // Set offsetChild to previous offsetParent unless it is the body element
- offsetChild = /^body$/i.test(offsetParent.tagName) ? offsetChild : offsetParent;
- // Get next offsetParent
- offsetParent = offsetParent.offsetParent;
+ if ( options ) {
+ return this.each(function( i ) {
+ jQuery.offset.setOffset( this, options, i );
+ });
+ }
+
+ if ( !elem || !elem.ownerDocument ) {
+ return null;
+ }
+
+ if ( elem === elem.ownerDocument.body ) {
+ return jQuery.offset.bodyOffset( elem );
+ }
+
+ var box = elem.getBoundingClientRect(), doc = elem.ownerDocument, body = doc.body, docElem = doc.documentElement,
+ clientTop = docElem.clientTop || body.clientTop || 0, clientLeft = docElem.clientLeft || body.clientLeft || 0,
+ top = box.top + (self.pageYOffset || jQuery.support.boxModel && docElem.scrollTop || body.scrollTop ) - clientTop,
+ left = box.left + (self.pageXOffset || jQuery.support.boxModel && docElem.scrollLeft || body.scrollLeft) - clientLeft;
+
+ return { top: top, left: left };
+ };
+
+} else {
+ jQuery.fn.offset = function( options ) {
+ var elem = this[0];
+
+ if ( options ) {
+ return this.each(function( i ) {
+ jQuery.offset.setOffset( this, options, i );
+ });
+ }
+
+ if ( !elem || !elem.ownerDocument ) {
+ return null;
+ }
+
+ if ( elem === elem.ownerDocument.body ) {
+ return jQuery.offset.bodyOffset( elem );
+ }
+
+ jQuery.offset.initialize();
+
+ var offsetParent = elem.offsetParent, prevOffsetParent = elem,
+ doc = elem.ownerDocument, computedStyle, docElem = doc.documentElement,
+ body = doc.body, defaultView = doc.defaultView,
+ prevComputedStyle = defaultView ? defaultView.getComputedStyle( elem, null ) : elem.currentStyle,
+ top = elem.offsetTop, left = elem.offsetLeft;
+
+ while ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) {
+ if ( jQuery.offset.supportsFixedPosition && prevComputedStyle.position === "fixed" ) {
+ break;
}
- // Get parent scroll offsets
- while ( parent && parent.tagName && !/^body|html$/i.test(parent.tagName) ) {
- // Remove parent scroll UNLESS that parent is inline or a table to work around Opera inline/table scrollLeft/Top bug
- if ( !/^inline|table.*$/i.test(css(parent, "display")) )
- // Subtract parent scroll offsets
- add( -parent.scrollLeft, -parent.scrollTop );
+ computedStyle = defaultView ? defaultView.getComputedStyle(elem, null) : elem.currentStyle;
+ top -= elem.scrollTop;
+ left -= elem.scrollLeft;
+
+ if ( elem === offsetParent ) {
+ top += elem.offsetTop;
+ left += elem.offsetLeft;
- // Mozilla does not add the border for a parent that has overflow != visible
- if ( mozilla && css(parent, "overflow") != "visible" )
- border( parent );
+ if ( jQuery.offset.doesNotAddBorder && !(jQuery.offset.doesAddBorderForTableAndCells && /^t(able|d|h)$/i.test(elem.nodeName)) ) {
+ top += parseFloat( computedStyle.borderTopWidth ) || 0;
+ left += parseFloat( computedStyle.borderLeftWidth ) || 0;
+ }
- // Get next parent
- parent = parent.parentNode;
+ prevOffsetParent = offsetParent, offsetParent = elem.offsetParent;
}
- // Safari <= 2 doubles body offsets with a fixed position element/offsetParent or absolutely positioned offsetChild
- // Mozilla doubles body offsets with a non-absolutely positioned offsetChild
- if ( (safari2 && (fixed || css(offsetChild, "position") == "absolute")) ||
- (mozilla && css(offsetChild, "position") != "absolute") )
- add( -doc.body.offsetLeft, -doc.body.offsetTop );
+ if ( jQuery.offset.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== "visible" ) {
+ top += parseFloat( computedStyle.borderTopWidth ) || 0;
+ left += parseFloat( computedStyle.borderLeftWidth ) || 0;
+ }
- // Add the document scroll offsets if position is fixed
- if ( fixed )
- add(Math.max(doc.documentElement.scrollLeft, doc.body.scrollLeft),
- Math.max(doc.documentElement.scrollTop, doc.body.scrollTop));
+ prevComputedStyle = computedStyle;
}
- // Return an object with top and left properties
- results = { top: top, left: left };
- }
+ if ( prevComputedStyle.position === "relative" || prevComputedStyle.position === "static" ) {
+ top += body.offsetTop;
+ left += body.offsetLeft;
+ }
- function border(elem) {
- add( jQuery.curCSS(elem, "borderLeftWidth", true), jQuery.curCSS(elem, "borderTopWidth", true) );
- }
+ if ( jQuery.offset.supportsFixedPosition && prevComputedStyle.position === "fixed" ) {
+ top += Math.max( docElem.scrollTop, body.scrollTop );
+ left += Math.max( docElem.scrollLeft, body.scrollLeft );
+ }
- function add(l, t) {
- left += parseInt(l, 10) || 0;
- top += parseInt(t, 10) || 0;
- }
+ return { top: top, left: left };
+ };
+}
- return results;
+jQuery.offset = {
+ initialize: function() {
+ var body = document.body, container = document.createElement("div"), innerDiv, checkDiv, table, td, bodyMarginTop = parseFloat( jQuery.curCSS(body, "marginTop", true) ) || 0,
+ html = "<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";
+
+ jQuery.extend( container.style, { position: "absolute", top: 0, left: 0, margin: 0, border: 0, width: "1px", height: "1px", visibility: "hidden" } );
+
+ container.innerHTML = html;
+ body.insertBefore( container, body.firstChild );
+ innerDiv = container.firstChild;
+ checkDiv = innerDiv.firstChild;
+ td = innerDiv.nextSibling.firstChild.firstChild;
+
+ this.doesNotAddBorder = (checkDiv.offsetTop !== 5);
+ this.doesAddBorderForTableAndCells = (td.offsetTop === 5);
+
+ checkDiv.style.position = "fixed", checkDiv.style.top = "20px";
+ // safari subtracts parent border width here which is 5px
+ this.supportsFixedPosition = (checkDiv.offsetTop === 20 || checkDiv.offsetTop === 15);
+ checkDiv.style.position = checkDiv.style.top = "";
+
+ innerDiv.style.overflow = "hidden", innerDiv.style.position = "relative";
+ this.subtractsBorderForOverflowNotVisible = (checkDiv.offsetTop === -5);
+
+ this.doesNotIncludeMarginInBodyOffset = (body.offsetTop !== bodyMarginTop);
+
+ body.removeChild( container );
+ body = container = innerDiv = checkDiv = table = td = null;
+ jQuery.offset.initialize = jQuery.noop;
+ },
+
+ bodyOffset: function( body ) {
+ var top = body.offsetTop, left = body.offsetLeft;
+
+ jQuery.offset.initialize();
+
+ if ( jQuery.offset.doesNotIncludeMarginInBodyOffset ) {
+ top += parseFloat( jQuery.curCSS(body, "marginTop", true) ) || 0;
+ left += parseFloat( jQuery.curCSS(body, "marginLeft", true) ) || 0;
+ }
+
+ return { top: top, left: left };
+ },
+
+ setOffset: function( elem, options, i ) {
+ // set position first, in-case top/left are set even on static elem
+ if ( /static/.test( jQuery.curCSS( elem, "position" ) ) ) {
+ elem.style.position = "relative";
+ }
+ var curElem = jQuery( elem ),
+ curOffset = curElem.offset(),
+ curTop = parseInt( jQuery.curCSS( elem, "top", true ), 10 ) || 0,
+ curLeft = parseInt( jQuery.curCSS( elem, "left", true ), 10 ) || 0;
+
+ if ( jQuery.isFunction( options ) ) {
+ options = options.call( elem, i, curOffset );
+ }
+
+ var props = {
+ top: (options.top - curOffset.top) + curTop,
+ left: (options.left - curOffset.left) + curLeft
+ };
+
+ if ( "using" in options ) {
+ options.using.call( elem, props );
+ } else {
+ curElem.css( props );
+ }
+ }
};
jQuery.fn.extend({
position: function() {
- var left = 0, top = 0, results;
-
- if ( this[0] ) {
- // Get *real* offsetParent
- var offsetParent = this.offsetParent(),
-
- // Get correct offsets
- offset = this.offset(),
- parentOffset = /^body|html$/i.test(offsetParent[0].tagName) ? { top: 0, left: 0 } : offsetParent.offset();
-
- // Subtract element margins
- // note: when an element has margin: auto the offsetLeft and marginLeft
- // are the same in Safari causing offset.left to incorrectly be 0
- offset.top -= num( this, 'marginTop' );
- offset.left -= num( this, 'marginLeft' );
-
- // Add offsetParent borders
- parentOffset.top += num( offsetParent, 'borderTopWidth' );
- parentOffset.left += num( offsetParent, 'borderLeftWidth' );
-
- // Subtract the two offsets
- results = {
- top: offset.top - parentOffset.top,
- left: offset.left - parentOffset.left
- };
+ if ( !this[0] ) {
+ return null;
}
- return results;
+ var elem = this[0],
+
+ // Get *real* offsetParent
+ offsetParent = this.offsetParent(),
+
+ // Get correct offsets
+ offset = this.offset(),
+ parentOffset = /^body|html$/i.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset();
+
+ // Subtract element margins
+ // note: when an element has margin: auto the offsetLeft and marginLeft
+ // are the same in Safari causing offset.left to incorrectly be 0
+ offset.top -= parseFloat( jQuery.curCSS(elem, "marginTop", true) ) || 0;
+ offset.left -= parseFloat( jQuery.curCSS(elem, "marginLeft", true) ) || 0;
+
+ // Add offsetParent borders
+ parentOffset.top += parseFloat( jQuery.curCSS(offsetParent[0], "borderTopWidth", true) ) || 0;
+ parentOffset.left += parseFloat( jQuery.curCSS(offsetParent[0], "borderLeftWidth", true) ) || 0;
+
+ // Subtract the two offsets
+ return {
+ top: offset.top - parentOffset.top,
+ left: offset.left - parentOffset.left
+ };
},
offsetParent: function() {
- var offsetParent = this[0].offsetParent;
- while ( offsetParent && (!/^body|html$/i.test(offsetParent.tagName) && jQuery.css(offsetParent, 'position') == 'static') )
- offsetParent = offsetParent.offsetParent;
- return jQuery(offsetParent);
+ return this.map(function() {
+ var offsetParent = this.offsetParent || document.body;
+ while ( offsetParent && (!/^body|html$/i.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) {
+ offsetParent = offsetParent.offsetParent;
+ }
+ return offsetParent;
+ });
}
});
// Create scrollLeft and scrollTop methods
-jQuery.each( ['Left', 'Top'], function(i, name) {
- var method = 'scroll' + name;
-
- jQuery.fn[ method ] = function(val) {
- if (!this[0]) return;
+jQuery.each( ["Left", "Top"], function( i, name ) {
+ var method = "scroll" + name;
- return val != undefined ?
+ jQuery.fn[ method ] = function(val) {
+ var elem = this[0], win;
+
+ if ( !elem ) {
+ return null;
+ }
+ if ( val !== undefined ) {
// Set the scroll offset
- this.each(function() {
- this == window || this == document ?
- window.scrollTo(
- !i ? val : jQuery(window).scrollLeft(),
- i ? val : jQuery(window).scrollTop()
- ) :
+ return this.each(function() {
+ win = getWindow( this );
+
+ if ( win ) {
+ win.scrollTo(
+ !i ? val : jQuery(win).scrollLeft(),
+ i ? val : jQuery(win).scrollTop()
+ );
+
+ } else {
this[ method ] = val;
- }) :
+ }
+ });
+ } else {
+ win = getWindow( elem );
// Return the scroll offset
- this[0] == window || this[0] == document ?
- self[ i ? 'pageYOffset' : 'pageXOffset' ] ||
- jQuery.boxModel && document.documentElement[ method ] ||
- document.body[ method ] :
- this[0][ method ];
+ return win ? ("pageXOffset" in win) ? win[ i ? "pageYOffset" : "pageXOffset" ] :
+ jQuery.support.boxModel && win.document.documentElement[ method ] ||
+ win.document.body[ method ] :
+ elem[ method ];
+ }
};
});
+
+function getWindow( elem ) {
+ return ("scrollTo" in elem && elem.document) ?
+ elem :
+ elem.nodeType === 9 ?
+ elem.defaultView || elem.parentWindow :
+ false;
+}
// Create innerHeight, innerWidth, outerHeight and outerWidth methods
-jQuery.each([ "Height", "Width" ], function(i, name){
+jQuery.each([ "Height", "Width" ], function( i, name ) {
- var tl = i ? "Left" : "Top", // top or left
- br = i ? "Right" : "Bottom"; // bottom or right
+ var type = name.toLowerCase();
// innerHeight and innerWidth
- jQuery.fn["inner" + name] = function(){
- return this[ name.toLowerCase() ]() +
- num(this, "padding" + tl) +
- num(this, "padding" + br);
+ jQuery.fn["inner" + name] = function() {
+ return this[0] ?
+ jQuery.css( this[0], type, false, "padding" ) :
+ null;
};
// outerHeight and outerWidth
- jQuery.fn["outer" + name] = function(margin) {
- return this["inner" + name]() +
- num(this, "border" + tl + "Width") +
- num(this, "border" + br + "Width") +
- (margin ?
- num(this, "margin" + tl) + num(this, "margin" + br) : 0);
+ jQuery.fn["outer" + name] = function( margin ) {
+ return this[0] ?
+ jQuery.css( this[0], type, false, margin ? "margin" : "border" ) :
+ null;
+ };
+
+ jQuery.fn[ type ] = function( size ) {
+ // Get window width or height
+ var elem = this[0];
+ if ( !elem ) {
+ return size == null ? null : this;
+ }
+
+ if ( jQuery.isFunction( size ) ) {
+ return this.each(function( i ) {
+ var self = jQuery( this );
+ self[ type ]( size.call( this, i, self[ type ]() ) );
+ });
+ }
+
+ return ("scrollTo" in elem && elem.document) ? // does it walk and quack like a window?
+ // Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
+ elem.document.compatMode === "CSS1Compat" && elem.document.documentElement[ "client" + name ] ||
+ elem.document.body[ "client" + name ] :
+
+ // Get document width or height
+ (elem.nodeType === 9) ? // is it a document
+ // Either scroll[Width/Height] or offset[Width/Height], whichever is greater
+ Math.max(
+ elem.documentElement["client" + name],
+ elem.body["scroll" + name], elem.documentElement["scroll" + name],
+ elem.body["offset" + name], elem.documentElement["offset" + name]
+ ) :
+
+ // Get or set width or height on the element
+ size === undefined ?
+ // Get width or height on the element
+ jQuery.css( elem, type ) :
+
+ // Set the width or height on the element (default to pixels if value is unitless)
+ this.css( type, typeof size === "string" ? size : size + "px" );
};
-});})();
+});
+// Expose jQuery to the global object
+window.jQuery = window.$ = jQuery;
+
+})(window);
diff --git a/template-common/lib/jquery.packed.js b/template-common/lib/jquery.packed.js
index 95dd0138f..f99269ee9 100644
--- a/template-common/lib/jquery.packed.js
+++ b/template-common/lib/jquery.packed.js
@@ -1,11 +1 @@
-/*
- * jQuery 1.2.6 - New Wave Javascript
- *
- * Copyright (c) 2008 John Resig (jquery.com)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
- *
- * $Date: 2008-05-24 14:22:17 -0400 (Sat, 24 May 2008) $
- * $Rev: 5685 $
- */
-eval(function(p,a,c,k,e,r){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--)r[e(c)]=k[c]||e(c);k=[function(e){return r[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}('(H(){J w=1b.4M,3m$=1b.$;J D=1b.4M=1b.$=H(a,b){I 2B D.17.5j(a,b)};J u=/^[^<]*(<(.|\\s)+>)[^>]*$|^#(\\w+)$/,62=/^.[^:#\\[\\.]*$/,12;D.17=D.44={5j:H(d,b){d=d||S;G(d.16){7[0]=d;7.K=1;I 7}G(1j d=="23"){J c=u.2D(d);G(c&&(c[1]||!b)){G(c[1])d=D.4h([c[1]],b);N{J a=S.61(c[3]);G(a){G(a.2v!=c[3])I D().2q(d);I D(a)}d=[]}}N I D(b).2q(d)}N G(D.1D(d))I D(S)[D.17.27?"27":"43"](d);I 7.6Y(D.2d(d))},5w:"1.2.6",8G:H(){I 7.K},K:0,3p:H(a){I a==12?D.2d(7):7[a]},2I:H(b){J a=D(b);a.5n=7;I a},6Y:H(a){7.K=0;2p.44.1p.1w(7,a);I 7},P:H(a,b){I D.P(7,a,b)},5i:H(b){J a=-1;I D.2L(b&&b.5w?b[0]:b,7)},1K:H(c,a,b){J d=c;G(c.1q==56)G(a===12)I 7[0]&&D[b||"1K"](7[0],c);N{d={};d[c]=a}I 7.P(H(i){R(c 1n d)D.1K(b?7.V:7,c,D.1i(7,d[c],b,i,c))})},1g:H(b,a){G((b==\'2h\'||b==\'1Z\')&&3d(a)<0)a=12;I 7.1K(b,a,"2a")},1r:H(b){G(1j b!="49"&&b!=U)I 7.4E().3v((7[0]&&7[0].2z||S).5F(b));J a="";D.P(b||7,H(){D.P(7.3t,H(){G(7.16!=8)a+=7.16!=1?7.76:D.17.1r([7])})});I a},5z:H(b){G(7[0])D(b,7[0].2z).5y().39(7[0]).2l(H(){J a=7;1B(a.1x)a=a.1x;I a}).3v(7);I 7},8Y:H(a){I 7.P(H(){D(7).6Q().5z(a)})},8R:H(a){I 7.P(H(){D(7).5z(a)})},3v:H(){I 7.3W(19,M,Q,H(a){G(7.16==1)7.3U(a)})},6F:H(){I 7.3W(19,M,M,H(a){G(7.16==1)7.39(a,7.1x)})},6E:H(){I 7.3W(19,Q,Q,H(a){7.1d.39(a,7)})},5q:H(){I 7.3W(19,Q,M,H(a){7.1d.39(a,7.2H)})},3l:H(){I 7.5n||D([])},2q:H(b){J c=D.2l(7,H(a){I D.2q(b,a)});I 7.2I(/[^+>] [^+>]/.11(b)||b.1h("..")>-1?D.4r(c):c)},5y:H(e){J f=7.2l(H(){G(D.14.1f&&!D.4n(7)){J a=7.6o(M),5h=S.3h("1v");5h.3U(a);I D.4h([5h.4H])[0]}N I 7.6o(M)});J d=f.2q("*").5c().P(H(){G(7[E]!=12)7[E]=U});G(e===M)7.2q("*").5c().P(H(i){G(7.16==3)I;J c=D.L(7,"3w");R(J a 1n c)R(J b 1n c[a])D.W.1e(d[i],a,c[a][b],c[a][b].L)});I f},1E:H(b){I 7.2I(D.1D(b)&&D.3C(7,H(a,i){I b.1k(a,i)})||D.3g(b,7))},4Y:H(b){G(b.1q==56)G(62.11(b))I 7.2I(D.3g(b,7,M));N b=D.3g(b,7);J a=b.K&&b[b.K-1]!==12&&!b.16;I 7.1E(H(){I a?D.2L(7,b)<0:7!=b})},1e:H(a){I 7.2I(D.4r(D.2R(7.3p(),1j a==\'23\'?D(a):D.2d(a))))},3F:H(a){I!!a&&D.3g(a,7).K>0},7T:H(a){I 7.3F("."+a)},6e:H(b){G(b==12){G(7.K){J c=7[0];G(D.Y(c,"2A")){J e=c.64,63=[],15=c.15,2V=c.O=="2A-2V";G(e<0)I U;R(J i=2V?e:0,2f=2V?e+1:15.K;i<2f;i++){J d=15[i];G(d.2W){b=D.14.1f&&!d.at.2x.an?d.1r:d.2x;G(2V)I b;63.1p(b)}}I 63}N I(7[0].2x||"").1o(/\\r/g,"")}I 12}G(b.1q==4L)b+=\'\';I 7.P(H(){G(7.16!=1)I;G(b.1q==2p&&/5O|5L/.11(7.O))7.4J=(D.2L(7.2x,b)>=0||D.2L(7.34,b)>=0);N G(D.Y(7,"2A")){J a=D.2d(b);D("9R",7).P(H(){7.2W=(D.2L(7.2x,a)>=0||D.2L(7.1r,a)>=0)});G(!a.K)7.64=-1}N 7.2x=b})},2K:H(a){I a==12?(7[0]?7[0].4H:U):7.4E().3v(a)},7b:H(a){I 7.5q(a).21()},79:H(i){I 7.3s(i,i+1)},3s:H(){I 7.2I(2p.44.3s.1w(7,19))},2l:H(b){I 7.2I(D.2l(7,H(a,i){I b.1k(a,i,a)}))},5c:H(){I 7.1e(7.5n)},L:H(d,b){J a=d.1R(".");a[1]=a[1]?"."+a[1]:"";G(b===12){J c=7.5C("9z"+a[1]+"!",[a[0]]);G(c===12&&7.K)c=D.L(7[0],d);I c===12&&a[1]?7.L(a[0]):c}N I 7.1P("9u"+a[1]+"!",[a[0],b]).P(H(){D.L(7,d,b)})},3b:H(a){I 7.P(H(){D.3b(7,a)})},3W:H(g,f,h,d){J e=7.K>1,3x;I 7.P(H(){G(!3x){3x=D.4h(g,7.2z);G(h)3x.9o()}J b=7;G(f&&D.Y(7,"1T")&&D.Y(3x[0],"4F"))b=7.3H("22")[0]||7.3U(7.2z.3h("22"));J c=D([]);D.P(3x,H(){J a=e?D(7).5y(M)[0]:7;G(D.Y(a,"1m"))c=c.1e(a);N{G(a.16==1)c=c.1e(D("1m",a).21());d.1k(b,a)}});c.P(6T)})}};D.17.5j.44=D.17;H 6T(i,a){G(a.4d)D.3Y({1a:a.4d,31:Q,1O:"1m"});N D.5u(a.1r||a.6O||a.4H||"");G(a.1d)a.1d.37(a)}H 1z(){I+2B 8J}D.1l=D.17.1l=H(){J b=19[0]||{},i=1,K=19.K,4x=Q,15;G(b.1q==8I){4x=b;b=19[1]||{};i=2}G(1j b!="49"&&1j b!="H")b={};G(K==i){b=7;--i}R(;i<K;i++)G((15=19[i])!=U)R(J c 1n 15){J a=b[c],2w=15[c];G(b===2w)6M;G(4x&&2w&&1j 2w=="49"&&!2w.16)b[c]=D.1l(4x,a||(2w.K!=U?[]:{}),2w);N G(2w!==12)b[c]=2w}I b};J E="4M"+1z(),6K=0,5r={},6G=/z-?5i|8B-?8A|1y|6B|8v-?1Z/i,3P=S.3P||{};D.1l({8u:H(a){1b.$=3m$;G(a)1b.4M=w;I D},1D:H(a){I!!a&&1j a!="23"&&!a.Y&&a.1q!=2p&&/^[\\s[]?H/.11(a+"")},4n:H(a){I a.1C&&!a.1c||a.2j&&a.2z&&!a.2z.1c},5u:H(a){a=D.3k(a);G(a){J b=S.3H("6w")[0]||S.1C,1m=S.3h("1m");1m.O="1r/4t";G(D.14.1f)1m.1r=a;N 1m.3U(S.5F(a));b.39(1m,b.1x);b.37(1m)}},Y:H(b,a){I b.Y&&b.Y.2r()==a.2r()},1Y:{},L:H(c,d,b){c=c==1b?5r:c;J a=c[E];G(!a)a=c[E]=++6K;G(d&&!D.1Y[a])D.1Y[a]={};G(b!==12)D.1Y[a][d]=b;I d?D.1Y[a][d]:a},3b:H(c,b){c=c==1b?5r:c;J a=c[E];G(b){G(D.1Y[a]){2U D.1Y[a][b];b="";R(b 1n D.1Y[a])1X;G(!b)D.3b(c)}}N{1U{2U c[E]}1V(e){G(c.5l)c.5l(E)}2U D.1Y[a]}},P:H(d,a,c){J e,i=0,K=d.K;G(c){G(K==12){R(e 1n d)G(a.1w(d[e],c)===Q)1X}N R(;i<K;)G(a.1w(d[i++],c)===Q)1X}N{G(K==12){R(e 1n d)G(a.1k(d[e],e,d[e])===Q)1X}N R(J b=d[0];i<K&&a.1k(b,i,b)!==Q;b=d[++i]){}}I d},1i:H(b,a,c,i,d){G(D.1D(a))a=a.1k(b,i);I a&&a.1q==4L&&c=="2a"&&!6G.11(d)?a+"2X":a},1F:{1e:H(c,b){D.P((b||"").1R(/\\s+/),H(i,a){G(c.16==1&&!D.1F.3T(c.1F,a))c.1F+=(c.1F?" ":"")+a})},21:H(c,b){G(c.16==1)c.1F=b!=12?D.3C(c.1F.1R(/\\s+/),H(a){I!D.1F.3T(b,a)}).6s(" "):""},3T:H(b,a){I D.2L(a,(b.1F||b).6r().1R(/\\s+/))>-1}},6q:H(b,c,a){J e={};R(J d 1n c){e[d]=b.V[d];b.V[d]=c[d]}a.1k(b);R(J d 1n c)b.V[d]=e[d]},1g:H(d,e,c){G(e=="2h"||e=="1Z"){J b,3X={30:"5x",5g:"1G",18:"3I"},35=e=="2h"?["5e","6k"]:["5G","6i"];H 5b(){b=e=="2h"?d.8f:d.8c;J a=0,2C=0;D.P(35,H(){a+=3d(D.2a(d,"57"+7,M))||0;2C+=3d(D.2a(d,"2C"+7+"4b",M))||0});b-=29.83(a+2C)}G(D(d).3F(":4j"))5b();N D.6q(d,3X,5b);I 29.2f(0,b)}I D.2a(d,e,c)},2a:H(f,l,k){J e,V=f.V;H 3E(b){G(!D.14.2k)I Q;J a=3P.54(b,U);I!a||a.52("3E")==""}G(l=="1y"&&D.14.1f){e=D.1K(V,"1y");I e==""?"1":e}G(D.14.2G&&l=="18"){J d=V.50;V.50="0 7Y 7W";V.50=d}G(l.1I(/4i/i))l=y;G(!k&&V&&V[l])e=V[l];N G(3P.54){G(l.1I(/4i/i))l="4i";l=l.1o(/([A-Z])/g,"-$1").3y();J c=3P.54(f,U);G(c&&!3E(f))e=c.52(l);N{J g=[],2E=[],a=f,i=0;R(;a&&3E(a);a=a.1d)2E.6h(a);R(;i<2E.K;i++)G(3E(2E[i])){g[i]=2E[i].V.18;2E[i].V.18="3I"}e=l=="18"&&g[2E.K-1]!=U?"2F":(c&&c.52(l))||"";R(i=0;i<g.K;i++)G(g[i]!=U)2E[i].V.18=g[i]}G(l=="1y"&&e=="")e="1"}N G(f.4g){J h=l.1o(/\\-(\\w)/g,H(a,b){I b.2r()});e=f.4g[l]||f.4g[h];G(!/^\\d+(2X)?$/i.11(e)&&/^\\d/.11(e)){J j=V.1A,66=f.65.1A;f.65.1A=f.4g.1A;V.1A=e||0;e=V.aM+"2X";V.1A=j;f.65.1A=66}}I e},4h:H(l,h){J k=[];h=h||S;G(1j h.3h==\'12\')h=h.2z||h[0]&&h[0].2z||S;D.P(l,H(i,d){G(!d)I;G(d.1q==4L)d+=\'\';G(1j d=="23"){d=d.1o(/(<(\\w+)[^>]*?)\\/>/g,H(b,a,c){I c.1I(/^(aK|4f|7E|aG|4T|7A|aB|3n|az|ay|av)$/i)?b:a+"></"+c+">"});J f=D.3k(d).3y(),1v=h.3h("1v");J e=!f.1h("<au")&&[1,"<2A 7w=\'7w\'>","</2A>"]||!f.1h("<ar")&&[1,"<7v>","</7v>"]||f.1I(/^<(aq|22|am|ak|ai)/)&&[1,"<1T>","</1T>"]||!f.1h("<4F")&&[2,"<1T><22>","</22></1T>"]||(!f.1h("<af")||!f.1h("<ad"))&&[3,"<1T><22><4F>","</4F></22></1T>"]||!f.1h("<7E")&&[2,"<1T><22></22><7q>","</7q></1T>"]||D.14.1f&&[1,"1v<1v>","</1v>"]||[0,"",""];1v.4H=e[1]+d+e[2];1B(e[0]--)1v=1v.5T;G(D.14.1f){J g=!f.1h("<1T")&&f.1h("<22")<0?1v.1x&&1v.1x.3t:e[1]=="<1T>"&&f.1h("<22")<0?1v.3t:[];R(J j=g.K-1;j>=0;--j)G(D.Y(g[j],"22")&&!g[j].3t.K)g[j].1d.37(g[j]);G(/^\\s/.11(d))1v.39(h.5F(d.1I(/^\\s*/)[0]),1v.1x)}d=D.2d(1v.3t)}G(d.K===0&&(!D.Y(d,"3V")&&!D.Y(d,"2A")))I;G(d[0]==12||D.Y(d,"3V")||d.15)k.1p(d);N k=D.2R(k,d)});I k},1K:H(d,f,c){G(!d||d.16==3||d.16==8)I 12;J e=!D.4n(d),40=c!==12,1f=D.14.1f;f=e&&D.3X[f]||f;G(d.2j){J g=/5Q|4d|V/.11(f);G(f=="2W"&&D.14.2k)d.1d.64;G(f 1n d&&e&&!g){G(40){G(f=="O"&&D.Y(d,"4T")&&d.1d)7p"O a3 a1\'t 9V 9U";d[f]=c}G(D.Y(d,"3V")&&d.7i(f))I d.7i(f).76;I d[f]}G(1f&&e&&f=="V")I D.1K(d.V,"9T",c);G(40)d.9Q(f,""+c);J h=1f&&e&&g?d.4G(f,2):d.4G(f);I h===U?12:h}G(1f&&f=="1y"){G(40){d.6B=1;d.1E=(d.1E||"").1o(/7f\\([^)]*\\)/,"")+(3r(c)+\'\'=="9L"?"":"7f(1y="+c*7a+")")}I d.1E&&d.1E.1h("1y=")>=0?(3d(d.1E.1I(/1y=([^)]*)/)[1])/7a)+\'\':""}f=f.1o(/-([a-z])/9H,H(a,b){I b.2r()});G(40)d[f]=c;I d[f]},3k:H(a){I(a||"").1o(/^\\s+|\\s+$/g,"")},2d:H(b){J a=[];G(b!=U){J i=b.K;G(i==U||b.1R||b.4I||b.1k)a[0]=b;N 1B(i)a[--i]=b[i]}I a},2L:H(b,a){R(J i=0,K=a.K;i<K;i++)G(a[i]===b)I i;I-1},2R:H(a,b){J i=0,T,2S=a.K;G(D.14.1f){1B(T=b[i++])G(T.16!=8)a[2S++]=T}N 1B(T=b[i++])a[2S++]=T;I a},4r:H(a){J c=[],2o={};1U{R(J i=0,K=a.K;i<K;i++){J b=D.L(a[i]);G(!2o[b]){2o[b]=M;c.1p(a[i])}}}1V(e){c=a}I c},3C:H(c,a,d){J b=[];R(J i=0,K=c.K;i<K;i++)G(!d!=!a(c[i],i))b.1p(c[i]);I b},2l:H(d,a){J c=[];R(J i=0,K=d.K;i<K;i++){J b=a(d[i],i);G(b!=U)c[c.K]=b}I c.7d.1w([],c)}});J v=9B.9A.3y();D.14={5B:(v.1I(/.+(?:9y|9x|9w|9v)[\\/: ]([\\d.]+)/)||[])[1],2k:/75/.11(v),2G:/2G/.11(v),1f:/1f/.11(v)&&!/2G/.11(v),42:/42/.11(v)&&!/(9s|75)/.11(v)};J y=D.14.1f?"7o":"72";D.1l({71:!D.14.1f||S.70=="6Z",3X:{"R":"9n","9k":"1F","4i":y,72:y,7o:y,9h:"9f",9e:"9d",9b:"99"}});D.P({6W:H(a){I a.1d},97:H(a){I D.4S(a,"1d")},95:H(a){I D.3a(a,2,"2H")},91:H(a){I D.3a(a,2,"4l")},8Z:H(a){I D.4S(a,"2H")},8X:H(a){I D.4S(a,"4l")},8W:H(a){I D.5v(a.1d.1x,a)},8V:H(a){I D.5v(a.1x)},6Q:H(a){I D.Y(a,"8U")?a.8T||a.8S.S:D.2d(a.3t)}},H(c,d){D.17[c]=H(b){J a=D.2l(7,d);G(b&&1j b=="23")a=D.3g(b,a);I 7.2I(D.4r(a))}});D.P({6P:"3v",8Q:"6F",39:"6E",8P:"5q",8O:"7b"},H(c,b){D.17[c]=H(){J a=19;I 7.P(H(){R(J i=0,K=a.K;i<K;i++)D(a[i])[b](7)})}});D.P({8N:H(a){D.1K(7,a,"");G(7.16==1)7.5l(a)},8M:H(a){D.1F.1e(7,a)},8L:H(a){D.1F.21(7,a)},8K:H(a){D.1F[D.1F.3T(7,a)?"21":"1e"](7,a)},21:H(a){G(!a||D.1E(a,[7]).r.K){D("*",7).1e(7).P(H(){D.W.21(7);D.3b(7)});G(7.1d)7.1d.37(7)}},4E:H(){D(">*",7).21();1B(7.1x)7.37(7.1x)}},H(a,b){D.17[a]=H(){I 7.P(b,19)}});D.P(["6N","4b"],H(i,c){J b=c.3y();D.17[b]=H(a){I 7[0]==1b?D.14.2G&&S.1c["5t"+c]||D.14.2k&&1b["5s"+c]||S.70=="6Z"&&S.1C["5t"+c]||S.1c["5t"+c]:7[0]==S?29.2f(29.2f(S.1c["4y"+c],S.1C["4y"+c]),29.2f(S.1c["2i"+c],S.1C["2i"+c])):a==12?(7.K?D.1g(7[0],b):U):7.1g(b,a.1q==56?a:a+"2X")}});H 25(a,b){I a[0]&&3r(D.2a(a[0],b,M),10)||0}J C=D.14.2k&&3r(D.14.5B)<8H?"(?:[\\\\w*3m-]|\\\\\\\\.)":"(?:[\\\\w\\8F-\\8E*3m-]|\\\\\\\\.)",6L=2B 4v("^>\\\\s*("+C+"+)"),6J=2B 4v("^("+C+"+)(#)("+C+"+)"),6I=2B 4v("^([#.]?)("+C+"*)");D.1l({6H:{"":H(a,i,m){I m[2]=="*"||D.Y(a,m[2])},"#":H(a,i,m){I a.4G("2v")==m[2]},":":{8D:H(a,i,m){I i<m[3]-0},8C:H(a,i,m){I i>m[3]-0},3a:H(a,i,m){I m[3]-0==i},79:H(a,i,m){I m[3]-0==i},3o:H(a,i){I i==0},3S:H(a,i,m,r){I i==r.K-1},6D:H(a,i){I i%2==0},6C:H(a,i){I i%2},"3o-4u":H(a){I a.1d.3H("*")[0]==a},"3S-4u":H(a){I D.3a(a.1d.5T,1,"4l")==a},"8z-4u":H(a){I!D.3a(a.1d.5T,2,"4l")},6W:H(a){I a.1x},4E:H(a){I!a.1x},8y:H(a,i,m){I(a.6O||a.8x||D(a).1r()||"").1h(m[3])>=0},4j:H(a){I"1G"!=a.O&&D.1g(a,"18")!="2F"&&D.1g(a,"5g")!="1G"},1G:H(a){I"1G"==a.O||D.1g(a,"18")=="2F"||D.1g(a,"5g")=="1G"},8w:H(a){I!a.3R},3R:H(a){I a.3R},4J:H(a){I a.4J},2W:H(a){I a.2W||D.1K(a,"2W")},1r:H(a){I"1r"==a.O},5O:H(a){I"5O"==a.O},5L:H(a){I"5L"==a.O},5p:H(a){I"5p"==a.O},3Q:H(a){I"3Q"==a.O},5o:H(a){I"5o"==a.O},6A:H(a){I"6A"==a.O},6z:H(a){I"6z"==a.O},2s:H(a){I"2s"==a.O||D.Y(a,"2s")},4T:H(a){I/4T|2A|6y|2s/i.11(a.Y)},3T:H(a,i,m){I D.2q(m[3],a).K},8t:H(a){I/h\\d/i.11(a.Y)},8s:H(a){I D.3C(D.3O,H(b){I a==b.T}).K}}},6x:[/^(\\[) *@?([\\w-]+) *([!*$^~=]*) *(\'?"?)(.*?)\\4 *\\]/,/^(:)([\\w-]+)\\("?\'?(.*?(\\(.*?\\))?[^(]*?)"?\'?\\)/,2B 4v("^([:.#]*)("+C+"+)")],3g:H(a,c,b){J d,1t=[];1B(a&&a!=d){d=a;J f=D.1E(a,c,b);a=f.t.1o(/^\\s*,\\s*/,"");1t=b?c=f.r:D.2R(1t,f.r)}I 1t},2q:H(t,o){G(1j t!="23")I[t];G(o&&o.16!=1&&o.16!=9)I[];o=o||S;J d=[o],2o=[],3S,Y;1B(t&&3S!=t){J r=[];3S=t;t=D.3k(t);J l=Q,3j=6L,m=3j.2D(t);G(m){Y=m[1].2r();R(J i=0;d[i];i++)R(J c=d[i].1x;c;c=c.2H)G(c.16==1&&(Y=="*"||c.Y.2r()==Y))r.1p(c);d=r;t=t.1o(3j,"");G(t.1h(" ")==0)6M;l=M}N{3j=/^([>+~])\\s*(\\w*)/i;G((m=3j.2D(t))!=U){r=[];J k={};Y=m[2].2r();m=m[1];R(J j=0,3i=d.K;j<3i;j++){J n=m=="~"||m=="+"?d[j].2H:d[j].1x;R(;n;n=n.2H)G(n.16==1){J g=D.L(n);G(m=="~"&&k[g])1X;G(!Y||n.Y.2r()==Y){G(m=="~")k[g]=M;r.1p(n)}G(m=="+")1X}}d=r;t=D.3k(t.1o(3j,""));l=M}}G(t&&!l){G(!t.1h(",")){G(o==d[0])d.4s();2o=D.2R(2o,d);r=d=[o];t=" "+t.6v(1,t.K)}N{J h=6J;J m=h.2D(t);G(m){m=[0,m[2],m[3],m[1]]}N{h=6I;m=h.2D(t)}m[2]=m[2].1o(/\\\\/g,"");J f=d[d.K-1];G(m[1]=="#"&&f&&f.61&&!D.4n(f)){J p=f.61(m[2]);G((D.14.1f||D.14.2G)&&p&&1j p.2v=="23"&&p.2v!=m[2])p=D(\'[@2v="\'+m[2]+\'"]\',f)[0];d=r=p&&(!m[3]||D.Y(p,m[3]))?[p]:[]}N{R(J i=0;d[i];i++){J a=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];G(a=="*"&&d[i].Y.3y()=="49")a="3n";r=D.2R(r,d[i].3H(a))}G(m[1]==".")r=D.5m(r,m[2]);G(m[1]=="#"){J e=[];R(J i=0;r[i];i++)G(r[i].4G("2v")==m[2]){e=[r[i]];1X}r=e}d=r}t=t.1o(h,"")}}G(t){J b=D.1E(t,r);d=r=b.r;t=D.3k(b.t)}}G(t)d=[];G(d&&o==d[0])d.4s();2o=D.2R(2o,d);I 2o},5m:H(r,m,a){m=" "+m+" ";J c=[];R(J i=0;r[i];i++){J b=(" "+r[i].1F+" ").1h(m)>=0;G(!a&&b||a&&!b)c.1p(r[i])}I c},1E:H(t,r,h){J d;1B(t&&t!=d){d=t;J p=D.6x,m;R(J i=0;p[i];i++){m=p[i].2D(t);G(m){t=t.8r(m[0].K);m[2]=m[2].1o(/\\\\/g,"");1X}}G(!m)1X;G(m[1]==":"&&m[2]=="4Y")r=62.11(m[3])?D.1E(m[3],r,M).r:D(r).4Y(m[3]);N G(m[1]==".")r=D.5m(r,m[2],h);N G(m[1]=="["){J g=[],O=m[3];R(J i=0,3i=r.K;i<3i;i++){J a=r[i],z=a[D.3X[m[2]]||m[2]];G(z==U||/5Q|4d|2W/.11(m[2]))z=D.1K(a,m[2])||\'\';G((O==""&&!!z||O=="="&&z==m[5]||O=="!="&&z!=m[5]||O=="^="&&z&&!z.1h(m[5])||O=="$="&&z.6v(z.K-m[5].K)==m[5]||(O=="*="||O=="~=")&&z.1h(m[5])>=0)^h)g.1p(a)}r=g}N G(m[1]==":"&&m[2]=="3a-4u"){J e={},g=[],11=/(-?)(\\d*)n((?:\\+|-)?\\d*)/.2D(m[3]=="6D"&&"2n"||m[3]=="6C"&&"2n+1"||!/\\D/.11(m[3])&&"8q+"+m[3]||m[3]),3o=(11[1]+(11[2]||1))-0,d=11[3]-0;R(J i=0,3i=r.K;i<3i;i++){J j=r[i],1d=j.1d,2v=D.L(1d);G(!e[2v]){J c=1;R(J n=1d.1x;n;n=n.2H)G(n.16==1)n.4q=c++;e[2v]=M}J b=Q;G(3o==0){G(j.4q==d)b=M}N G((j.4q-d)%3o==0&&(j.4q-d)/3o>=0)b=M;G(b^h)g.1p(j)}r=g}N{J f=D.6H[m[1]];G(1j f=="49")f=f[m[2]];G(1j f=="23")f=6u("Q||H(a,i){I "+f+";}");r=D.3C(r,H(a,i){I f(a,i,m,r)},h)}}I{r:r,t:t}},4S:H(b,c){J a=[],1t=b[c];1B(1t&&1t!=S){G(1t.16==1)a.1p(1t);1t=1t[c]}I a},3a:H(a,e,c,b){e=e||1;J d=0;R(;a;a=a[c])G(a.16==1&&++d==e)1X;I a},5v:H(n,a){J r=[];R(;n;n=n.2H){G(n.16==1&&n!=a)r.1p(n)}I r}});D.W={1e:H(f,i,g,e){G(f.16==3||f.16==8)I;G(D.14.1f&&f.4I)f=1b;G(!g.24)g.24=7.24++;G(e!=12){J h=g;g=7.3M(h,H(){I h.1w(7,19)});g.L=e}J j=D.L(f,"3w")||D.L(f,"3w",{}),1H=D.L(f,"1H")||D.L(f,"1H",H(){G(1j D!="12"&&!D.W.5k)I D.W.1H.1w(19.3L.T,19)});1H.T=f;D.P(i.1R(/\\s+/),H(c,b){J a=b.1R(".");b=a[0];g.O=a[1];J d=j[b];G(!d){d=j[b]={};G(!D.W.2t[b]||D.W.2t[b].4p.1k(f)===Q){G(f.3K)f.3K(b,1H,Q);N G(f.6t)f.6t("4o"+b,1H)}}d[g.24]=g;D.W.26[b]=M});f=U},24:1,26:{},21:H(e,h,f){G(e.16==3||e.16==8)I;J i=D.L(e,"3w"),1L,5i;G(i){G(h==12||(1j h=="23"&&h.8p(0)=="."))R(J g 1n i)7.21(e,g+(h||""));N{G(h.O){f=h.2y;h=h.O}D.P(h.1R(/\\s+/),H(b,a){J c=a.1R(".");a=c[0];G(i[a]){G(f)2U i[a][f.24];N R(f 1n i[a])G(!c[1]||i[a][f].O==c[1])2U i[a][f];R(1L 1n i[a])1X;G(!1L){G(!D.W.2t[a]||D.W.2t[a].4A.1k(e)===Q){G(e.6p)e.6p(a,D.L(e,"1H"),Q);N G(e.6n)e.6n("4o"+a,D.L(e,"1H"))}1L=U;2U i[a]}}})}R(1L 1n i)1X;G(!1L){J d=D.L(e,"1H");G(d)d.T=U;D.3b(e,"3w");D.3b(e,"1H")}}},1P:H(h,c,f,g,i){c=D.2d(c);G(h.1h("!")>=0){h=h.3s(0,-1);J a=M}G(!f){G(7.26[h])D("*").1e([1b,S]).1P(h,c)}N{G(f.16==3||f.16==8)I 12;J b,1L,17=D.1D(f[h]||U),W=!c[0]||!c[0].32;G(W){c.6h({O:h,2J:f,32:H(){},3J:H(){},4C:1z()});c[0][E]=M}c[0].O=h;G(a)c[0].6m=M;J d=D.L(f,"1H");G(d)b=d.1w(f,c);G((!17||(D.Y(f,\'a\')&&h=="4V"))&&f["4o"+h]&&f["4o"+h].1w(f,c)===Q)b=Q;G(W)c.4s();G(i&&D.1D(i)){1L=i.1w(f,b==U?c:c.7d(b));G(1L!==12)b=1L}G(17&&g!==Q&&b!==Q&&!(D.Y(f,\'a\')&&h=="4V")){7.5k=M;1U{f[h]()}1V(e){}}7.5k=Q}I b},1H:H(b){J a,1L,38,5f,4m;b=19[0]=D.W.6l(b||1b.W);38=b.O.1R(".");b.O=38[0];38=38[1];5f=!38&&!b.6m;4m=(D.L(7,"3w")||{})[b.O];R(J j 1n 4m){J c=4m[j];G(5f||c.O==38){b.2y=c;b.L=c.L;1L=c.1w(7,19);G(a!==Q)a=1L;G(1L===Q){b.32();b.3J()}}}I a},6l:H(b){G(b[E]==M)I b;J d=b;b={8o:d};J c="8n 8m 8l 8k 2s 8j 47 5d 6j 5E 8i L 8h 8g 4K 2y 5a 59 8e 8b 58 6f 8a 88 4k 87 86 84 6d 2J 4C 6c O 82 81 35".1R(" ");R(J i=c.K;i;i--)b[c[i]]=d[c[i]];b[E]=M;b.32=H(){G(d.32)d.32();d.80=Q};b.3J=H(){G(d.3J)d.3J();d.7Z=M};b.4C=b.4C||1z();G(!b.2J)b.2J=b.6d||S;G(b.2J.16==3)b.2J=b.2J.1d;G(!b.4k&&b.4K)b.4k=b.4K==b.2J?b.6c:b.4K;G(b.58==U&&b.5d!=U){J a=S.1C,1c=S.1c;b.58=b.5d+(a&&a.2e||1c&&1c.2e||0)-(a.6b||0);b.6f=b.6j+(a&&a.2c||1c&&1c.2c||0)-(a.6a||0)}G(!b.35&&((b.47||b.47===0)?b.47:b.5a))b.35=b.47||b.5a;G(!b.59&&b.5E)b.59=b.5E;G(!b.35&&b.2s)b.35=(b.2s&1?1:(b.2s&2?3:(b.2s&4?2:0)));I b},3M:H(a,b){b.24=a.24=a.24||b.24||7.24++;I b},2t:{27:{4p:H(){55();I},4A:H(){I}},3D:{4p:H(){G(D.14.1f)I Q;D(7).2O("53",D.W.2t.3D.2y);I M},4A:H(){G(D.14.1f)I Q;D(7).4e("53",D.W.2t.3D.2y);I M},2y:H(a){G(F(a,7))I M;a.O="3D";I D.W.1H.1w(7,19)}},3N:{4p:H(){G(D.14.1f)I Q;D(7).2O("51",D.W.2t.3N.2y);I M},4A:H(){G(D.14.1f)I Q;D(7).4e("51",D.W.2t.3N.2y);I M},2y:H(a){G(F(a,7))I M;a.O="3N";I D.W.1H.1w(7,19)}}}};D.17.1l({2O:H(c,a,b){I c=="4X"?7.2V(c,a,b):7.P(H(){D.W.1e(7,c,b||a,b&&a)})},2V:H(d,b,c){J e=D.W.3M(c||b,H(a){D(7).4e(a,e);I(c||b).1w(7,19)});I 7.P(H(){D.W.1e(7,d,e,c&&b)})},4e:H(a,b){I 7.P(H(){D.W.21(7,a,b)})},1P:H(c,a,b){I 7.P(H(){D.W.1P(c,a,7,M,b)})},5C:H(c,a,b){I 7[0]&&D.W.1P(c,a,7[0],Q,b)},2m:H(b){J c=19,i=1;1B(i<c.K)D.W.3M(b,c[i++]);I 7.4V(D.W.3M(b,H(a){7.4Z=(7.4Z||0)%i;a.32();I c[7.4Z++].1w(7,19)||Q}))},7X:H(a,b){I 7.2O(\'3D\',a).2O(\'3N\',b)},27:H(a){55();G(D.2Q)a.1k(S,D);N D.3A.1p(H(){I a.1k(7,D)});I 7}});D.1l({2Q:Q,3A:[],27:H(){G(!D.2Q){D.2Q=M;G(D.3A){D.P(D.3A,H(){7.1k(S)});D.3A=U}D(S).5C("27")}}});J x=Q;H 55(){G(x)I;x=M;G(S.3K&&!D.14.2G)S.3K("69",D.27,Q);G(D.14.1f&&1b==1S)(H(){G(D.2Q)I;1U{S.1C.7V("1A")}1V(3e){3B(19.3L,0);I}D.27()})();G(D.14.2G)S.3K("69",H(){G(D.2Q)I;R(J i=0;i<S.4W.K;i++)G(S.4W[i].3R){3B(19.3L,0);I}D.27()},Q);G(D.14.2k){J a;(H(){G(D.2Q)I;G(S.3f!="68"&&S.3f!="1J"){3B(19.3L,0);I}G(a===12)a=D("V, 7A[7U=7S]").K;G(S.4W.K!=a){3B(19.3L,0);I}D.27()})()}D.W.1e(1b,"43",D.27)}D.P(("7R,7Q,43,85,4y,4X,4V,7P,"+"7O,7N,89,53,51,7M,2A,"+"5o,7L,7K,8d,3e").1R(","),H(i,b){D.17[b]=H(a){I a?7.2O(b,a):7.1P(b)}});J F=H(a,c){J b=a.4k;1B(b&&b!=c)1U{b=b.1d}1V(3e){b=c}I b==c};D(1b).2O("4X",H(){D("*").1e(S).4e()});D.17.1l({67:D.17.43,43:H(g,d,c){G(1j g!=\'23\')I 7.67(g);J e=g.1h(" ");G(e>=0){J i=g.3s(e,g.K);g=g.3s(0,e)}c=c||H(){};J f="2P";G(d)G(D.1D(d)){c=d;d=U}N{d=D.3n(d);f="6g"}J h=7;D.3Y({1a:g,O:f,1O:"2K",L:d,1J:H(a,b){G(b=="1W"||b=="7J")h.2K(i?D("<1v/>").3v(a.4U.1o(/<1m(.|\\s)*?\\/1m>/g,"")).2q(i):a.4U);h.P(c,[a.4U,b,a])}});I 7},aL:H(){I D.3n(7.7I())},7I:H(){I 7.2l(H(){I D.Y(7,"3V")?D.2d(7.aH):7}).1E(H(){I 7.34&&!7.3R&&(7.4J||/2A|6y/i.11(7.Y)||/1r|1G|3Q/i.11(7.O))}).2l(H(i,c){J b=D(7).6e();I b==U?U:b.1q==2p?D.2l(b,H(a,i){I{34:c.34,2x:a}}):{34:c.34,2x:b}}).3p()}});D.P("7H,7G,7F,7D,7C,7B".1R(","),H(i,o){D.17[o]=H(f){I 7.2O(o,f)}});J B=1z();D.1l({3p:H(d,b,a,c){G(D.1D(b)){a=b;b=U}I D.3Y({O:"2P",1a:d,L:b,1W:a,1O:c})},aE:H(b,a){I D.3p(b,U,a,"1m")},aD:H(c,b,a){I D.3p(c,b,a,"3z")},aC:H(d,b,a,c){G(D.1D(b)){a=b;b={}}I D.3Y({O:"6g",1a:d,L:b,1W:a,1O:c})},aA:H(a){D.1l(D.60,a)},60:{1a:5Z.5Q,26:M,O:"2P",2T:0,7z:"4R/x-ax-3V-aw",7x:M,31:M,L:U,5Y:U,3Q:U,4Q:{2N:"4R/2N, 1r/2N",2K:"1r/2K",1m:"1r/4t, 4R/4t",3z:"4R/3z, 1r/4t",1r:"1r/as",4w:"*/*"}},4z:{},3Y:H(s){s=D.1l(M,s,D.1l(M,{},D.60,s));J g,2Z=/=\\?(&|$)/g,1u,L,O=s.O.2r();G(s.L&&s.7x&&1j s.L!="23")s.L=D.3n(s.L);G(s.1O=="4P"){G(O=="2P"){G(!s.1a.1I(2Z))s.1a+=(s.1a.1I(/\\?/)?"&":"?")+(s.4P||"7u")+"=?"}N G(!s.L||!s.L.1I(2Z))s.L=(s.L?s.L+"&":"")+(s.4P||"7u")+"=?";s.1O="3z"}G(s.1O=="3z"&&(s.L&&s.L.1I(2Z)||s.1a.1I(2Z))){g="4P"+B++;G(s.L)s.L=(s.L+"").1o(2Z,"="+g+"$1");s.1a=s.1a.1o(2Z,"="+g+"$1");s.1O="1m";1b[g]=H(a){L=a;1W();1J();1b[g]=12;1U{2U 1b[g]}1V(e){}G(i)i.37(h)}}G(s.1O=="1m"&&s.1Y==U)s.1Y=Q;G(s.1Y===Q&&O=="2P"){J j=1z();J k=s.1a.1o(/(\\?|&)3m=.*?(&|$)/,"$ap="+j+"$2");s.1a=k+((k==s.1a)?(s.1a.1I(/\\?/)?"&":"?")+"3m="+j:"")}G(s.L&&O=="2P"){s.1a+=(s.1a.1I(/\\?/)?"&":"?")+s.L;s.L=U}G(s.26&&!D.4O++)D.W.1P("7H");J n=/^(?:\\w+:)?\\/\\/([^\\/?#]+)/;G(s.1O=="1m"&&O=="2P"&&n.11(s.1a)&&n.2D(s.1a)[1]!=5Z.al){J i=S.3H("6w")[0];J h=S.3h("1m");h.4d=s.1a;G(s.7t)h.aj=s.7t;G(!g){J l=Q;h.ah=h.ag=H(){G(!l&&(!7.3f||7.3f=="68"||7.3f=="1J")){l=M;1W();1J();i.37(h)}}}i.3U(h);I 12}J m=Q;J c=1b.7s?2B 7s("ae.ac"):2B 7r();G(s.5Y)c.6R(O,s.1a,s.31,s.5Y,s.3Q);N c.6R(O,s.1a,s.31);1U{G(s.L)c.4B("ab-aa",s.7z);G(s.5S)c.4B("a9-5R-a8",D.4z[s.1a]||"a7, a6 a5 a4 5N:5N:5N a2");c.4B("X-9Z-9Y","7r");c.4B("9W",s.1O&&s.4Q[s.1O]?s.4Q[s.1O]+", */*":s.4Q.4w)}1V(e){}G(s.7m&&s.7m(c,s)===Q){s.26&&D.4O--;c.7l();I Q}G(s.26)D.W.1P("7B",[c,s]);J d=H(a){G(!m&&c&&(c.3f==4||a=="2T")){m=M;G(f){7k(f);f=U}1u=a=="2T"&&"2T"||!D.7j(c)&&"3e"||s.5S&&D.7h(c,s.1a)&&"7J"||"1W";G(1u=="1W"){1U{L=D.6X(c,s.1O,s.9S)}1V(e){1u="5J"}}G(1u=="1W"){J b;1U{b=c.5I("7g-5R")}1V(e){}G(s.5S&&b)D.4z[s.1a]=b;G(!g)1W()}N D.5H(s,c,1u);1J();G(s.31)c=U}};G(s.31){J f=4I(d,13);G(s.2T>0)3B(H(){G(c){c.7l();G(!m)d("2T")}},s.2T)}1U{c.9P(s.L)}1V(e){D.5H(s,c,U,e)}G(!s.31)d();H 1W(){G(s.1W)s.1W(L,1u);G(s.26)D.W.1P("7C",[c,s])}H 1J(){G(s.1J)s.1J(c,1u);G(s.26)D.W.1P("7F",[c,s]);G(s.26&&!--D.4O)D.W.1P("7G")}I c},5H:H(s,a,b,e){G(s.3e)s.3e(a,b,e);G(s.26)D.W.1P("7D",[a,s,e])},4O:0,7j:H(a){1U{I!a.1u&&5Z.9O=="5p:"||(a.1u>=7e&&a.1u<9N)||a.1u==7c||a.1u==9K||D.14.2k&&a.1u==12}1V(e){}I Q},7h:H(a,c){1U{J b=a.5I("7g-5R");I a.1u==7c||b==D.4z[c]||D.14.2k&&a.1u==12}1V(e){}I Q},6X:H(a,c,b){J d=a.5I("9J-O"),2N=c=="2N"||!c&&d&&d.1h("2N")>=0,L=2N?a.9I:a.4U;G(2N&&L.1C.2j=="5J")7p"5J";G(b)L=b(L,c);G(c=="1m")D.5u(L);G(c=="3z")L=6u("("+L+")");I L},3n:H(a){J s=[];G(a.1q==2p||a.5w)D.P(a,H(){s.1p(3u(7.34)+"="+3u(7.2x))});N R(J j 1n a)G(a[j]&&a[j].1q==2p)D.P(a[j],H(){s.1p(3u(j)+"="+3u(7))});N s.1p(3u(j)+"="+3u(D.1D(a[j])?a[j]():a[j]));I s.6s("&").1o(/%20/g,"+")}});D.17.1l({1N:H(c,b){I c?7.2g({1Z:"1N",2h:"1N",1y:"1N"},c,b):7.1E(":1G").P(H(){7.V.18=7.5D||"";G(D.1g(7,"18")=="2F"){J a=D("<"+7.2j+" />").6P("1c");7.V.18=a.1g("18");G(7.V.18=="2F")7.V.18="3I";a.21()}}).3l()},1M:H(b,a){I b?7.2g({1Z:"1M",2h:"1M",1y:"1M"},b,a):7.1E(":4j").P(H(){7.5D=7.5D||D.1g(7,"18");7.V.18="2F"}).3l()},78:D.17.2m,2m:H(a,b){I D.1D(a)&&D.1D(b)?7.78.1w(7,19):a?7.2g({1Z:"2m",2h:"2m",1y:"2m"},a,b):7.P(H(){D(7)[D(7).3F(":1G")?"1N":"1M"]()})},9G:H(b,a){I 7.2g({1Z:"1N"},b,a)},9F:H(b,a){I 7.2g({1Z:"1M"},b,a)},9E:H(b,a){I 7.2g({1Z:"2m"},b,a)},9D:H(b,a){I 7.2g({1y:"1N"},b,a)},9M:H(b,a){I 7.2g({1y:"1M"},b,a)},9C:H(c,a,b){I 7.2g({1y:a},c,b)},2g:H(k,j,i,g){J h=D.77(j,i,g);I 7[h.36===Q?"P":"36"](H(){G(7.16!=1)I Q;J f=D.1l({},h),p,1G=D(7).3F(":1G"),46=7;R(p 1n k){G(k[p]=="1M"&&1G||k[p]=="1N"&&!1G)I f.1J.1k(7);G(p=="1Z"||p=="2h"){f.18=D.1g(7,"18");f.33=7.V.33}}G(f.33!=U)7.V.33="1G";f.45=D.1l({},k);D.P(k,H(c,a){J e=2B D.28(46,f,c);G(/2m|1N|1M/.11(a))e[a=="2m"?1G?"1N":"1M":a](k);N{J b=a.6r().1I(/^([+-]=)?([\\d+-.]+)(.*)$/),2b=e.1t(M)||0;G(b){J d=3d(b[2]),2M=b[3]||"2X";G(2M!="2X"){46.V[c]=(d||1)+2M;2b=((d||1)/e.1t(M))*2b;46.V[c]=2b+2M}G(b[1])d=((b[1]=="-="?-1:1)*d)+2b;e.3G(2b,d,2M)}N e.3G(2b,a,"")}});I M})},36:H(a,b){G(D.1D(a)||(a&&a.1q==2p)){b=a;a="28"}G(!a||(1j a=="23"&&!b))I A(7[0],a);I 7.P(H(){G(b.1q==2p)A(7,a,b);N{A(7,a).1p(b);G(A(7,a).K==1)b.1k(7)}})},9X:H(b,c){J a=D.3O;G(b)7.36([]);7.P(H(){R(J i=a.K-1;i>=0;i--)G(a[i].T==7){G(c)a[i](M);a.7n(i,1)}});G(!c)7.5A();I 7}});J A=H(b,c,a){G(b){c=c||"28";J q=D.L(b,c+"36");G(!q||a)q=D.L(b,c+"36",D.2d(a))}I q};D.17.5A=H(a){a=a||"28";I 7.P(H(){J q=A(7,a);q.4s();G(q.K)q[0].1k(7)})};D.1l({77:H(b,a,c){J d=b&&b.1q==a0?b:{1J:c||!c&&a||D.1D(b)&&b,2u:b,41:c&&a||a&&a.1q!=9t&&a};d.2u=(d.2u&&d.2u.1q==4L?d.2u:D.28.5K[d.2u])||D.28.5K.74;d.5M=d.1J;d.1J=H(){G(d.36!==Q)D(7).5A();G(D.1D(d.5M))d.5M.1k(7)};I d},41:{73:H(p,n,b,a){I b+a*p},5P:H(p,n,b,a){I((-29.9r(p*29.9q)/2)+0.5)*a+b}},3O:[],48:U,28:H(b,c,a){7.15=c;7.T=b;7.1i=a;G(!c.3Z)c.3Z={}}});D.28.44={4D:H(){G(7.15.2Y)7.15.2Y.1k(7.T,7.1z,7);(D.28.2Y[7.1i]||D.28.2Y.4w)(7);G(7.1i=="1Z"||7.1i=="2h")7.T.V.18="3I"},1t:H(a){G(7.T[7.1i]!=U&&7.T.V[7.1i]==U)I 7.T[7.1i];J r=3d(D.1g(7.T,7.1i,a));I r&&r>-9p?r:3d(D.2a(7.T,7.1i))||0},3G:H(c,b,d){7.5V=1z();7.2b=c;7.3l=b;7.2M=d||7.2M||"2X";7.1z=7.2b;7.2S=7.4N=0;7.4D();J e=7;H t(a){I e.2Y(a)}t.T=7.T;D.3O.1p(t);G(D.48==U){D.48=4I(H(){J a=D.3O;R(J i=0;i<a.K;i++)G(!a[i]())a.7n(i--,1);G(!a.K){7k(D.48);D.48=U}},13)}},1N:H(){7.15.3Z[7.1i]=D.1K(7.T.V,7.1i);7.15.1N=M;7.3G(0,7.1t());G(7.1i=="2h"||7.1i=="1Z")7.T.V[7.1i]="9m";D(7.T).1N()},1M:H(){7.15.3Z[7.1i]=D.1K(7.T.V,7.1i);7.15.1M=M;7.3G(7.1t(),0)},2Y:H(a){J t=1z();G(a||t>7.15.2u+7.5V){7.1z=7.3l;7.2S=7.4N=1;7.4D();7.15.45[7.1i]=M;J b=M;R(J i 1n 7.15.45)G(7.15.45[i]!==M)b=Q;G(b){G(7.15.18!=U){7.T.V.33=7.15.33;7.T.V.18=7.15.18;G(D.1g(7.T,"18")=="2F")7.T.V.18="3I"}G(7.15.1M)7.T.V.18="2F";G(7.15.1M||7.15.1N)R(J p 1n 7.15.45)D.1K(7.T.V,p,7.15.3Z[p])}G(b)7.15.1J.1k(7.T);I Q}N{J n=t-7.5V;7.4N=n/7.15.2u;7.2S=D.41[7.15.41||(D.41.5P?"5P":"73")](7.4N,n,0,1,7.15.2u);7.1z=7.2b+((7.3l-7.2b)*7.2S);7.4D()}I M}};D.1l(D.28,{5K:{9l:9j,9i:7e,74:9g},2Y:{2e:H(a){a.T.2e=a.1z},2c:H(a){a.T.2c=a.1z},1y:H(a){D.1K(a.T.V,"1y",a.1z)},4w:H(a){a.T.V[a.1i]=a.1z+a.2M}}});D.17.2i=H(){J b=0,1S=0,T=7[0],3q;G(T)ao(D.14){J d=T.1d,4a=T,1s=T.1s,1Q=T.2z,5U=2k&&3r(5B)<9c&&!/9a/i.11(v),1g=D.2a,3c=1g(T,"30")=="3c";G(T.7y){J c=T.7y();1e(c.1A+29.2f(1Q.1C.2e,1Q.1c.2e),c.1S+29.2f(1Q.1C.2c,1Q.1c.2c));1e(-1Q.1C.6b,-1Q.1C.6a)}N{1e(T.5X,T.5W);1B(1s){1e(1s.5X,1s.5W);G(42&&!/^t(98|d|h)$/i.11(1s.2j)||2k&&!5U)2C(1s);G(!3c&&1g(1s,"30")=="3c")3c=M;4a=/^1c$/i.11(1s.2j)?4a:1s;1s=1s.1s}1B(d&&d.2j&&!/^1c|2K$/i.11(d.2j)){G(!/^96|1T.*$/i.11(1g(d,"18")))1e(-d.2e,-d.2c);G(42&&1g(d,"33")!="4j")2C(d);d=d.1d}G((5U&&(3c||1g(4a,"30")=="5x"))||(42&&1g(4a,"30")!="5x"))1e(-1Q.1c.5X,-1Q.1c.5W);G(3c)1e(29.2f(1Q.1C.2e,1Q.1c.2e),29.2f(1Q.1C.2c,1Q.1c.2c))}3q={1S:1S,1A:b}}H 2C(a){1e(D.2a(a,"6V",M),D.2a(a,"6U",M))}H 1e(l,t){b+=3r(l,10)||0;1S+=3r(t,10)||0}I 3q};D.17.1l({30:H(){J a=0,1S=0,3q;G(7[0]){J b=7.1s(),2i=7.2i(),4c=/^1c|2K$/i.11(b[0].2j)?{1S:0,1A:0}:b.2i();2i.1S-=25(7,\'94\');2i.1A-=25(7,\'aF\');4c.1S+=25(b,\'6U\');4c.1A+=25(b,\'6V\');3q={1S:2i.1S-4c.1S,1A:2i.1A-4c.1A}}I 3q},1s:H(){J a=7[0].1s;1B(a&&(!/^1c|2K$/i.11(a.2j)&&D.1g(a,\'30\')==\'93\'))a=a.1s;I D(a)}});D.P([\'5e\',\'5G\'],H(i,b){J c=\'4y\'+b;D.17[c]=H(a){G(!7[0])I;I a!=12?7.P(H(){7==1b||7==S?1b.92(!i?a:D(1b).2e(),i?a:D(1b).2c()):7[c]=a}):7[0]==1b||7[0]==S?46[i?\'aI\':\'aJ\']||D.71&&S.1C[c]||S.1c[c]:7[0][c]}});D.P(["6N","4b"],H(i,b){J c=i?"5e":"5G",4f=i?"6k":"6i";D.17["5s"+b]=H(){I 7[b.3y()]()+25(7,"57"+c)+25(7,"57"+4f)};D.17["90"+b]=H(a){I 7["5s"+b]()+25(7,"2C"+c+"4b")+25(7,"2C"+4f+"4b")+(a?25(7,"6S"+c)+25(7,"6S"+4f):0)}})})();',62,669,'|||||||this|||||||||||||||||||||||||||||||||||if|function|return|var|length|data|true|else|type|each|false|for|document|elem|null|style|event||nodeName|||test|undefined||browser|options|nodeType|fn|display|arguments|url|window|body|parentNode|add|msie|css|indexOf|prop|typeof|call|extend|script|in|replace|push|constructor|text|offsetParent|cur|status|div|apply|firstChild|opacity|now|left|while|documentElement|isFunction|filter|className|hidden|handle|match|complete|attr|ret|hide|show|dataType|trigger|doc|split|top|table|try|catch|success|break|cache|height||remove|tbody|string|guid|num|global|ready|fx|Math|curCSS|start|scrollTop|makeArray|scrollLeft|max|animate|width|offset|tagName|safari|map|toggle||done|Array|find|toUpperCase|button|special|duration|id|copy|value|handler|ownerDocument|select|new|border|exec|stack|none|opera|nextSibling|pushStack|target|html|inArray|unit|xml|bind|GET|isReady|merge|pos|timeout|delete|one|selected|px|step|jsre|position|async|preventDefault|overflow|name|which|queue|removeChild|namespace|insertBefore|nth|removeData|fixed|parseFloat|error|readyState|multiFilter|createElement|rl|re|trim|end|_|param|first|get|results|parseInt|slice|childNodes|encodeURIComponent|append|events|elems|toLowerCase|json|readyList|setTimeout|grep|mouseenter|color|is|custom|getElementsByTagName|block|stopPropagation|addEventListener|callee|proxy|mouseleave|timers|defaultView|password|disabled|last|has|appendChild|form|domManip|props|ajax|orig|set|easing|mozilla|load|prototype|curAnim|self|charCode|timerId|object|offsetChild|Width|parentOffset|src|unbind|br|currentStyle|clean|float|visible|relatedTarget|previousSibling|handlers|isXMLDoc|on|setup|nodeIndex|unique|shift|javascript|child|RegExp|_default|deep|scroll|lastModified|teardown|setRequestHeader|timeStamp|update|empty|tr|getAttribute|innerHTML|setInterval|checked|fromElement|Number|jQuery|state|active|jsonp|accepts|application|dir|input|responseText|click|styleSheets|unload|not|lastToggle|outline|mouseout|getPropertyValue|mouseover|getComputedStyle|bindReady|String|padding|pageX|metaKey|keyCode|getWH|andSelf|clientX|Left|all|visibility|container|index|init|triggered|removeAttribute|classFilter|prevObject|submit|file|after|windowData|inner|client|globalEval|sibling|jquery|absolute|clone|wrapAll|dequeue|version|triggerHandler|oldblock|ctrlKey|createTextNode|Top|handleError|getResponseHeader|parsererror|speeds|checkbox|old|00|radio|swing|href|Modified|ifModified|lastChild|safari2|startTime|offsetTop|offsetLeft|username|location|ajaxSettings|getElementById|isSimple|values|selectedIndex|runtimeStyle|rsLeft|_load|loaded|DOMContentLoaded|clientTop|clientLeft|toElement|srcElement|val|pageY|POST|unshift|Bottom|clientY|Right|fix|exclusive|detachEvent|cloneNode|removeEventListener|swap|toString|join|attachEvent|eval|substr|head|parse|textarea|reset|image|zoom|odd|even|before|prepend|exclude|expr|quickClass|quickID|uuid|quickChild|continue|Height|textContent|appendTo|contents|open|margin|evalScript|borderTopWidth|borderLeftWidth|parent|httpData|setArray|CSS1Compat|compatMode|boxModel|cssFloat|linear|def|webkit|nodeValue|speed|_toggle|eq|100|replaceWith|304|concat|200|alpha|Last|httpNotModified|getAttributeNode|httpSuccess|clearInterval|abort|beforeSend|splice|styleFloat|throw|colgroup|XMLHttpRequest|ActiveXObject|scriptCharset|callback|fieldset|multiple|processData|getBoundingClientRect|contentType|link|ajaxSend|ajaxSuccess|ajaxError|col|ajaxComplete|ajaxStop|ajaxStart|serializeArray|notmodified|keypress|keydown|change|mouseup|mousedown|dblclick|focus|blur|stylesheet|hasClass|rel|doScroll|black|hover|solid|cancelBubble|returnValue|wheelDelta|view|round|shiftKey|resize|screenY|screenX|relatedNode|mousemove|prevValue|originalTarget|offsetHeight|keyup|newValue|offsetWidth|eventPhase|detail|currentTarget|cancelable|bubbles|attrName|attrChange|altKey|originalEvent|charAt|0n|substring|animated|header|noConflict|line|enabled|innerText|contains|only|weight|font|gt|lt|uFFFF|u0128|size|417|Boolean|Date|toggleClass|removeClass|addClass|removeAttr|replaceAll|insertAfter|prependTo|wrap|contentWindow|contentDocument|iframe|children|siblings|prevAll|wrapInner|nextAll|outer|prev|scrollTo|static|marginTop|next|inline|parents|able|cellSpacing|adobeair|cellspacing|522|maxLength|maxlength|readOnly|400|readonly|fast|600|class|slow|1px|htmlFor|reverse|10000|PI|cos|compatible|Function|setData|ie|ra|it|rv|getData|userAgent|navigator|fadeTo|fadeIn|slideToggle|slideUp|slideDown|ig|responseXML|content|1223|NaN|fadeOut|300|protocol|send|setAttribute|option|dataFilter|cssText|changed|be|Accept|stop|With|Requested|Object|can|GMT|property|1970|Jan|01|Thu|Since|If|Type|Content|XMLHTTP|th|Microsoft|td|onreadystatechange|onload|cap|charset|colg|host|tfoot|specified|with|1_|thead|leg|plain|attributes|opt|embed|urlencoded|www|area|hr|ajaxSetup|meta|post|getJSON|getScript|marginLeft|img|elements|pageYOffset|pageXOffset|abbr|serialize|pixelLeft'.split('|'),0,{})) \ No newline at end of file
+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}('(C(1B,1d){G y=C(P,T){E 3g y.fn.8Z(P,T)},ay=1B.y,84$=1B.$,12=1B.12,6E,aD=/^[^<]*(<[\\w\\W]+>)[^>]*$|^#([\\w-]+)$/,cO=/^.[^:#\\[\\.,]*$/,aJ=/\\S/,at=/^(\\s|\\aC)+|(\\s|\\aC)+$/g,aB=/^<(\\w+)\\s*\\/?>(?:<\\/\\1>)?$/,9q=eh.9q,6T,91=14,5X=[],42,4a=7x.2T.4a,6U=7x.2T.6U,1K=3X.2T.1K,2k=3X.2T.2k,2r=3X.2T.2r;y.fn=y.2T={8Z:C(P,T){G K,6,M,2e;7(!P){E B}7(P.19){B.T=B[0]=P;B.O=1;E B}7(1a P==="1R"){K=aD.29(P);7(K&&(K[1]||!T)){7(K[1]){2e=(T?T.1Z||T:12);M=aB.29(P);7(M){7(y.87(T)){P=[12.2x(M[1])];y.fn.3x.1f(P,T,R)}Q{P=[2e.2x(M[1])]}}Q{M=8B([K[1]],[2e]);P=(M.5c?M.2v.5k(R):M.2v).47}}Q{6=12.5z(K[2]);7(6){7(6.1T!==K[2]){E 6E.2y(P)}B.O=1;B[0]=6}B.T=12;B.P=P;E B}}Q 7(!T&&/^\\w+$/.17(P)){B.P=P;B.T=12;P=12.2N(P)}Q 7(!T||T.6j){E(T||6E).2y(P)}Q{E y(T).2y(P)}}Q 7(y.1G(P)){E 6E.3l(P)}7(P.P!==1d){B.P=P.P;B.T=P.T}E y.3f(P)?B.ax(P):y.2P(P,B)},P:"",6j:"1.4.1",O:0,4j:C(){E B.O},7b:C(){E 2k.1f(B,0)},54:C(3B){E 3B==U?B.7b():(3B<0?B.2k(3B)[0]:B[3B])},3s:C(1C,J,P){G M=y(1C||U);M.9k=B;M.T=B.T;7(J==="2y"){M.P=B.P+(B.P?" ":"")+P}Q 7(J){M.P=B.P+"."+J+"("+P+")"}E M},ax:C(1C){B.O=0;1K.27(B,1C);E B},1b:C(1o,1D){E y.1b(B,1o,1D)},3l:C(fn){y.9E();7(y.6O){fn.1f(12,y)}Q 7(5X){5X.1K(fn)}E B},eq:C(i){E i===-1?B.2k(i):B.2k(i,+i+1)},2j:C(){E B.eq(0)},4o:C(){E B.eq(-1)},2k:C(){E B.3s(2k.27(B,1F),"2k",2k.1f(1F).4R(","))},2Y:C(1o){E B.3s(y.2Y(B,C(6,i){E 1o.1f(6,i,6)}))},3o:C(){E B.9k||y(U)},1K:1K,4Z:[].4Z,3S:[].3S};y.fn.8Z.2T=y.fn;y.1Q=y.fn.1Q=C(){G 1w=1F[0]||{},i=1,O=1F.O,5P=14,1e,J,2L,3R;7(1a 1w==="7S"){5P=1w;1w=1F[1]||{};i=2}7(1a 1w!=="1P"&&!y.1G(1w)){1w={}}7(O===i){1w=B;--i}V(;i<O;i++){7((1e=1F[i])!=U){V(J 1A 1e){2L=1w[J];3R=1e[J];7(1w===3R){9F}7(5P&&3R&&(y.87(3R)||y.3f(3R))){G 6z=2L&&(y.87(2L)||y.3f(2L))?2L:y.3f(3R)?[]:{};1w[J]=y.1Q(5P,6z,3R)}Q 7(3R!==1d){1w[J]=3R}}}}E 1w};y.1Q({ed:C(5P){1B.$=84$;7(5P){1B.y=ay}E y},6O:14,3l:C(){7(!y.6O){7(!12.1i){E 7N(y.3l,13)}y.6O=R;7(5X){G fn,i=0;23((fn=5X[i++])){fn.1f(12,y)}5X=U}7(y.fn.7G){y(12).7G("3l")}}},9E:C(){7(91){E}91=R;7(12.5h==="2H"){E y.3l()}7(12.4b){12.4b("42",42,14);1B.4b("76",y.3l,14)}Q 7(12.3L){12.3L("3E",42);1B.3L("9P",y.3l);G 95=14;2E{95=1B.b1==U}2G(e){}7(12.2i.bk&&95){99()}}},1G:C(25){E 4a.1f(25)==="[1P aN]"},3f:C(25){E 4a.1f(25)==="[1P 3X]"},87:C(25){7(!25||4a.1f(25)!=="[1P 7x]"||25.19||25.6A){E 14}7(25.8W&&!6U.1f(25,"8W")&&!6U.1f(25.8W.2T,"eo")){E 14}G 1X;V(1X 1A 25){}E 1X===1d||6U.1f(25,1X)},9n:C(25){V(G J 1A 25){E 14}E R},2W:C(7e){bd 7e},c3:C(I){7(1a I!=="1R"||!I){E U}7(/^[\\],:{}\\s]*$/.17(I.1H(/\\\\(?:["\\\\\\/em]|u[0-9a-fA-F]{4})/g,"@").1H(/"[^"\\\\\\n\\r]*"|R|14|U|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g,"]").1H(/(?:^|:|,)(?:\\s*\\[)+/g,""))){E 1B.83&&1B.83.aG?1B.83.aG(I):(3g aN("E "+I))()}Q{y.2W("en 83: "+I)}},6y:C(){},9e:C(I){7(I&&aJ.17(I)){G 3e=12.2N("3e")[0]||12.2i,1x=12.2x("1x");1x.H="1U/4S";7(y.1Y.9g){1x.3N(12.6x(I))}Q{1x.1U=I}3e.3C(1x,3e.1S);3e.3u(1x)}},1g:C(6,J){E 6.1g&&6.1g.8c()===J.8c()},1b:C(1P,1o,1D){G J,i=0,O=1P.O,9m=O===1d||y.1G(1P);7(1D){7(9m){V(J 1A 1P){7(1o.27(1P[J],1D)===14){2z}}}Q{V(;i<O;){7(1o.27(1P[i++],1D)===14){2z}}}}Q{7(9m){V(J 1A 1P){7(1o.1f(1P[J],J,1P[J])===14){2z}}}Q{V(G N=1P[0];i<O&&1o.1f(N,i,N)!==14;N=1P[++i]){}}}E 1P},eb:C(1U){E(1U||"").1H(at,"")},2P:C(1E,1q){G M=1q||[];7(1E!=U){7(1E.O==U||1a 1E==="1R"||y.1G(1E)||(1a 1E!=="C"&&1E.6A)){1K.1f(M,1E)}Q{y.7p(M,1E)}}E M},4s:C(6,1E){7(1E.2r){E 1E.2r(6)}V(G i=0,O=1E.O;i<O;i++){7(1E[i]===6){E i}}E-1},7p:C(2j,66){G i=2j.O,j=0;7(1a 66.O==="5m"){V(G l=66.O;j<l;j++){2j[i++]=66[j]}}Q{23(66[j]!==1d){2j[i++]=66[j++]}}2j.O=i;E 2j},5Y:C(1C,1o,ar){G M=[];V(G i=0,O=1C.O;i<O;i++){7(!ar!==!1o(1C[i],i)){M.1K(1C[i])}}E M},2Y:C(1C,1o,aM){G M=[],N;V(G i=0,O=1C.O;i<O;i++){N=1o(1C[i],i,aM);7(N!=U){M[M.O]=N}}E M.7V.27([],M)},21:1,2a:C(fn,2a,6K){7(1F.O===2){7(1a 2a==="1R"){6K=fn;fn=6K[2a];2a=1d}Q 7(2a&&!y.1G(2a)){6K=2a;2a=1d}}7(!2a&&fn){2a=C(){E fn.27(6K||B,1F)}}7(fn){2a.21=fn.21=fn.21||2a.21||y.21++}E 2a},bI:C(4n){4n=4n.28();G K=/(bp)[ \\/]([\\w.]+)/.29(4n)||/(e1)(?:.*81)?[ \\/]([\\w.]+)/.29(4n)||/(e2) ([\\w.]+)/.29(4n)||!/e0/.17(4n)&&/(dZ)(?:.*? dX:([\\w.]+))?/.29(4n)||[];E{4G:K[1]||"",81:K[2]||"0"}},4G:{}});6T=y.bI(9q);7(6T.4G){y.4G[6T.4G]=R;y.4G.81=6T.81}7(y.4G.bp){y.4G.ea=R}7(2r){y.4s=C(6,1E){E 2r.1f(1E,6)}}6E=y(12);7(12.4b){42=C(){12.6X("42",42,14);y.3l()}}Q 7(12.3L){42=C(){7(12.5h==="2H"){12.7Q("3E",42);y.3l()}}}C 99(){7(y.6O){E}2E{12.2i.bk("1m")}2G(2W){7N(99,1);E}y.3l()}C c1(i,6){7(6.2L){y.6a({1n:6.2L,4W:14,36:"1x"})}Q{y.9e(6.1U||6.bA||6.3p||"")}7(6.1v){6.1v.3u(6)}}C 7t(1C,1X,N,29,fn,4m){G O=1C.O;7(1a 1X==="1P"){V(G k 1A 1X){7t(1C,k,1X[k],29,fn,N)}E 1C}7(N!==1d){29=!4m&&29&&y.1G(N);V(G i=0;i<O;i++){fn(1C[i],1X,29?N.1f(1C[i],i,fn(1C[i],1X)):N,4m)}E 1C}E O?fn(1C[0],1X):U}C 2Q(){E(3g aP).aH()}(C(){y.1Y={};G 2Z=12.2i,1x=12.2x("1x"),Y=12.2x("Y"),1T="1x"+2Q();Y.18.2c="4q";Y.3p=" <9f/><2f></2f><a 3A=\'/a\' 18=\'c0:bn;9H:1m;2o:.55;\'>a</a><3O H=\'4V\'/>";G 2K=Y.2N("*"),a=Y.2N("a")[0];7(!2K||!2K.O||!a){E}y.1Y={ak:Y.1S.19===3,2A:!Y.2N("2A").O,da:!!Y.2N("9f").O,18:/bn/.17(a.3a("18")),aW:a.3a("3A")==="/a",2o:/^0.55$/.17(a.18.2o),7y:!!a.18.7y,b7:Y.2N("3O")[0].N==="3J",b5:12.2x("33").3N(12.2x("44")).4Q,7l:14,9g:14,8j:R,5B:U};1x.H="1U/4S";2E{1x.3N(12.6x("1B."+1T+"=1;"))}2G(e){}2Z.3C(1x,2Z.1S);7(1B[1T]){y.1Y.9g=R;3q 1B[1T]}2Z.3u(1x);7(Y.3L&&Y.bG){Y.3L("9t",C 4c(){y.1Y.8j=14;Y.7Q("9t",4c)});Y.5k(R).bG("9t")}Y=12.2x("Y");Y.3p="<3O H=\'4f\' J=\'e7\' 3Q=\'3Q\'/>";G 2v=12.c9();2v.3N(Y.1S);y.1Y.7l=2v.5k(R).5k(R).an.3Q;y(C(){G Y=12.2x("Y");Y.18.2O=Y.18.dj="5g";12.1i.3N(Y);y.5B=y.1Y.5B=Y.7F===2;12.1i.3u(Y).18.2c=\'4q\';Y=U});G 8l=C(63){G el=12.2x("Y");63="3J"+63;G 7W=(63 1A el);7(!7W){el.aS(63,"E;");7W=1a el[63]==="C"}el=U;E 7W};y.1Y.aA=8l("4t");y.1Y.bg=8l("6p");2Z=1x=Y=2K=a=U})();y.3j={"V":"b9","43":"1N",e6:"aE",es:"et",bR:"eO",eP:"eN",eM:"eK",eL:"ap",eQ:"eR",eW:"eV"};G 3v="y"+2Q(),aZ=0,8k={};G b0={};y.1Q({2I:{},3v:3v,6g:{"cK":R,"1P":R,"eU":R},I:C(6,J,I){7(6.1g&&y.6g[6.1g.28()]){E}6=6==1B?8k:6;G 1T=6[3v],2I=y.2I,3r;7(!J&&!1T){E U}7(!1T){1T=++aZ}7(1a J==="1P"){6[3v]=1T;3r=2I[1T]=y.1Q(R,{},J)}Q 7(2I[1T]){3r=2I[1T]}Q 7(1a I==="1d"){3r=b0}Q{3r=2I[1T]={}}7(I!==1d){6[3v]=1T;3r[J]=I}E 1a J==="1R"?3r[J]:3r},50:C(6,J){7(6.1g&&y.6g[6.1g.28()]){E}6=6==1B?8k:6;G 1T=6[3v],2I=y.2I,3r=2I[1T];7(J){7(3r){3q 3r[J];7(y.9n(3r)){y.50(6)}}}Q{2E{3q 6[3v]}2G(e){7(6.8G){6.8G(3v)}}3q 2I[1T]}}});y.fn.1Q({I:C(1X,N){7(1a 1X==="1d"&&B.O){E y.I(B[0])}Q 7(1a 1X==="1P"){E B.1b(C(){y.I(B,1X)})}G 1k=1X.3d(".");1k[1]=1k[1]?"."+1k[1]:"";7(N===1d){G I=B.7G("eJ"+1k[1]+"!",[1k[0]]);7(I===1d&&B.O){I=y.I(B[0],1X)}E I===1d&&1k[1]?B.I(1k[0]):I}Q{E B.2q("eI"+1k[1]+"!",[1k[0],N]).1b(C(){y.I(B,1X,N)})}},50:C(1X){E B.1b(C(){y.50(B,1X)})}});y.1Q({2D:C(6,H,I){7(!6){E}H=(H||"fx")+"2D";G q=y.I(6,H);7(!I){E q||[]}7(!q||y.3f(I)){q=y.I(6,H,y.2P(I))}Q{q.1K(I)}E q},4K:C(6,H){H=H||"fx";G 2D=y.2D(6,H),fn=2D.4d();7(fn==="8F"){fn=2D.4d()}7(fn){7(H==="fx"){2D.8I("8F")}fn.1f(6,C(){y.4K(6,H)})}}});y.fn.1Q({2D:C(H,I){7(1a H!=="1R"){I=H;H="fx"}7(I===1d){E y.2D(B[0],H)}E B.1b(C(i,6){G 2D=y.2D(B,H,I);7(H==="fx"&&2D[0]!=="8F"){y.4K(B,H)}})},4K:C(H){E B.1b(C(){y.4K(B,H)})},ez:C(56,H){56=y.fx?y.fx.82[56]||56:56;H=H||"fx";E B.2D(H,C(){G 6=B;7N(C(){y.4K(6,H)},56)})},94:C(H){E B.2D(H||"fx",[])}});G 8E=/[\\n\\t]/g,7K=/\\s+/,bl=/\\r/g,b8=/3A|2L|18/,bb=/(3n|3O)/i,aV=/(3n|3O|1P|33|6n)/i,aU=/^(a|8n)$/i,aa=/4f|4V/;y.fn.1Q({3x:C(J,N){E 7t(B,J,N,R,y.3x)},ex:C(J,fn){E B.1b(C(){y.3x(B,J,"");7(B.19===1){B.8G(J)}})},8A:C(N){7(y.1G(N)){E B.1b(C(i){G 1s=y(B);1s.8A(N.1f(B,i,1s.3x("43")))})}7(N&&1a N==="1R"){G 41=(N||"").3d(7K);V(G i=0,l=B.O;i<l;i++){G 6=B[i];7(6.19===1){7(!6.1N){6.1N=N}Q{G 1N=" "+6.1N+" ";V(G c=0,cl=41.O;c<cl;c++){7(1N.2r(" "+41[c]+" ")<0){6.1N+=" "+41[c]}}}}}}E B},9u:C(N){7(y.1G(N)){E B.1b(C(i){G 1s=y(B);1s.9u(N.1f(B,i,1s.3x("43")))})}7((N&&1a N==="1R")||N===1d){G 41=(N||"").3d(7K);V(G i=0,l=B.O;i<l;i++){G 6=B[i];7(6.19===1&&6.1N){7(N){G 1N=(" "+6.1N+" ").1H(8E," ");V(G c=0,cl=41.O;c<cl;c++){1N=1N.1H(" "+41[c]+" "," ")}6.1N=1N.ew(1,1N.O-1)}Q{6.1N=""}}}}E B},aR:C(N,6P){G H=1a N,b4=1a 6P==="7S";7(y.1G(N)){E B.1b(C(i){G 1s=y(B);1s.aR(N.1f(B,i,1s.3x("43"),6P),6P)})}E B.1b(C(){7(H==="1R"){G 1N,i=0,1s=y(B),3K=6P,41=N.3d(7K);23((1N=41[i++])){3K=b4?3K:!1s.b6(1N);1s[3K?"8A":"9u"](1N)}}Q 7(H==="1d"||H==="7S"){7(B.1N){y.I(B,"ba",B.1N)}B.1N=B.1N||N===14?"":y.I(B,"ba")||""}})},b6:C(P){G 1N=" "+P+" ";V(G i=0,l=B.O;i<l;i++){7((" "+B[i].1N+" ").1H(8E," ").2r(1N)>-1){E R}}E 14},1j:C(N){7(N===1d){G 6=B[0];7(6){7(y.1g(6,"44")){E(6.eF.N||{}).bc?6.N:6.1U}7(y.1g(6,"33")){G 4p=6.5j,5D=[],1e=6.1e,4g=6.H==="33-4g";7(4p<0){E U}V(G i=4g?4p:0,58=4g?4p+1:1e.O;i<58;i++){G 44=1e[i];7(44.4Q){N=y(44).1j();7(4g){E N}5D.1K(N)}}E 5D}7(aa.17(6.H)&&!y.1Y.b7){E 6.3a("N")===U?"3J":6.N}E(6.N||"").1H(bl,"")}E 1d}G 1G=y.1G(N);E B.1b(C(i){G 1s=y(B),1j=N;7(B.19!==1){E}7(1G){1j=N.1f(B,i,1s.1j())}7(1a 1j==="5m"){1j+=""}7(y.3f(1j)&&aa.17(B.H)){B.3Q=y.4s(1s.1j(),1j)>=0}Q 7(y.1g(B,"33")){G 5D=y.2P(1j);y("44",B).1b(C(){B.4Q=y.4s(y(B).1j(),5D)>=0});7(!5D.O){B.5j=-1}}Q{B.N=1j}})}});y.1Q({7s:{1j:R,2R:R,1V:R,1U:R,I:R,2O:R,30:R,22:R},3x:C(6,J,N,4m){7(!6||6.19===3||6.19===8){E 1d}7(4m&&J 1A y.7s){E y(6)[J](N)}G 6b=6.19!==1||!y.8p(6),1l=N!==1d;J=6b&&y.3j[J]||J;7(6.19===1){G 2m=b8.17(J);7(J==="4Q"&&!y.1Y.b5){G 1M=6.1v;7(1M){1M.5j;7(1M.1v){1M.1v.5j}}}7(J 1A 6&&6b&&!2m){7(1l){7(J==="H"&&bb.17(6.1g)&&6.1v){y.2W("H dx dv\'t be ds")}6[J]=N}7(y.1g(6,"3P")&&6.5l(J)){E 6.5l(J).7n}7(J==="ap"){G 7L=6.5l("ap");E 7L&&7L.bc?7L.N:aV.17(6.1g)||aU.17(6.1g)&&6.3A?0:1d}E 6[J]}7(!y.1Y.18&&6b&&J==="18"){7(1l){6.18.aT=""+N}E 6.18.aT}7(1l){6.aS(J,""+N)}G 3x=!y.1Y.aW&&6b&&2m?6.3a(J,2):6.3a(J);E 3x===U?1d:3x}E y.18(6,J,N)}});G bi=C(aX){E aX.1H(/[^\\w\\s\\.\\|`]/g,C(ch){E"\\\\"+ch})};y.L={2M:C(6,2u,1y,I){7(6.19===3||6.19===8){E}7(6.6A&&(6!==1B&&!6.b1)){6=1B}7(!1y.21){1y.21=y.21++}7(I!==1d){G fn=1y;1y=y.2a(fn);1y.I=I}G 1I=y.I(6,"1I")||y.I(6,"1I",{}),1L=y.I(6,"1L"),7T;7(!1L){7T=C(){E 1a y!=="1d"&&!y.L.9x?y.L.1L.27(7T.6,1F):1d};1L=y.I(6,"1L",7T)}7(!1L){E}1L.6=6;2u=2u.3d(/\\s+/);G H,i=0;23((H=2u[i++])){G 24=H.3d(".");H=24.4d();7(i>1){1y=y.2a(1y);7(I!==1d){1y.I=I}}1y.H=24.2k(0).4Z().4R(".");G 40=1I[H],2m=B.2m[H]||{};7(!40){40=1I[H]={};7(!2m.4D||2m.4D.1f(6,I,24,1y)===14){7(6.4b){6.4b(H,1L,14)}Q 7(6.3L){6.3L("3J"+H,1L)}}}7(2m.2M){G 3W=2m.2M.1f(6,1y,I,24,40);7(3W&&y.1G(3W)){3W.21=3W.21||1y.21;3W.I=3W.I||1y.I;3W.H=3W.H||1y.H;1y=3W}}40[1y.21]=1y;B.3F[H]=R}6=U},3F:{},2p:C(6,2u,1y){7(6.19===3||6.19===8){E}G 1I=y.I(6,"1I"),M,H,fn;7(1I){7(2u===1d||(1a 2u==="1R"&&2u.dK(0)===".")){V(H 1A 1I){B.2p(6,H+(2u||""))}}Q{7(2u.H){1y=2u.1y;2u=2u.H}2u=2u.3d(/\\s+/);G i=0;23((H=2u[i++])){G 24=H.3d(".");H=24.4d();G 2K=!24.O,bC=y.2Y(24.2k(0).4Z(),bi),7Z=3g 5V("(^|\\\\.)"+bC.4R("\\\\.(?:.*\\\\.)?")+"(\\\\.|$)"),2m=B.2m[H]||{};7(1I[H]){7(1y){fn=1I[H][1y.21];3q 1I[H][1y.21]}Q{V(G 1L 1A 1I[H]){7(2K||7Z.17(1I[H][1L].H)){3q 1I[H][1L]}}}7(2m.2p){2m.2p.1f(6,24,fn)}V(M 1A 1I[H]){2z}7(!M){7(!2m.5M||2m.5M.1f(6,24)===14){7(6.6X){6.6X(H,y.I(6,"1L"),14)}Q 7(6.7Q){6.7Q("3J"+H,y.I(6,"1L"))}}M=U;3q 1I[H]}}}}V(M 1A 1I){2z}7(!M){G 1L=y.I(6,"1L");7(1L){1L.6=U}y.50(6,"1I");y.50(6,"1L")}}},2q:C(L,I,6){G H=L.H||L,bD=1F[3];7(!bD){L=1a L==="1P"?L[3v]?L:y.1Q(y.57(H),L):y.57(H);7(H.2r("!")>=0){L.H=H=H.2k(0,-1);L.bo=R}7(!6){L.52();7(B.3F[H]){y.1b(y.2I,C(){7(B.1I&&B.1I[H]){y.L.2q(L,I,B.1L.6)}})}}7(!6||6.19===3||6.19===8){E 1d}L.2b=1d;L.1w=6;I=y.2P(I);I.8I(L)}L.6Q=6;G 1L=y.I(6,"1L");7(1L){1L.27(6,I)}G 1M=6.1v||6.1Z;2E{7(!(6&&6.1g&&y.6g[6.1g.28()])){7(6["3J"+H]&&6["3J"+H].27(6,I)===14){L.2b=14}}}2G(e){}7(!L.ai()&&1M){y.L.2q(L,I,1M,R)}Q 7(!L.ag()){G 1w=L.1w,26,bw=y.1g(1w,"a")&&H==="4c";7(!bw&&!(1w&&1w.1g&&y.6g[1w.1g.28()])){2E{7(1w[H]){26=1w["3J"+H];7(26){1w["3J"+H]=U}B.9x=R;1w[H]()}}2G(e){}7(26){1w["3J"+H]=26}B.9x=14}}},1L:C(L){G 2K,40;L=1F[0]=y.L.3Z(L||1B.L);L.6Q=B;G 24=L.H.3d(".");L.H=24.4d();2K=!24.O&&!L.bo;G 7Z=3g 5V("(^|\\\\.)"+24.2k(0).4Z().4R("\\\\.(?:.*\\\\.)?")+"(\\\\.|$)");40=(y.I(B,"1I")||{})[L.H];V(G j 1A 40){G 1y=40[j];7(2K||7Z.17(1y.H)){L.1y=1y;L.I=1y.I;G M=1y.27(B,1F);7(M!==1d){L.2b=M;7(M===14){L.4M();L.52()}}7(L.aj()){2z}}}E L.2b},3j:"dJ dF dA dD 3n dL 6w 9W aw 9C 6Q I dS dR 7J 1y 5S dN dO 9w dP dV dt do 9X aO dq du 6u dr dw ey av 1w as f9 g9 4Y".3d(" "),3Z:C(L){7(L[3v]){E L}G 5L=L;L=y.57(5L);V(G i=B.3j.O,1p;i;){1p=B.3j[--i];L[1p]=5L[1p]}7(!L.1w){L.1w=L.av||12}7(L.1w.19===3){L.1w=L.1w.1v}7(!L.6u&&L.7J){L.6u=L.7J===L.1w?L.as:L.7J}7(L.9X==U&&L.9W!=U){G 2e=12.2i,1i=12.1i;L.9X=L.9W+(2e&&2e.4v||1i&&1i.4v||0)-(2e&&2e.5K||1i&&1i.5K||0);L.aO=L.aw+(2e&&2e.4z||1i&&1i.4z||0)-(2e&&2e.5Q||1i&&1i.5Q||0)}7(!L.4Y&&((L.6w||L.6w===0)?L.6w:L.5S)){L.4Y=L.6w||L.5S}7(!L.9w&&L.9C){L.9w=L.9C}7(!L.4Y&&L.3n!==1d){L.4Y=(L.3n&1?1:(L.3n&2?3:(L.3n&4?2:0)))}E L},21:gb,2a:y.2a,2m:{3l:{4D:y.9E,5M:y.6y},2B:{2M:C(2a,I,24,2B){y.1Q(2a,I||{});2a.21+=I.P+I.2B;I.gd=2a;y.L.2M(B,I.2B,9M,I)},2p:C(24){7(24.O){G 2p=0,J=3g 5V("(^|\\\\.)"+24[0]+"(\\\\.|$)");y.1b((y.I(B,"1I").2B||{}),C(){7(J.17(B.H)){2p++}});7(2p<1){y.L.2p(B,24[0],9M)}}},2m:{}},gc:{4D:C(I,24,fn){7(B.6A){B.9Z=fn}E 14},5M:C(24,fn){7(B.9Z===fn){B.9Z=U}}}}};y.57=C(2L){7(!B.4M){E 3g y.57(2L)}7(2L&&2L.H){B.5L=2L;B.H=2L.H}Q{B.H=2L}B.eY=2Q();B[3v]=R};C 8d(){E 14}C 89(){E R}y.57.2T={4M:C(){B.ag=89;G e=B.5L;7(!e){E}7(e.4M){e.4M()}e.g3=14},52:C(){B.ai=89;G e=B.5L;7(!e){E}7(e.52){e.52()}e.fV=R},fU:C(){B.aj=89;B.52()},ag:8d,ai:8d,aj:8d};G a1=C(L){G 1M=L.6u;23(1M&&1M!==B){2E{1M=1M.1v}2G(e){2z}}7(1M!==B){L.H=L.I;y.L.1L.27(B,1F)}},am=C(L){L.H=L.I;y.L.1L.27(B,1F)};y.1b({6h:"bm",6M:"bv"},C(2U,3Z){y.L.2m[2U]={4D:C(I){y.L.2M(B,3Z,I&&I.P?am:a1,2U)},5M:C(I){y.L.2p(B,3Z,I&&I.P?am:a1)}}});7(!y.1Y.aA){y.L.2m.4t={4D:C(I,24,fn){7(B.1g.28()!=="3P"){y.L.2M(B,"4c.8f."+fn.21,C(e){G 6=e.1w,H=6.H;7((H==="4t"||H==="8r")&&y(6).6v("3P").O){E 2q("4t",B,1F)}});y.L.2M(B,"9L.8f."+fn.21,C(e){G 6=e.1w,H=6.H;7((H==="1U"||H==="6o")&&y(6).6v("3P").O&&e.5S===13){E 2q("4t",B,1F)}})}Q{E 14}},2p:C(24,fn){y.L.2p(B,"4c.8f"+(fn?"."+fn.21:""));y.L.2p(B,"9L.8f"+(fn?"."+fn.21:""))}}}7(!y.1Y.bg){G 6Y=/6n|3O|33/i;C a5(6){G H=6.H,1j=6.N;7(H==="4f"||H==="4V"){1j=6.3Q}Q 7(H==="33-7D"){1j=6.5j>-1?y.2Y(6.1e,C(6){E 6.4Q}).4R("-"):""}Q 7(6.1g.28()==="33"){1j=6.5j}E 1j}C 6Z(e){G 6=e.1w,I,1j;7(!6Y.17(6.1g)||6.aE){E}I=y.I(6,"a2");1j=a5(6);7(e.H!=="6R"||6.H!=="4f"){y.I(6,"a2",1j)}7(I===1d||1j===I){E}7(I!=U||1j){e.H="6p";E y.L.2q(e,1F[1],6)}}y.L.2m.6p={3H:{6R:6Z,4c:C(e){G 6=e.1w,H=6.H;7(H==="4f"||H==="4V"||6.1g.28()==="33"){E 6Z.1f(B,e)}},bF:C(e){G 6=e.1w,H=6.H;7((e.5S===13&&6.1g.28()!=="6n")||(e.5S===32&&(H==="4V"||H==="4f"))||H==="33-7D"){E 6Z.1f(B,e)}},fZ:C(e){G 6=e.1w;7(6.1g.28()==="3O"&&6.H==="4f"){y.I(6,"a2",a5(6))}}},4D:C(I,24,fn){V(G H 1A 6I){y.L.2M(B,H+".az."+fn.21,6I[H])}E 6Y.17(B.1g)},2p:C(24,fn){V(G H 1A 6I){y.L.2p(B,H+".az"+(fn?"."+fn.21:""),6I[H])}E 6Y.17(B.1g)}};G 6I=y.L.2m.6p.3H}C 2q(H,6,1D){1D[0].H=H;E y.L.1L.27(6,1D)}7(12.4b){y.1b({9v:"a6",9A:"6R"},C(2U,3Z){y.L.2m[3Z]={4D:C(){B.4b(2U,1y,R)},5M:C(){B.6X(2U,1y,R)}};C 1y(e){e=y.L.3Z(e);e.H=3Z;E y.L.1L.1f(B,e)}})}y.1b(["8a","4g"],C(i,J){y.fn[J]=C(H,I,fn){7(1a H==="1P"){V(G 1X 1A H){B[J](1X,I,H[1X],fn)}E B}7(y.1G(I)){fn=I;I=1d}G 1y=J==="4g"?y.2a(fn,C(L){y(B).6W(L,1y);E fn.27(B,1F)}):fn;E H==="bj"&&J!=="4g"?B.4g(H,I,fn):B.1b(C(){y.L.2M(B,H,1y,I)})}});y.fn.1Q({6W:C(H,fn){7(1a H==="1P"&&!H.4M){V(G 1X 1A H){B.6W(1X,H[1X])}E B}E B.1b(C(){y.L.2p(B,H,fn)})},2q:C(H,I){E B.1b(C(){y.L.2q(H,I,B)})},7G:C(H,I){7(B[0]){G L=y.57(H);L.4M();L.52();y.L.2q(L,I,B[0]);E L.2b}},5r:C(fn){G 1D=1F,i=1;23(i<1D.O){y.2a(fn,1D[i++])}E B.4c(y.2a(fn,C(L){G 6q=(y.I(B,"6q"+fn.21)||0)%i;y.I(B,"6q"+fn.21,6q+1);L.4M();E 1D[6q].27(B,1F)||14}))},aK:C(9K,aL){E B.6h(9K).6M(aL||9K)}});y.1b(["2B","gs"],C(i,J){y.fn[J]=C(2u,I,fn){G H,i=0;7(y.1G(I)){fn=I;I=1d}2u=(2u||"").3d(/\\s+/);23((H=2u[i++])!=U){H=H==="9v"?"a6":H==="9A"?"6R":H==="aK"?2u.1K("6M")&&"6h":H;7(J==="2B"){y(B.T).8a(9U(H,B.P),{I:I,P:B.P,2B:H},fn)}Q{y(B.T).6W(9U(H,B.P),fn?{21:fn.21+B.P+H}:U)}}E B}});C 9M(L){G 62,1C=[],3h=[],1D=1F,6e,K,fn,6,j,i,l,I,2B=y.1Q({},y.I(B,"1I").2B);7(L.3n&&L.H==="4c"){E}V(j 1A 2B){fn=2B[j];7(fn.2B===L.H||fn.aI&&y.4s(L.H,fn.aI)>-1){I=fn.I;7(!(I.9O&&I.9O[L.H]&&!I.9O[L.H](L))){3h.1K(fn.P)}}Q{3q 2B[j]}}K=y(L.1w).6v(3h,L.6Q);V(i=0,l=K.O;i<l;i++){V(j 1A 2B){fn=2B[j];6=K[i].6;6e=U;7(K[i].P===fn.P){7(fn.2B==="6h"||fn.2B==="6M"){6e=y(L.6u).6v(fn.P)[0]}7(!6e||6e!==6){1C.1K({6:6,fn:fn})}}}}V(i=0,l=1C.O;i<l;i++){K=1C[i];L.6Q=K.6;L.I=K.fn.I;7(K.fn.27(K.6,1D)===14){62=14;2z}}E 62}C 9U(H,P){E"2B."+(H?H+".":"")+P.1H(/\\./g,"`").1H(/ /g,"&")}y.1b(("9A 9v a6 6R 76 fh 7Y bj 4c fi "+"fm fl fk bm bv 6h 6M "+"6p 33 4t bF 9L fb 2W").3d(" "),C(i,J){y.fn[J]=C(fn){E fn?B.8a(J,fn):B.2q(J)};7(y.7s){y.7s[J]=R}});7(1B.3L&&!1B.4b){1B.3L("f2",C(){V(G 1T 1A y.2I){7(y.2I[1T].1L){2E{y.L.2p(y.2I[1T].1L.6)}2G(e){}}}})}(C(){G 7k=/((?:\\((?:\\([^()]+\\)|[^()]+)+\\)|\\[(?:\\[[^[\\]]*\\]|[\'"][^\'"]*[\'"]|[^[\\]\'"]+)+\\]|\\\\.|[^ >+~,(\\[\\\\]+)+|[>+~])(\\s*,\\s*)?((?:.|\\r|\\n)*)/g,3Y=0,4a=7x.2T.4a,49=14,9B=R;[0,0].4Z(C(){9B=14;E 0});G 1J=C(P,T,1q,4E){1q=1q||[];G aY=T=T||12;7(T.19!==1&&T.19!==9){E[]}7(!P||1a P!=="1R"){E 1q}G 1k=[],m,1l,1r,3I,9y=R,6t=2d(T),9J=P;23((7k.29(""),m=7k.29(9J))!==U){9J=m[3];1k.1K(m[1]);7(m[2]){3I=m[3];2z}}7(1k.O>1&&bs.29(P)){7(1k.O===2&&1t.3V[1k[0]]){1l=8V(1k[0]+1k[1],T)}Q{1l=1t.3V[1k[0]]?[T]:1J(1k.4d(),T);23(1k.O){P=1k.4d();7(1t.3V[P]){P+=1k.4d()}1l=8V(P,1l)}}}Q{7(!4E&&1k.O>1&&T.19===9&&!6t&&1t.K.45.17(1k[0])&&!1t.K.45.17(1k[1k.O-1])){G M=1J.2y(1k.4d(),T,6t);T=M.1z?1J.1u(M.1z,M.1l)[0]:M.1l[0]}7(T){G M=4E?{1z:1k.4e(),1l:2P(4E)}:1J.2y(1k.4e(),1k.O===1&&(1k[0]==="~"||1k[0]==="+")&&T.1v?T.1v:T,6t);1l=M.1z?1J.1u(M.1z,M.1l):M.1l;7(1k.O>0){1r=2P(1l)}Q{9y=14}23(1k.O){G 1h=1k.4e(),4e=1h;7(!1t.3V[1h]){1h=""}Q{4e=1k.4e()}7(4e==U){4e=T}1t.3V[1h](1r,4e,6t)}}Q{1r=1k=[]}}7(!1r){1r=1l}7(!1r){1J.2W(1h||P)}7(4a.1f(1r)==="[1P 3X]"){7(!9y){1q.1K.27(1q,1r)}Q 7(T&&T.19===1){V(G i=0;1r[i]!=U;i++){7(1r[i]&&(1r[i]===R||1r[i].19===1&&4r(T,1r[i]))){1q.1K(1l[i])}}}Q{V(G i=0;1r[i]!=U;i++){7(1r[i]&&1r[i].19===1){1q.1K(1l[i])}}}}Q{2P(1r,1q)}7(3I){1J(3I,aY,1q,4E);1J.8N(1q)}E 1q};1J.8N=C(1q){7(64){49=9B;1q.4Z(64);7(49){V(G i=1;i<1q.O;i++){7(1q[i]===1q[i-1]){1q.3S(i--,1)}}}}E 1q};1J.4u=C(1z,1l){E 1J(1z,U,U,1l)};1J.2y=C(1z,T,2d){G 1l,K;7(!1z){E[]}V(G i=0,l=1t.78.O;i<l;i++){G H=1t.78[i],K;7((K=1t.77[H].29(1z))){G 1m=K[1];K.3S(1,1);7(1m.73(1m.O-1)!=="\\\\"){K[1]=(K[1]||"").1H(/\\\\/g,"");1l=1t.2y[H](K,T,2d);7(1l!=U){1z=1z.1H(1t.K[H],"");2z}}}}7(!1l){1l=T.2N("*")}E{1l:1l,1z:1z}};1J.1u=C(1z,1l,3y,2F){G 26=1z,2b=[],2S=1l,K,5e,b2=1l&&1l[0]&&2d(1l[0]);23(1z&&1l.O){V(G H 1A 1t.1u){7((K=1t.77[H].29(1z))!=U&&K[2]){G 1u=1t.1u[H],5w,6f,1m=K[1];5e=14;K.3S(1,1);7(1m.73(1m.O-1)==="\\\\"){9F}7(2S===2b){2b=[]}7(1t.8u[H]){K=1t.8u[H](K,2S,3y,2b,2F,b2);7(!K){5e=5w=R}Q 7(K===R){9F}}7(K){V(G i=0;(6f=2S[i])!=U;i++){7(6f){5w=1u(6f,K,i,2S);G 4m=2F^!!5w;7(3y&&5w!=U){7(4m){5e=R}Q{2S[i]=14}}Q 7(4m){2b.1K(6f);5e=R}}}}7(5w!==1d){7(!3y){2S=2b}1z=1z.1H(1t.K[H],"");7(!5e){E[]}2z}}}7(1z===26){7(5e==U){1J.2W(1z)}Q{2z}}26=1z}E 2S};1J.2W=C(7e){bd"bz 2W, bx by: "+7e};G 1t=1J.3h={78:["45","8C","5E"],K:{45:/#((?:[\\w\\5u-\\5y-]|\\\\.)+)/,6i:/\\.((?:[\\w\\5u-\\5y-]|\\\\.)+)/,8C:/\\[J=[\'"]*((?:[\\w\\5u-\\5y-]|\\\\.)+)[\'"]*\\]/,9d:/\\[\\s*((?:[\\w\\5u-\\5y-]|\\\\.)+)\\s*(?:(\\S?=)\\s*([\'"]*)(.*?)\\3|)\\s*\\]/,5E:/^((?:[\\w\\5u-\\5y\\*-]|\\\\.)+)/,79:/:(bH|4H|4o|2j)-fJ(?:\\((7q|7E|[\\dn+-]*)\\))?/,5p:/:(4H|eq|gt|bB|2j|4o|7q|7E)(?:\\((\\d*)\\))?(?=[^-]|$)/,6N:/:((?:[\\w\\5u-\\5y-]|\\\\.)+)(?:\\(([\'"]?)((?:\\([^\\)]+\\)|[^\\(\\)]*)+)\\2\\))?/},77:{},8z:{"43":"1N","V":"b9"},7f:{3A:C(6){E 6.3a("3A")}},3V:{"+":C(1r,1W){G 5a=1a 1W==="1R",9c=5a&&!/\\W/.17(1W),8g=5a&&!9c;7(9c){1W=1W.28()}V(G i=0,l=1r.O,6;i<l;i++){7((6=1r[i])){23((6=6.65)&&6.19!==1){}1r[i]=8g||6&&6.1g.28()===1W?6||14:6===1W}}7(8g){1J.1u(1W,1r,R)}},">":C(1r,1W){G 5a=1a 1W==="1R";7(5a&&!/\\W/.17(1W)){1W=1W.28();V(G i=0,l=1r.O;i<l;i++){G 6=1r[i];7(6){G 1M=6.1v;1r[i]=1M.1g.28()===1W?1M:14}}}Q{V(G i=0,l=1r.O;i<l;i++){G 6=1r[i];7(6){1r[i]=5a?6.1v:6.1v===1W}}7(5a){1J.1u(1W,1r,R)}}},"":C(1r,1W,2d){G 39=3Y++,5C=8X;7(1a 1W==="1R"&&!/\\W/.17(1W)){G 5H=1W=1W.28();5C=8Y}5C("1v",1W,39,1r,5H,2d)},"~":C(1r,1W,2d){G 39=3Y++,5C=8X;7(1a 1W==="1R"&&!/\\W/.17(1W)){G 5H=1W=1W.28();5C=8Y}5C("65",1W,39,1r,5H,2d)}},2y:{45:C(K,T,2d){7(1a T.5z!=="1d"&&!2d){G m=T.5z(K[1]);E m?[m]:[]}},8C:C(K,T){7(1a T.bf!=="1d"){G M=[],1q=T.bf(K[1]);V(G i=0,l=1q.O;i<l;i++){7(1q[i].3a("J")===K[1]){M.1K(1q[i])}}E M.O===0?U:M}},5E:C(K,T){E T.2N(K[1])}},8u:{6i:C(K,2S,3y,2b,2F,2d){K=" "+K[1].1H(/\\\\/g,"")+" ";7(2d){E K}V(G i=0,6;(6=2S[i])!=U;i++){7(6){7(2F^(6.1N&&(" "+6.1N+" ").1H(/[\\t\\n]/g," ").2r(K)>=0)){7(!3y){2b.1K(6)}}Q 7(3y){2S[i]=14}}}E 14},45:C(K){E K[1].1H(/\\\\/g,"")},5E:C(K,2S){E K[1].28()},79:C(K){7(K[1]==="4H"){G 17=/(-?)(\\d*)n((?:\\+|-)?\\d*)/.29(K[2]==="7q"&&"2n"||K[2]==="7E"&&"2n+1"||!/\\D/.17(K[2])&&"fM+"+K[2]||K[2]);K[2]=(17[1]+(17[2]||1))-0;K[3]=17[3]-0}K[0]=3Y++;E K},9d:C(K,2S,3y,2b,2F,2d){G J=K[1].1H(/\\\\/g,"");7(!2d&&1t.8z[J]){K[1]=1t.8z[J]}7(K[2]==="~="){K[4]=" "+K[4]+" "}E K},6N:C(K,2S,3y,2b,2F){7(K[1]==="2F"){7((7k.29(K[3])||"").O>1||/^\\w/.17(K[3])){K[3]=1J(K[3],U,U,2S)}Q{G M=1J.1u(K[3],2S,3y,R^2F);7(!3y){2b.1K.27(2b,M)}E 14}}Q 7(1t.K.5p.17(K[0])||1t.K.79.17(K[0])){E R}E K},5p:C(K){K.8I(R);E K}},3H:{fu:C(6){E 6.71===14&&6.H!=="2X"},71:C(6){E 6.71===R},3Q:C(6){E 6.3Q===R},4Q:C(6){6.1v.5j;E 6.4Q===R},1M:C(6){E!!6.1S},5G:C(6){E!6.1S},cN:C(6,i,K){E!!1J(K[3],6).O},fq:C(6){E/h\\d/i.17(6.1g)},1U:C(6){E"1U"===6.H},4f:C(6){E"4f"===6.H},4V:C(6){E"4V"===6.H},7P:C(6){E"7P"===6.H},6o:C(6){E"6o"===6.H},4t:C(6){E"4t"===6.H},8r:C(6){E"8r"===6.H},bh:C(6){E"bh"===6.H},3n:C(6){E"3n"===6.H||6.1g.28()==="3n"},3O:C(6){E/3O|33|6n|3n/i.17(6.1g)}},bt:{2j:C(6,i){E i===0},4o:C(6,i,K,1E){E i===1E.O-1},7q:C(6,i){E i%2===0},7E:C(6,i){E i%2===1},bB:C(6,i,K){E i<K[3]-0},gt:C(6,i,K){E i>K[3]-0},4H:C(6,i,K){E K[3]-0===i},eq:C(6,i,K){E K[3]-0===i}},1u:{6N:C(6,K,i,1E){G J=K[1],1u=1t.3H[J];7(1u){E 1u(6,i,K,1E)}Q 7(J==="4r"){E(6.bA||6.fC||5Z([6])||"").2r(K[3])>=0}Q 7(J==="2F"){G 2F=K[3];V(G i=0,l=2F.O;i<l;i++){7(2F[i]===6){E 14}}E R}Q{1J.2W("bz 2W, bx by: "+J)}},79:C(6,K){G H=K[1],2t=6;fs(H){7r\'bH\':7r\'2j\':23((2t=2t.65)){7(2t.19===1){E 14}}7(H==="2j"){E R}2t=6;7r\'4o\':23((2t=2t.4i)){7(2t.19===1){E 14}}E R;7r\'4H\':G 2j=K[2],4o=K[3];7(2j===1&&4o===0){E R}G 39=K[0],1M=6.1v;7(1M&&(1M.5F!==39||!6.9h)){G bE=0;V(2t=1M.1S;2t;2t=2t.4i){7(2t.19===1){2t.9h=++bE}}1M.5F=39}G 4B=6.9h-4o;7(2j===0){E 4B===0}Q{E(4B%2j===0&&4B/2j>=0)}}},45:C(6,K){E 6.19===1&&6.3a("1T")===K},5E:C(6,K){E(K==="*"&&6.19===1)||6.1g.28()===K},6i:C(6,K){E(" "+(6.1N||6.3a("43"))+" ").2r(K)>-1},9d:C(6,K){G J=K[1],2b=1t.7f[J]?1t.7f[J](6):6[J]!=U?6[J]:6.3a(J),N=2b+"",H=K[2],3t=K[4];E 2b==U?H==="!=":H==="="?N===3t:H==="*="?N.2r(3t)>=0:H==="~="?(" "+N+" ").2r(3t)>=0:!3t?N&&2b!==14:H==="!="?N!==3t:H==="^="?N.2r(3t)===0:H==="$="?N.73(N.O-3t.O)===3t:H==="|="?N===3t||N.73(0,3t.O+1)===3t+"-":14},5p:C(6,K,i,1E){G J=K[2],1u=1t.bt[J];7(1u){E 1u(6,i,K,1E)}}}};G bs=1t.K.5p;V(G H 1A 1t.K){1t.K[H]=3g 5V(1t.K[H].74+/(?![^\\[]*\\])(?![^\\(]*\\))/.74);1t.77[H]=3g 5V(/(^(?:.|\\r|\\n)*?)/.74+1t.K[H].74.1H(/\\\\(\\d+)/g,C(2K,3B){E"\\\\"+(3B-0+1)}))}G 2P=C(1E,1q){1E=3X.2T.2k.1f(1E,0);7(1q){1q.1K.27(1q,1E);E 1q}E 1E};2E{3X.2T.2k.1f(12.2i.47,0)}2G(e){2P=C(1E,1q){G M=1q||[];7(4a.1f(1E)==="[1P 3X]"){3X.2T.1K.27(M,1E)}Q{7(1a 1E.O==="5m"){V(G i=0,l=1E.O;i<l;i++){M.1K(1E[i])}}Q{V(G i=0;1E[i];i++){M.1K(1E[i])}}}E M}}G 64;7(12.2i.5s){64=C(a,b){7(!a.5s||!b.5s){7(a==b){49=R}E a.5s?-1:1}G M=a.5s(b)&4?-1:a===b?0:1;7(M===0){49=R}E M}}Q 7("61"1A 12.2i){64=C(a,b){7(!a.61||!b.61){7(a==b){49=R}E a.61?-1:1}G M=a.61-b.61;7(M===0){49=R}E M}}Q 7(12.9s){64=C(a,b){7(!a.1Z||!b.1Z){7(a==b){49=R}E a.1Z?-1:1}G 7C=a.1Z.9s(),7g=b.1Z.9s();7C.au(a,0);7C.aq(a,0);7g.au(b,0);7g.aq(b,0);G M=7C.gv(gy.gz,7g);7(M===0){49=R}E M}}C 5Z(1C){G M="",6;V(G i=0;1C[i];i++){6=1C[i];7(6.19===3||6.19===4){M+=6.7n}Q 7(6.19!==8){M+=5Z(6.47)}}E M}(C(){G 3P=12.2x("Y"),1T="1x"+(3g aP).aH();3P.3p="<a J=\'"+1T+"\'/>";G 2Z=12.2i;2Z.3C(3P,2Z.1S);7(12.5z(1T)){1t.2y.45=C(K,T,2d){7(1a T.5z!=="1d"&&!2d){G m=T.5z(K[1]);E m?m.1T===K[1]||1a m.5l!=="1d"&&m.5l("1T").7n===K[1]?[m]:1d:[]}};1t.1u.45=C(6,K){G 2t=1a 6.5l!=="1d"&&6.5l("1T");E 6.19===1&&2t&&2t.7n===K}}2Z.3u(3P);2Z=3P=U})();(C(){G Y=12.2x("Y");Y.3N(12.g1(""));7(Y.2N("*").O>0){1t.2y.5E=C(K,T){G 1q=T.2N(K[1]);7(K[1]==="*"){G 6l=[];V(G i=0;1q[i];i++){7(1q[i].19===1){6l.1K(1q[i])}}1q=6l}E 1q}}Y.3p="<a 3A=\'#\'></a>";7(Y.1S&&1a Y.1S.3a!=="1d"&&Y.1S.3a("3A")!=="#"){1t.7f.3A=C(6){E 6.3a("3A",2)}}Y=U})();7(12.7A){(C(){G 70=1J,Y=12.2x("Y");Y.3p="<p 43=\'aF\'></p>";7(Y.7A&&Y.7A(".aF").O===0){E}1J=C(9G,T,3I,4E){T=T||12;7(!4E&&T.19===9&&!2d(T)){2E{E 2P(T.7A(9G),3I)}2G(e){}}E 70(9G,T,3I,4E)};V(G 1p 1A 70){1J[1p]=70[1p]}Y=U})()}(C(){G Y=12.2x("Y");Y.3p="<Y 43=\'17 e\'></Y><Y 43=\'17\'></Y>";7(!Y.6d||Y.6d("e").O===0){E}Y.an.1N="e";7(Y.6d("e").O===1){E}1t.78.3S(1,0,"6i");1t.2y.6i=C(K,T,2d){7(1a T.6d!=="1d"&&!2d){E T.6d(K[1])}};Y=U})();C 8Y(2J,1h,39,1r,5H,2d){V(G i=0,l=1r.O;i<l;i++){G 6=1r[i];7(6){6=6[2J];G K=14;23(6){7(6.5F===39){K=1r[6.7B];2z}7(6.19===1&&!2d){6.5F=39;6.7B=i}7(6.1g.28()===1h){K=6;2z}6=6[2J]}1r[i]=K}}}C 8X(2J,1h,39,1r,5H,2d){V(G i=0,l=1r.O;i<l;i++){G 6=1r[i];7(6){6=6[2J];G K=14;23(6){7(6.5F===39){K=1r[6.7B];2z}7(6.19===1){7(!2d){6.5F=39;6.7B=i}7(1a 1h!=="1R"){7(6===1h){K=R;2z}}Q 7(1J.1u(1h,[6]).O>0){K=6;2z}}6=6[2J]}1r[i]=K}}}G 4r=12.5s?C(a,b){E a.5s(b)&16}:C(a,b){E a!==b&&(a.4r?a.4r(b):R)};G 2d=C(6){G 2i=(6?6.1Z||6:0).2i;E 2i?2i.1g!=="g2":14};G 8V=C(P,T){G 8O=[],8P="",K,2Z=T.19?[T]:T;23((K=1t.K.6N.29(P))){8P+=K[0];P=P.1H(1t.K.6N,"")}P=1t.3V[P]?P+"*":P;V(G i=0,l=2Z.O;i<l;i++){1J(P,2Z[i],8O)}E 1J.1u(8P,8O)};y.2y=1J;y.1z=1J.3h;y.1z[":"]=y.1z.3H;y.9j=1J.8N;y.5Z=5Z;y.8p=2d;y.4r=4r;E;1B.1J=1J})();G d3=/g0$/,cU=/^(?:d4|bJ|cX)/,d1=/,/,2k=3X.2T.2k;G 97=C(53,3G,6k){7(y.1G(3G)){E y.5Y(53,C(6,i){E!!3G.1f(6,i,6)===6k})}Q 7(3G.19){E y.5Y(53,C(6,i){E(6===3G)===6k})}Q 7(1a 3G==="1R"){G 8U=y.5Y(53,C(6){E 6.19===1});7(cO.17(3G)){E y.1u(3G,8U,!6k)}Q{3G=y.1u(3G,8U)}}E y.5Y(53,C(6,i){E(y.4s(6,3G)>=0)===6k})};y.fn.1Q({2y:C(P){G M=B.3s("","2y",P),O=0;V(G i=0,l=B.O;i<l;i++){O=M.O;y.2y(P,B[i],M);7(i>0){V(G n=O;n<M.O;n++){V(G r=0;r<O;r++){7(M[r]===M[n]){M.3S(n--,1);2z}}}}}E M},cN:C(1w){G 96=y(1w);E B.1u(C(){V(G i=0,l=96.O;i<l;i++){7(y.4r(B,96[i])){E R}}})},2F:C(P){E B.3s(97(B,P,14),"2F",P)},1u:C(P){E B.3s(97(B,P,R),"1u",P)},67:C(P){E!!P&&y.1u(P,B).O>0},6v:C(3h,T){7(y.3f(3h)){G M=[],1h=B[0],K,4u={},P;7(1h&&3h.O){V(G i=0,l=3h.O;i<l;i++){P=3h[i];7(!4u[P]){4u[P]=y.1z.K.5p.17(P)?y(P,T||B.T):P}}23(1h&&1h.1Z&&1h!==T){V(P 1A 4u){K=4u[P];7(K.6j?K.4p(1h)>-1:y(1h).67(K)){M.1K({P:P,6:1h});3q 4u[P]}}1h=1h.1v}}E M}G 5q=y.1z.K.5p.17(3h)?y(3h,T||B.T):U;E B.2Y(C(i,1h){23(1h&&1h.1Z&&1h!==T){7(5q?5q.4p(1h)>-1:y(1h).67(3h)){E 1h}1h=1h.1v}E U})},4p:C(6){7(!6||1a 6==="1R"){E y.4s(B[0],6?y(6):B.1M().cZ())}E y.4s(6.6j?6[0]:6,B)},2M:C(P,T){G 1l=1a P==="1R"?y(P,T||B.T):y.2P(P),2K=y.7p(B.54(),1l);E B.3s(9o(1l[0])||9o(2K[0])?2K:y.9j(2K))},gx:C(){E B.2M(B.9k)}});C 9o(2t){E!2t||!2t.1v||2t.1v.19===11}y.1b({1M:C(6){G 1M=6.1v;E 1M&&1M.19!==11?1M:U},d4:C(6){E y.2J(6,"1v")},gn:C(6,i,3m){E y.2J(6,"1v",3m)},7m:C(6){E y.4H(6,2,"4i")},gq:C(6){E y.4H(6,2,"65")},f0:C(6){E y.2J(6,"4i")},cX:C(6){E y.2J(6,"65")},f4:C(6,i,3m){E y.2J(6,"4i",3m)},bJ:C(6,i,3m){E y.2J(6,"65",3m)},fp:C(6){E y.98(6.1v.1S,6)},cZ:C(6){E y.98(6.1S)},6V:C(6){E y.1g(6,"fF")?6.fP||6.fO.12:y.2P(6.47)}},C(J,fn){y.fn[J]=C(3m,P){G M=y.2Y(B,fn,3m);7(!d3.17(J)){P=3m}7(P&&1a P==="1R"){M=y.1u(P,M)}M=B.O>1?y.9j(M):M;7((B.O>1||d1.17(P))&&cU.17(J)){M=M.fN()}E B.3s(M,J,2k.1f(1F).4R(","))}});y.1Q({1u:C(1z,1C,2F){7(2F){1z=":2F("+1z+")"}E y.2y.4u(1z,1C)},2J:C(6,2J,3m){G 9b=[],1h=6[2J];23(1h&&1h.19!==9&&(3m===1d||1h.19!==1||!y(1h).67(3m))){7(1h.19===1){9b.1K(1h)}1h=1h[2J]}E 9b},4H:C(1h,2b,2J,6){2b=2b||1;G 3B=0;V(;1h;1h=1h[2J]){7(1h.19===1&&++3B===2b){2z}}E 1h},98:C(n,6){G r=[];V(;n;n=n.4i){7(n.19===1&&n!==6){r.1K(n)}}E r}});G 8t=/ y\\d+="(?:\\d+|U)"/g,6J=/^\\s+/,a0=/(<([\\w:]+)[^>]*?)\\/>/g,cQ=/^(?:8n|br|d7|cK|fE|fD|3O|9f|ft|6s)$/i,a4=/<([\\w:]+)/,bK=/<2A/i,bX=/<|&\\w+;/,8J=/3Q\\s*(?:[^=]|=\\s*.3Q.)/i,a3=C(2K,d6,5x){E cQ.17(5x)?2K:d6+"></"+5x+">"},34={44:[1,"<33 7D=\'7D\'>","</33>"],fr:[1,"<d5>","</d5>"],d8:[1,"<2f>","</2f>"],59:[2,"<2f><2A>","</2A></2f>"],4I:[3,"<2f><2A><59>","</59></2A></2f>"],d7:[2,"<2f><2A></2A><8m>","</8m></2f>"],8n:[1,"<2Y>","</2Y>"],4k:[0,"",""]};34.fe=34.44;34.2A=34.fy=34.8m=34.fz=34.d8;34.fB=34.4I;7(!y.1Y.da){34.4k=[1,"Y<Y>","</Y>"]}y.fn.1Q({1U:C(1U){7(y.1G(1U)){E B.1b(C(i){G 1s=y(B);1s.1U(1U.1f(B,i,1s.1U()))})}7(1a 1U!=="1P"&&1U!==1d){E B.5G().3U((B[0]&&B[0].1Z||12).6x(1U))}E y.5Z(B)},7d:C(1V){7(y.1G(1V)){E B.1b(C(i){y(B).7d(1V.1f(B,i))})}7(B[0]){G 46=y(1V,B[0].1Z).eq(0).6z(R);7(B[0].1v){46.3C(B[0])}46.2Y(C(){G 6=B;23(6.1S&&6.1S.19===1){6=6.1S}E 6}).3U(B)}E B},dd:C(1V){7(y.1G(1V)){E B.1b(C(i){y(B).dd(1V.1f(B,i))})}E B.1b(C(){G 1s=y(B),6V=1s.6V();7(6V.O){6V.7d(1V)}Q{1s.3U(1V)}})},46:C(1V){E B.1b(C(){y(B).7d(1V)})},fw:C(){E B.1M().1b(C(){7(!y.1g(B,"1i")){y(B).6D(B.47)}}).3o()},3U:C(){E B.5d(1F,R,C(6){7(B.19===1){B.3N(6)}})},c6:C(){E B.5d(1F,R,C(6){7(B.19===1){B.3C(6,B.1S)}})},7h:C(){7(B[0]&&B[0].1v){E B.5d(1F,14,C(6){B.1v.3C(6,B)})}Q 7(1F.O){G 1l=y(1F[0]);1l.1K.27(1l,B.7b());E B.3s(1l,"7h",1F)}},8q:C(){7(B[0]&&B[0].1v){E B.5d(1F,14,C(6){B.1v.3C(6,B.4i)})}Q 7(1F.O){G 1l=B.3s(B,"8q",1F);1l.1K.27(1l,y(1F[0]).7b());E 1l}},6z:C(1I){G M=B.2Y(C(){7(!y.1Y.8j&&!y.8p(B)){G 1V=B.fv,1Z=B.1Z;7(!1V){G Y=1Z.2x("Y");Y.3N(B.5k(R));1V=Y.3p}E y.ac([1V.1H(8t,"").1H(6J,"")],1Z)[0]}Q{E B.5k(R)}});7(1I===R){8y(B,M);8y(B.2y("*"),M.2y("*"))}E M},1V:C(N){7(N===1d){E B[0]&&B[0].19===1?B[0].3p.1H(8t,""):U}Q 7(1a N==="1R"&&!/<1x/i.17(N)&&(y.1Y.ak||!6J.17(N))&&!34[(a4.29(N)||["",""])[1].28()]){N=N.1H(a0,a3);2E{V(G i=0,l=B.O;i<l;i++){7(B[i].19===1){y.69(B[i].2N("*"));B[i].3p=N}}}2G(e){B.5G().3U(N)}}Q 7(y.1G(N)){B.1b(C(i){G 1s=y(B),26=1s.1V();1s.5G().3U(C(){E N.1f(B,i,26)})})}Q{B.5G().3U(N)}E B},6D:C(N){7(B[0]&&B[0].1v){7(!y.1G(N)){N=y(N).cT()}Q{E B.1b(C(i){G 1s=y(B),26=1s.1V();1s.6D(N.1f(B,i,26))})}E B.1b(C(){G 7m=B.4i,1M=B.1v;y(B).2p();7(7m){y(7m).7h(N)}Q{y(1M).3U(N)}})}Q{E B.3s(y(y.1G(N)?N():N),"6D",N)}},cT:C(P){E B.2p(P,R)},5d:C(1D,2f,1o){G 1q,2j,N=1D[0],4h=[];7(!y.1Y.7l&&1F.O===3&&1a N==="1R"&&8J.17(N)){E B.1b(C(){y(B).5d(1D,2f,1o,R)})}7(y.1G(N)){E B.1b(C(i){G 1s=y(B);1D[0]=N.1f(B,i,2f?1s.1V():1d);1s.5d(1D,2f,1o)})}7(B[0]){7(1D[0]&&1D[0].1v&&1D[0].1v.19===11){1q={2v:1D[0].1v}}Q{1q=8B(1D,B,4h)}2j=1q.2v.1S;7(2j){2f=2f&&y.1g(2j,"59");V(G i=0,l=B.O;i<l;i++){1o.1f(2f?2Z(B[i],2j):B[i],1q.5c||B.O>1||i>0?1q.2v.5k(R):1q.2v)}}7(4h){y.1b(4h,c1)}}E B;C 2Z(6,1h){E y.1g(6,"2f")?(6.2N("2A")[0]||6.3N(6.1Z.2x("2A"))):6}}});C 8y(2U,M){G i=0;M.1b(C(){7(B.1g!==(2U[i]&&2U[i].1g)){E}G 7j=y.I(2U[i++]),8D=y.I(B,7j),1I=7j&&7j.1I;7(1I){3q 8D.1L;8D.1I={};V(G H 1A 1I){V(G 1y 1A 1I[H]){y.L.2M(B,H,1I[H][1y],1I[H][1y].I)}}}})}C 8B(1D,6G,4h){G 2v,5c,5A,2e;7(1D.O===1&&1a 1D[0]==="1R"&&1D[0].O<fL&&1D[0].2r("<44")<0&&(y.1Y.7l||!8J.17(1D[0]))){5c=R;5A=y.8K[1D[0]];7(5A){7(5A!==1){2v=5A}}}7(!2v){2e=(6G&&6G[0]?6G[0].1Z||6G[0]:12);2v=2e.c9();y.ac(1D,2e,2v,4h)}7(5c){y.8K[1D[0]]=5A?2v:1}E{2v:2v,5c:5c}}y.8K={};y.1b({dh:"3U",fG:"c6",3C:"7h",fH:"8q",fI:"6D"},C(J,c7){y.fn[J]=C(P){G M=[],7c=y(P);V(G i=0,l=7c.O;i<l;i++){G 1C=(i>0?B.6z(R):B).54();y.fn[c7].27(y(7c[i]),1C);M=M.7V(1C)}E B.3s(M,J,7c.P)}});y.1b({2p:C(P,bY){7(!P||y.1u(P,[B]).O){7(!bY&&B.19===1){y.69(B.2N("*"));y.69([B])}7(B.1v){B.1v.3u(B)}}},5G:C(){7(B.19===1){y.69(B.2N("*"))}23(B.1S){B.3u(B.1S)}}},C(J,fn){y.fn[J]=C(){E B.1b(fn,1F)}});y.1Q({ac:C(1C,T,2v,4h){T=T||12;7(1a T.2x==="1d"){T=T.1Z||T[0]&&T[0].1Z||12}G M=[];y.1b(1C,C(i,6){7(1a 6==="5m"){6+=""}7(!6){E}7(1a 6==="1R"&&!bX.17(6)){6=T.6x(6)}Q 7(1a 6==="1R"){6=6.1H(a0,a3);G 5x=(a4.29(6)||["",""])[1].28(),46=34[5x]||34.4k,bM=46[0],Y=T.2x("Y");Y.3p=46[1]+6+46[2];23(bM--){Y=Y.an}7(!y.1Y.2A){G ao=bK.17(6),2A=5x==="2f"&&!ao?Y.1S&&Y.1S.47:46[1]==="<2f>"&&!ao?Y.47:[];V(G j=2A.O-1;j>=0;--j){7(y.1g(2A[j],"2A")&&!2A[j].47.O){2A[j].1v.3u(2A[j])}}}7(!y.1Y.ak&&6J.17(6)){Y.3C(T.6x(6J.29(6)[0]),Y.1S)}6=y.2P(Y.47)}7(6.19){M.1K(6)}Q{M=y.7p(M,6)}});7(2v){V(G i=0;M[i];i++){7(4h&&y.1g(M[i],"1x")&&(!M[i].H||M[i].H.28()==="1U/4S")){4h.1K(M[i].1v?M[i].1v.3u(M[i]):M[i])}Q{7(M[i].19===1){M.3S.27(M,[i+1,0].7V(y.2P(M[i].2N("1x"))))}2v.3N(M[i])}}}E M},69:C(1C){V(G i=0,6,1T;(6=1C[i])!=U;i++){y.L.2p(6);y.50(6)}}});G cw=/z-?4p|f6-?f7|2o|cB|f8-?30/i,9Y=/cF\\([^)]*\\)/,a7=/2o=([^)]*)/,7v=/9H/i,7M=/-([a-z])/f5,cd=/([A-Z])/g,ck=/^-?\\d+(?:5n)?$/i,cm=/^-?\\d/,cC={31:"7z",bQ:"2X",2c:"86"},ci=["bq","eZ"],cj=["bu","f1"],5I=12.37&&12.37.5I,7w=y.1Y.7y?"7y":"7w",7O=C(2K,cx){E cx.8c()};y.fn.2R=C(J,N){E 7t(B,J,N,R,C(6,J,N){7(N===1d){E y.2C(6,J)}7(1a N==="5m"&&!cw.17(J)){N+="5n"}y.18(6,J,N)})};y.1Q({18:C(6,J,N){7(!6||6.19===3||6.19===8){E 1d}7((J==="2O"||J==="30")&&2w(N)<0){N=1d}G 18=6.18||6,1l=N!==1d;7(!y.1Y.2o&&J==="2o"){7(1l){18.cB=1;G 2o=8T(N,10)+""==="fj"?"":"cF(2o="+N*a9+")";G 1u=18.1u||y.2C(6,"1u")||"";18.1u=9Y.17(1u)?1u.1H(9Y,2o):2o}E 18.1u&&18.1u.2r("2o=")>=0?(2w(a7.29(18.1u)[1])/a9)+"":""}7(7v.17(J)){J=7w}J=J.1H(7M,7O);7(1l){18[J]=N}E 18[J]},2R:C(6,J,5N,3I){7(J==="2O"||J==="30"){G 1j,3j=cC,4Y=J==="2O"?ci:cj;C ah(){1j=J==="2O"?6.7F:6.co;7(3I==="5J"){E}y.1b(4Y,C(){7(!3I){1j-=2w(y.2C(6,"75"+B,R))||0}7(3I==="4L"){1j+=2w(y.2C(6,"4L"+B,R))||0}Q{1j-=2w(y.2C(6,"5J"+B+"aQ",R))||0}})}7(6.7F!==0){ah()}Q{y.cn(6,3j,ah)}E 4x.58(0,4x.fd(1j))}E y.2C(6,J,5N)},2C:C(6,J,5N){G M,18=6.18,1u;7(!y.1Y.2o&&J==="2o"&&6.4C){M=a7.17(6.4C.1u||"")?(2w(5V.$1)/a9)+"":"";E M===""?"1":M}7(7v.17(J)){J=7w}7(!5N&&18&&18[J]){M=18[J]}Q 7(5I){7(7v.17(J)){J="9H"}J=J.1H(cd,"-$1").28();G 37=6.1Z.37;7(!37){E U}G 3D=37.5I(6,U);7(3D){M=3D.fc(J)}7(J==="2o"&&M===""){M="1"}}Q 7(6.4C){G 9N=J.1H(7M,7O);M=6.4C[J]||6.4C[9N];7(!ck.17(M)&&cm.17(M)){G 1m=18.1m,cp=6.9Q.1m;6.9Q.1m=6.4C.1m;18.1m=9N==="ff"?"fg":(M||0);M=18.fQ+"5n";18.1m=1m;6.9Q.1m=cp}}E M},cn:C(6,1e,1o){G 26={};V(G J 1A 1e){26[J]=6.18[J];6.18[J]=1e[J]}1o.1f(6);V(G J 1A 1e){6.18[J]=26[J]}}});7(y.1z&&y.1z.3H){y.1z.3H.2X=C(6){G 2O=6.7F,30=6.co,9S=6.1g.28()==="59";E 2O===0&&30===0&&!9S?R:2O>0&&30>0&&!9S?14:y.2C(6,"2c")==="4q"};y.1z.3H.bT=C(6){E!y.1z.3H.2X(6)}}G d2=2Q(),bV=/<1x(.|\\s)*?\\/1x>/gi,c8=/33|6n/i,ca=/c0|gu|gp|go|2X|gk|5m|6o|gj|gl|gm|1U|56|1n|gw/i,51=/=\\?(&|$)/,7I=/\\?/,cP=/(\\?|&)84=.*?(&|$)/,df=/^(\\w+:)?\\/\\/([^\\/?#]+)/,dk=/%20/g;y.fn.1Q({cb:y.fn.76,76:C(1n,48,1o){7(1a 1n!=="1R"){E B.cb(1n)}Q 7(!B.O){E B}G 6H=1n.2r(" ");7(6H>=0){G P=1n.2k(6H,1n.O);1n=1n.2k(0,6H)}G H="4X";7(48){7(y.1G(48)){1o=48;48=U}Q 7(1a 48==="1P"){48=y.6s(48,y.6r.4J);H="ae"}}G 1s=B;y.6a({1n:1n,H:H,36:"1V",I:48,2H:C(6F,2h){7(2h==="3i"||2h==="af"){1s.1V(P?y("<Y />").3U(6F.7U.1H(bV,"")).2y(P):6F.7U)}7(1o){1s.1b(1o,[6F.7U,2h,6F])}}});E B},gg:C(){E y.6s(B.bO())},bO:C(){E B.2Y(C(){E B.53?y.2P(B.53):B}).1u(C(){E B.J&&!B.71&&(B.3Q||c8.17(B.1g)||ca.17(B.H))}).2Y(C(i,6){G 1j=y(B).1j();E 1j==U?U:y.3f(1j)?y.2Y(1j,C(1j,i){E{J:6.J,N:1j}}):{J:6.J,N:1j}}).54()}});y.1b("dl 8h cr cg cq cv".3d(" "),C(i,o){y.fn[o]=C(f){E B.8a(o,f)}});y.1Q({54:C(1n,I,1o,H){7(y.1G(I)){H=H||1o;1o=I;I=U}E y.6a({H:"4X",1n:1n,I:I,3i:1o,36:H})},fY:C(1n,1o){E y.54(1n,U,1o,"1x")},fX:C(1n,I,1o){E y.54(1n,I,1o,"4U")},fT:C(1n,I,1o,H){7(y.1G(I)){H=H||1o;1o=I;I={}}E y.6a({H:"ae",1n:1n,I:I,3i:1o,36:H})},fS:C(db){y.1Q(y.6r,db)},6r:{1n:6c.3A,3F:R,H:"4X",9T:"8b/x-fW-3P-g4",cV:R,4W:R,1c:1B.9D&&(1B.6c.8x!=="7P:"||!1B.cS)?C(){E 3g 1B.9D()}:C(){2E{E 3g 1B.cS("ge.ga")}2G(e){}},7R:{4w:"8b/4w, 1U/4w",1V:"1U/1V",1x:"1U/4S, 8b/4S",4U:"8b/4U, 1U/4S",1U:"1U/g6",4k:"*/*"}},4N:{},4O:{},6a:C(5W){G s=y.1Q(R,{},y.6r,5W);G 35,2h,I,8e=5W&&5W.T||s,H=s.H.8c();7(s.I&&s.cV&&1a s.I!=="1R"){s.I=y.6s(s.I,s.4J)}7(s.36==="35"){7(H==="4X"){7(!51.17(s.1n)){s.1n+=(7I.17(s.1n)?"&":"?")+(s.35||"1o")+"=?"}}Q 7(!s.I||!51.17(s.I)){s.I=(s.I?s.I+"&":"")+(s.35||"1o")+"=?"}s.36="4U"}7(s.36==="4U"&&(s.I&&51.17(s.I)||51.17(s.1n))){35=s.g5||("35"+d2++);7(s.I){s.I=(s.I+"").1H(51,"="+35+"$1")}s.1n=s.1n.1H(51,"="+35+"$1");s.36="1x";1B[35]=1B[35]||C(6l){I=6l;3i();2H();1B[35]=1d;2E{3q 1B[35]}2G(e){}7(3e){3e.3u(1x)}}}7(s.36==="1x"&&s.2I===U){s.2I=14}7(s.2I===14&&H==="4X"){G 9R=2Q();G M=s.1n.1H(cP,"$g7="+9R+"$2");s.1n=M+((M===s.1n)?(7I.17(s.1n)?"&":"?")+"84="+9R:"")}7(s.I&&H==="4X"){s.1n+=(7I.17(s.1n)?"&":"?")+s.I}7(s.3F&&!y.88++){y.L.2q("dl")}G 1k=df.29(s.1n),9I=1k&&(1k[1]&&1k[1]!==6c.8x||1k[2]!==6c.g8);7(s.36==="1x"&&H==="4X"&&9I){G 3e=12.2N("3e")[0]||12.2i;G 1x=12.2x("1x");1x.2L=s.1n;7(s.cI){1x.dH=s.cI}7(!35){G 3Y=14;1x.9P=1x.3E=C(){7(!3Y&&(!B.5h||B.5h==="dI"||B.5h==="2H")){3Y=R;3i();2H();1x.9P=1x.3E=U;7(3e&&1x.1v){3e.3u(1x)}}}}3e.3C(1x,3e.1S);E 1d}G 5t=14;G 1c=s.1c();7(!1c){E}7(s.c4){1c.c5(H,s.1n,s.4W,s.c4,s.6o)}Q{1c.c5(H,s.1n,s.4W)}2E{7(s.I||5W&&5W.9T){1c.68("dE-dB",s.9T)}7(s.cG){7(y.4N[s.1n]){1c.68("bP-cz-dC",y.4N[s.1n])}7(y.4O[s.1n]){1c.68("bP-dT-dU",y.4O[s.1n])}}7(!9I){1c.68("X-dz-dQ","9D")}1c.68("dM",s.36&&s.7R[s.36]?s.7R[s.36]+", */*":s.7R.4k)}2G(e){}7(s.cy&&s.cy.1f(8e,1c,s)===14){7(s.3F&&!--y.88){y.L.2q("8h")}1c.5v();E 14}7(s.3F){2q("cv",[1c,s])}G 3E=1c.3E=C(6L){7(!1c||1c.5h===0||6L==="5v"){7(!5t){2H()}5t=R;7(1c){1c.3E=y.6y}}Q 7(!5t&&1c&&(1c.5h===4||6L==="5f")){5t=R;1c.3E=y.6y;2h=6L==="5f"?"5f":!y.cs(1c)?"2W":s.cG&&y.cA(1c,s.1n)?"af":"3i";G al;7(2h==="3i"){2E{I=y.bU(1c,s.36,s)}2G(cD){2h="8o";al=cD}}7(2h==="3i"||2h==="af"){7(!35){3i()}}Q{y.8i(s,1c,2h,al)}2H();7(6L==="5f"){1c.5v()}7(s.4W){1c=U}}};2E{G cu=1c.5v;1c.5v=C(){7(1c){cu.1f(1c)}3E("5v")}}2G(e){}7(s.4W&&s.5f>0){7N(C(){7(1c&&!5t){3E("5f")}},s.5f)}2E{1c.dy(H==="ae"||H==="dp"||H==="eX"?s.I:U)}2G(e){y.8i(s,1c,U,e);2H()}7(!s.4W){3E()}C 3i(){7(s.3i){s.3i.1f(8e,I,2h,1c)}7(s.3F){2q("cq",[1c,s])}}C 2H(){7(s.2H){s.2H.1f(8e,1c,2h)}7(s.3F){2q("cr",[1c,s])}7(s.3F&&!--y.88){y.L.2q("8h")}}C 2q(H,1D){(s.T?y(s.T):y.L).2q(H,1D)}E 1c},8i:C(s,1c,2h,e){7(s.2W){s.2W.1f(s.T||s,1c,2h,e)}7(s.3F){(s.T?y(s.T):y.L).2q("cg",[1c,s,e])}},88:0,cs:C(1c){2E{E!1c.2h&&6c.8x==="7P:"||(1c.2h>=ce&&1c.2h<eB)||1c.2h===bS||1c.2h===eA||1c.2h===0}2G(e){}E 14},cA:C(1c,1n){G 4N=1c.8s("eu-cz"),4O=1c.8s("dW");7(4N){y.4N[1n]=4N}7(4O){y.4O[1n]=4O}E 1c.2h===bS||1c.2h===0},bU:C(1c,H,s){G ct=1c.8s("eT-H")||"",4w=H==="4w"||!H&&ct.2r("4w")>=0,I=4w?1c.eS:1c.7U;7(4w&&I.2i.1g==="8o"){y.2W("8o")}7(s&&s.bZ){I=s.bZ(I,H)}7(1a I==="1R"){7(H==="4U"||!H&&ct.2r("4U")>=0){I=y.c3(I)}Q 7(H==="1x"||!H&&ct.2r("4S")>=0){y.9e(I)}}E I},6s:C(a,4J){G s=[];7(4J===1d){4J=y.6r.4J}7(y.3f(a)||a.6j){y.1b(a,C(){2M(B.J,B.N)})}Q{V(G 4A 1A a){7X(4A,a[4A])}}E s.4R("&").1H(dk,"+");C 7X(4A,25){7(y.3f(25)){y.1b(25,C(i,v){7(4J){2M(4A,v)}Q{7X(4A+"["+(1a v==="1P"||y.3f(v)?i:"")+"]",v)}})}Q 7(!4J&&25!=U&&1a 25==="1P"){y.1b(25,C(k,v){7X(4A+"["+k+"]",v)})}Q{2M(4A,25)}}C 2M(1X,N){N=y.1G(N)?N():N;s[s.O]=dg(1X)+"="+dg(N)}}});G 80={},cW=/5r|3b|38/,cY=/^([+-]=)?([\\d+-.]+)(.*)$/,6C,ab=[["30","72","e8","e9","e4"],["2O","90","e3","dj","dY"],["2o"]];y.fn.1Q({3b:C(2g,1o){7(2g||2g===0){E B.5R(5i("3b",3),2g,1o)}Q{V(G i=0,l=B.O;i<l;i++){G 26=y.I(B[i],"5T");B[i].18.2c=26||"";7(y.2R(B[i],"2c")==="4q"){G 1g=B[i].1g,2c;7(80[1g]){2c=80[1g]}Q{G 6=y("<"+1g+" />").dh("1i");2c=6.2R("2c");7(2c==="4q"){2c="86"}6.2p();80[1g]=2c}y.I(B[i],"5T",2c)}}V(G j=0,k=B.O;j<k;j++){B[j].18.2c=y.I(B[j],"5T")||""}E B}},38:C(2g,1o){7(2g||2g===0){E B.5R(5i("38",3),2g,1o)}Q{V(G i=0,l=B.O;i<l;i++){G 26=y.I(B[i],"5T");7(!26&&26!=="4q"){y.I(B[i],"5T",y.2R(B[i],"2c"))}}V(G j=0,k=B.O;j<k;j++){B[j].18.2c="4q"}E B}},cL:y.fn.5r,5r:C(fn,9l){G 9p=1a fn==="7S";7(y.1G(fn)&&y.1G(9l)){B.cL.27(B,1F)}Q 7(fn==U||9p){B.1b(C(){G 3K=9p?fn:y(B).67(":2X");y(B)[3K?"3b":"38"]()})}Q{B.5R(5i("5r",3),fn,9l)}E B},ec:C(2g,7u,1o){E B.1u(":2X").2R("2o",0).3b().3o().5R({2o:7u},2g,1o)},5R:C(1p,2g,3c,1o){G 7H=y.2g(2g,3c,1o);7(y.9n(1p)){E B.1b(7H.2H)}E B[7H.2D===14?"1b":"2D"](C(){G 2s=y.1Q({},7H),p,2X=B.19===1&&y(B).67(":2X"),1s=B;V(p 1A 1p){G J=p.1H(7M,7O);7(p!==J){1p[J]=1p[p];3q 1p[p];p=J}7(1p[p]==="38"&&2X||1p[p]==="3b"&&!2X){E 2s.2H.1f(B)}7((p==="30"||p==="2O")&&B.18){2s.2c=y.2R(B,"2c");2s.4y=B.18.4y}7(y.3f(1p[p])){(2s.60=2s.60||{})[p]=1p[p][1];1p[p]=1p[p][0]}}7(2s.4y!=U){B.18.4y="2X"}2s.6S=y.1Q({},1p);y.1b(1p,C(J,1j){G e=3g y.fx(1s,2s,J);7(cW.17(1j)){e[1j==="5r"?2X?"3b":"38":1j](1p)}Q{G 1k=cY.29(1j),3w=e.1h(R)||0;7(1k){G 3o=2w(1k[2]),3M=1k[3]||"5n";7(3M!=="5n"){1s.18[J]=(3o||1)+3M;3w=((3o||1)/e.1h(R))*3w;1s.18[J]=3w+3M}7(1k[1]){3o=((1k[1]==="-="?-1:1)*3o)+3w}e.6m(3w,3o,3M)}Q{e.6m(3w,1j,"")}}});E R})},62:C(94,5o){G 2V=y.2V;7(94){B.2D([])}B.1b(C(){V(G i=2V.O-1;i>=0;i--){7(2V[i].6===B){7(5o){2V[i](R)}2V.3S(i,1)}}});7(!5o){B.4K()}E B}});y.1b({ep:5i("3b",1),er:5i("38",1),ek:5i("5r",1),ej:{2o:"3b"},ee:{2o:"38"}},C(J,3j){y.fn[J]=C(2g,1o){E B.5R(3j,2g,1o)}});y.1Q({2g:C(2g,3c,fn){G 2s=2g&&1a 2g==="1P"?2g:{2H:fn||!fn&&3c||y.1G(2g)&&2g,4F:2g,3c:fn&&3c||3c&&!y.1G(3c)&&3c};2s.4F=y.fx.6H?0:1a 2s.4F==="5m"?2s.4F:y.fx.82[2s.4F]||y.fx.82.4k;2s.26=2s.2H;2s.2H=C(){7(2s.2D!==14){y(B).4K()}7(y.1G(2s.26)){2s.26.1f(B)}};E 2s},3c:{d0:C(p,n,85,4B){E 85+4B*p},8R:C(p,n,85,4B){E((-4x.ef(p*4x.eg)/2)+0.5)*4B+85}},2V:[],fx:C(6,1e,1p){B.1e=1e;B.6=6;B.1p=1p;7(!1e.2U){1e.2U={}}}});y.fx.2T={8L:C(){7(B.1e.5b){B.1e.5b.1f(B.6,B.2Q,B)}(y.fx.5b[B.1p]||y.fx.5b.4k)(B);7((B.1p==="30"||B.1p==="2O")&&B.6.18){B.6.18.2c="86"}},1h:C(5N){7(B.6[B.1p]!=U&&(!B.6.18||B.6.18[B.1p]==U)){E B.6[B.1p]}G r=2w(y.2R(B.6,B.1p,5N));E r&&r>-ei?r:2w(y.2C(B.6,B.1p))||0},6m:C(dc,7u,3M){B.8M=2Q();B.3w=dc;B.3o=7u;B.3M=3M||B.3M||"5n";B.2Q=B.3w;B.5q=B.3K=0;G 1s=B;C t(5o){E 1s.5b(5o)}t.6=B.6;7(t()&&y.2V.1K(t)&&!6C){6C=6A(y.fx.cH,13)}},3b:C(){B.1e.2U[B.1p]=y.18(B.6,B.1p);B.1e.3b=R;B.6m(B.1p==="2O"||B.1p==="30"?1:0,B.1h());y(B.6).3b()},38:C(){B.1e.2U[B.1p]=y.18(B.6,B.1p);B.1e.38=R;B.6m(B.1h(),0)},5b:C(5o){G t=2Q(),3Y=R;7(5o||t>=B.1e.4F+B.8M){B.2Q=B.3o;B.5q=B.3K=1;B.8L();B.1e.6S[B.1p]=R;V(G i 1A B.1e.6S){7(B.1e.6S[i]!==R){3Y=14}}7(3Y){7(B.1e.2c!=U){B.6.18.4y=B.1e.4y;G 26=y.I(B.6,"5T");B.6.18.2c=26?26:B.1e.2c;7(y.2R(B.6,"2c")==="4q"){B.6.18.2c="86"}}7(B.1e.38){y(B.6).38()}7(B.1e.38||B.1e.3b){V(G p 1A B.1e.6S){y.18(B.6,p,B.1e.2U[p])}}B.1e.2H.1f(B.6)}E 14}Q{G n=t-B.8M;B.3K=n/B.1e.4F;G 60=B.1e.60&&B.1e.60[B.1p];G cM=B.1e.3c||(y.3c.8R?"8R":"d0");B.5q=y.3c[60||cM](B.3K,n,0,1,B.1e.4F);B.2Q=B.3w+((B.3o-B.3w)*B.5q);B.8L()}E R}};y.1Q(y.fx,{cH:C(){G 2V=y.2V;V(G i=0;i<2V.O;i++){7(!2V[i]()){2V.3S(i--,1)}}7(!2V.O){y.fx.62()}},62:C(){e5(6C);6C=U},82:{ev:eH,eG:ce,4k:eC},5b:{2o:C(fx){y.18(fx.6,"2o",fx.2Q)},4k:C(fx){7(fx.6.18&&fx.6.18[fx.1p]!=U){fx.6.18[fx.1p]=(fx.1p==="2O"||fx.1p==="30"?4x.58(0,fx.2Q):fx.2Q)+fx.3M}Q{fx.6[fx.1p]=fx.2Q}}}});7(y.1z&&y.1z.3H){y.1z.3H.eD=C(6){E y.5Y(y.2V,C(fn){E 6===fn.6}).O}}C 5i(H,3B){G 25={};y.1b(ab.7V.27([],ab.2k(0,3B)),C(){25[B]=H});E 25}7("de"1A 12.2i){y.fn.22=C(1e){G 6=B[0];7(1e){E B.1b(C(i){y.22.8S(B,1e,i)})}7(!6||!6.1Z){E U}7(6===6.1Z.1i){E y.22.9i(6)}G 9V=6.de(),2e=6.1Z,1i=2e.1i,4l=2e.2i,5Q=4l.5Q||1i.5Q||0,5K=4l.5K||1i.5K||0,1O=9V.1O+(1s.b3||y.1Y.5B&&4l.4z||1i.4z)-5Q,1m=9V.1m+(1s.8w||y.1Y.5B&&4l.4v||1i.4v)-5K;E{1O:1O,1m:1m}}}Q{y.fn.22=C(1e){G 6=B[0];7(1e){E B.1b(C(i){y.22.8S(B,1e,i)})}7(!6||!6.1Z){E U}7(6===6.1Z.1i){E y.22.9i(6)}y.22.7o();G 2l=6.2l,bW=6,2e=6.1Z,3D,4l=2e.2i,1i=2e.1i,37=2e.37,5O=37?37.5I(6,U):6.4C,1O=6.3T,1m=6.7a;23((6=6.1v)&&6!==1i&&6!==4l){7(y.22.8v&&5O.31==="a8"){2z}3D=37?37.5I(6,U):6.4C;1O-=6.4z;1m-=6.4v;7(6===2l){1O+=6.3T;1m+=6.7a;7(y.22.bL&&!(y.22.bN&&/^t(gh|d|h)$/i.17(6.1g))){1O+=2w(3D.93)||0;1m+=2w(3D.8Q)||0}bW=2l,2l=6.2l}7(y.22.c2&&3D.4y!=="bT"){1O+=2w(3D.93)||0;1m+=2w(3D.8Q)||0}5O=3D}7(5O.31==="3V"||5O.31==="9r"){1O+=1i.3T;1m+=1i.7a}7(y.22.8v&&5O.31==="a8"){1O+=4x.58(4l.4z,1i.4z);1m+=4x.58(4l.4v,1i.4v)}E{1O:1O,1m:1m}}}y.22={7o:C(){G 1i=12.1i,4T=12.2x("Y"),4P,3z,2f,4I,di=2w(y.2C(1i,"72",R))||0,1V="<Y 18=\'31:7z;1O:0;1m:0;4L:0;5J:cf cE #cc;75:0;2O:5g;30:5g;\'><Y></Y></Y><2f 18=\'31:7z;1O:0;1m:0;4L:0;5J:cf cE #cc;75:0;2O:5g;30:5g;\' fo=\'0\' bR=\'0\'><59><4I></4I></59></2f>";y.1Q(4T.18,{31:"7z",1O:0,1m:0,4L:0,5J:0,2O:"5g",30:"5g",bQ:"2X"});4T.3p=1V;1i.3C(4T,1i.1S);4P=4T.1S;3z=4P.1S;4I=4P.4i.1S.1S;B.bL=(3z.3T!==5);B.bN=(4I.3T===5);3z.18.31="a8",3z.18.1O="fK";B.8v=(3z.3T===20||3z.3T===15);3z.18.31=3z.18.1O="";4P.18.4y="2X",4P.18.31="3V";B.c2=(3z.3T===-5);B.cJ=(1i.3T!==di);1i.3u(4T);1i=4T=4P=3z=2f=4I=U;y.22.7o=y.6y},9i:C(1i){G 1O=1i.3T,1m=1i.7a;y.22.7o();7(y.22.cJ){1O+=2w(y.2C(1i,"72",R))||0;1m+=2w(y.2C(1i,"90",R))||0}E{1O:1O,1m:1m}},8S:C(6,1e,i){7(/9r/.17(y.2C(6,"31"))){6.18.31="3V"}G 92=y(6),7i=92.22(),dm=8T(y.2C(6,"1O",R),10)||0,d9=8T(y.2C(6,"1m",R),10)||0;7(y.1G(1e)){1e=1e.1f(6,i,7i)}G 3j={1O:(1e.1O-7i.1O)+dm,1m:(1e.1m-7i.1m)+d9};7("cR"1A 1e){1e.cR.1f(6,3j)}Q{92.2R(3j)}}};y.fn.1Q({31:C(){7(!B[0]){E U}G 6=B[0],2l=B.2l(),22=B.22(),6B=/^1i|1V$/i.17(2l[0].1g)?{1O:0,1m:0}:2l.22();22.1O-=2w(y.2C(6,"72",R))||0;22.1m-=2w(y.2C(6,"90",R))||0;6B.1O+=2w(y.2C(2l[0],"93",R))||0;6B.1m+=2w(y.2C(2l[0],"8Q",R))||0;E{1O:22.1O-6B.1O,1m:22.1m-6B.1m}},2l:C(){E B.2Y(C(){G 2l=B.2l||12.1i;23(2l&&(!/^1i|1V$/i.17(2l.1g)&&y.2R(2l,"31")==="9r")){2l=2l.2l}E 2l})}});y.1b(["bq","bu"],C(i,J){G 5U="7Y"+J;y.fn[5U]=C(1j){G 6=B[0],3k;7(!6){E U}7(1j!==1d){E B.1b(C(){3k=9z(B);7(3k){3k.ad(!i?1j:y(3k).4v(),i?1j:y(3k).4z())}Q{B[5U]=1j}})}Q{3k=9z(6);E 3k?("8w"1A 3k)?3k[i?"b3":"8w"]:y.1Y.5B&&3k.12.2i[5U]||3k.12.1i[5U]:6[5U]}}});C 9z(6){E("ad"1A 6&&6.12)?6:6.19===9?6.37||6.f3:14}y.1b(["fa","aQ"],C(i,J){G H=J.28();y.fn["fR"+J]=C(){E B[0]?y.2R(B[0],H,14,"75"):U};y.fn["gr"+J]=C(4L){E B[0]?y.2R(B[0],H,14,4L?"4L":"5J"):U};y.fn[H]=C(4j){G 6=B[0];7(!6){E 4j==U?U:B}7(y.1G(4j)){E B.1b(C(i){G 1s=y(B);1s[H](4j.1f(B,i,1s[H]()))})}E("ad"1A 6&&6.12)?6.12.gf==="dG"&&6.12.2i["8H"+J]||6.12.1i["8H"+J]:(6.19===9)?4x.58(6.2i["8H"+J],6.1i["7Y"+J],6.2i["7Y"+J],6.1i["22"+J],6.2i["22"+J]):4j===1d?y.2R(6,H):B.2R(H,1a 4j==="1R"?4j:4j+"5n")}});1B.y=1B.$=y})(1B);',62,1028,'||||||elem|if|||||||||||||||||||||||||||jQuery|||this|function||return||var|type|data|name|match|event|ret|value|length|selector|else|true||context|null|for|||div||||document||false|||test|style|nodeType|typeof|each|xhr|undefined|options|call|nodeName|cur|body|val|parts|set|left|url|callback|prop|results|checkSet|self|Expr|filter|parentNode|target|script|handler|expr|in|window|elems|args|array|arguments|isFunction|replace|events|Sizzle|push|handle|parent|className|top|object|extend|string|firstChild|id|text|html|part|key|support|ownerDocument||guid|offset|while|namespaces|obj|old|apply|toLowerCase|exec|proxy|result|display|isXML|doc|table|speed|status|documentElement|first|slice|offsetParent|special||opacity|remove|trigger|indexOf|opt|node|types|fragment|parseFloat|createElement|find|break|tbody|live|curCSS|queue|try|not|catch|complete|cache|dir|all|src|add|getElementsByTagName|width|makeArray|now|css|curLoop|prototype|orig|timers|error|hidden|map|root|height|position||select|wrapMap|jsonp|dataType|defaultView|hide|doneName|getAttribute|show|easing|split|head|isArray|new|selectors|success|props|win|ready|until|button|end|innerHTML|delete|thisCache|pushStack|check|removeChild|expando|start|attr|inplace|checkDiv|href|num|insertBefore|computedStyle|onreadystatechange|global|qualifier|filters|extra|on|state|attachEvent|unit|appendChild|input|form|checked|copy|splice|offsetTop|append|relative|modifiedHandler|Array|done|fix|handlers|classNames|DOMContentLoaded|class|option|ID|wrap|childNodes|params|hasDuplicate|toString|addEventListener|click|shift|pop|radio|one|scripts|nextSibling|size|_default|docElem|pass|ua|last|index|none|contains|inArray|submit|matches|scrollLeft|xml|Math|overflow|scrollTop|prefix|diff|currentStyle|setup|seed|duration|browser|nth|td|traditional|dequeue|margin|preventDefault|lastModified|etag|innerDiv|selected|join|javascript|container|json|checkbox|async|GET|which|sort|removeData|jsre|stopPropagation|elements|get||time|Event|max|tr|isPartStr|step|cacheable|domManip|anyFound|timeout|1px|readyState|genFx|selectedIndex|cloneNode|getAttributeNode|number|px|gotoEnd|POS|pos|toggle|compareDocumentPosition|requestDone|u00c0|abort|found|tag|uFFFF|getElementById|cacheresults|boxModel|checkFn|values|TAG|sizcache|empty|nodeCheck|getComputedStyle|border|clientLeft|originalEvent|teardown|force|prevComputedStyle|deep|clientTop|animate|keyCode|olddisplay|method|RegExp|origSettings|readyList|grep|getText|specialEasing|sourceIndex|stop|eventName|sortOrder|previousSibling|second|is|setRequestHeader|cleanData|ajax|notxml|location|getElementsByClassName|related|item|noData|mouseenter|CLASS|jquery|keep|tmp|custom|textarea|password|change|lastToggle|ajaxSettings|param|contextXML|relatedTarget|closest|charCode|createTextNode|noop|clone|setInterval|parentOffset|timerId|replaceWith|rootjQuery|res|nodes|off|changeFilters|rleadingWhitespace|thisObject|isTimeout|mouseleave|PSEUDO|isReady|stateVal|currentTarget|focusout|curAnim|browserMatch|hasOwnProperty|contents|unbind|removeEventListener|formElems|testChange|oldSizzle|disabled|marginTop|substr|source|padding|load|leftMatch|order|CHILD|offsetLeft|toArray|insert|wrapAll|msg|attrHandle|bRange|before|curOffset|oldData|chunker|checkClone|next|nodeValue|initialize|merge|even|case|attrFn|access|to|rfloat|styleFloat|Object|cssFloat|absolute|querySelectorAll|sizset|aRange|multiple|odd|offsetWidth|triggerHandler|optall|rquery|fromElement|rspace|attributeNode|rdashAlpha|setTimeout|fcamelCase|file|detachEvent|accepts|boolean|eventHandle|responseText|concat|isSupported|buildParams|scroll|namespace|elemdisplay|version|speeds|JSON|_|firstNum|block|isPlainObject|active|returnTrue|bind|application|toUpperCase|returnFalse|callbackContext|specialSubmit|isPartStrNotTag|ajaxStop|handleError|noCloneEvent|windowData|eventSupported|colgroup|area|parsererror|isXMLDoc|after|image|getResponseHeader|rinlinejQuery|preFilter|supportsFixedPosition|pageXOffset|protocol|cloneCopyEvent|attrMap|addClass|buildFragment|NAME|curData|rclass|inprogress|removeAttribute|client|unshift|rchecked|fragments|update|startTime|uniqueSort|tmpSet|later|borderLeftWidth|swing|setOffset|parseInt|filtered|posProcess|constructor|dirCheck|dirNodeCheck|init|marginLeft|readyBound|curElem|borderTopWidth|clearQueue|toplevel|targets|winnow|sibling|doScrollCheck||matched|isTag|ATTR|globalEval|link|scriptEval|nodeIndex|bodyOffset|unique|prevObject|fn2|isObj|isEmptyObject|isDisconnected|bool|userAgent|static|createRange|onclick|removeClass|focus|metaKey|triggered|prune|getWindow|blur|baseHasDuplicate|ctrlKey|XMLHttpRequest|bindReady|continue|query|float|remote|soFar|fnOver|keypress|liveHandler|camelCase|beforeFilter|onload|runtimeStyle|ts|skip|contentType|liveConvert|box|clientX|pageX|ralpha|onbeforeunload|rxhtmlTag|withinElement|_change_data|fcloseTag|rtagName|getVal|focusin|ropacity|fixed|100|rradiocheck|fxAttrs|clean|scrollTo|POST|notmodified|isDefaultPrevented|getWH|isPropagationStopped|isImmediatePropagationStopped|leadingWhitespace|errMsg|delegate|lastChild|hasBody|tabIndex|setEnd|inv|toElement|rtrim|setStart|srcElement|clientY|setArray|_jQuery|specialChange|submitBubbles|rsingleTag|u00A0|quickExpr|readOnly|TEST|parse|getTime|altLive|rnotwhite|hover|fnOut|arg|Function|pageY|Date|Width|toggleClass|setAttribute|cssText|rclickable|rfocusable|hrefNormalized|nm|origContext|uuid|emptyObject|frameElement|isXMLFilter|pageYOffset|isBool|optSelected|hasClass|checkOn|rspecialurl|htmlFor|__className__|rtype|specified|throw||getElementsByName|changeBubbles|reset|fcleanup|unload|doScroll|rreturn|mouseover|red|exclusive|webkit|Left||origPOS|setFilters|Top|mouseout|isClick|unrecognized|expression|Syntax|textContent|lt|cleaned|bubbling|count|keydown|fireEvent|only|uaMatch|prevUntil|rtbody|doesNotAddBorder|depth|doesAddBorderForTableAndCells|serializeArray|If|visibility|cellspacing|304|visible|httpData|rscript|prevOffsetParent|rhtml|keepData|dataFilter|color|evalScript|subtractsBorderForOverflowNotVisible|parseJSON|username|open|prepend|original|rselectTextarea|createDocumentFragment|rinput|_load|000|rupper|200|5px|ajaxError||cssWidth|cssHeight|rnumpx||rnum|swap|offsetHeight|rsLeft|ajaxSuccess|ajaxComplete|httpSuccess||oldAbort|ajaxSend|rexclude|letter|beforeSend|Modified|httpNotModified|zoom|cssShow|err|solid|alpha|ifModified|tick|scriptCharset|doesNotIncludeMarginInBodyOffset|embed|_toggle|defaultEasing|has|isSimple|rts|rselfClosing|using|ActiveXObject|detach|rparentsprev|processData|rfxtypes|prevAll|rfxnum|children|linear|rmultiselector|jsc|runtil|parents|fieldset|front|col|thead|curLeft|htmlSerialize|settings|from|wrapInner|getBoundingClientRect|rurl|encodeURIComponent|appendTo|bodyMarginTop|paddingLeft|r20|ajaxStart|curTop||originalTarget|PUT|prevValue|screenX|changed|offsetY|relatedNode|can|screenY|property|send|Requested|attrName|Type|Since|bubbles|Content|attrChange|CSS1Compat|charset|loaded|altKey|charAt|cancelable|Accept|layerX|layerY|newValue|With|eventPhase|detail|None|Match|offsetX|Etag|rv|paddingRight|mozilla|compatible|opera|msie|marginRight|paddingBottom|clearInterval|readonly|radiotest|marginBottom|paddingTop|safari|trim|fadeTo|noConflict|fadeOut|cos|PI|navigator|10000|fadeIn|slideToggle||bfnrt|Invalid|isPrototypeOf|slideDown||slideUp|maxlength|maxLength|Last|slow|substring|removeAttr|shiftKey|delay|1223|300|400|animated||attributes|fast|600|setData|getData|colSpan|tabindex|colspan|rowSpan|cellSpacing|rowspan|usemap|useMap|responseXML|content|applet|frameBorder|frameborder|DELETE|timeStamp|Right|nextAll|Bottom|onunload|parentWindow|nextUntil|ig|font|weight|line|view|Height|keyup|getPropertyValue|round|optgroup|fontSize|1em|resize|dblclick|NaN|mousemove|mouseup|mousedown||cellpadding|siblings|header|legend|switch|meta|enabled|outerHTML|unwrap||tfoot|caption||th|innerText|img|hr|iframe|prependTo|insertAfter|replaceAll|child|20px|512|0n|reverse|contentWindow|contentDocument|pixelLeft|inner|ajaxSetup|post|stopImmediatePropagation|cancelBubble|www|getJSON|getScript|beforeactivate|Until|createComment|HTML|returnValue|urlencoded|jsonpCallback|plain|1_|host|wheelDelta|XMLHTTP|1E8|beforeunload|liveProxy|Microsoft|compatMode|serialize|able||range|month|search|tel|parentsUntil|email|datetime|prev|outer|die||date|compareBoundaryPoints|week|andSelf|Range|START_TO_END'.split('|'),0,{}))
diff --git a/template-common/lib/ui/effects.blind.js b/template-common/lib/ui/effects.blind.js
index 269fe30d6..62d86ef14 100644
--- a/template-common/lib/ui/effects.blind.js
+++ b/template-common/lib/ui/effects.blind.js
@@ -1,10 +1,10 @@
/*
- * jQuery UI Effects Blind
+ * jQuery UI Effects Blind 1.7.2
*
- * Copyright (c) 2008 Aaron Eisenberger (aaronchi@gmail.com)
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
- *
+ *
* http://docs.jquery.com/UI/Effects/Blind
*
* Depends:
@@ -18,22 +18,22 @@ $.effects.blind = function(o) {
// Create element
var el = $(this), props = ['position','top','left'];
-
+
// Set options
var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
var direction = o.options.direction || 'vertical'; // Default direction
-
+
// Adjust
$.effects.save(el, props); el.show(); // Save & Show
var wrapper = $.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper
var ref = (direction == 'vertical') ? 'height' : 'width';
var distance = (direction == 'vertical') ? wrapper.height() : wrapper.width();
if(mode == 'show') wrapper.css(ref, 0); // Shift
-
+
// Animation
var animation = {};
animation[ref] = mode == 'show' ? distance : 0;
-
+
// Animate
wrapper.animate(animation, o.duration, o.options.easing, function() {
if(mode == 'hide') el.hide(); // Hide
@@ -41,9 +41,9 @@ $.effects.blind = function(o) {
if(o.callback) o.callback.apply(el[0], arguments); // Callback
el.dequeue();
});
-
+
});
-
+
};
})(jQuery);
diff --git a/template-common/lib/ui/effects.bounce.js b/template-common/lib/ui/effects.bounce.js
index 4bb489d7f..646133261 100644
--- a/template-common/lib/ui/effects.bounce.js
+++ b/template-common/lib/ui/effects.bounce.js
@@ -1,10 +1,10 @@
/*
- * jQuery UI Effects Bounce
+ * jQuery UI Effects Bounce 1.7.2
*
- * Copyright (c) 2008 Aaron Eisenberger (aaronchi@gmail.com)
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
- *
+ *
* http://docs.jquery.com/UI/Effects/Bounce
*
* Depends:
@@ -36,7 +36,7 @@ $.effects.bounce = function(o) {
if (mode == 'show') el.css('opacity', 0).css(ref, motion == 'pos' ? -distance : distance); // Shift
if (mode == 'hide') distance = distance / (times * 2);
if (mode != 'hide') times--;
-
+
// Animate
if (mode == 'show') { // Show Bounce
var animation = {opacity: 1};
@@ -72,7 +72,7 @@ $.effects.bounce = function(o) {
el.queue('fx', function() { el.dequeue(); });
el.dequeue();
});
-
+
};
})(jQuery);
diff --git a/template-common/lib/ui/effects.clip.js b/template-common/lib/ui/effects.clip.js
index 21f90f3f2..1775f8359 100644
--- a/template-common/lib/ui/effects.clip.js
+++ b/template-common/lib/ui/effects.clip.js
@@ -1,10 +1,10 @@
/*
- * jQuery UI Effects Clip
+ * jQuery UI Effects Clip 1.7.2
*
- * Copyright (c) 2008 Aaron Eisenberger (aaronchi@gmail.com)
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
- *
+ *
* http://docs.jquery.com/UI/Effects/Clip
*
* Depends:
@@ -18,11 +18,11 @@ $.effects.clip = function(o) {
// Create element
var el = $(this), props = ['position','top','left','height','width'];
-
+
// Set options
var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
var direction = o.options.direction || 'vertical'; // Default direction
-
+
// Adjust
$.effects.save(el, props); el.show(); // Save & Show
var wrapper = $.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper
@@ -33,22 +33,22 @@ $.effects.clip = function(o) {
};
var distance = (direction == 'vertical') ? animate.height() : animate.width();
if(mode == 'show') { animate.css(ref.size, 0); animate.css(ref.position, distance / 2); } // Shift
-
+
// Animation
var animation = {};
animation[ref.size] = mode == 'show' ? distance : 0;
animation[ref.position] = mode == 'show' ? 0 : distance / 2;
-
+
// Animate
animate.animate(animation, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() {
if(mode == 'hide') el.hide(); // Hide
$.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
if(o.callback) o.callback.apply(el[0], arguments); // Callback
el.dequeue();
- }});
-
+ }});
+
});
-
+
};
})(jQuery);
diff --git a/template-common/lib/ui/effects.core.js b/template-common/lib/ui/effects.core.js
index c00a89d77..efd0d50b0 100644
--- a/template-common/lib/ui/effects.core.js
+++ b/template-common/lib/ui/effects.core.js
@@ -1,31 +1,36 @@
-/*
- * jQuery UI Effects 1.5.3
+/*
+ * jQuery UI Effects 1.7.2
*
- * Copyright (c) 2008 Aaron Eisenberger (aaronchi@gmail.com)
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
- *
+ *
* http://docs.jquery.com/UI/Effects/
*/
-;(function($) {
+;jQuery.effects || (function($) {
-$.effects = $.effects || {}; //Add the 'effects' scope
+$.effects = {
+ version: "1.7.2",
-$.extend($.effects, {
- save: function(el, set) {
- for(var i=0;i<set.length;i++) {
- if(set[i] !== null) $.data(el[0], "ec.storage."+set[i], el[0].style[set[i]]);
+ // Saves a set of properties in a data storage
+ save: function(element, set) {
+ for(var i=0; i < set.length; i++) {
+ if(set[i] !== null) element.data("ec.storage."+set[i], element[0].style[set[i]]);
}
},
- restore: function(el, set) {
- for(var i=0;i<set.length;i++) {
- if(set[i] !== null) el.css(set[i], $.data(el[0], "ec.storage."+set[i]));
+
+ // Restores a set of previously saved properties from a data storage
+ restore: function(element, set) {
+ for(var i=0; i < set.length; i++) {
+ if(set[i] !== null) element.css(set[i], element.data("ec.storage."+set[i]));
}
},
+
setMode: function(el, mode) {
if (mode == 'toggle') mode = el.is(':hidden') ? 'show' : 'hide'; // Set for toggle
return mode;
},
+
getBaseline: function(origin, original) { // Translates a [top,left] array into a baseline value
// this should be a little more flexible in the future to handle a string & hash
var y, x;
@@ -43,41 +48,54 @@ $.extend($.effects, {
};
return {x: x, y: y};
},
- createWrapper: function(el) {
- if (el.parent().attr('id') == 'fxWrapper')
- return el;
- var props = {width: el.outerWidth({margin:true}), height: el.outerHeight({margin:true}), 'float': el.css('float')};
- el.wrap('<div id="fxWrapper" style="font-size:100%;background:transparent;border:none;margin:0;padding:0"></div>');
- var wrapper = el.parent();
- if (el.css('position') == 'static'){
- wrapper.css({position: 'relative'});
- el.css({position: 'relative'});
+
+ // Wraps the element around a wrapper that copies position properties
+ createWrapper: function(element) {
+
+ //if the element is already wrapped, return it
+ if (element.parent().is('.ui-effects-wrapper'))
+ return element.parent();
+
+ //Cache width,height and float properties of the element, and create a wrapper around it
+ var props = { width: element.outerWidth(true), height: element.outerHeight(true), 'float': element.css('float') };
+ element.wrap('<div class="ui-effects-wrapper" style="font-size:100%;background:transparent;border:none;margin:0;padding:0"></div>');
+ var wrapper = element.parent();
+
+ //Transfer the positioning of the element to the wrapper
+ if (element.css('position') == 'static') {
+ wrapper.css({ position: 'relative' });
+ element.css({ position: 'relative'} );
} else {
- var top = el.css('top'); if(isNaN(parseInt(top))) top = 'auto';
- var left = el.css('left'); if(isNaN(parseInt(left))) left = 'auto';
- wrapper.css({ position: el.css('position'), top: top, left: left, zIndex: el.css('z-index') }).show();
- el.css({position: 'relative', top:0, left:0});
+ var top = element.css('top'); if(isNaN(parseInt(top,10))) top = 'auto';
+ var left = element.css('left'); if(isNaN(parseInt(left,10))) left = 'auto';
+ wrapper.css({ position: element.css('position'), top: top, left: left, zIndex: element.css('z-index') }).show();
+ element.css({position: 'relative', top: 0, left: 0 });
}
+
wrapper.css(props);
return wrapper;
},
- removeWrapper: function(el) {
- if (el.parent().attr('id') == 'fxWrapper')
- return el.parent().replaceWith(el);
- return el;
+
+ removeWrapper: function(element) {
+ if (element.parent().is('.ui-effects-wrapper'))
+ return element.parent().replaceWith(element);
+ return element;
},
- setTransition: function(el, list, factor, val) {
- val = val || {};
- $.each(list,function(i, x){
- unit = el.cssUnit(x);
- if (unit[0] > 0) val[x] = unit[0] * factor + unit[1];
+
+ setTransition: function(element, list, factor, value) {
+ value = value || {};
+ $.each(list, function(i, x){
+ unit = element.cssUnit(x);
+ if (unit[0] > 0) value[x] = unit[0] * factor + unit[1];
});
- return val;
+ return value;
},
+
+ //Base function to animate from one class to another in a seamless transition
animateClass: function(value, duration, easing, callback) {
var cb = (typeof easing == "function" ? easing : (callback ? callback : null));
- var ea = (typeof easing == "object" ? easing : null);
+ var ea = (typeof easing == "string" ? easing : null);
return this.each(function() {
@@ -110,10 +128,23 @@ $.extend($.effects, {
});
}
-});
+};
+
+
+function _normalizeArguments(a, m) {
+
+ var o = a[1] && a[1].constructor == Object ? a[1] : {}; if(m) o.mode = m;
+ var speed = a[1] && a[1].constructor != Object ? a[1] : (o.duration ? o.duration : a[2]); //either comes from options.duration or the secon/third argument
+ speed = $.fx.off ? 0 : typeof speed === "number" ? speed : $.fx.speeds[speed] || $.fx.speeds._default;
+ var callback = o.callback || ( $.isFunction(a[1]) && a[1] ) || ( $.isFunction(a[2]) && a[2] ) || ( $.isFunction(a[3]) && a[3] );
+
+ return [a[0], o, speed, callback];
+
+}
//Extend the methods of jQuery
$.fn.extend({
+
//Save old methods
_show: $.fn.show,
_hide: $.fn.hide,
@@ -121,42 +152,46 @@ $.fn.extend({
_addClass: $.fn.addClass,
_removeClass: $.fn.removeClass,
_toggleClass: $.fn.toggleClass,
- // New ec methods
- effect: function(fx,o,speed,callback) {
- return $.effects[fx] ? $.effects[fx].call(this, {method: fx, options: o || {}, duration: speed, callback: callback }) : null;
+
+ // New effect methods
+ effect: function(fx, options, speed, callback) {
+ return $.effects[fx] ? $.effects[fx].call(this, {method: fx, options: options || {}, duration: speed, callback: callback }) : null;
},
+
show: function() {
- if(!arguments[0] || (arguments[0].constructor == Number || /(slow|normal|fast)/.test(arguments[0])))
+ if(!arguments[0] || (arguments[0].constructor == Number || (/(slow|normal|fast)/).test(arguments[0])))
return this._show.apply(this, arguments);
else {
- var o = arguments[1] || {}; o['mode'] = 'show';
- return this.effect.apply(this, [arguments[0], o, arguments[2] || o.duration, arguments[3] || o.callback]);
+ return this.effect.apply(this, _normalizeArguments(arguments, 'show'));
}
},
+
hide: function() {
- if(!arguments[0] || (arguments[0].constructor == Number || /(slow|normal|fast)/.test(arguments[0])))
+ if(!arguments[0] || (arguments[0].constructor == Number || (/(slow|normal|fast)/).test(arguments[0])))
return this._hide.apply(this, arguments);
else {
- var o = arguments[1] || {}; o['mode'] = 'hide';
- return this.effect.apply(this, [arguments[0], o, arguments[2] || o.duration, arguments[3] || o.callback]);
+ return this.effect.apply(this, _normalizeArguments(arguments, 'hide'));
}
},
+
toggle: function(){
- if(!arguments[0] || (arguments[0].constructor == Number || /(slow|normal|fast)/.test(arguments[0])) || (arguments[0].constructor == Function))
+ if(!arguments[0] ||
+ (arguments[0].constructor == Number || (/(slow|normal|fast)/).test(arguments[0])) ||
+ ($.isFunction(arguments[0]) || typeof arguments[0] == 'boolean')) {
return this.__toggle.apply(this, arguments);
- else {
- var o = arguments[1] || {}; o['mode'] = 'toggle';
- return this.effect.apply(this, [arguments[0], o, arguments[2] || o.duration, arguments[3] || o.callback]);
+ } else {
+ return this.effect.apply(this, _normalizeArguments(arguments, 'toggle'));
}
},
- addClass: function(classNames,speed,easing,callback) {
+
+ addClass: function(classNames, speed, easing, callback) {
return speed ? $.effects.animateClass.apply(this, [{ add: classNames },speed,easing,callback]) : this._addClass(classNames);
},
removeClass: function(classNames,speed,easing,callback) {
return speed ? $.effects.animateClass.apply(this, [{ remove: classNames },speed,easing,callback]) : this._removeClass(classNames);
},
toggleClass: function(classNames,speed,easing,callback) {
- return speed ? $.effects.animateClass.apply(this, [{ toggle: classNames },speed,easing,callback]) : this._toggleClass(classNames);
+ return ( (typeof speed !== "boolean") && speed ) ? $.effects.animateClass.apply(this, [{ toggle: classNames },speed,easing,callback]) : this._toggleClass(classNames, speed);
},
morph: function(remove,add,speed,easing,callback) {
return $.effects.animateClass.apply(this, [{ add: add, remove: remove },speed,easing,callback]);
@@ -164,6 +199,7 @@ $.fn.extend({
switchClass: function() {
return this.morph.apply(this, arguments);
},
+
// helper functions
cssUnit: function(key) {
var style = this.css(key), val = [];
@@ -182,19 +218,19 @@ $.fn.extend({
*/
// We override the animation for all of these color styles
-jQuery.each(['backgroundColor', 'borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor', 'color', 'outlineColor'], function(i,attr){
- jQuery.fx.step[attr] = function(fx){
+$.each(['backgroundColor', 'borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor', 'color', 'outlineColor'], function(i,attr){
+ $.fx.step[attr] = function(fx) {
if ( fx.state == 0 ) {
fx.start = getColor( fx.elem, attr );
fx.end = getRGB( fx.end );
}
fx.elem.style[attr] = "rgb(" + [
- Math.max(Math.min( parseInt((fx.pos * (fx.end[0] - fx.start[0])) + fx.start[0]), 255), 0),
- Math.max(Math.min( parseInt((fx.pos * (fx.end[1] - fx.start[1])) + fx.start[1]), 255), 0),
- Math.max(Math.min( parseInt((fx.pos * (fx.end[2] - fx.start[2])) + fx.start[2]), 255), 0)
+ Math.max(Math.min( parseInt((fx.pos * (fx.end[0] - fx.start[0])) + fx.start[0],10), 255), 0),
+ Math.max(Math.min( parseInt((fx.pos * (fx.end[1] - fx.start[1])) + fx.start[1],10), 255), 0),
+ Math.max(Math.min( parseInt((fx.pos * (fx.end[2] - fx.start[2])) + fx.start[2],10), 255), 0)
].join(",") + ")";
- }
+ };
});
// Color Conversion functions from highlightFade
@@ -211,7 +247,7 @@ function getRGB(color) {
// Look for rgb(num,num,num)
if (result = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color))
- return [parseInt(result[1]), parseInt(result[2]), parseInt(result[3])];
+ return [parseInt(result[1],10), parseInt(result[2],10), parseInt(result[3],10)];
// Look for rgb(num%,num%,num%)
if (result = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color))
@@ -227,20 +263,20 @@ function getRGB(color) {
// Look for rgba(0, 0, 0, 0) == transparent in Safari 3
if (result = /rgba\(0, 0, 0, 0\)/.exec(color))
- return colors['transparent']
+ return colors['transparent'];
// Otherwise, we're most likely dealing with a named color
- return colors[jQuery.trim(color).toLowerCase()];
+ return colors[$.trim(color).toLowerCase()];
}
function getColor(elem, attr) {
var color;
do {
- color = jQuery.curCSS(elem, attr);
+ color = $.curCSS(elem, attr);
// Keep going until we find an element that has color, or we hit the body
- if ( color != '' && color != 'transparent' || jQuery.nodeName(elem, "body") )
+ if ( color != '' && color != 'transparent' || $.nodeName(elem, "body") )
break;
attr = "backgroundColor";
@@ -299,7 +335,7 @@ var colors = {
yellow:[255,255,0],
transparent: [255,255,255]
};
-
+
/*
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
*
@@ -307,45 +343,45 @@ var colors = {
* to offer multiple easing options
*
* TERMS OF USE - jQuery Easing
- *
- * Open source under the BSD License.
- *
- * Copyright © 2008 George McGinley Smith
+ *
+ * Open source under the BSD License.
+ *
+ * Copyright 2008 George McGinley Smith
* All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification,
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this list of
+ *
+ * Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice, this list
- * of conditions and the following disclaimer in the documentation and/or other materials
+ * Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
- *
- * Neither the name of the author nor the names of contributors may be used to endorse
+ *
+ * Neither the name of the author nor the names of contributors may be used to endorse
* or promote products derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
- * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
// t: current time, b: begInnIng value, c: change In value, d: duration
-jQuery.easing['jswing'] = jQuery.easing['swing'];
+$.easing.jswing = $.easing.swing;
-jQuery.extend( jQuery.easing,
+$.extend($.easing,
{
def: 'easeOutQuad',
swing: function (x, t, b, c, d) {
- //alert(jQuery.easing.default);
- return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
+ //alert($.easing.default);
+ return $.easing[$.easing.def](x, t, b, c, d);
},
easeInQuad: function (x, t, b, c, d) {
return c*(t/=d)*t + b;
@@ -449,12 +485,12 @@ jQuery.extend( jQuery.easing,
return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
},
easeInOutBack: function (x, t, b, c, d, s) {
- if (s == undefined) s = 1.70158;
+ if (s == undefined) s = 1.70158;
if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
},
easeInBounce: function (x, t, b, c, d) {
- return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
+ return c - $.easing.easeOutBounce (x, d-t, 0, c, d) + b;
},
easeOutBounce: function (x, t, b, c, d) {
if ((t/=d) < (1/2.75)) {
@@ -468,41 +504,41 @@ jQuery.extend( jQuery.easing,
}
},
easeInOutBounce: function (x, t, b, c, d) {
- if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
- return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
+ if (t < d/2) return $.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
+ return $.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
}
});
/*
*
* TERMS OF USE - EASING EQUATIONS
- *
- * Open source under the BSD License.
- *
- * Copyright © 2001 Robert Penner
+ *
+ * Open source under the BSD License.
+ *
+ * Copyright 2001 Robert Penner
* All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification,
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this list of
+ *
+ * Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice, this list
- * of conditions and the following disclaimer in the documentation and/or other materials
+ * Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
- *
- * Neither the name of the author nor the names of contributors may be used to endorse
+ *
+ * Neither the name of the author nor the names of contributors may be used to endorse
* or promote products derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
- * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
diff --git a/template-common/lib/ui/effects.drop.js b/template-common/lib/ui/effects.drop.js
index 62762d4ef..604ac8d8b 100644
--- a/template-common/lib/ui/effects.drop.js
+++ b/template-common/lib/ui/effects.drop.js
@@ -1,10 +1,10 @@
/*
- * jQuery UI Effects Drop
+ * jQuery UI Effects Drop 1.7.2
*
- * Copyright (c) 2008 Aaron Eisenberger (aaronchi@gmail.com)
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
- *
+ *
* http://docs.jquery.com/UI/Effects/Drop
*
* Depends:
@@ -18,11 +18,11 @@ $.effects.drop = function(o) {
// Create element
var el = $(this), props = ['position','top','left','opacity'];
-
+
// Set options
var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
var direction = o.options.direction || 'left'; // Default Direction
-
+
// Adjust
$.effects.save(el, props); el.show(); // Save & Show
$.effects.createWrapper(el); // Create Wrapper
@@ -30,11 +30,11 @@ $.effects.drop = function(o) {
var motion = (direction == 'up' || direction == 'left') ? 'pos' : 'neg';
var distance = o.options.distance || (ref == 'top' ? el.outerHeight({margin:true}) / 2 : el.outerWidth({margin:true}) / 2);
if (mode == 'show') el.css('opacity', 0).css(ref, motion == 'pos' ? -distance : distance); // Shift
-
+
// Animation
var animation = {opacity: mode == 'show' ? 1 : 0};
animation[ref] = (mode == 'show' ? (motion == 'pos' ? '+=' : '-=') : (motion == 'pos' ? '-=' : '+=')) + distance;
-
+
// Animate
el.animate(animation, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() {
if(mode == 'hide') el.hide(); // Hide
@@ -42,9 +42,9 @@ $.effects.drop = function(o) {
if(o.callback) o.callback.apply(this, arguments); // Callback
el.dequeue();
}});
-
+
});
-
+
};
})(jQuery);
diff --git a/template-common/lib/ui/effects.explode.js b/template-common/lib/ui/effects.explode.js
index b6d9ae48a..31efd2f54 100644
--- a/template-common/lib/ui/effects.explode.js
+++ b/template-common/lib/ui/effects.explode.js
@@ -1,10 +1,10 @@
/*
- * jQuery UI Effects Explode
+ * jQuery UI Effects Explode 1.7.2
*
- * Copyright (c) 2008 Paul Bakaus (ui.jquery.com)
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
- *
+ *
* http://docs.jquery.com/UI/Effects/Explode
*
* Depends:
@@ -18,15 +18,15 @@ $.effects.explode = function(o) {
var rows = o.options.pieces ? Math.round(Math.sqrt(o.options.pieces)) : 3;
var cells = o.options.pieces ? Math.round(Math.sqrt(o.options.pieces)) : 3;
-
+
o.options.mode = o.options.mode == 'toggle' ? ($(this).is(':visible') ? 'hide' : 'show') : o.options.mode;
var el = $(this).show().css('visibility', 'hidden');
var offset = el.offset();
-
+
//Substract the margins - not fixing the problem yet.
- offset.top -= parseInt(el.css("marginTop")) || 0;
- offset.left -= parseInt(el.css("marginLeft")) || 0;
-
+ offset.top -= parseInt(el.css("marginTop"),10) || 0;
+ offset.left -= parseInt(el.css("marginLeft"),10) || 0;
+
var width = el.outerWidth(true);
var height = el.outerHeight(true);
@@ -43,7 +43,7 @@ $.effects.explode = function(o) {
top: -i*(height/rows)
})
.parent()
- .addClass('effects-explode')
+ .addClass('ui-effects-explode')
.css({
position: 'absolute',
overflow: 'hidden',
@@ -62,18 +62,18 @@ $.effects.explode = function(o) {
// Set a timeout, to call the callback approx. when the other animations have finished
setTimeout(function() {
-
+
o.options.mode == 'show' ? el.css({ visibility: 'visible' }) : el.css({ visibility: 'visible' }).hide();
if(o.callback) o.callback.apply(el[0]); // Callback
el.dequeue();
-
- $('.effects-explode').remove();
-
+
+ $('div.ui-effects-explode').remove();
+
}, o.duration || 500);
-
-
+
+
});
-
+
};
})(jQuery);
diff --git a/template-common/lib/ui/effects.fold.js b/template-common/lib/ui/effects.fold.js
index 9fa1e661e..5ed1188f6 100644
--- a/template-common/lib/ui/effects.fold.js
+++ b/template-common/lib/ui/effects.fold.js
@@ -1,10 +1,10 @@
/*
- * jQuery UI Effects Fold
+ * jQuery UI Effects Fold 1.7.2
*
- * Copyright (c) 2008 Aaron Eisenberger (aaronchi@gmail.com)
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
- *
+ *
* http://docs.jquery.com/UI/Effects/Fold
*
* Depends:
@@ -18,12 +18,13 @@ $.effects.fold = function(o) {
// Create element
var el = $(this), props = ['position','top','left'];
-
+
// Set options
var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
var size = o.options.size || 15; // Default fold size
var horizFirst = !(!o.options.horizFirst); // Ensure a boolean value
-
+ var duration = o.duration ? o.duration / 2 : $.fx.speeds._default / 2;
+
// Adjust
$.effects.save(el, props); el.show(); // Save & Show
var wrapper = $.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper
@@ -31,25 +32,25 @@ $.effects.fold = function(o) {
var ref = widthFirst ? ['width', 'height'] : ['height', 'width'];
var distance = widthFirst ? [wrapper.width(), wrapper.height()] : [wrapper.height(), wrapper.width()];
var percent = /([0-9]+)%/.exec(size);
- if(percent) size = parseInt(percent[1]) / 100 * distance[mode == 'hide' ? 0 : 1];
+ if(percent) size = parseInt(percent[1],10) / 100 * distance[mode == 'hide' ? 0 : 1];
if(mode == 'show') wrapper.css(horizFirst ? {height: 0, width: size} : {height: size, width: 0}); // Shift
-
+
// Animation
var animation1 = {}, animation2 = {};
animation1[ref[0]] = mode == 'show' ? distance[0] : size;
animation2[ref[1]] = mode == 'show' ? distance[1] : 0;
-
+
// Animate
- wrapper.animate(animation1, o.duration / 2, o.options.easing)
- .animate(animation2, o.duration / 2, o.options.easing, function() {
+ wrapper.animate(animation1, duration, o.options.easing)
+ .animate(animation2, duration, o.options.easing, function() {
if(mode == 'hide') el.hide(); // Hide
$.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
if(o.callback) o.callback.apply(el[0], arguments); // Callback
el.dequeue();
});
-
+
});
-
+
};
})(jQuery);
diff --git a/template-common/lib/ui/effects.highlight.js b/template-common/lib/ui/effects.highlight.js
index cc69f4d48..828d059ab 100644
--- a/template-common/lib/ui/effects.highlight.js
+++ b/template-common/lib/ui/effects.highlight.js
@@ -1,48 +1,48 @@
/*
- * jQuery UI Effects Highlight
+ * jQuery UI Effects Highlight 1.7.2
*
- * Copyright (c) 2008 Aaron Eisenberger (aaronchi@gmail.com)
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
- *
+ *
* http://docs.jquery.com/UI/Effects/Highlight
*
* Depends:
* effects.core.js
*/
-;(function($) {
+(function($) {
$.effects.highlight = function(o) {
return this.queue(function() {
-
+
// Create element
var el = $(this), props = ['backgroundImage','backgroundColor','opacity'];
-
+
// Set options
var mode = $.effects.setMode(el, o.options.mode || 'show'); // Set Mode
var color = o.options.color || "#ffff99"; // Default highlight color
var oldColor = el.css("backgroundColor");
-
+
// Adjust
$.effects.save(el, props); el.show(); // Save & Show
el.css({backgroundImage: 'none', backgroundColor: color}); // Shift
-
+
// Animation
var animation = {backgroundColor: oldColor };
if (mode == "hide") animation['opacity'] = 0;
-
+
// Animate
el.animate(animation, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() {
if(mode == "hide") el.hide();
$.effects.restore(el, props);
- if (mode == "show" && jQuery.browser.msie) this.style.removeAttribute('filter');
+ if (mode == "show" && $.browser.msie) this.style.removeAttribute('filter');
if(o.callback) o.callback.apply(this, arguments);
el.dequeue();
}});
-
+
});
-
+
};
})(jQuery);
diff --git a/template-common/lib/ui/effects.pulsate.js b/template-common/lib/ui/effects.pulsate.js
index 6f89f7127..6459d1868 100644
--- a/template-common/lib/ui/effects.pulsate.js
+++ b/template-common/lib/ui/effects.pulsate.js
@@ -1,10 +1,10 @@
/*
- * jQuery UI Effects Pulsate
+ * jQuery UI Effects Pulsate 1.7.2
*
- * Copyright (c) 2008 Aaron Eisenberger (aaronchi@gmail.com)
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
- *
+ *
* http://docs.jquery.com/UI/Effects/Pulsate
*
* Depends:
@@ -15,41 +15,42 @@
$.effects.pulsate = function(o) {
return this.queue(function() {
-
+
// Create element
var el = $(this);
-
+
// Set options
var mode = $.effects.setMode(el, o.options.mode || 'show'); // Set Mode
var times = o.options.times || 5; // Default # of times
-
+ var duration = o.duration ? o.duration / 2 : $.fx.speeds._default / 2;
+
// Adjust
if (mode == 'hide') times--;
if (el.is(':hidden')) { // Show fadeIn
el.css('opacity', 0);
el.show(); // Show
- el.animate({opacity: 1}, o.duration / 2, o.options.easing);
+ el.animate({opacity: 1}, duration, o.options.easing);
times = times-2;
}
-
+
// Animate
for (var i = 0; i < times; i++) { // Pulsate
- el.animate({opacity: 0}, o.duration / 2, o.options.easing).animate({opacity: 1}, o.duration / 2, o.options.easing);
+ el.animate({opacity: 0}, duration, o.options.easing).animate({opacity: 1}, duration, o.options.easing);
};
if (mode == 'hide') { // Last Pulse
- el.animate({opacity: 0}, o.duration / 2, o.options.easing, function(){
+ el.animate({opacity: 0}, duration, o.options.easing, function(){
el.hide(); // Hide
if(o.callback) o.callback.apply(this, arguments); // Callback
});
} else {
- el.animate({opacity: 0}, o.duration / 2, o.options.easing).animate({opacity: 1}, o.duration / 2, o.options.easing, function(){
+ el.animate({opacity: 0}, duration, o.options.easing).animate({opacity: 1}, duration, o.options.easing, function(){
if(o.callback) o.callback.apply(this, arguments); // Callback
});
};
el.queue('fx', function() { el.dequeue(); });
el.dequeue();
});
-
+
};
})(jQuery);
diff --git a/template-common/lib/ui/effects.scale.js b/template-common/lib/ui/effects.scale.js
index 216b0172e..ec15cf853 100644
--- a/template-common/lib/ui/effects.scale.js
+++ b/template-common/lib/ui/effects.scale.js
@@ -1,10 +1,10 @@
/*
- * jQuery UI Effects Scale
+ * jQuery UI Effects Scale 1.7.2
*
- * Copyright (c) 2008 Aaron Eisenberger (aaronchi@gmail.com)
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
- *
+ *
* http://docs.jquery.com/UI/Effects/Scale
*
* Depends:
@@ -18,41 +18,41 @@ $.effects.puff = function(o) {
// Create element
var el = $(this);
-
+
// Set options
var options = $.extend(true, {}, o.options);
var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
- var percent = parseInt(o.options.percent) || 150; // Set default puff percent
+ var percent = parseInt(o.options.percent,10) || 150; // Set default puff percent
options.fade = true; // It's not a puff if it doesn't fade! :)
var original = {height: el.height(), width: el.width()}; // Save original
-
+
// Adjust
var factor = percent / 100;
el.from = (mode == 'hide') ? original : {height: original.height * factor, width: original.width * factor};
-
+
// Animation
options.from = el.from;
options.percent = (mode == 'hide') ? percent : 100;
options.mode = mode;
-
+
// Animate
el.effect('scale', options, o.duration, o.callback);
el.dequeue();
});
-
+
};
$.effects.scale = function(o) {
-
+
return this.queue(function() {
-
+
// Create element
var el = $(this);
// Set options
var options = $.extend(true, {}, o.options);
var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode
- var percent = parseInt(o.options.percent) || (parseInt(o.options.percent) == 0 ? 0 : (mode == 'hide' ? 0 : 100)); // Set default scaling percent
+ var percent = parseInt(o.options.percent,10) || (parseInt(o.options.percent,10) == 0 ? 0 : (mode == 'hide' ? 0 : 100)); // Set default scaling percent
var direction = o.options.direction || 'both'; // Set default axis
var origin = o.options.origin; // The origin of the scaling
if (mode != 'effect') { // Set default origin and restore for show/hide
@@ -61,33 +61,33 @@ $.effects.scale = function(o) {
}
var original = {height: el.height(), width: el.width()}; // Save original
el.from = o.options.from || (mode == 'show' ? {height: 0, width: 0} : original); // Default from state
-
+
// Adjust
var factor = { // Set scaling factor
y: direction != 'horizontal' ? (percent / 100) : 1,
x: direction != 'vertical' ? (percent / 100) : 1
};
el.to = {height: original.height * factor.y, width: original.width * factor.x}; // Set to state
-
+
if (o.options.fade) { // Fade option to support puff
if (mode == 'show') {el.from.opacity = 0; el.to.opacity = 1;};
if (mode == 'hide') {el.from.opacity = 1; el.to.opacity = 0;};
};
-
+
// Animation
options.from = el.from; options.to = el.to; options.mode = mode;
-
+
// Animate
el.effect('size', options, o.duration, o.callback);
el.dequeue();
});
-
+
};
$.effects.size = function(o) {
return this.queue(function() {
-
+
// Create element
var el = $(this), props = ['position','top','left','width','height','overflow','opacity'];
var props1 = ['position','top','left','overflow','opacity']; // Always restore
@@ -95,7 +95,7 @@ $.effects.size = function(o) {
var cProps = ['fontSize'];
var vProps = ['borderTopWidth', 'borderBottomWidth', 'paddingTop', 'paddingBottom'];
var hProps = ['borderLeftWidth', 'borderRightWidth', 'paddingLeft', 'paddingRight'];
-
+
// Set options
var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode
var restore = o.options.restore || false; // Default restore
@@ -138,7 +138,7 @@ $.effects.size = function(o) {
$.effects.save(el, restore ? props : props1); el.show(); // Save & Show
$.effects.createWrapper(el); // Create Wrapper
el.css('overflow','hidden').css(el.from); // Shift
-
+
// Animate
if (scale == 'content' || scale == 'both') { // Scale the children
vProps = vProps.concat(['marginTop','marginBottom']).concat(cProps); // Add margins/font-size
@@ -164,15 +164,15 @@ $.effects.size = function(o) {
}); // Animate children
});
};
-
+
// Animate
el.animate(el.to, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() {
if(mode == 'hide') el.hide(); // Hide
$.effects.restore(el, restore ? props : props1); $.effects.removeWrapper(el); // Restore
if(o.callback) o.callback.apply(this, arguments); // Callback
el.dequeue();
- }});
-
+ }});
+
});
};
diff --git a/template-common/lib/ui/effects.shake.js b/template-common/lib/ui/effects.shake.js
index e07366548..dc9f59710 100644
--- a/template-common/lib/ui/effects.shake.js
+++ b/template-common/lib/ui/effects.shake.js
@@ -1,10 +1,10 @@
/*
- * jQuery UI Effects Shake
+ * jQuery UI Effects Shake 1.7.2
*
- * Copyright (c) 2008 Aaron Eisenberger (aaronchi@gmail.com)
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
- *
+ *
* http://docs.jquery.com/UI/Effects/Shake
*
* Depends:
@@ -18,26 +18,26 @@ $.effects.shake = function(o) {
// Create element
var el = $(this), props = ['position','top','left'];
-
+
// Set options
var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode
var direction = o.options.direction || 'left'; // Default direction
var distance = o.options.distance || 20; // Default distance
var times = o.options.times || 3; // Default # of times
var speed = o.duration || o.options.duration || 140; // Default speed per shake
-
+
// Adjust
$.effects.save(el, props); el.show(); // Save & Show
$.effects.createWrapper(el); // Create Wrapper
var ref = (direction == 'up' || direction == 'down') ? 'top' : 'left';
var motion = (direction == 'up' || direction == 'left') ? 'pos' : 'neg';
-
+
// Animation
var animation = {}, animation1 = {}, animation2 = {};
animation[ref] = (motion == 'pos' ? '-=' : '+=') + distance;
animation1[ref] = (motion == 'pos' ? '+=' : '-=') + distance * 2;
animation2[ref] = (motion == 'pos' ? '-=' : '+=') + distance * 2;
-
+
// Animate
el.animate(animation, speed, o.options.easing);
for (var i = 1; i < times; i++) { // Shakes
@@ -51,7 +51,7 @@ $.effects.shake = function(o) {
el.queue('fx', function() { el.dequeue(); });
el.dequeue();
});
-
+
};
})(jQuery);
diff --git a/template-common/lib/ui/effects.slide.js b/template-common/lib/ui/effects.slide.js
index 357133701..350f599e9 100644
--- a/template-common/lib/ui/effects.slide.js
+++ b/template-common/lib/ui/effects.slide.js
@@ -1,10 +1,10 @@
/*
- * jQuery UI Effects Slide
+ * jQuery UI Effects Slide 1.7.2
*
- * Copyright (c) 2008 Aaron Eisenberger (aaronchi@gmail.com)
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
- *
+ *
* http://docs.jquery.com/UI/Effects/Slide
*
* Depends:
@@ -18,11 +18,11 @@ $.effects.slide = function(o) {
// Create element
var el = $(this), props = ['position','top','left'];
-
+
// Set options
var mode = $.effects.setMode(el, o.options.mode || 'show'); // Set Mode
var direction = o.options.direction || 'left'; // Default Direction
-
+
// Adjust
$.effects.save(el, props); el.show(); // Save & Show
$.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper
@@ -30,11 +30,11 @@ $.effects.slide = function(o) {
var motion = (direction == 'up' || direction == 'left') ? 'pos' : 'neg';
var distance = o.options.distance || (ref == 'top' ? el.outerHeight({margin:true}) : el.outerWidth({margin:true}));
if (mode == 'show') el.css(ref, motion == 'pos' ? -distance : distance); // Shift
-
+
// Animation
var animation = {};
animation[ref] = (mode == 'show' ? (motion == 'pos' ? '+=' : '-=') : (motion == 'pos' ? '-=' : '+=')) + distance;
-
+
// Animate
el.animate(animation, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() {
if(mode == 'hide') el.hide(); // Hide
@@ -42,9 +42,9 @@ $.effects.slide = function(o) {
if(o.callback) o.callback.apply(this, arguments); // Callback
el.dequeue();
}});
-
+
});
-
+
};
})(jQuery);
diff --git a/template-common/lib/ui/effects.transfer.js b/template-common/lib/ui/effects.transfer.js
index 9f08f67f9..82bab6d89 100644
--- a/template-common/lib/ui/effects.transfer.js
+++ b/template-common/lib/ui/effects.transfer.js
@@ -1,10 +1,10 @@
/*
- * jQuery UI Effects Transfer
+ * jQuery UI Effects Transfer 1.7.2
*
- * Copyright (c) 2008 Aaron Eisenberger (aaronchi@gmail.com)
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
- *
+ *
* http://docs.jquery.com/UI/Effects/Transfer
*
* Depends:
@@ -13,47 +13,33 @@
(function($) {
$.effects.transfer = function(o) {
-
return this.queue(function() {
-
- // Create element
- var el = $(this);
-
- // Set options
- var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode
- var target = $(o.options.to); // Find Target
- var position = el.offset();
- var transfer = $('<div class="ui-effects-transfer"></div>').appendTo(document.body);
- if(o.options.className) transfer.addClass(o.options.className);
-
- // Set target css
- transfer.addClass(o.options.className);
- transfer.css({
- top: position.top,
- left: position.left,
- height: el.outerHeight() - parseInt(transfer.css('borderTopWidth')) - parseInt(transfer.css('borderBottomWidth')),
- width: el.outerWidth() - parseInt(transfer.css('borderLeftWidth')) - parseInt(transfer.css('borderRightWidth')),
- position: 'absolute'
- });
-
- // Animation
- position = target.offset();
- animation = {
- top: position.top,
- left: position.left,
- height: target.outerHeight() - parseInt(transfer.css('borderTopWidth')) - parseInt(transfer.css('borderBottomWidth')),
- width: target.outerWidth() - parseInt(transfer.css('borderLeftWidth')) - parseInt(transfer.css('borderRightWidth'))
- };
-
- // Animate
- transfer.animate(animation, o.duration, o.options.easing, function() {
- transfer.remove(); // Remove div
- if(o.callback) o.callback.apply(el[0], arguments); // Callback
- el.dequeue();
- });
-
+ var elem = $(this),
+ target = $(o.options.to),
+ endPosition = target.offset(),
+ animation = {
+ top: endPosition.top,
+ left: endPosition.left,
+ height: target.innerHeight(),
+ width: target.innerWidth()
+ },
+ startPosition = elem.offset(),
+ transfer = $('<div class="ui-effects-transfer"></div>')
+ .appendTo(document.body)
+ .addClass(o.options.className)
+ .css({
+ top: startPosition.top,
+ left: startPosition.left,
+ height: elem.innerHeight(),
+ width: elem.innerWidth(),
+ position: 'absolute'
+ })
+ .animate(animation, o.duration, o.options.easing, function() {
+ transfer.remove();
+ (o.callback && o.callback.apply(elem[0], arguments));
+ elem.dequeue();
+ });
});
-
};
})(jQuery);
diff --git a/template-common/lib/ui/i18n/ui.datepicker-ar.js b/template-common/lib/ui/i18n/ui.datepicker-ar.js
index 62478819c..b60587891 100644
--- a/template-common/lib/ui/i18n/ui.datepicker-ar.js
+++ b/template-common/lib/ui/i18n/ui.datepicker-ar.js
@@ -1,23 +1,20 @@
/* Arabic Translation for jQuery UI date picker plugin. */
/* Khaled Al Horani -- koko.dw@gmail.com */
/* خالد الحوراني -- koko.dw@gmail.com */
-/* NOTE: monthNames are the original months names and thez are the Arabic names, not the new months name Ùبراير - يناير and there isnät any Arabic roots for these months */
+/* NOTE: monthNames are the original months names and they are the Arabic names, not the new months name Ùبراير - يناير and there isn't any Arabic roots for these months */
jQuery(function($){
$.datepicker.regional['ar'] = {
- clearText: 'مسح', clearStatus: 'امسح التاريخ الحالي',
- closeText: 'إغلاق', closeStatus: 'إغلاق بدون Ø­Ùظ',
- prevText: '<السابق', prevStatus: 'عرض الشهر السابق',
- nextText: 'التالي>', nextStatus: 'عرض الشهر القادم',
- currentText: 'اليوم', currentStatus: 'عرض الشهر الحالي',
- monthNames: ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'آذار', 'حزيران', 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'],
+ closeText: 'إغلاق',
+ prevText: '&#x3c;السابق',
+ nextText: 'التالي&#x3e;',
+ currentText: 'اليوم',
+ monthNames: ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'آذار', 'حزيران',
+ 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'],
monthNamesShort: ['1','2','3','4','5','6','7','8','9','10','11','12'],
- monthStatus: 'عرض شهر آخر', yearStatus: 'عرض سنة آخرى',
- weekHeader: 'أسبوع', weekStatus: 'أسبوع السنة',
dayNames: ['السبت', 'الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة'],
dayNamesShort: ['سبت', 'أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة'],
dayNamesMin: ['سبت', 'أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة'],
- dayStatus: 'اختر DD لليوم الأول من الأسبوع', dateStatus: 'اختر D, M d',
- dateFormat: 'dd/mm/yy', firstDay: 0,
- initStatus: 'اختر يوم', isRTL: true};
+ dateFormat: 'dd/mm/yy', firstDay: 0,
+ isRTL: true};
$.datepicker.setDefaults($.datepicker.regional['ar']);
}); \ No newline at end of file
diff --git a/template-common/lib/ui/i18n/ui.datepicker-bg.js b/template-common/lib/ui/i18n/ui.datepicker-bg.js
index 59589671e..a73884ef2 100644
--- a/template-common/lib/ui/i18n/ui.datepicker-bg.js
+++ b/template-common/lib/ui/i18n/ui.datepicker-bg.js
@@ -1,22 +1,20 @@
/* Bulgarian initialisation for the jQuery UI date picker plugin. */
/* Written by Stoyan Kyosev (http://svest.org). */
jQuery(function($){
- $.datepicker.regional['bg'] = {clearText: 'изчиÑти', clearStatus: 'изчиÑти актуалната дата',
- closeText: 'затвори', closeStatus: 'затвори без промени',
- prevText: '&#x3c;назад', prevStatus: 'покажи поÑÐ»ÐµÐ´Ð½Ð¸Ñ Ð¼ÐµÑец',
- nextText: 'напред&#x3e;', nextStatus: 'покажи ÑÐ»ÐµÐ´Ð²Ð°Ñ‰Ð¸Ñ Ð¼ÐµÑец',
- currentText: 'днеÑ', currentStatus: '',
+ $.datepicker.regional['bg'] = {
+ closeText: 'затвори',
+ prevText: '&#x3c;назад',
+ nextText: 'напред&#x3e;',
+ nextBigText: '&#x3e;&#x3e;',
+ currentText: 'днеÑ',
monthNames: ['Януари','Февруари','Март','Ðприл','Май','Юни',
'Юли','ÐвгуÑÑ‚','Септември','Октомври','Ðоември','Декември'],
monthNamesShort: ['Яну','Фев','Мар','Ðпр','Май','Юни',
'Юли','Ðвг','Сеп','Окт','Ðов','Дек'],
- monthStatus: 'покажи друг меÑец', yearStatus: 'покажи друга година',
- weekHeader: 'Wk', weekStatus: 'Ñедмица от меÑеца',
dayNames: ['ÐеделÑ','Понеделник','Вторник','СрÑда','Четвъртък','Петък','Събота'],
dayNamesShort: ['Ðед','Пон','Вто','СрÑ','Чет','Пет','Съб'],
dayNamesMin: ['Ðе','По','Ð’Ñ‚','Ср','Че','Пе','Съ'],
- dayStatus: 'Сложи DD като първи ден от Ñедмицата', dateStatus: 'Избери D, M d',
dateFormat: 'dd.mm.yy', firstDay: 1,
- initStatus: 'Избери дата', isRTL: false};
+ isRTL: false};
$.datepicker.setDefaults($.datepicker.regional['bg']);
});
diff --git a/template-common/lib/ui/i18n/ui.datepicker-ca.js b/template-common/lib/ui/i18n/ui.datepicker-ca.js
index 46147a497..ad47af0bb 100644
--- a/template-common/lib/ui/i18n/ui.datepicker-ca.js
+++ b/template-common/lib/ui/i18n/ui.datepicker-ca.js
@@ -1,22 +1,19 @@
-/* Inicialització en català per a l'extenció 'calendar' per jQuery. */
+/* Inicialitzaci� en catal� per a l'extenci� 'calendar' per jQuery. */
/* Writers: (joan.leon@gmail.com). */
jQuery(function($){
- $.datepicker.regional['ca'] = {clearText: 'Netejar', clearStatus: '',
- closeText: 'Tancar', closeStatus: '',
- prevText: '&lt;Ant', prevStatus: '',
- nextText: 'Seg&gt;', nextStatus: '',
- currentText: 'Avui', currentStatus: '',
+ $.datepicker.regional['ca'] = {
+ closeText: 'Tancar',
+ prevText: '&#x3c;Ant',
+ nextText: 'Seg&#x3e;',
+ currentText: 'Avui',
monthNames: ['Gener','Febrer','Mar&ccedil;','Abril','Maig','Juny',
'Juliol','Agost','Setembre','Octubre','Novembre','Desembre'],
monthNamesShort: ['Gen','Feb','Mar','Abr','Mai','Jun',
'Jul','Ago','Set','Oct','Nov','Des'],
- monthStatus: '', yearStatus: '',
- weekHeader: 'Sm', weekStatus: '',
dayNames: ['Diumenge','Dilluns','Dimarts','Dimecres','Dijous','Divendres','Dissabte'],
dayNamesShort: ['Dug','Dln','Dmt','Dmc','Djs','Dvn','Dsb'],
dayNamesMin: ['Dg','Dl','Dt','Dc','Dj','Dv','Ds'],
- dayStatus: 'DD', dateStatus: 'D, M d',
- dateFormat: 'mm/dd/yy', firstDay: 0,
- initStatus: '', isRTL: false};
+ dateFormat: 'mm/dd/yy', firstDay: 0,
+ isRTL: false};
$.datepicker.setDefaults($.datepicker.regional['ca']);
}); \ No newline at end of file
diff --git a/template-common/lib/ui/i18n/ui.datepicker-cs.js b/template-common/lib/ui/i18n/ui.datepicker-cs.js
index e195deb43..334ae2f46 100644
--- a/template-common/lib/ui/i18n/ui.datepicker-cs.js
+++ b/template-common/lib/ui/i18n/ui.datepicker-cs.js
@@ -1,22 +1,19 @@
/* Czech initialisation for the jQuery UI date picker plugin. */
/* Written by Tomas Muller (tomas@tomas-muller.net). */
jQuery(function($){
- $.datepicker.regional['cs'] = {clearText: 'Vymazat', clearStatus: 'Vymaže zadané datum',
- closeText: 'Zavřít', closeStatus: 'Zavře kalendář beze změny',
- prevText: '&#x3c;Dříve', prevStatus: 'Přejít na předchozí měsí',
- nextText: 'Později&#x3e;', nextStatus: 'Přejít na další měsíc',
- currentText: 'Nyní', currentStatus: 'Přejde na aktuální měsíc',
+ $.datepicker.regional['cs'] = {
+ closeText: 'Zavřít',
+ prevText: '&#x3c;Dříve',
+ nextText: 'Později&#x3e;',
+ currentText: 'Nyní',
monthNames: ['leden','únor','bÅ™ezen','duben','kvÄ›ten','Äerven',
'Äervenec','srpen','září','říjen','listopad','prosinec'],
monthNamesShort: ['led','úno','bÅ™e','dub','kvÄ›','Äer',
'Ävc','srp','zář','říj','lis','pro'],
- monthStatus: 'Přejít na jiný měsíc', yearStatus: 'Přejít na jiný rok',
- weekHeader: 'Týd', weekStatus: 'Týden v roce',
dayNames: ['nedÄ›le', 'pondÄ›lí', 'úterý', 'stÅ™eda', 'Ätvrtek', 'pátek', 'sobota'],
dayNamesShort: ['ne', 'po', 'út', 'st', 'Ät', 'pá', 'so'],
dayNamesMin: ['ne','po','út','st','Ät','pá','so'],
- dayStatus: 'Nastavit DD jako první den v týdnu', dateStatus: '\'Vyber\' DD, M d',
- dateFormat: 'dd.mm.yy', firstDay: 1,
- initStatus: 'Vyberte datum', isRTL: false};
+ dateFormat: 'dd.mm.yy', firstDay: 1,
+ isRTL: false};
$.datepicker.setDefaults($.datepicker.regional['cs']);
});
diff --git a/template-common/lib/ui/i18n/ui.datepicker-da.js b/template-common/lib/ui/i18n/ui.datepicker-da.js
index 794f6ef44..8ad1e2cc3 100644
--- a/template-common/lib/ui/i18n/ui.datepicker-da.js
+++ b/template-common/lib/ui/i18n/ui.datepicker-da.js
@@ -1,22 +1,19 @@
/* Danish initialisation for the jQuery UI date picker plugin. */
/* Written by Jan Christensen ( deletestuff@gmail.com). */
jQuery(function($){
- $.datepicker.regional['da'] = {clearText: 'Nulstil', clearStatus: 'Nulstil den aktuelle dato',
- closeText: 'Luk', closeStatus: 'Luk uden ændringer',
- prevText: '&#x3c;Forrige', prevStatus: 'Vis forrige måned',
- nextText: 'Næste&#x3e;', nextStatus: 'Vis næste måned',
- currentText: 'Idag', currentStatus: 'Vis aktuel måned',
- monthNames: ['Januar','Februar','Marts','April','Maj','Juni',
+ $.datepicker.regional['da'] = {
+ closeText: 'Luk',
+ prevText: '&#x3c;Forrige',
+ nextText: 'Næste&#x3e;',
+ currentText: 'Idag',
+ monthNames: ['Januar','Februar','Marts','April','Maj','Juni',
'Juli','August','September','Oktober','November','December'],
- monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
'Jul','Aug','Sep','Okt','Nov','Dec'],
- monthStatus: 'Vis en anden måned', yearStatus: 'Vis et andet år',
- weekHeader: 'Uge', weekStatus: 'Ã…rets uge',
dayNames: ['Søndag','Mandag','Tirsdag','Onsdag','Torsdag','Fredag','Lørdag'],
dayNamesShort: ['Søn','Man','Tir','Ons','Tor','Fre','Lør'],
dayNamesMin: ['Sø','Ma','Ti','On','To','Fr','Lø'],
- dayStatus: 'Sæt DD som første ugedag', dateStatus: 'Vælg D, M d',
- dateFormat: 'dd-mm-yy', firstDay: 0,
- initStatus: 'Vælg en dato', isRTL: false};
- $.datepicker.setDefaults($.datepicker.regional['da']);
+ dateFormat: 'dd-mm-yy', firstDay: 0,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['da']);
});
diff --git a/template-common/lib/ui/i18n/ui.datepicker-de.js b/template-common/lib/ui/i18n/ui.datepicker-de.js
index d31af3a1b..f9299c815 100644
--- a/template-common/lib/ui/i18n/ui.datepicker-de.js
+++ b/template-common/lib/ui/i18n/ui.datepicker-de.js
@@ -1,22 +1,19 @@
/* German initialisation for the jQuery UI date picker plugin. */
/* Written by Milian Wolff (mail@milianw.de). */
jQuery(function($){
- $.datepicker.regional['de'] = {clearText: 'löschen', clearStatus: 'aktuelles Datum löschen',
- closeText: 'schließen', closeStatus: 'ohne Änderungen schließen',
- prevText: '&#x3c;zurück', prevStatus: 'letzten Monat zeigen',
- nextText: 'Vor&#x3e;', nextStatus: 'nächsten Monat zeigen',
- currentText: 'heute', currentStatus: '',
+ $.datepicker.regional['de'] = {
+ closeText: 'schließen',
+ prevText: '&#x3c;zurück',
+ nextText: 'Vor&#x3e;',
+ currentText: 'heute',
monthNames: ['Januar','Februar','März','April','Mai','Juni',
'Juli','August','September','Oktober','November','Dezember'],
monthNamesShort: ['Jan','Feb','Mär','Apr','Mai','Jun',
'Jul','Aug','Sep','Okt','Nov','Dez'],
- monthStatus: 'anderen Monat anzeigen', yearStatus: 'anderes Jahr anzeigen',
- weekHeader: 'Wo', weekStatus: 'Woche des Monats',
dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'],
dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'],
dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'],
- dayStatus: 'Setze DD als ersten Wochentag', dateStatus: 'Wähle D, M d',
- dateFormat: 'dd.mm.yy', firstDay: 1,
- initStatus: 'Wähle ein Datum', isRTL: false};
+ dateFormat: 'dd.mm.yy', firstDay: 1,
+ isRTL: false};
$.datepicker.setDefaults($.datepicker.regional['de']);
});
diff --git a/template-common/lib/ui/i18n/ui.datepicker-es.js b/template-common/lib/ui/i18n/ui.datepicker-es.js
index c5fdd719d..0a699afe7 100644
--- a/template-common/lib/ui/i18n/ui.datepicker-es.js
+++ b/template-common/lib/ui/i18n/ui.datepicker-es.js
@@ -1,22 +1,19 @@
-/* Inicialización en español para la extensión 'UI date picker' para jQuery. */
+/* Inicializaci�n en espa�ol para la extensi�n 'UI date picker' para jQuery. */
/* Traducido por Vester (xvester@gmail.com). */
jQuery(function($){
- $.datepicker.regional['es'] = {clearText: 'Limpiar', clearStatus: '',
- closeText: 'Cerrar', closeStatus: '',
- prevText: '&lt;Ant', prevStatus: '',
- nextText: 'Sig&gt;', nextStatus: '',
- currentText: 'Hoy', currentStatus: '',
+ $.datepicker.regional['es'] = {
+ closeText: 'Cerrar',
+ prevText: '&#x3c;Ant',
+ nextText: 'Sig&#x3e;',
+ currentText: 'Hoy',
monthNames: ['Enero','Febrero','Marzo','Abril','Mayo','Junio',
'Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'],
monthNamesShort: ['Ene','Feb','Mar','Abr','May','Jun',
'Jul','Ago','Sep','Oct','Nov','Dic'],
- monthStatus: '', yearStatus: '',
- weekHeader: 'Sm', weekStatus: '',
- dayNames: ['Domingo','Lunes','Martes','Mi&eacute;rcoles','Jueves','Viernes','S&aacute;dabo'],
+ dayNames: ['Domingo','Lunes','Martes','Mi&eacute;rcoles','Jueves','Viernes','S&aacute;bado'],
dayNamesShort: ['Dom','Lun','Mar','Mi&eacute;','Juv','Vie','S&aacute;b'],
dayNamesMin: ['Do','Lu','Ma','Mi','Ju','Vi','S&aacute;'],
- dayStatus: 'DD', dateStatus: 'D, M d',
- dateFormat: 'dd/mm/yy', firstDay: 0,
- initStatus: '', isRTL: false};
+ dateFormat: 'dd/mm/yy', firstDay: 0,
+ isRTL: false};
$.datepicker.setDefaults($.datepicker.regional['es']);
}); \ No newline at end of file
diff --git a/template-common/lib/ui/i18n/ui.datepicker-fi.js b/template-common/lib/ui/i18n/ui.datepicker-fi.js
index 550a980aa..3a0943fd7 100644
--- a/template-common/lib/ui/i18n/ui.datepicker-fi.js
+++ b/template-common/lib/ui/i18n/ui.datepicker-fi.js
@@ -1,24 +1,19 @@
/* Finnish initialisation for the jQuery UI date picker plugin. */
-/* Written by Harri Kilpiö (harrikilpio@gmail.com). */
-
-$(document).ready(function(){
+/* Written by Harri Kilpi� (harrikilpio@gmail.com). */
+jQuery(function($){
$.datepicker.regional['fi'] = {
- clearText: 'Tyhjenn&auml;', clearStatus: '',
- closeText: 'Sulje', closeStatus: '',
- prevText: '&laquo;Edellinen', prevStatus: '',
- nextText: 'Seuraava&raquo;', nextStatus: '',
- currentText: 'T&auml;n&auml;&auml;n', currentStatus: '',
+ closeText: 'Sulje',
+ prevText: '&laquo;Edellinen',
+ nextText: 'Seuraava&raquo;',
+ currentText: 'T&auml;n&auml;&auml;n',
monthNames: ['Tammikuu','Helmikuu','Maaliskuu','Huhtikuu','Toukokuu','Kes&auml;kuu',
'Hein&auml;kuu','Elokuu','Syyskuu','Lokakuu','Marraskuu','Joulukuu'],
monthNamesShort: ['Tammi','Helmi','Maalis','Huhti','Touko','Kes&auml;',
'Hein&auml;','Elo','Syys','Loka','Marras','Joulu'],
- monthStatus: '', yearStatus: '',
- weekHeader: 'Vk', weekStatus: '',
dayNamesShort: ['Su','Ma','Ti','Ke','To','Pe','Su'],
dayNames: ['Sunnuntai','Maanantai','Tiistai','Keskiviikko','Torstai','Perjantai','Lauantai'],
dayNamesMin: ['Su','Ma','Ti','Ke','To','Pe','La'],
- dayStatus: 'DD', dateStatus: 'D, M d',
dateFormat: 'dd.mm.yy', firstDay: 1,
- initStatus: '', isRTL: false};
+ isRTL: false};
$.datepicker.setDefaults($.datepicker.regional['fi']);
});
diff --git a/template-common/lib/ui/i18n/ui.datepicker-fr.js b/template-common/lib/ui/i18n/ui.datepicker-fr.js
index 936cb8afe..02edda29d 100644
--- a/template-common/lib/ui/i18n/ui.datepicker-fr.js
+++ b/template-common/lib/ui/i18n/ui.datepicker-fr.js
@@ -1,22 +1,19 @@
/* French initialisation for the jQuery UI date picker plugin. */
/* Written by Keith Wood (kbwood@virginbroadband.com.au) and Stéphane Nahmani (sholby@sholby.net). */
jQuery(function($){
- $.datepicker.regional['fr'] = {clearText: 'Effacer', clearStatus: '',
- closeText: 'Fermer', closeStatus: 'Fermer sans modifier',
- prevText: '&lt;Préc', prevStatus: 'Voir le mois précédent',
- nextText: 'Suiv&gt;', nextStatus: 'Voir le mois suivant',
- currentText: 'Courant', currentStatus: 'Voir le mois courant',
+ $.datepicker.regional['fr'] = {
+ closeText: 'Fermer',
+ prevText: '&#x3c;Préc',
+ nextText: 'Suiv&#x3e;',
+ currentText: 'Courant',
monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin',
'Juillet','Août','Septembre','Octobre','Novembre','Décembre'],
monthNamesShort: ['Jan','Fév','Mar','Avr','Mai','Jun',
'Jul','Aoû','Sep','Oct','Nov','Déc'],
- monthStatus: 'Voir un autre mois', yearStatus: 'Voir un autre année',
- weekHeader: 'Sm', weekStatus: '',
dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'],
dayNamesShort: ['Dim','Lun','Mar','Mer','Jeu','Ven','Sam'],
dayNamesMin: ['Di','Lu','Ma','Me','Je','Ve','Sa'],
- dayStatus: 'Utiliser DD comme premier jour de la semaine', dateStatus: 'Choisir le DD, MM d',
- dateFormat: 'dd/mm/yy', firstDay: 0,
- initStatus: 'Choisir la date', isRTL: false};
+ dateFormat: 'dd/mm/yy', firstDay: 1,
+ isRTL: false};
$.datepicker.setDefaults($.datepicker.regional['fr']);
}); \ No newline at end of file
diff --git a/template-common/lib/ui/i18n/ui.datepicker-he.js b/template-common/lib/ui/i18n/ui.datepicker-he.js
index 87f55f729..38e0a03e2 100644
--- a/template-common/lib/ui/i18n/ui.datepicker-he.js
+++ b/template-common/lib/ui/i18n/ui.datepicker-he.js
@@ -1,22 +1,19 @@
/* Hebrew initialisation for the UI Datepicker extension. */
/* Written by Amir Hardon (ahardon at gmail dot com). */
-jQuery(document).ready(function(){
- jQuery.datepicker.regional['he'] = {clearText: 'נקה', clearStatus: '',
- closeText: 'סגור', closeStatus: '',
- prevText: '&#x3c;הקוד×', prevStatus: '',
- nextText: 'הב×&#x3e;', nextStatus: '',
- currentText: 'היו×', currentStatus: '',
+jQuery(function($){
+ $.datepicker.regional['he'] = {
+ closeText: 'סגור',
+ prevText: '&#x3c;הקוד×',
+ nextText: 'הב×&#x3e;',
+ currentText: 'היו×',
monthNames: ['ינו×ר','פברו×ר','מרץ','×פריל','מ××™','יוני',
'יולי','×וגוסט','ספטמבר','×וקטובר','נובמבר','דצמבר'],
monthNamesShort: ['1','2','3','4','5','6',
'7','8','9','10','11','12'],
- monthStatus: '', yearStatus: '',
- weekHeader: 'Sm', weekStatus: '',
dayNames: ['ר×שון','שני','שלישי','רביעי','חמישי','שישי','שבת'],
dayNamesShort: ['×\'','ב\'','×’\'','ד\'','×”\'','ו\'','שבת'],
dayNamesMin: ['×\'','ב\'','×’\'','ד\'','×”\'','ו\'','שבת'],
- dayStatus: 'DD', dateStatus: 'DD, M d',
- dateFormat: 'dd/mm/yy', firstDay: 0,
- initStatus: '', isRTL: true};
- jQuery.datepicker.setDefaults($.datepicker.regional['he']);
+ dateFormat: 'dd/mm/yy', firstDay: 0,
+ isRTL: true};
+ $.datepicker.setDefaults($.datepicker.regional['he']);
});
diff --git a/template-common/lib/ui/i18n/ui.datepicker-hu.js b/template-common/lib/ui/i18n/ui.datepicker-hu.js
index 1d71a3ddf..ee102acd0 100644
--- a/template-common/lib/ui/i18n/ui.datepicker-hu.js
+++ b/template-common/lib/ui/i18n/ui.datepicker-hu.js
@@ -1,22 +1,19 @@
/* Hungarian initialisation for the jQuery UI date picker plugin. */
/* Written by Istvan Karaszi (jquerycalendar@spam.raszi.hu). */
jQuery(function($){
- $.datepicker.regional['hu'] = {clearText: 'törlés', clearStatus: '',
- closeText: 'bezárás', closeStatus: '',
- prevText: '&laquo;&nbsp;vissza', prevStatus: '',
- nextText: 'előre&nbsp;&raquo;', nextStatus: '',
- currentText: 'ma', currentStatus: '',
+ $.datepicker.regional['hu'] = {
+ closeText: 'bezárás',
+ prevText: '&laquo;&nbsp;vissza',
+ nextText: 'előre&nbsp;&raquo;',
+ currentText: 'ma',
monthNames: ['Január', 'Február', 'Március', 'Ãprilis', 'Május', 'Június',
'Július', 'Augusztus', 'Szeptember', 'Október', 'November', 'December'],
monthNamesShort: ['Jan', 'Feb', 'Már', 'Ãpr', 'Máj', 'Jún',
'Júl', 'Aug', 'Szep', 'Okt', 'Nov', 'Dec'],
- monthStatus: '', yearStatus: '',
- weekHeader: 'Hé', weekStatus: '',
dayNames: ['Vasámap', 'Hétfö', 'Kedd', 'Szerda', 'Csütörtök', 'Péntek', 'Szombat'],
dayNamesShort: ['Vas', 'Hét', 'Ked', 'Sze', 'Csü', 'Pén', 'Szo'],
dayNamesMin: ['V', 'H', 'K', 'Sze', 'Cs', 'P', 'Szo'],
- dayStatus: 'DD', dateStatus: 'D, M d',
- dateFormat: 'yy-mm-dd', firstDay: 1,
- initStatus: '', isRTL: false};
+ dateFormat: 'yy-mm-dd', firstDay: 1,
+ isRTL: false};
$.datepicker.setDefaults($.datepicker.regional['hu']);
});
diff --git a/template-common/lib/ui/i18n/ui.datepicker-hy.js b/template-common/lib/ui/i18n/ui.datepicker-hy.js
index aed9f3574..1ffbeaae0 100644
--- a/template-common/lib/ui/i18n/ui.datepicker-hy.js
+++ b/template-common/lib/ui/i18n/ui.datepicker-hy.js
@@ -1,22 +1,19 @@
/* Armenian(UTF-8) initialisation for the jQuery UI date picker plugin. */
/* Written by Levon Zakaryan (levon.zakaryan@gmail.com)*/
jQuery(function($){
- $.datepicker.regional['hy'] = {clearText: 'Õ„Õ¡Ö„Ö€Õ¥Õ¬', clearStatus: '',
- closeText: 'Õ“Õ¡Õ¯Õ¥Õ¬', closeStatus: '',
- prevText: '&lt;Õ†Õ¡Õ­.', prevStatus: '',
- nextText: 'Õ€Õ¡Õ».&gt;', nextStatus: '',
- currentText: 'Ô±ÕµÕ½Ö…Ö€', currentStatus: '',
+ $.datepicker.regional['hy'] = {
+ closeText: 'Õ“Õ¡Õ¯Õ¥Õ¬',
+ prevText: '&#x3c;Õ†Õ¡Õ­.',
+ nextText: 'Õ€Õ¡Õ».&#x3e;',
+ currentText: 'Ô±ÕµÕ½Ö…Ö€',
monthNames: ['Õ€Õ¸Ö‚Õ¶Õ¾Õ¡Ö€','Õ“Õ¥Õ¿Ö€Õ¾Õ¡Ö€','Õ„Õ¡Ö€Õ¿','Ô±ÕºÖ€Õ«Õ¬','Õ„Õ¡ÕµÕ«Õ½','Õ€Õ¸Ö‚Õ¶Õ«Õ½',
'Õ€Õ¸Ö‚Õ¬Õ«Õ½','Õ•Õ£Õ¸Õ½Õ¿Õ¸Õ½','ÕÕ¥ÕºÕ¿Õ¥Õ´Õ¢Õ¥Ö€','Õ€Õ¸Õ¯Õ¿Õ¥Õ´Õ¢Õ¥Ö€','Õ†Õ¸ÕµÕ¥Õ´Õ¢Õ¥Ö€','Ô´Õ¥Õ¯Õ¿Õ¥Õ´Õ¢Õ¥Ö€'],
monthNamesShort: ['Õ€Õ¸Ö‚Õ¶Õ¾','Õ“Õ¥Õ¿Ö€','Õ„Õ¡Ö€Õ¿','Ô±ÕºÖ€','Õ„Õ¡ÕµÕ«Õ½','Õ€Õ¸Ö‚Õ¶Õ«Õ½',
'Õ€Õ¸Ö‚Õ¬','Õ•Õ£Õ½','ÕÕ¥Õº','Õ€Õ¸Õ¯','Õ†Õ¸Õµ','Ô´Õ¥Õ¯'],
- monthStatus: '', yearStatus: '',
- weekHeader: 'Õ‡Ô²Õ', weekStatus: '',
dayNames: ['Õ¯Õ«Ö€Õ¡Õ¯Õ«','Õ¥Õ¯Õ¸Ö‚Õ·Õ¡Õ¢Õ©Õ«','Õ¥Ö€Õ¥Ö„Õ·Õ¡Õ¢Õ©Õ«','Õ¹Õ¸Ö€Õ¥Ö„Õ·Õ¡Õ¢Õ©Õ«','Õ°Õ«Õ¶Õ£Õ·Õ¡Õ¢Õ©Õ«','Õ¸Ö‚Ö€Õ¢Õ¡Õ©','Õ·Õ¡Õ¢Õ¡Õ©'],
dayNamesShort: ['Õ¯Õ«Ö€','Õ¥Ö€Õ¯','Õ¥Ö€Ö„','Õ¹Ö€Ö„','Õ°Õ¶Õ£','Õ¸Ö‚Ö€Õ¢','Õ·Õ¢Õ©'],
dayNamesMin: ['Õ¯Õ«Ö€','Õ¥Ö€Õ¯','Õ¥Ö€Ö„','Õ¹Ö€Ö„','Õ°Õ¶Õ£','Õ¸Ö‚Ö€Õ¢','Õ·Õ¢Õ©'],
- dayStatus: 'DD', dateStatus: 'D, M d',
- dateFormat: 'dd.mm.yy', firstDay: 1,
- initStatus: '', isRTL: false};
+ dateFormat: 'dd.mm.yy', firstDay: 1,
+ isRTL: false};
$.datepicker.setDefaults($.datepicker.regional['hy']);
}); \ No newline at end of file
diff --git a/template-common/lib/ui/i18n/ui.datepicker-id.js b/template-common/lib/ui/i18n/ui.datepicker-id.js
index f8a417a2e..e5246c85d 100644
--- a/template-common/lib/ui/i18n/ui.datepicker-id.js
+++ b/template-common/lib/ui/i18n/ui.datepicker-id.js
@@ -1,22 +1,19 @@
/* Indonesian initialisation for the jQuery UI date picker plugin. */
/* Written by Deden Fathurahman (dedenf@gmail.com). */
jQuery(function($){
- $.datepicker.regional['id'] = {clearText: 'kosongkan', clearStatus: 'bersihkan tanggal yang sekarang',
- closeText: 'Tutup', closeStatus: 'Tutup tanpa mengubah',
- prevText: '&lt;mundur', prevStatus: 'Tampilkan bulan sebelumnya',
- nextText: 'maju&gt;', nextStatus: 'Tampilkan bulan berikutnya',
- currentText: 'hari ini', currentStatus: 'Tampilkan bulan sekarang',
+ $.datepicker.regional['id'] = {
+ closeText: 'Tutup',
+ prevText: '&#x3c;mundur',
+ nextText: 'maju&#x3e;',
+ currentText: 'hari ini',
monthNames: ['Januari','Februari','Maret','April','Mei','Juni',
'Juli','Agustus','September','Oktober','Nopember','Desember'],
monthNamesShort: ['Jan','Feb','Mar','Apr','Mei','Jun',
'Jul','Agus','Sep','Okt','Nop','Des'],
- monthStatus: 'Tampilkan bulan yang berbeda', yearStatus: 'Tampilkan tahun yang berbeda',
- weekHeader: 'Mg', weekStatus: 'Minggu dalam tahun',
dayNames: ['Minggu','Senin','Selasa','Rabu','Kamis','Jumat','Sabtu'],
dayNamesShort: ['Min','Sen','Sel','Rab','kam','Jum','Sab'],
dayNamesMin: ['Mg','Sn','Sl','Rb','Km','jm','Sb'],
- dayStatus: 'gunakan DD sebagai awal hari dalam minggu', dateStatus: 'pilih le DD, MM d',
- dateFormat: 'dd/mm/yy', firstDay: 0,
- initStatus: 'Pilih Tanggal', isRTL: false};
+ dateFormat: 'dd/mm/yy', firstDay: 0,
+ isRTL: false};
$.datepicker.setDefaults($.datepicker.regional['id']);
}); \ No newline at end of file
diff --git a/template-common/lib/ui/i18n/ui.datepicker-is.js b/template-common/lib/ui/i18n/ui.datepicker-is.js
index 65316eed0..68c1a07d4 100644
--- a/template-common/lib/ui/i18n/ui.datepicker-is.js
+++ b/template-common/lib/ui/i18n/ui.datepicker-is.js
@@ -1,22 +1,19 @@
/* Icelandic initialisation for the jQuery UI date picker plugin. */
/* Written by Haukur H. Thorsson (haukur@eskill.is). */
jQuery(function($){
- $.datepicker.regional['is'] = {clearText: 'Hreinsa', clearStatus: '',
- closeText: 'Loka', closeStatus: '',
- prevText: '< Fyrri', prevStatus: '',
- nextText: 'N&aelig;sti >', nextStatus: '',
- currentText: '&Iacute; dag', currentStatus: '',
+ $.datepicker.regional['is'] = {
+ closeText: 'Loka',
+ prevText: '&#x3c; Fyrri',
+ nextText: 'N&aelig;sti &#x3e;',
+ currentText: '&Iacute; dag',
monthNames: ['Jan&uacute;ar','Febr&uacute;ar','Mars','Apr&iacute;l','Ma&iacute','J&uacute;n&iacute;',
'J&uacute;l&iacute;','&Aacute;g&uacute;st','September','Okt&oacute;ber','N&oacute;vember','Desember'],
monthNamesShort: ['Jan','Feb','Mar','Apr','Ma&iacute;','J&uacute;n',
'J&uacute;l','&Aacute;g&uacute;','Sep','Okt','N&oacute;v','Des'],
- monthStatus: '', yearStatus: '',
- weekHeader: 'Vika', weekStatus: '',
dayNames: ['Sunnudagur','M&aacute;nudagur','&THORN;ri&eth;judagur','Mi&eth;vikudagur','Fimmtudagur','F&ouml;studagur','Laugardagur'],
dayNamesShort: ['Sun','M&aacute;n','&THORN;ri','Mi&eth;','Fim','F&ouml;s','Lau'],
dayNamesMin: ['Su','M&aacute;','&THORN;r','Mi','Fi','F&ouml;','La'],
- dayStatus: 'DD', dateStatus: 'D, M d',
- dateFormat: 'dd/mm/yy', firstDay: 0,
- initStatus: '', isRTL: false};
+ dateFormat: 'dd/mm/yy', firstDay: 0,
+ isRTL: false};
$.datepicker.setDefaults($.datepicker.regional['is']);
}); \ No newline at end of file
diff --git a/template-common/lib/ui/i18n/ui.datepicker-it.js b/template-common/lib/ui/i18n/ui.datepicker-it.js
index a1ee89599..f3e691e5e 100644
--- a/template-common/lib/ui/i18n/ui.datepicker-it.js
+++ b/template-common/lib/ui/i18n/ui.datepicker-it.js
@@ -1,22 +1,19 @@
/* Italian initialisation for the jQuery UI date picker plugin. */
/* Written by Apaella (apaella@gmail.com). */
jQuery(function($){
- $.datepicker.regional['it'] = {clearText: 'Svuota', clearStatus: '',
- closeText: 'Chiudi', closeStatus: '',
- prevText: '&lt;Prec', prevStatus: '',
- nextText: 'Succ&gt;', nextStatus: '',
- currentText: 'Oggi', currentStatus: '',
+ $.datepicker.regional['it'] = {
+ closeText: 'Chiudi',
+ prevText: '&#x3c;Prec',
+ nextText: 'Succ&#x3e;',
+ currentText: 'Oggi',
monthNames: ['Gennaio','Febbraio','Marzo','Aprile','Maggio','Giugno',
'Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre'],
monthNamesShort: ['Gen','Feb','Mar','Apr','Mag','Giu',
'Lug','Ago','Set','Ott','Nov','Dic'],
- monthStatus: '', yearStatus: '',
- weekHeader: 'Sm', weekStatus: '',
dayNames: ['Domenica','Luned&#236','Marted&#236','Mercoled&#236','Gioved&#236','Venerd&#236','Sabato'],
dayNamesShort: ['Dom','Lun','Mar','Mer','Gio','Ven','Sab'],
dayNamesMin: ['Do','Lu','Ma','Me','Gio','Ve','Sa'],
- dayStatus: 'DD', dateStatus: 'D, M d',
- dateFormat: 'dd/mm/yy', firstDay: 1,
- initStatus: '', isRTL: false};
+ dateFormat: 'dd/mm/yy', firstDay: 1,
+ isRTL: false};
$.datepicker.setDefaults($.datepicker.regional['it']);
});
diff --git a/template-common/lib/ui/i18n/ui.datepicker-ja.js b/template-common/lib/ui/i18n/ui.datepicker-ja.js
index e33909fe5..a6a5f45ce 100644
--- a/template-common/lib/ui/i18n/ui.datepicker-ja.js
+++ b/template-common/lib/ui/i18n/ui.datepicker-ja.js
@@ -1,22 +1,20 @@
-/* Japanese (UTF-8) initialisation for the jQuery UI date picker plugin. */
-/* Written by Milly. */
+/* Japanese initialisation for the jQuery UI date picker plugin. */
+/* Written by Kentaro SATO (kentaro@ranvis.com). */
jQuery(function($){
- $.datepicker.regional['ja'] = {clearText: '&#21066;&#38500;', clearStatus: '',
- closeText: '&#38281;&#12376;&#12427;', closeStatus: '',
- prevText: '&lt;&#21069;&#26376;', prevStatus: '',
- nextText: '&#27425;&#26376;&gt;', nextStatus: '',
- currentText: '&#20170;&#26085;', currentStatus: '',
- monthNames: ['1&#26376;','2&#26376;','3&#26376;','4&#26376;','5&#26376;','6&#26376;',
- '7&#26376;','8&#26376;','9&#26376;','10&#26376;','11&#26376;','12&#26376;'],
- monthNamesShort: ['1&#26376;','2&#26376;','3&#26376;','4&#26376;','5&#26376;','6&#26376;',
- '7&#26376;','8&#26376;','9&#26376;','10&#26376;','11&#26376;','12&#26376;'],
- monthStatus: '', yearStatus: '',
- weekHeader: 'Wk', weekStatus: '',
- dayNames: ['&#26085;','&#26376;','&#28779;','&#27700;','&#26408;','&#37329;','&#22303;'],
- dayNamesShort: ['&#26085;','&#26376;','&#28779;','&#27700;','&#26408;','&#37329;','&#22303;'],
- dayNamesMin: ['&#26085;','&#26376;','&#28779;','&#27700;','&#26408;','&#37329;','&#22303;'],
- dayStatus: 'DD', dateStatus: 'D, M d',
- dateFormat: 'yy/mm/dd', firstDay: 0,
- initStatus: '', isRTL: false};
+ $.datepicker.regional['ja'] = {
+ closeText: 'é–‰ã˜ã‚‹',
+ prevText: '&#x3c;å‰',
+ nextText: '次&#x3e;',
+ currentText: '今日',
+ monthNames: ['1月','2月','3月','4月','5月','6月',
+ '7月','8月','9月','10月','11月','12月'],
+ monthNamesShort: ['1月','2月','3月','4月','5月','6月',
+ '7月','8月','9月','10月','11月','12月'],
+ dayNames: ['日曜日','月曜日','ç«æ›œæ—¥','水曜日','木曜日','金曜日','土曜日'],
+ dayNamesShort: ['æ—¥','月','ç«','æ°´','木','金','土'],
+ dayNamesMin: ['æ—¥','月','ç«','æ°´','木','金','土'],
+ dateFormat: 'yy/mm/dd', firstDay: 0,
+ isRTL: false,
+ showMonthAfterYear: true};
$.datepicker.setDefaults($.datepicker.regional['ja']);
}); \ No newline at end of file
diff --git a/template-common/lib/ui/i18n/ui.datepicker-ko.js b/template-common/lib/ui/i18n/ui.datepicker-ko.js
index 1381e66b7..53ede9142 100644
--- a/template-common/lib/ui/i18n/ui.datepicker-ko.js
+++ b/template-common/lib/ui/i18n/ui.datepicker-ko.js
@@ -1,22 +1,19 @@
/* Korean initialisation for the jQuery calendar extension. */
/* Written by DaeKwon Kang (ncrash.dk@gmail.com). */
jQuery(function($){
- $.datepicker.regional['ko'] = {clearText: '지우기', clearStatus: '',
- closeText: '닫기', closeStatus: '',
- prevText: 'ì´ì „달', prevStatus: '',
- nextText: '다ìŒë‹¬', nextStatus: '',
- currentText: '오늘', currentStatus: '',
+ $.datepicker.regional['ko'] = {
+ closeText: '닫기',
+ prevText: 'ì´ì „달',
+ nextText: '다ìŒë‹¬',
+ currentText: '오늘',
monthNames: ['1ì›”(JAN)','2ì›”(FEB)','3ì›”(MAR)','4ì›”(APR)','5ì›”(MAY)','6ì›”(JUN)',
- '7ì›”(JUL)','8ì›”(AUG)','9ì›”(SEP)','10ì›”(OCT)','11ì›”(NOV)','12ì›”(DEC)'],
+ '7ì›”(JUL)','8ì›”(AUG)','9ì›”(SEP)','10ì›”(OCT)','11ì›”(NOV)','12ì›”(DEC)'],
monthNamesShort: ['1ì›”(JAN)','2ì›”(FEB)','3ì›”(MAR)','4ì›”(APR)','5ì›”(MAY)','6ì›”(JUN)',
- '7ì›”(JUL)','8ì›”(AUG)','9ì›”(SEP)','10ì›”(OCT)','11ì›”(NOV)','12ì›”(DEC)'],
- monthStatus: '', yearStatus: '',
- weekHeader: 'Wk', weekStatus: '',
+ '7ì›”(JUL)','8ì›”(AUG)','9ì›”(SEP)','10ì›”(OCT)','11ì›”(NOV)','12ì›”(DEC)'],
dayNames: ['ì¼','ì›”','í™”','수','목','금','토'],
dayNamesShort: ['ì¼','ì›”','í™”','수','목','금','토'],
dayNamesMin: ['ì¼','ì›”','í™”','수','목','금','토'],
- dayStatus: 'DD', dateStatus: 'D, M d',
- dateFormat: 'yy-mm-dd', firstDay: 0,
- initStatus: '', isRTL: false};
+ dateFormat: 'yy-mm-dd', firstDay: 0,
+ isRTL: false};
$.datepicker.setDefaults($.datepicker.regional['ko']);
}); \ No newline at end of file
diff --git a/template-common/lib/ui/i18n/ui.datepicker-lt.js b/template-common/lib/ui/i18n/ui.datepicker-lt.js
index 120e82b2f..a8a6aa1a4 100644
--- a/template-common/lib/ui/i18n/ui.datepicker-lt.js
+++ b/template-common/lib/ui/i18n/ui.datepicker-lt.js
@@ -1,25 +1,19 @@
-/**
- * Lithuanian (UTF-8) initialisation for the jQuery UI date picker plugin.
- *
- * @author Arturas Paleicikas <arturas@avalon.lt>
- */
+/* Lithuanian (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* @author Arturas Paleicikas <arturas@avalon.lt> */
jQuery(function($){
- $.datepicker.regional['lt'] = {clearText: 'IÅ¡valyti', clearStatus: '',
- closeText: 'Uždaryti', closeStatus: '',
- prevText: '&lt;Atgal', prevStatus: '',
- nextText: 'Pirmyn&gt;', nextStatus: '',
- currentText: 'Å iandien', currentStatus: '',
+ $.datepicker.regional['lt'] = {
+ closeText: 'Uždaryti',
+ prevText: '&#x3c;Atgal',
+ nextText: 'Pirmyn&#x3e;',
+ currentText: 'Å iandien',
monthNames: ['Sausis','Vasaris','Kovas','Balandis','Gegužė','Birželis',
'Liepa','Rugpjūtis','Rugsėjis','Spalis','Lapkritis','Gruodis'],
monthNamesShort: ['Sau','Vas','Kov','Bal','Geg','Bir',
'Lie','Rugp','Rugs','Spa','Lap','Gru'],
- monthStatus: '', yearStatus: '',
- weekHeader: '', weekStatus: '',
dayNames: ['sekmadienis','pirmadienis','antradienis','treÄiadienis','ketvirtadienis','penktadienis','Å¡eÅ¡tadienis'],
dayNamesShort: ['sek','pir','ant','tre','ket','pen','šeš'],
dayNamesMin: ['Se','Pr','An','Tr','Ke','Pe','Å e'],
- dayStatus: 'DD', dateStatus: 'D, M d',
- dateFormat: 'yy-mm-dd', firstDay: 1,
- initStatus: '', isRTL: false};
+ dateFormat: 'yy-mm-dd', firstDay: 1,
+ isRTL: false};
$.datepicker.setDefaults($.datepicker.regional['lt']);
}); \ No newline at end of file
diff --git a/template-common/lib/ui/i18n/ui.datepicker-lv.js b/template-common/lib/ui/i18n/ui.datepicker-lv.js
index 0a386ec60..12c32f83c 100644
--- a/template-common/lib/ui/i18n/ui.datepicker-lv.js
+++ b/template-common/lib/ui/i18n/ui.datepicker-lv.js
@@ -1,25 +1,19 @@
-/**
- * Latvian (UTF-8) initialisation for the jQuery UI date picker plugin.
- * @author Arturas Paleicikas <arturas.paleicikas@metasite.net>
- */
+/* Latvian (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* @author Arturas Paleicikas <arturas.paleicikas@metasite.net> */
jQuery(function($){
$.datepicker.regional['lv'] = {
- clearText: 'Notīrīt', clearStatus: '',
- closeText: 'Aizvērt', closeStatus: '',
- prevText: 'Iepr', prevStatus: '',
- nextText: 'NÄka', nextStatus: '',
- currentText: 'Å odien', currentStatus: '',
+ closeText: 'Aizvērt',
+ prevText: 'Iepr',
+ nextText: 'NÄka',
+ currentText: 'Å odien',
monthNames: ['JanvÄris','FebruÄris','Marts','AprÄ«lis','Maijs','JÅ«nijs',
'JÅ«lijs','Augusts','Septembris','Oktobris','Novembris','Decembris'],
monthNamesShort: ['Jan','Feb','Mar','Apr','Mai','JÅ«n',
'JÅ«l','Aug','Sep','Okt','Nov','Dec'],
- monthStatus: '', yearStatus: '',
- weekHeader: 'Nav', weekStatus: '',
dayNames: ['svētdiena','pirmdiena','otrdiena','trešdiena','ceturtdiena','piektdiena','sestdiena'],
dayNamesShort: ['svt','prm','otr','tre','ctr','pkt','sst'],
dayNamesMin: ['Sv','Pr','Ot','Tr','Ct','Pk','Ss'],
- dayStatus: 'DD', dateStatus: 'D, M d',
- dateFormat: 'dd-mm-yy', firstDay: 1,
- initStatus: '', isRTL: false};
+ dateFormat: 'dd-mm-yy', firstDay: 1,
+ isRTL: false};
$.datepicker.setDefaults($.datepicker.regional['lv']);
}); \ No newline at end of file
diff --git a/template-common/lib/ui/i18n/ui.datepicker-nl.js b/template-common/lib/ui/i18n/ui.datepicker-nl.js
index 0d52d6f33..938dc5ef6 100644
--- a/template-common/lib/ui/i18n/ui.datepicker-nl.js
+++ b/template-common/lib/ui/i18n/ui.datepicker-nl.js
@@ -1,21 +1,19 @@
-/* Dutch (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Dutch (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by Mathias Bynens <http://mathiasbynens.be/> */
jQuery(function($){
- $.datepicker.regional['nl'] = {clearText: 'Wissen', clearStatus: 'Wis de huidige datum',
- closeText: 'Sluiten', closeStatus: 'Sluit zonder verandering',
- prevText: '&lt;Terug', prevStatus: 'Laat de voorgaande maand zien',
- nextText: 'Volgende&gt;', nextStatus: 'Laat de volgende maand zien',
- currentText: 'Vandaag', currentStatus: 'Laat de huidige maand zien',
- monthNames: ['Januari','Februari','Maart','April','Mei','Juni',
- 'Juli','Augustus','September','Oktober','November','December'],
- monthNamesShort: ['Jan','Feb','Mrt','Apr','Mei','Jun',
- 'Jul','Aug','Sep','Okt','Nov','Dec'],
- monthStatus: 'Laat een andere maand zien', yearStatus: 'Laat een ander jaar zien',
- weekHeader: 'Wk', weekStatus: 'Week van het jaar',
- dayNames: ['Zondag','Maandag','Dinsdag','Woensdag','Donderdag','Vrijdag','Zaterdag'],
- dayNamesShort: ['Zon','Maa','Din','Woe','Don','Vri','Zat'],
- dayNamesMin: ['Zo','Ma','Di','Wo','Do','Vr','Za'],
- dayStatus: 'DD', dateStatus: 'D, M d',
- dateFormat: 'dd.mm.yy', firstDay: 1,
- initStatus: 'Kies een datum', isRTL: false};
- $.datepicker.setDefaults($.datepicker.regional['nl']);
+ $.datepicker.regional.nl = {
+ closeText: 'Sluiten',
+ prevText: 'â†',
+ nextText: '→',
+ currentText: 'Vandaag',
+ monthNames: ['januari', 'februari', 'maart', 'april', 'mei', 'juni',
+ 'juli', 'augustus', 'september', 'oktober', 'november', 'december'],
+ monthNamesShort: ['jan', 'feb', 'maa', 'apr', 'mei', 'jun',
+ 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'],
+ dayNames: ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'],
+ dayNamesShort: ['zon', 'maa', 'din', 'woe', 'don', 'vri', 'zat'],
+ dayNamesMin: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'],
+ dateFormat: 'dd/mm/yy', firstDay: 1,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional.nl);
}); \ No newline at end of file
diff --git a/template-common/lib/ui/i18n/ui.datepicker-no.js b/template-common/lib/ui/i18n/ui.datepicker-no.js
index 42932b0f9..d81f6bb2e 100644
--- a/template-common/lib/ui/i18n/ui.datepicker-no.js
+++ b/template-common/lib/ui/i18n/ui.datepicker-no.js
@@ -1,23 +1,19 @@
/* Norwegian initialisation for the jQuery UI date picker plugin. */
/* Written by Naimdjon Takhirov (naimdjon@gmail.com). */
-
-$(document).ready(function(){
- $.datepicker.regional['no'] = {clearText: 'Tøm', clearStatus: '',
- closeText: 'Lukk', closeStatus: '',
- prevText: '&laquo;Forrige', prevStatus: '',
- nextText: 'Neste&raquo;', nextStatus: '',
- currentText: 'I dag', currentStatus: '',
- monthNames: ['Januar','Februar','Mars','April','Mai','Juni',
+jQuery(function($){
+ $.datepicker.regional['no'] = {
+ closeText: 'Lukk',
+ prevText: '&laquo;Forrige',
+ nextText: 'Neste&raquo;',
+ currentText: 'I dag',
+ monthNames: ['Januar','Februar','Mars','April','Mai','Juni',
'Juli','August','September','Oktober','November','Desember'],
- monthNamesShort: ['Jan','Feb','Mar','Apr','Mai','Jun',
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Mai','Jun',
'Jul','Aug','Sep','Okt','Nov','Des'],
- monthStatus: '', yearStatus: '',
- weekHeader: 'Uke', weekStatus: '',
dayNamesShort: ['Søn','Man','Tir','Ons','Tor','Fre','Lør'],
dayNames: ['Søndag','Mandag','Tirsdag','Onsdag','Torsdag','Fredag','Lørdag'],
dayNamesMin: ['Sø','Ma','Ti','On','To','Fr','Lø'],
- dayStatus: 'DD', dateStatus: 'D, M d',
- dateFormat: 'yy-mm-dd', firstDay: 0,
- initStatus: '', isRTL: false};
- $.datepicker.setDefaults($.datepicker.regional['no']);
+ dateFormat: 'yy-mm-dd', firstDay: 0,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['no']);
});
diff --git a/template-common/lib/ui/i18n/ui.datepicker-pl.js b/template-common/lib/ui/i18n/ui.datepicker-pl.js
index bb3112d96..0ce38bea8 100644
--- a/template-common/lib/ui/i18n/ui.datepicker-pl.js
+++ b/template-common/lib/ui/i18n/ui.datepicker-pl.js
@@ -1,22 +1,19 @@
/* Polish initialisation for the jQuery UI date picker plugin. */
/* Written by Jacek Wysocki (jacek.wysocki@gmail.com). */
jQuery(function($){
- $.datepicker.regional['pl'] = {clearText: 'Wyczyść', clearStatus: 'Wyczyść obecną datę',
- closeText: 'Zamknij', closeStatus: 'Zamknij bez zapisywania',
- prevText: '&#x3c;Poprzedni', prevStatus: 'Pokaż poprzedni miesiąc',
- nextText: 'Następny&#x3e;', nextStatus: 'Pokaż następny miesiąc',
- currentText: 'Dziś', currentStatus: 'Pokaż aktualny miesiąc',
+ $.datepicker.regional['pl'] = {
+ closeText: 'Zamknij',
+ prevText: '&#x3c;Poprzedni',
+ nextText: 'Następny&#x3e;',
+ currentText: 'DziÅ›',
monthNames: ['Styczeń','Luty','Marzec','Kwiecień','Maj','Czerwiec',
'Lipiec','Sierpień','Wrzesień','Październik','Listopad','Grudzień'],
monthNamesShort: ['Sty','Lu','Mar','Kw','Maj','Cze',
'Lip','Sie','Wrz','Pa','Lis','Gru'],
- monthStatus: 'Pokaż inny miesiąc', yearStatus: 'Pokaż inny rok',
- weekHeader: 'Tydz', weekStatus: 'Tydzień roku',
dayNames: ['Niedziela','Poniedzialek','Wtorek','Åšroda','Czwartek','PiÄ…tek','Sobota'],
dayNamesShort: ['Nie','Pn','Wt','Åšr','Czw','Pt','So'],
dayNamesMin: ['N','Pn','Wt','Åšr','Cz','Pt','So'],
- dayStatus: 'Ustaw DD jako pierwszy dzień tygodnia', dateStatus: 'Wybierz D, M d',
- dateFormat: 'yy-mm-dd', firstDay: 1,
- initStatus: 'Wybierz datÄ™', isRTL: false};
+ dateFormat: 'yy-mm-dd', firstDay: 1,
+ isRTL: false};
$.datepicker.setDefaults($.datepicker.regional['pl']);
});
diff --git a/template-common/lib/ui/i18n/ui.datepicker-pt-BR.js b/template-common/lib/ui/i18n/ui.datepicker-pt-BR.js
index 457341983..e3ac652b3 100644
--- a/template-common/lib/ui/i18n/ui.datepicker-pt-BR.js
+++ b/template-common/lib/ui/i18n/ui.datepicker-pt-BR.js
@@ -1,22 +1,19 @@
/* Brazilian initialisation for the jQuery UI date picker plugin. */
/* Written by Leonildo Costa Silva (leocsilva@gmail.com). */
jQuery(function($){
- $.datepicker.regional['pt-BR'] = {clearText: 'Limpar', clearStatus: '',
- closeText: 'Fechar', closeStatus: '',
- prevText: '&lt;Anterior', prevStatus: '',
- nextText: 'Pr&oacute;ximo&gt;', nextStatus: '',
- currentText: 'Hoje', currentStatus: '',
+ $.datepicker.regional['pt-BR'] = {
+ closeText: 'Fechar',
+ prevText: '&#x3c;Anterior',
+ nextText: 'Pr&oacute;ximo&#x3e;',
+ currentText: 'Hoje',
monthNames: ['Janeiro','Fevereiro','Mar&ccedil;o','Abril','Maio','Junho',
'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun',
'Jul','Ago','Set','Out','Nov','Dez'],
- monthStatus: '', yearStatus: '',
- weekHeader: 'Sm', weekStatus: '',
dayNames: ['Domingo','Segunda-feira','Ter&ccedil;a-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sabado'],
dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sab'],
dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','Sab'],
- dayStatus: 'DD', dateStatus: 'D, M d',
- dateFormat: 'dd/mm/yy', firstDay: 0,
- initStatus: '', isRTL: false};
+ dateFormat: 'dd/mm/yy', firstDay: 0,
+ isRTL: false};
$.datepicker.setDefaults($.datepicker.regional['pt-BR']);
}); \ No newline at end of file
diff --git a/template-common/lib/ui/i18n/ui.datepicker-ro.js b/template-common/lib/ui/i18n/ui.datepicker-ro.js
index 5902596af..ec4033cc7 100644
--- a/template-common/lib/ui/i18n/ui.datepicker-ro.js
+++ b/template-common/lib/ui/i18n/ui.datepicker-ro.js
@@ -1,22 +1,22 @@
-/* Romanian initialisation for the jQuery UI date picker plugin. */
-/* Written by Edmond L. (ll_edmond@walla.com). */
+/* Romanian initialisation for the jQuery UI date picker plugin.
+ *
+ * Written by Edmond L. (ll_edmond@walla.com)
+ * and Ionut G. Stan (ionut.g.stan@gmail.com)
+ */
jQuery(function($){
- $.datepicker.regional['ro'] = {clearText: 'Curat', clearStatus: 'Sterge data curenta',
- closeText: 'Inchide', closeStatus: 'Inchide fara schimbare',
- prevText: '&#x3c;Anterior', prevStatus: 'Arata luna trecuta',
- nextText: 'Urmator&#x3e;', nextStatus: 'Arata luna urmatoare',
- currentText: 'Azi', currentStatus: 'Arata luna curenta',
- monthNames: ['Ianuarie','Februarie','Martie','Aprilie','Mai','Junie',
- 'Julie','August','Septembrie','Octobrie','Noiembrie','Decembrie'],
- monthNamesShort: ['Ian', 'Feb', 'Mar', 'Apr', 'Mai', 'Jun',
- 'Jul', 'Aug', 'Sep', 'Oct', 'Noi', 'Dec'],
- monthStatus: 'Arata o luna diferita', yearStatus: 'Arat un an diferit',
- weekHeader: 'Sapt', weekStatus: 'Saptamana anului',
- dayNames: ['Duminica', 'Luni', 'Marti', 'Miercuri', 'Joi', 'Vineri', 'Sambata'],
- dayNamesShort: ['Dum', 'Lun', 'Mar', 'Mie', 'Joi', 'Vin', 'Sam'],
- dayNamesMin: ['Du','Lu','Ma','Mi','Jo','Vi','Sa'],
- dayStatus: 'Seteaza DD ca prima saptamana zi', dateStatus: 'Selecteaza D, M d',
- dateFormat: 'mm/dd/yy', firstDay: 0,
- initStatus: 'Selecteaza o data', isRTL: false};
+ $.datepicker.regional['ro'] = {
+ closeText: 'ÃŽnchide',
+ prevText: '&laquo; Luna precedentă',
+ nextText: 'Luna următoare &raquo;',
+ currentText: 'Azi',
+ monthNames: ['Ianuarie','Februarie','Martie','Aprilie','Mai','Iunie',
+ 'Iulie','August','Septembrie','Octombrie','Noiembrie','Decembrie'],
+ monthNamesShort: ['Ian', 'Feb', 'Mar', 'Apr', 'Mai', 'Iun',
+ 'Iul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
+ dayNames: ['Duminică', 'Luni', 'Marţi', 'Miercuri', 'Joi', 'Vineri', 'Sâmbătă'],
+ dayNamesShort: ['Dum', 'Lun', 'Mar', 'Mie', 'Joi', 'Vin', 'Sâm'],
+ dayNamesMin: ['Du','Lu','Ma','Mi','Jo','Vi','Sâ'],
+ dateFormat: 'dd MM yy', firstDay: 1,
+ isRTL: false};
$.datepicker.setDefaults($.datepicker.regional['ro']);
});
diff --git a/template-common/lib/ui/i18n/ui.datepicker-ru.js b/template-common/lib/ui/i18n/ui.datepicker-ru.js
index 1b6518c50..62752c7f5 100644
--- a/template-common/lib/ui/i18n/ui.datepicker-ru.js
+++ b/template-common/lib/ui/i18n/ui.datepicker-ru.js
@@ -1,22 +1,19 @@
/* Russian (UTF-8) initialisation for the jQuery UI date picker plugin. */
/* Written by Andrew Stromnov (stromnov@gmail.com). */
jQuery(function($){
- $.datepicker.regional['ru'] = {clearText: 'ОчиÑтить', clearStatus: '',
- closeText: 'Закрыть', closeStatus: '',
- prevText: '&lt;Пред', prevStatus: '',
- nextText: 'След&gt;', nextStatus: '',
- currentText: 'СегоднÑ', currentStatus: '',
+ $.datepicker.regional['ru'] = {
+ closeText: 'Закрыть',
+ prevText: '&#x3c;Пред',
+ nextText: 'След&#x3e;',
+ currentText: 'СегоднÑ',
monthNames: ['Январь','Февраль','Март','Ðпрель','Май','Июнь',
'Июль','ÐвгуÑÑ‚','СентÑбрь','ОктÑбрь','ÐоÑбрь','Декабрь'],
monthNamesShort: ['Янв','Фев','Мар','Ðпр','Май','Июн',
'Июл','Ðвг','Сен','Окт','ÐоÑ','Дек'],
- monthStatus: '', yearStatus: '',
- weekHeader: 'Ðе', weekStatus: '',
dayNames: ['воÑкреÑенье','понедельник','вторник','Ñреда','четверг','пÑтница','Ñуббота'],
dayNamesShort: ['вÑк','пнд','втр','Ñрд','чтв','птн','Ñбт'],
dayNamesMin: ['Ð’Ñ','Пн','Ð’Ñ‚','Ср','Чт','Пт','Сб'],
- dayStatus: 'DD', dateStatus: 'D, M d',
- dateFormat: 'dd.mm.yy', firstDay: 1,
- initStatus: '', isRTL: false};
+ dateFormat: 'dd.mm.yy', firstDay: 1,
+ isRTL: false};
$.datepicker.setDefaults($.datepicker.regional['ru']);
}); \ No newline at end of file
diff --git a/template-common/lib/ui/i18n/ui.datepicker-sk.js b/template-common/lib/ui/i18n/ui.datepicker-sk.js
index c486fd7bb..a023ffa77 100644
--- a/template-common/lib/ui/i18n/ui.datepicker-sk.js
+++ b/template-common/lib/ui/i18n/ui.datepicker-sk.js
@@ -1,22 +1,19 @@
/* Slovak initialisation for the jQuery UI date picker plugin. */
/* Written by Vojtech Rinik (vojto@hmm.sk). */
jQuery(function($){
- $.datepicker.regional['sk'] = {clearText: 'Zmazať', clearStatus: '',
- closeText: 'Zavrieť', closeStatus: '',
- prevText: '&lt;Predchádzajúci', prevStatus: '',
- nextText: 'Nasledujúci&gt;', nextStatus: '',
- currentText: 'Dnes', currentStatus: '',
+ $.datepicker.regional['sk'] = {
+ closeText: 'Zavrieť',
+ prevText: '&#x3c;Predchádzajúci',
+ nextText: 'Nasledujúci&#x3e;',
+ currentText: 'Dnes',
monthNames: ['Január','Február','Marec','Apríl','Máj','Jún',
'Júl','August','September','Október','November','December'],
monthNamesShort: ['Jan','Feb','Mar','Apr','Máj','Jún',
'Júl','Aug','Sep','Okt','Nov','Dec'],
- monthStatus: '', yearStatus: '',
- weekHeader: 'Ty', weekStatus: '',
dayNames: ['Nedel\'a','Pondelok','Utorok','Streda','Å tvrtok','Piatok','Sobota'],
dayNamesShort: ['Ned','Pon','Uto','Str','Å tv','Pia','Sob'],
dayNamesMin: ['Ne','Po','Ut','St','Å t','Pia','So'],
- dayStatus: 'DD', dateStatus: 'D, M d',
- dateFormat: 'dd.mm.yy', firstDay: 0,
- initStatus: '', isRTL: false};
+ dateFormat: 'dd.mm.yy', firstDay: 0,
+ isRTL: false};
$.datepicker.setDefaults($.datepicker.regional['sk']);
});
diff --git a/template-common/lib/ui/i18n/ui.datepicker-sv.js b/template-common/lib/ui/i18n/ui.datepicker-sv.js
index 7842a63cc..47c4b24e4 100644
--- a/template-common/lib/ui/i18n/ui.datepicker-sv.js
+++ b/template-common/lib/ui/i18n/ui.datepicker-sv.js
@@ -1,22 +1,19 @@
/* Swedish initialisation for the jQuery UI date picker plugin. */
/* Written by Anders Ekdahl ( anders@nomadiz.se). */
jQuery(function($){
- $.datepicker.regional['sv'] = {clearText: 'Rensa', clearStatus: '',
- closeText: 'Stäng', closeStatus: '',
- prevText: '&laquo;Förra', prevStatus: '',
- nextText: 'Nästa&raquo;', nextStatus: '',
- currentText: 'Idag', currentStatus: '',
- monthNames: ['Januari','Februari','Mars','April','Maj','Juni',
+ $.datepicker.regional['sv'] = {
+ closeText: 'Stäng',
+ prevText: '&laquo;Förra',
+ nextText: 'Nästa&raquo;',
+ currentText: 'Idag',
+ monthNames: ['Januari','Februari','Mars','April','Maj','Juni',
'Juli','Augusti','September','Oktober','November','December'],
- monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
'Jul','Aug','Sep','Okt','Nov','Dec'],
- monthStatus: '', yearStatus: '',
- weekHeader: 'Ve', weekStatus: '',
dayNamesShort: ['Sön','Mån','Tis','Ons','Tor','Fre','Lör'],
dayNames: ['Söndag','Måndag','Tisdag','Onsdag','Torsdag','Fredag','Lördag'],
dayNamesMin: ['Sö','Må','Ti','On','To','Fr','Lö'],
- dayStatus: 'DD', dateStatus: 'D, M d',
- dateFormat: 'yy-mm-dd', firstDay: 1,
- initStatus: '', isRTL: false};
- $.datepicker.setDefaults($.datepicker.regional['sv']);
+ dateFormat: 'yy-mm-dd', firstDay: 1,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['sv']);
});
diff --git a/template-common/lib/ui/i18n/ui.datepicker-th.js b/template-common/lib/ui/i18n/ui.datepicker-th.js
index cfbf0ccc7..3c2a02b5e 100644
--- a/template-common/lib/ui/i18n/ui.datepicker-th.js
+++ b/template-common/lib/ui/i18n/ui.datepicker-th.js
@@ -1,22 +1,19 @@
/* Thai initialisation for the jQuery UI date picker plugin. */
/* Written by pipo (pipo@sixhead.com). */
jQuery(function($){
- $.datepicker.regional['th'] = {clearText: 'ลบ', clearStatus: '',
- closeText: 'ปิด', closeStatus: '',
- prevText: '&laquo;&nbsp;ย้อน', prevStatus: '',
- nextText: 'ถัดไป&nbsp;&raquo;', nextStatus: '',
- currentText: 'วันนี้', currentStatus: '',
+ $.datepicker.regional['th'] = {
+ closeText: 'ปิด',
+ prevText: '&laquo;&nbsp;ย้อน',
+ nextText: 'ถัดไป&nbsp;&raquo;',
+ currentText: 'วันนี้',
monthNames: ['มà¸à¸£à¸²à¸„ม','à¸à¸¸à¸¡à¸ à¸²à¸žà¸±à¸™à¸˜à¹Œ','มีนาคม','เมษายน','พฤษภาคม','มิถุนายน',
'à¸à¸£à¸à¸à¸²à¸„ม','สิงหาคม','à¸à¸±à¸™à¸¢à¸²à¸¢à¸™','ตุลาคม','พฤศจิà¸à¸²à¸¢à¸™','ธันวาคม'],
monthNamesShort: ['ม.ค.','à¸.พ.','มี.ค.','เม.ย.','พ.ค.','มิ.ย.',
'à¸.ค.','ส.ค.','à¸.ย.','ต.ค.','พ.ย.','ธ.ค.'],
- monthStatus: '', yearStatus: '',
- weekHeader: 'Sm', weekStatus: '',
dayNames: ['อาทิตย์','จันทร์','อังคาร','พุธ','พฤหัสบดี','ศุà¸à¸£à¹Œ','เสาร์'],
dayNamesShort: ['อา.','จ.','อ.','พ.','พฤ.','ศ.','ส.'],
dayNamesMin: ['อา.','จ.','อ.','พ.','พฤ.','ศ.','ส.'],
- dayStatus: 'DD', dateStatus: 'D, M d',
- dateFormat: 'dd/mm/yy', firstDay: 0,
- initStatus: '', isRTL: false};
+ dateFormat: 'dd/mm/yy', firstDay: 0,
+ isRTL: false};
$.datepicker.setDefaults($.datepicker.regional['th']);
}); \ No newline at end of file
diff --git a/template-common/lib/ui/i18n/ui.datepicker-tr.js b/template-common/lib/ui/i18n/ui.datepicker-tr.js
index 80670d14b..5817b2ac0 100644
--- a/template-common/lib/ui/i18n/ui.datepicker-tr.js
+++ b/template-common/lib/ui/i18n/ui.datepicker-tr.js
@@ -1,22 +1,19 @@
/* Turkish initialisation for the jQuery UI date picker plugin. */
/* Written by Izzet Emre Erkan (kara@karalamalar.net). */
jQuery(function($){
- $.datepicker.regional['tr'] = {clearText: 'temizle', clearStatus: 'geçerli tarihi temizler',
- closeText: 'kapat', closeStatus: 'sadece göstergeyi kapat',
- prevText: '&#x3c;geri', prevStatus: 'önceki ayı göster',
- nextText: 'ileri&#x3e', nextStatus: 'sonraki ayı göster',
- currentText: 'bugün', currentStatus: '',
+ $.datepicker.regional['tr'] = {
+ closeText: 'kapat',
+ prevText: '&#x3c;geri',
+ nextText: 'ileri&#x3e',
+ currentText: 'bugün',
monthNames: ['Ocak','Şubat','Mart','Nisan','Mayıs','Haziran',
'Temmuz','Ağustos','Eylül','Ekim','Kasım','Aralık'],
monthNamesShort: ['Oca','Åžub','Mar','Nis','May','Haz',
'Tem','AÄŸu','Eyl','Eki','Kas','Ara'],
- monthStatus: 'başka ay', yearStatus: 'başka yıl',
- weekHeader: 'Hf', weekStatus: 'Ayın haftaları',
dayNames: ['Pazar','Pazartesi','Salı','Çarşamba','Perşembe','Cuma','Cumartesi'],
dayNamesShort: ['Pz','Pt','Sa','Ça','Pe','Cu','Ct'],
dayNamesMin: ['Pz','Pt','Sa','Ça','Pe','Cu','Ct'],
- dayStatus: 'Haftanın ilk gününü belirleyin', dateStatus: 'D, M d seçiniz',
- dateFormat: 'dd.mm.yy', firstDay: 1,
- initStatus: 'Bir tarih seçiniz', isRTL: false};
+ dateFormat: 'dd.mm.yy', firstDay: 1,
+ isRTL: false};
$.datepicker.setDefaults($.datepicker.regional['tr']);
}); \ No newline at end of file
diff --git a/template-common/lib/ui/i18n/ui.datepicker-uk.js b/template-common/lib/ui/i18n/ui.datepicker-uk.js
index d65e5d35d..1043d7cd8 100644
--- a/template-common/lib/ui/i18n/ui.datepicker-uk.js
+++ b/template-common/lib/ui/i18n/ui.datepicker-uk.js
@@ -1,10 +1,13 @@
/* Ukrainian (UTF-8) initialisation for the jQuery UI date picker plugin. */
/* Written by Maxim Drogobitskiy (maxdao@gmail.com). */
jQuery(function($){
- $.datepicker.regional['uk'] = {clearText: 'ОчиÑтити', clearStatus: '',
+ $.datepicker.regional['uk'] = {
+ clearText: 'ОчиÑтити', clearStatus: '',
closeText: 'Закрити', closeStatus: '',
- prevText: '&lt;&lt;', prevStatus: '',
- nextText: '&gt;&gt;', nextStatus: '',
+ prevText: '&#x3c;', prevStatus: '',
+ prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+ nextText: '&#x3e;', nextStatus: '',
+ nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
currentText: 'Сьогодні', currentStatus: '',
monthNames: ['Січень','Лютий','Березень','Квітень','Травень','Червень',
'Липень','Серпень','ВереÑень','Жовтень','ЛиÑтопад','Грудень'],
@@ -12,11 +15,11 @@ jQuery(function($){
'Лип','Сер','Вер','Жов','ЛиÑ','Гру'],
monthStatus: '', yearStatus: '',
weekHeader: 'Ðе', weekStatus: '',
- dayNames: ['неділÑ','понеділок','вівторок','Ñереда','четвер','пÑтницÑ','Ñуббота'],
+ dayNames: ['неділÑ','понеділок','вівторок','Ñереда','четвер','п’ÑтницÑ','Ñубота'],
dayNamesShort: ['нед','пнд','вів','Ñрд','чтв','птн','Ñбт'],
dayNamesMin: ['Ðд','Пн','Ð’Ñ‚','Ср','Чт','Пт','Сб'],
dayStatus: 'DD', dateStatus: 'D, M d',
- dateFormat: 'dd.mm.yy', firstDay: 1,
+ dateFormat: 'dd/mm/yy', firstDay: 1,
initStatus: '', isRTL: false};
$.datepicker.setDefaults($.datepicker.regional['uk']);
}); \ No newline at end of file
diff --git a/template-common/lib/ui/i18n/ui.datepicker-zh-CN.js b/template-common/lib/ui/i18n/ui.datepicker-zh-CN.js
index 05dad7244..e3a69dc6d 100644
--- a/template-common/lib/ui/i18n/ui.datepicker-zh-CN.js
+++ b/template-common/lib/ui/i18n/ui.datepicker-zh-CN.js
@@ -1,22 +1,19 @@
/* Chinese initialisation for the jQuery UI date picker plugin. */
/* Written by Cloudream (cloudream@gmail.com). */
jQuery(function($){
- $.datepicker.regional['zh-CN'] = {clearText: '清除', clearStatus: '清除已选日期',
- closeText: '关闭', closeStatus: 'ä¸æ”¹å˜å½“å‰é€‰æ‹©',
- prevText: '&lt;上月', prevStatus: '显示上月',
- nextText: '下月&gt;', nextStatus: '显示下月',
- currentText: '今天', currentStatus: '显示本月',
+ $.datepicker.regional['zh-CN'] = {
+ closeText: '关闭',
+ prevText: '&#x3c;上月',
+ nextText: '下月&#x3e;',
+ currentText: '今天',
monthNames: ['一月','二月','三月','四月','五月','六月',
'七月','八月','ä¹æœˆ','å月','å一月','å二月'],
monthNamesShort: ['一','二','三','四','五','六',
'七','å…«','ä¹','å','å一','å二'],
- monthStatus: '选择月份', yearStatus: '选择年份',
- weekHeader: '周', weekStatus: '年内周次',
dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
dayNamesMin: ['日','一','二','三','四','五','六'],
- dayStatus: '设置 DD 为一周起始', dateStatus: '选择 m月 d日, DD',
- dateFormat: 'yy-mm-dd', firstDay: 1,
- initStatus: '请选择日期', isRTL: false};
+ dateFormat: 'yy-mm-dd', firstDay: 1,
+ isRTL: false};
$.datepicker.setDefaults($.datepicker.regional['zh-CN']);
});
diff --git a/template-common/lib/ui/i18n/ui.datepicker-zh-TW.js b/template-common/lib/ui/i18n/ui.datepicker-zh-TW.js
index d1bca8d04..9cb49b72b 100644
--- a/template-common/lib/ui/i18n/ui.datepicker-zh-TW.js
+++ b/template-common/lib/ui/i18n/ui.datepicker-zh-TW.js
@@ -2,22 +2,18 @@
/* Written by Ressol (ressol@gmail.com). */
jQuery(function($){
$.datepicker.regional['zh-TW'] = {
- clearText: '清除', clearStatus: '清除已é¸æ—¥æœŸ',
- closeText: '關閉', closeStatus: 'ä¸æ”¹è®Šç›®å‰çš„é¸æ“‡',
- prevText: '&lt;上月', prevStatus: '顯示上月',
- nextText: '下月&gt;', nextStatus: '顯示下月',
- currentText: '今天', currentStatus: '顯示本月',
+ closeText: '關閉',
+ prevText: '&#x3c;上月',
+ nextText: '下月&#x3e;',
+ currentText: '今天',
monthNames: ['一月','二月','三月','四月','五月','六月',
'七月','八月','ä¹æœˆ','å月','å一月','å二月'],
monthNamesShort: ['一','二','三','四','五','六',
'七','å…«','ä¹','å','å一','å二'],
- monthStatus: 'é¸æ“‡æœˆä»½', yearStatus: 'é¸æ“‡å¹´ä»½',
- weekHeader: '周', weekStatus: '年內周次',
dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
dayNamesMin: ['日','一','二','三','四','五','六'],
- dayStatus: '設定 DD 為一周起始', dateStatus: 'é¸æ“‡ m月 dæ—¥, DD',
- dateFormat: 'yy/mm/dd', firstDay: 1,
- initStatus: 'è«‹é¸æ“‡æ—¥æœŸ', isRTL: false};
+ dateFormat: 'yy/mm/dd', firstDay: 1,
+ isRTL: false};
$.datepicker.setDefaults($.datepicker.regional['zh-TW']);
});
diff --git a/template-common/lib/ui/jquery.ui.all.js b/template-common/lib/ui/jquery.ui.all.js
index d2c316608..cf19f30a9 100644
--- a/template-common/lib/ui/jquery.ui.all.js
+++ b/template-common/lib/ui/jquery.ui.all.js
@@ -1,7616 +1,298 @@
-/*
- * jQuery UI 1.5.3
+/*
+ * jQuery UI 1.7.2
*
- * Copyright (c) 2008 Paul Bakaus (ui.jquery.com)
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
* http://docs.jquery.com/UI
*/
-;(function($) {
-
-$.ui = {
- plugin: {
- add: function(module, option, set) {
- var proto = $.ui[module].prototype;
- for(var i in set) {
- proto.plugins[i] = proto.plugins[i] || [];
- proto.plugins[i].push([option, set[i]]);
- }
- },
- call: function(instance, name, args) {
- var set = instance.plugins[name];
- if(!set) { return; }
-
- for (var i = 0; i < set.length; i++) {
- if (instance.options[set[i][0]]) {
- set[i][1].apply(instance.element, args);
- }
- }
- }
- },
- cssCache: {},
- css: function(name) {
- if ($.ui.cssCache[name]) { return $.ui.cssCache[name]; }
- var tmp = $('<div class="ui-gen">').addClass(name).css({position:'absolute', top:'-5000px', left:'-5000px', display:'block'}).appendTo('body');
-
- //if (!$.browser.safari)
- //tmp.appendTo('body');
-
- //Opera and Safari set width and height to 0px instead of auto
- //Safari returns rgba(0,0,0,0) when bgcolor is not set
- $.ui.cssCache[name] = !!(
- (!(/auto|default/).test(tmp.css('cursor')) || (/^[1-9]/).test(tmp.css('height')) || (/^[1-9]/).test(tmp.css('width')) ||
- !(/none/).test(tmp.css('backgroundImage')) || !(/transparent|rgba\(0, 0, 0, 0\)/).test(tmp.css('backgroundColor')))
- );
- try { $('body').get(0).removeChild(tmp.get(0)); } catch(e){}
- return $.ui.cssCache[name];
- },
- disableSelection: function(el) {
- $(el).attr('unselectable', 'on').css('MozUserSelect', 'none');
- },
- enableSelection: function(el) {
- $(el).attr('unselectable', 'off').css('MozUserSelect', '');
- },
- hasScroll: function(e, a) {
- var scroll = /top/.test(a||"top") ? 'scrollTop' : 'scrollLeft', has = false;
- if (e[scroll] > 0) return true; e[scroll] = 1;
- has = e[scroll] > 0 ? true : false; e[scroll] = 0;
- return has;
- }
-};
-
-
-/** jQuery core modifications and additions **/
-
-var _remove = $.fn.remove;
-$.fn.remove = function() {
- $("*", this).add(this).triggerHandler("remove");
- return _remove.apply(this, arguments );
-};
-
-// $.widget is a factory to create jQuery plugins
-// taking some boilerplate code out of the plugin code
-// created by Scott González and Jörn Zaefferer
-function getter(namespace, plugin, method) {
- var methods = $[namespace][plugin].getter || [];
- methods = (typeof methods == "string" ? methods.split(/,?\s+/) : methods);
- return ($.inArray(method, methods) != -1);
-}
-
-$.widget = function(name, prototype) {
- var namespace = name.split(".")[0];
- name = name.split(".")[1];
-
- // create plugin method
- $.fn[name] = function(options) {
- var isMethodCall = (typeof options == 'string'),
- args = Array.prototype.slice.call(arguments, 1);
-
- if (isMethodCall && getter(namespace, name, options)) {
- var instance = $.data(this[0], name);
- return (instance ? instance[options].apply(instance, args)
- : undefined);
- }
-
- return this.each(function() {
- var instance = $.data(this, name);
- if (isMethodCall && instance && $.isFunction(instance[options])) {
- instance[options].apply(instance, args);
- } else if (!isMethodCall) {
- $.data(this, name, new $[namespace][name](this, options));
- }
- });
- };
-
- // create widget constructor
- $[namespace][name] = function(element, options) {
- var self = this;
-
- this.widgetName = name;
- this.widgetBaseClass = namespace + '-' + name;
-
- this.options = $.extend({}, $.widget.defaults, $[namespace][name].defaults, options);
- this.element = $(element)
- .bind('setData.' + name, function(e, key, value) {
- return self.setData(key, value);
- })
- .bind('getData.' + name, function(e, key) {
- return self.getData(key);
- })
- .bind('remove', function() {
- return self.destroy();
- });
- this.init();
- };
-
- // add widget prototype
- $[namespace][name].prototype = $.extend({}, $.widget.prototype, prototype);
-};
-
-$.widget.prototype = {
- init: function() {},
- destroy: function() {
- this.element.removeData(this.widgetName);
- },
-
- getData: function(key) {
- return this.options[key];
- },
- setData: function(key, value) {
- this.options[key] = value;
-
- if (key == 'disabled') {
- this.element[value ? 'addClass' : 'removeClass'](
- this.widgetBaseClass + '-disabled');
- }
- },
-
- enable: function() {
- this.setData('disabled', false);
- },
- disable: function() {
- this.setData('disabled', true);
- }
-};
-
-$.widget.defaults = {
- disabled: false
-};
-
-
-/** Mouse Interaction Plugin **/
-
-$.ui.mouse = {
- mouseInit: function() {
- var self = this;
-
- this.element.bind('mousedown.'+this.widgetName, function(e) {
- return self.mouseDown(e);
- });
-
- // Prevent text selection in IE
- if ($.browser.msie) {
- this._mouseUnselectable = this.element.attr('unselectable');
- this.element.attr('unselectable', 'on');
- }
-
- this.started = false;
- },
-
- // TODO: make sure destroying one instance of mouse doesn't mess with
- // other instances of mouse
- mouseDestroy: function() {
- this.element.unbind('.'+this.widgetName);
-
- // Restore text selection in IE
- ($.browser.msie
- && this.element.attr('unselectable', this._mouseUnselectable));
- },
-
- mouseDown: function(e) {
- // we may have missed mouseup (out of window)
- (this._mouseStarted && this.mouseUp(e));
-
- this._mouseDownEvent = e;
-
- var self = this,
- btnIsLeft = (e.which == 1),
- elIsCancel = (typeof this.options.cancel == "string" ? $(e.target).parents().add(e.target).filter(this.options.cancel).length : false);
- if (!btnIsLeft || elIsCancel || !this.mouseCapture(e)) {
- return true;
- }
-
- this._mouseDelayMet = !this.options.delay;
- if (!this._mouseDelayMet) {
- this._mouseDelayTimer = setTimeout(function() {
- self._mouseDelayMet = true;
- }, this.options.delay);
- }
-
- if (this.mouseDistanceMet(e) && this.mouseDelayMet(e)) {
- this._mouseStarted = (this.mouseStart(e) !== false);
- if (!this._mouseStarted) {
- e.preventDefault();
- return true;
- }
- }
-
- // these delegates are required to keep context
- this._mouseMoveDelegate = function(e) {
- return self.mouseMove(e);
- };
- this._mouseUpDelegate = function(e) {
- return self.mouseUp(e);
- };
- $(document)
- .bind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
- .bind('mouseup.'+this.widgetName, this._mouseUpDelegate);
-
- return false;
- },
-
- mouseMove: function(e) {
- // IE mouseup check - mouseup happened when mouse was out of window
- if ($.browser.msie && !e.button) {
- return this.mouseUp(e);
- }
-
- if (this._mouseStarted) {
- this.mouseDrag(e);
- return false;
- }
-
- if (this.mouseDistanceMet(e) && this.mouseDelayMet(e)) {
- this._mouseStarted =
- (this.mouseStart(this._mouseDownEvent, e) !== false);
- (this._mouseStarted ? this.mouseDrag(e) : this.mouseUp(e));
- }
-
- return !this._mouseStarted;
- },
-
- mouseUp: function(e) {
- $(document)
- .unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
- .unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);
-
- if (this._mouseStarted) {
- this._mouseStarted = false;
- this.mouseStop(e);
- }
-
- return false;
- },
-
- mouseDistanceMet: function(e) {
- return (Math.max(
- Math.abs(this._mouseDownEvent.pageX - e.pageX),
- Math.abs(this._mouseDownEvent.pageY - e.pageY)
- ) >= this.options.distance
- );
- },
-
- mouseDelayMet: function(e) {
- return this._mouseDelayMet;
- },
-
- // These are placeholder methods, to be overriden by extending plugin
- mouseStart: function(e) {},
- mouseDrag: function(e) {},
- mouseStop: function(e) {},
- mouseCapture: function(e) { return true; }
-};
-
-$.ui.mouse.defaults = {
- cancel: null,
- distance: 1,
- delay: 0
-};
-
-})(jQuery);
-/*
- * jQuery UI Draggable
+jQuery.ui||(function(c){var i=c.fn.remove,d=c.browser.mozilla&&(parseFloat(c.browser.version)<1.9);c.ui={version:"1.7.2",plugin:{add:function(k,l,n){var m=c.ui[k].prototype;for(var j in n){m.plugins[j]=m.plugins[j]||[];m.plugins[j].push([l,n[j]])}},call:function(j,l,k){var n=j.plugins[l];if(!n||!j.element[0].parentNode){return}for(var m=0;m<n.length;m++){if(j.options[n[m][0]]){n[m][1].apply(j.element,k)}}}},contains:function(k,j){return document.compareDocumentPosition?k.compareDocumentPosition(j)&16:k!==j&&k.contains(j)},hasScroll:function(m,k){if(c(m).css("overflow")=="hidden"){return false}var j=(k&&k=="left")?"scrollLeft":"scrollTop",l=false;if(m[j]>0){return true}m[j]=1;l=(m[j]>0);m[j]=0;return l},isOverAxis:function(k,j,l){return(k>j)&&(k<(j+l))},isOver:function(o,k,n,m,j,l){return c.ui.isOverAxis(o,n,j)&&c.ui.isOverAxis(k,m,l)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(d){var f=c.attr,e=c.fn.removeAttr,h="http://www.w3.org/2005/07/aaa",a=/^aria-/,b=/^wairole:/;c.attr=function(k,j,l){var m=l!==undefined;return(j=="role"?(m?f.call(this,k,j,"wairole:"+l):(f.apply(this,arguments)||"").replace(b,"")):(a.test(j)?(m?k.setAttributeNS(h,j.replace(a,"aaa:"),l):f.call(this,k,j.replace(a,"aaa:"))):f.apply(this,arguments)))};c.fn.removeAttr=function(j){return(a.test(j)?this.each(function(){this.removeAttributeNS(h,j.replace(a,""))}):e.call(this,j))}}c.fn.extend({remove:function(){c("*",this).add(this).each(function(){c(this).triggerHandler("remove")});return i.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var j;if((c.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){j=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(c.curCSS(this,"position",1))&&(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}else{j=this.parents().filter(function(){return(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!j.length?c(document):j}});c.extend(c.expr[":"],{data:function(l,k,j){return !!c.data(l,j[3])},focusable:function(k){var l=k.nodeName.toLowerCase(),j=c.attr(k,"tabindex");return(/input|select|textarea|button|object/.test(l)?!k.disabled:"a"==l||"area"==l?k.href||!isNaN(j):!isNaN(j))&&!c(k)["area"==l?"parents":"closest"](":hidden").length},tabbable:function(k){var j=c.attr(k,"tabindex");return(isNaN(j)||j>=0)&&c(k).is(":focusable")}});function g(m,n,o,l){function k(q){var p=c[m][n][q]||[];return(typeof p=="string"?p.split(/,?\s+/):p)}var j=k("getter");if(l.length==1&&typeof l[0]=="string"){j=j.concat(k("getterSetter"))}return(c.inArray(o,j)!=-1)}c.widget=function(k,j){var l=k.split(".")[0];k=k.split(".")[1];c.fn[k]=function(p){var n=(typeof p=="string"),o=Array.prototype.slice.call(arguments,1);if(n&&p.substring(0,1)=="_"){return this}if(n&&g(l,k,p,o)){var m=c.data(this[0],k);return(m?m[p].apply(m,o):undefined)}return this.each(function(){var q=c.data(this,k);(!q&&!n&&c.data(this,k,new c[l][k](this,p))._init());(q&&n&&c.isFunction(q[p])&&q[p].apply(q,o))})};c[l]=c[l]||{};c[l][k]=function(o,n){var m=this;this.namespace=l;this.widgetName=k;this.widgetEventPrefix=c[l][k].eventPrefix||k;this.widgetBaseClass=l+"-"+k;this.options=c.extend({},c.widget.defaults,c[l][k].defaults,c.metadata&&c.metadata.get(o)[k],n);this.element=c(o).bind("setData."+k,function(q,p,r){if(q.target==o){return m._setData(p,r)}}).bind("getData."+k,function(q,p){if(q.target==o){return m._getData(p)}}).bind("remove",function(){return m.destroy()})};c[l][k].prototype=c.extend({},c.widget.prototype,j);c[l][k].getterSetter="option"};c.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")},option:function(l,m){var k=l,j=this;if(typeof l=="string"){if(m===undefined){return this._getData(l)}k={};k[l]=m}c.each(k,function(n,o){j._setData(n,o)})},_getData:function(j){return this.options[j]},_setData:function(j,k){this.options[j]=k;if(j=="disabled"){this.element[k?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",k)}},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(l,m,n){var p=this.options[l],j=(l==this.widgetEventPrefix?l:this.widgetEventPrefix+l);m=c.Event(m);m.type=j;if(m.originalEvent){for(var k=c.event.props.length,o;k;){o=c.event.props[--k];m[o]=m.originalEvent[o]}}this.element.trigger(m,n);return !(c.isFunction(p)&&p.call(this.element[0],m,n)===false||m.isDefaultPrevented())}};c.widget.defaults={disabled:false};c.ui.mouse={_mouseInit:function(){var j=this;this.element.bind("mousedown."+this.widgetName,function(k){return j._mouseDown(k)}).bind("click."+this.widgetName,function(k){if(j._preventClickEvent){j._preventClickEvent=false;k.stopImmediatePropagation();return false}});if(c.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);(c.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},_mouseDown:function(l){l.originalEvent=l.originalEvent||{};if(l.originalEvent.mouseHandled){return}(this._mouseStarted&&this._mouseUp(l));this._mouseDownEvent=l;var k=this,m=(l.which==1),j=(typeof this.options.cancel=="string"?c(l.target).parents().add(l.target).filter(this.options.cancel).length:false);if(!m||j||!this._mouseCapture(l)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){k.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(l)&&this._mouseDelayMet(l)){this._mouseStarted=(this._mouseStart(l)!==false);if(!this._mouseStarted){l.preventDefault();return true}}this._mouseMoveDelegate=function(n){return k._mouseMove(n)};this._mouseUpDelegate=function(n){return k._mouseUp(n)};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);(c.browser.safari||l.preventDefault());l.originalEvent.mouseHandled=true;return true},_mouseMove:function(j){if(c.browser.msie&&!j.button){return this._mouseUp(j)}if(this._mouseStarted){this._mouseDrag(j);return j.preventDefault()}if(this._mouseDistanceMet(j)&&this._mouseDelayMet(j)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,j)!==false);(this._mouseStarted?this._mouseDrag(j):this._mouseUp(j))}return !this._mouseStarted},_mouseUp:function(j){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(j.target==this._mouseDownEvent.target);this._mouseStop(j)}return false},_mouseDistanceMet:function(j){return(Math.max(Math.abs(this._mouseDownEvent.pageX-j.pageX),Math.abs(this._mouseDownEvent.pageY-j.pageY))>=this.options.distance)},_mouseDelayMet:function(j){return this.mouseDelayMet},_mouseStart:function(j){},_mouseDrag:function(j){},_mouseStop:function(j){},_mouseCapture:function(j){return true}};c.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);;/*
+ * jQuery UI Draggable 1.7.2
*
- * Copyright (c) 2008 Paul Bakaus
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
- *
+ *
* http://docs.jquery.com/UI/Draggables
*
* Depends:
* ui.core.js
*/
-(function($) {
-
-$.widget("ui.draggable", $.extend({}, $.ui.mouse, {
- init: function() {
-
- //Initialize needed constants
- var o = this.options;
-
- //Position the node
- if (o.helper == 'original' && !(/(relative|absolute|fixed)/).test(this.element.css('position')))
- this.element.css('position', 'relative');
-
- this.element.addClass('ui-draggable');
- (o.disabled && this.element.addClass('ui-draggable-disabled'));
-
- this.mouseInit();
-
- },
- mouseStart: function(e) {
- var o = this.options;
-
- if (this.helper || o.disabled || $(e.target).is('.ui-resizable-handle')) return false;
-
- var handle = !this.options.handle || !$(this.options.handle, this.element).length ? true : false;
-
-
- $(this.options.handle, this.element).find("*").andSelf().each(function() {
- if(this == e.target) handle = true;
- });
- if (!handle) return false;
-
- if($.ui.ddmanager) $.ui.ddmanager.current = this;
-
- //Create and append the visible helper
- this.helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [e])) : (o.helper == 'clone' ? this.element.clone() : this.element);
- if(!this.helper.parents('body').length) this.helper.appendTo((o.appendTo == 'parent' ? this.element[0].parentNode : o.appendTo));
- if(this.helper[0] != this.element[0] && !(/(fixed|absolute)/).test(this.helper.css("position"))) this.helper.css("position", "absolute");
-
- /*
- * - Position generation -
- * This block generates everything position related - it's the core of draggables.
- */
-
- this.margins = { //Cache the margins
- left: (parseInt(this.element.css("marginLeft"),10) || 0),
- top: (parseInt(this.element.css("marginTop"),10) || 0)
- };
-
- this.cssPosition = this.helper.css("position"); //Store the helper's css position
- this.offset = this.element.offset(); //The element's absolute position on the page
- this.offset = { //Substract the margins from the element's absolute offset
- top: this.offset.top - this.margins.top,
- left: this.offset.left - this.margins.left
- };
-
- this.offset.click = { //Where the click happened, relative to the element
- left: e.pageX - this.offset.left,
- top: e.pageY - this.offset.top
- };
-
- this.offsetParent = this.helper.offsetParent(); var po = this.offsetParent.offset(); //Get the offsetParent and cache its position
- if(this.offsetParent[0] == document.body && $.browser.mozilla) po = { top: 0, left: 0 }; //Ugly FF3 fix
- this.offset.parent = { //Store its position plus border
- top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
- left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
- };
-
- var p = this.element.position(); //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helpers
- this.offset.relative = this.cssPosition == "relative" ? {
- top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.offsetParent[0].scrollTop,
- left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.offsetParent[0].scrollLeft
- } : { top: 0, left: 0 };
-
- this.originalPosition = this.generatePosition(e); //Generate the original position
- this.helperProportions = { width: this.helper.outerWidth(), height: this.helper.outerHeight() };//Cache the helper size
-
- if(o.cursorAt) {
- if(o.cursorAt.left != undefined) this.offset.click.left = o.cursorAt.left + this.margins.left;
- if(o.cursorAt.right != undefined) this.offset.click.left = this.helperProportions.width - o.cursorAt.right + this.margins.left;
- if(o.cursorAt.top != undefined) this.offset.click.top = o.cursorAt.top + this.margins.top;
- if(o.cursorAt.bottom != undefined) this.offset.click.top = this.helperProportions.height - o.cursorAt.bottom + this.margins.top;
- }
-
-
- /*
- * - Position constraining -
- * Here we prepare position constraining like grid and containment.
- */
-
- if(o.containment) {
- if(o.containment == 'parent') o.containment = this.helper[0].parentNode;
- if(o.containment == 'document' || o.containment == 'window') this.containment = [
- 0 - this.offset.relative.left - this.offset.parent.left,
- 0 - this.offset.relative.top - this.offset.parent.top,
- $(o.containment == 'document' ? document : window).width() - this.offset.relative.left - this.offset.parent.left - this.helperProportions.width - this.margins.left - (parseInt(this.element.css("marginRight"),10) || 0),
- ($(o.containment == 'document' ? document : window).height() || document.body.parentNode.scrollHeight) - this.offset.relative.top - this.offset.parent.top - this.helperProportions.height - this.margins.top - (parseInt(this.element.css("marginBottom"),10) || 0)
- ];
-
- if(!(/^(document|window|parent)$/).test(o.containment)) {
- var ce = $(o.containment)[0];
- var co = $(o.containment).offset();
-
- this.containment = [
- co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) - this.offset.relative.left - this.offset.parent.left,
- co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) - this.offset.relative.top - this.offset.parent.top,
- co.left+Math.max(ce.scrollWidth,ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - this.offset.relative.left - this.offset.parent.left - this.helperProportions.width - this.margins.left - (parseInt(this.element.css("marginRight"),10) || 0),
- co.top+Math.max(ce.scrollHeight,ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - this.offset.relative.top - this.offset.parent.top - this.helperProportions.height - this.margins.top - (parseInt(this.element.css("marginBottom"),10) || 0)
- ];
- }
- }
-
- //Call plugins and callbacks
- this.propagate("start", e);
-
- this.helperProportions = { width: this.helper.outerWidth(), height: this.helper.outerHeight() };//Recache the helper size
- if ($.ui.ddmanager && !o.dropBehaviour) $.ui.ddmanager.prepareOffsets(this, e);
-
- this.helper.addClass("ui-draggable-dragging");
- this.mouseDrag(e); //Execute the drag once - this causes the helper not to be visible before getting its correct position
- return true;
- },
- convertPositionTo: function(d, pos) {
- if(!pos) pos = this.position;
- var mod = d == "absolute" ? 1 : -1;
- return {
- top: (
- pos.top // the calculated relative position
- + this.offset.relative.top * mod // Only for relative positioned nodes: Relative offset from element to offset parent
- + this.offset.parent.top * mod // The offsetParent's offset without borders (offset + border)
- - (this.cssPosition == "fixed" || (this.cssPosition == "absolute" && this.offsetParent[0] == document.body) ? 0 : this.offsetParent[0].scrollTop) * mod // The offsetParent's scroll position, not if the element is fixed
- + (this.cssPosition == "fixed" ? $(document).scrollTop() : 0) * mod
- + this.margins.top * mod //Add the margin (you don't want the margin counting in intersection methods)
- ),
- left: (
- pos.left // the calculated relative position
- + this.offset.relative.left * mod // Only for relative positioned nodes: Relative offset from element to offset parent
- + this.offset.parent.left * mod // The offsetParent's offset without borders (offset + border)
- - (this.cssPosition == "fixed" || (this.cssPosition == "absolute" && this.offsetParent[0] == document.body) ? 0 : this.offsetParent[0].scrollLeft) * mod // The offsetParent's scroll position, not if the element is fixed
- + (this.cssPosition == "fixed" ? $(document).scrollLeft() : 0) * mod
- + this.margins.left * mod //Add the margin (you don't want the margin counting in intersection methods)
- )
- };
- },
- generatePosition: function(e) {
-
- var o = this.options;
- var position = {
- top: (
- e.pageY // The absolute mouse position
- - this.offset.click.top // Click offset (relative to the element)
- - this.offset.relative.top // Only for relative positioned nodes: Relative offset from element to offset parent
- - this.offset.parent.top // The offsetParent's offset without borders (offset + border)
- + (this.cssPosition == "fixed" || (this.cssPosition == "absolute" && this.offsetParent[0] == document.body) ? 0 : this.offsetParent[0].scrollTop) // The offsetParent's scroll position, not if the element is fixed
- - (this.cssPosition == "fixed" ? $(document).scrollTop() : 0)
- ),
- left: (
- e.pageX // The absolute mouse position
- - this.offset.click.left // Click offset (relative to the element)
- - this.offset.relative.left // Only for relative positioned nodes: Relative offset from element to offset parent
- - this.offset.parent.left // The offsetParent's offset without borders (offset + border)
- + (this.cssPosition == "fixed" || (this.cssPosition == "absolute" && this.offsetParent[0] == document.body) ? 0 : this.offsetParent[0].scrollLeft) // The offsetParent's scroll position, not if the element is fixed
- - (this.cssPosition == "fixed" ? $(document).scrollLeft() : 0)
- )
- };
-
- if(!this.originalPosition) return position; //If we are not dragging yet, we won't check for options
-
- /*
- * - Position constraining -
- * Constrain the position to a mix of grid, containment.
- */
- if(this.containment) {
- if(position.left < this.containment[0]) position.left = this.containment[0];
- if(position.top < this.containment[1]) position.top = this.containment[1];
- if(position.left > this.containment[2]) position.left = this.containment[2];
- if(position.top > this.containment[3]) position.top = this.containment[3];
- }
-
- if(o.grid) {
- var top = this.originalPosition.top + Math.round((position.top - this.originalPosition.top) / o.grid[1]) * o.grid[1];
- position.top = this.containment ? (!(top < this.containment[1] || top > this.containment[3]) ? top : (!(top < this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
-
- var left = this.originalPosition.left + Math.round((position.left - this.originalPosition.left) / o.grid[0]) * o.grid[0];
- position.left = this.containment ? (!(left < this.containment[0] || left > this.containment[2]) ? left : (!(left < this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
- }
-
- return position;
- },
- mouseDrag: function(e) {
-
- //Compute the helpers position
- this.position = this.generatePosition(e);
- this.positionAbs = this.convertPositionTo("absolute");
-
- //Call plugins and callbacks and use the resulting position if something is returned
- this.position = this.propagate("drag", e) || this.position;
-
- if(!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left+'px';
- if(!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top+'px';
- if($.ui.ddmanager) $.ui.ddmanager.drag(this, e);
-
- return false;
- },
- mouseStop: function(e) {
-
- //If we are using droppables, inform the manager about the drop
- var dropped = false;
- if ($.ui.ddmanager && !this.options.dropBehaviour)
- var dropped = $.ui.ddmanager.drop(this, e);
-
- if((this.options.revert == "invalid" && !dropped) || (this.options.revert == "valid" && dropped) || this.options.revert === true) {
- var self = this;
- $(this.helper).animate(this.originalPosition, parseInt(this.options.revert, 10) || 500, function() {
- self.propagate("stop", e);
- self.clear();
- });
- } else {
- this.propagate("stop", e);
- this.clear();
- }
-
- return false;
- },
- clear: function() {
- this.helper.removeClass("ui-draggable-dragging");
- if(this.options.helper != 'original' && !this.cancelHelperRemoval) this.helper.remove();
- //if($.ui.ddmanager) $.ui.ddmanager.current = null;
- this.helper = null;
- this.cancelHelperRemoval = false;
- },
-
- // From now on bulk stuff - mainly helpers
- plugins: {},
- uiHash: function(e) {
- return {
- helper: this.helper,
- position: this.position,
- absolutePosition: this.positionAbs,
- options: this.options
- };
- },
- propagate: function(n,e) {
- $.ui.plugin.call(this, n, [e, this.uiHash()]);
- if(n == "drag") this.positionAbs = this.convertPositionTo("absolute"); //The absolute position has to be recalculated after plugins
- return this.element.triggerHandler(n == "drag" ? n : "drag"+n, [e, this.uiHash()], this.options[n]);
- },
- destroy: function() {
- if(!this.element.data('draggable')) return;
- this.element.removeData("draggable").unbind(".draggable").removeClass('ui-draggable');
- this.mouseDestroy();
- }
-}));
-
-$.extend($.ui.draggable, {
- defaults: {
- appendTo: "parent",
- axis: false,
- cancel: ":input",
- delay: 0,
- distance: 1,
- helper: "original"
- }
-});
-
-$.ui.plugin.add("draggable", "cursor", {
- start: function(e, ui) {
- var t = $('body');
- if (t.css("cursor")) ui.options._cursor = t.css("cursor");
- t.css("cursor", ui.options.cursor);
- },
- stop: function(e, ui) {
- if (ui.options._cursor) $('body').css("cursor", ui.options._cursor);
- }
-});
-
-$.ui.plugin.add("draggable", "zIndex", {
- start: function(e, ui) {
- var t = $(ui.helper);
- if(t.css("zIndex")) ui.options._zIndex = t.css("zIndex");
- t.css('zIndex', ui.options.zIndex);
- },
- stop: function(e, ui) {
- if(ui.options._zIndex) $(ui.helper).css('zIndex', ui.options._zIndex);
- }
-});
-
-$.ui.plugin.add("draggable", "opacity", {
- start: function(e, ui) {
- var t = $(ui.helper);
- if(t.css("opacity")) ui.options._opacity = t.css("opacity");
- t.css('opacity', ui.options.opacity);
- },
- stop: function(e, ui) {
- if(ui.options._opacity) $(ui.helper).css('opacity', ui.options._opacity);
- }
-});
-
-$.ui.plugin.add("draggable", "iframeFix", {
- start: function(e, ui) {
- $(ui.options.iframeFix === true ? "iframe" : ui.options.iframeFix).each(function() {
- $('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>')
- .css({
- width: this.offsetWidth+"px", height: this.offsetHeight+"px",
- position: "absolute", opacity: "0.001", zIndex: 1000
- })
- .css($(this).offset())
- .appendTo("body");
- });
- },
- stop: function(e, ui) {
- $("div.DragDropIframeFix").each(function() { this.parentNode.removeChild(this); }); //Remove frame helpers
- }
-});
-
-$.ui.plugin.add("draggable", "scroll", {
- start: function(e, ui) {
- var o = ui.options;
- var i = $(this).data("draggable");
- o.scrollSensitivity = o.scrollSensitivity || 20;
- o.scrollSpeed = o.scrollSpeed || 20;
-
- i.overflowY = function(el) {
- do { if(/auto|scroll/.test(el.css('overflow')) || (/auto|scroll/).test(el.css('overflow-y'))) return el; el = el.parent(); } while (el[0].parentNode);
- return $(document);
- }(this);
- i.overflowX = function(el) {
- do { if(/auto|scroll/.test(el.css('overflow')) || (/auto|scroll/).test(el.css('overflow-x'))) return el; el = el.parent(); } while (el[0].parentNode);
- return $(document);
- }(this);
-
- if(i.overflowY[0] != document && i.overflowY[0].tagName != 'HTML') i.overflowYOffset = i.overflowY.offset();
- if(i.overflowX[0] != document && i.overflowX[0].tagName != 'HTML') i.overflowXOffset = i.overflowX.offset();
-
- },
- drag: function(e, ui) {
-
- var o = ui.options;
- var i = $(this).data("draggable");
-
- if(i.overflowY[0] != document && i.overflowY[0].tagName != 'HTML') {
- if((i.overflowYOffset.top + i.overflowY[0].offsetHeight) - e.pageY < o.scrollSensitivity)
- i.overflowY[0].scrollTop = i.overflowY[0].scrollTop + o.scrollSpeed;
- if(e.pageY - i.overflowYOffset.top < o.scrollSensitivity)
- i.overflowY[0].scrollTop = i.overflowY[0].scrollTop - o.scrollSpeed;
-
- } else {
- if(e.pageY - $(document).scrollTop() < o.scrollSensitivity)
- $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
- if($(window).height() - (e.pageY - $(document).scrollTop()) < o.scrollSensitivity)
- $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
- }
-
- if(i.overflowX[0] != document && i.overflowX[0].tagName != 'HTML') {
- if((i.overflowXOffset.left + i.overflowX[0].offsetWidth) - e.pageX < o.scrollSensitivity)
- i.overflowX[0].scrollLeft = i.overflowX[0].scrollLeft + o.scrollSpeed;
- if(e.pageX - i.overflowXOffset.left < o.scrollSensitivity)
- i.overflowX[0].scrollLeft = i.overflowX[0].scrollLeft - o.scrollSpeed;
- } else {
- if(e.pageX - $(document).scrollLeft() < o.scrollSensitivity)
- $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
- if($(window).width() - (e.pageX - $(document).scrollLeft()) < o.scrollSensitivity)
- $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
- }
-
- }
-});
-
-$.ui.plugin.add("draggable", "snap", {
- start: function(e, ui) {
-
- var inst = $(this).data("draggable");
- inst.snapElements = [];
- $(ui.options.snap === true ? '.ui-draggable' : ui.options.snap).each(function() {
- var $t = $(this); var $o = $t.offset();
- if(this != inst.element[0]) inst.snapElements.push({
- item: this,
- width: $t.outerWidth(), height: $t.outerHeight(),
- top: $o.top, left: $o.left
- });
- });
-
- },
- drag: function(e, ui) {
-
- var inst = $(this).data("draggable");
- var d = ui.options.snapTolerance || 20;
- var x1 = ui.absolutePosition.left, x2 = x1 + inst.helperProportions.width,
- y1 = ui.absolutePosition.top, y2 = y1 + inst.helperProportions.height;
-
- for (var i = inst.snapElements.length - 1; i >= 0; i--){
-
- var l = inst.snapElements[i].left, r = l + inst.snapElements[i].width,
- t = inst.snapElements[i].top, b = t + inst.snapElements[i].height;
-
- //Yes, I know, this is insane ;)
- if(!((l-d < x1 && x1 < r+d && t-d < y1 && y1 < b+d) || (l-d < x1 && x1 < r+d && t-d < y2 && y2 < b+d) || (l-d < x2 && x2 < r+d && t-d < y1 && y1 < b+d) || (l-d < x2 && x2 < r+d && t-d < y2 && y2 < b+d))) continue;
-
- if(ui.options.snapMode != 'inner') {
- var ts = Math.abs(t - y2) <= 20;
- var bs = Math.abs(b - y1) <= 20;
- var ls = Math.abs(l - x2) <= 20;
- var rs = Math.abs(r - x1) <= 20;
- if(ts) ui.position.top = inst.convertPositionTo("relative", { top: t - inst.helperProportions.height, left: 0 }).top;
- if(bs) ui.position.top = inst.convertPositionTo("relative", { top: b, left: 0 }).top;
- if(ls) ui.position.left = inst.convertPositionTo("relative", { top: 0, left: l - inst.helperProportions.width }).left;
- if(rs) ui.position.left = inst.convertPositionTo("relative", { top: 0, left: r }).left;
- }
-
- if(ui.options.snapMode != 'outer') {
- var ts = Math.abs(t - y1) <= 20;
- var bs = Math.abs(b - y2) <= 20;
- var ls = Math.abs(l - x1) <= 20;
- var rs = Math.abs(r - x2) <= 20;
- if(ts) ui.position.top = inst.convertPositionTo("relative", { top: t, left: 0 }).top;
- if(bs) ui.position.top = inst.convertPositionTo("relative", { top: b - inst.helperProportions.height, left: 0 }).top;
- if(ls) ui.position.left = inst.convertPositionTo("relative", { top: 0, left: l }).left;
- if(rs) ui.position.left = inst.convertPositionTo("relative", { top: 0, left: r - inst.helperProportions.width }).left;
- }
-
- };
- }
-});
-
-$.ui.plugin.add("draggable", "connectToSortable", {
- start: function(e,ui) {
-
- var inst = $(this).data("draggable");
- inst.sortables = [];
- $(ui.options.connectToSortable).each(function() {
- if($.data(this, 'sortable')) {
- var sortable = $.data(this, 'sortable');
- inst.sortables.push({
- instance: sortable,
- shouldRevert: sortable.options.revert
- });
- sortable.refreshItems(); //Do a one-time refresh at start to refresh the containerCache
- sortable.propagate("activate", e, inst);
- }
- });
-
- },
- stop: function(e,ui) {
-
- //If we are still over the sortable, we fake the stop event of the sortable, but also remove helper
- var inst = $(this).data("draggable");
-
- $.each(inst.sortables, function() {
- if(this.instance.isOver) {
- this.instance.isOver = 0;
- inst.cancelHelperRemoval = true; //Don't remove the helper in the draggable instance
- this.instance.cancelHelperRemoval = false; //Remove it in the sortable instance (so sortable plugins like revert still work)
- if(this.shouldRevert) this.instance.options.revert = true; //revert here
- this.instance.mouseStop(e);
-
- //Also propagate receive event, since the sortable is actually receiving a element
- this.instance.element.triggerHandler("sortreceive", [e, $.extend(this.instance.ui(), { sender: inst.element })], this.instance.options["receive"]);
-
- this.instance.options.helper = this.instance.options._helper;
- } else {
- this.instance.propagate("deactivate", e, inst);
- }
-
- });
-
- },
- drag: function(e,ui) {
-
- var inst = $(this).data("draggable"), self = this;
-
- var checkPos = function(o) {
-
- var l = o.left, r = l + o.width,
- t = o.top, b = t + o.height;
-
- return (l < (this.positionAbs.left + this.offset.click.left) && (this.positionAbs.left + this.offset.click.left) < r
- && t < (this.positionAbs.top + this.offset.click.top) && (this.positionAbs.top + this.offset.click.top) < b);
- };
-
- $.each(inst.sortables, function(i) {
-
- if(checkPos.call(inst, this.instance.containerCache)) {
-
- //If it intersects, we use a little isOver variable and set it once, so our move-in stuff gets fired only once
- if(!this.instance.isOver) {
- this.instance.isOver = 1;
-
- //Now we fake the start of dragging for the sortable instance,
- //by cloning the list group item, appending it to the sortable and using it as inst.currentItem
- //We can then fire the start event of the sortable with our passed browser event, and our own helper (so it doesn't create a new one)
- this.instance.currentItem = $(self).clone().appendTo(this.instance.element).data("sortable-item", true);
- this.instance.options._helper = this.instance.options.helper; //Store helper option to later restore it
- this.instance.options.helper = function() { return ui.helper[0]; };
-
- e.target = this.instance.currentItem[0];
- this.instance.mouseCapture(e, true);
- this.instance.mouseStart(e, true, true);
-
- //Because the browser event is way off the new appended portlet, we modify a couple of variables to reflect the changes
- this.instance.offset.click.top = inst.offset.click.top;
- this.instance.offset.click.left = inst.offset.click.left;
- this.instance.offset.parent.left -= inst.offset.parent.left - this.instance.offset.parent.left;
- this.instance.offset.parent.top -= inst.offset.parent.top - this.instance.offset.parent.top;
-
- inst.propagate("toSortable", e);
-
- }
-
- //Provided we did all the previous steps, we can fire the drag event of the sortable on every draggable drag, when it intersects with the sortable
- if(this.instance.currentItem) this.instance.mouseDrag(e);
-
- } else {
-
- //If it doesn't intersect with the sortable, and it intersected before,
- //we fake the drag stop of the sortable, but make sure it doesn't remove the helper by using cancelHelperRemoval
- if(this.instance.isOver) {
- this.instance.isOver = 0;
- this.instance.cancelHelperRemoval = true;
- this.instance.options.revert = false; //No revert here
- this.instance.mouseStop(e, true);
- this.instance.options.helper = this.instance.options._helper;
-
- //Now we remove our currentItem, the list group clone again, and the placeholder, and animate the helper back to it's original size
- this.instance.currentItem.remove();
- if(this.instance.placeholder) this.instance.placeholder.remove();
-
- inst.propagate("fromSortable", e);
- }
-
- };
-
- });
-
- }
-});
-
-$.ui.plugin.add("draggable", "stack", {
- start: function(e,ui) {
- var group = $.makeArray($(ui.options.stack.group)).sort(function(a,b) {
- return (parseInt($(a).css("zIndex"),10) || ui.options.stack.min) - (parseInt($(b).css("zIndex"),10) || ui.options.stack.min);
- });
-
- $(group).each(function(i) {
- this.style.zIndex = ui.options.stack.min + i;
- });
-
- this[0].style.zIndex = ui.options.stack.min + group.length;
- }
-});
-
-})(jQuery);
-/*
- * jQuery UI Droppable
+(function(a){a.widget("ui.draggable",a.extend({},a.ui.mouse,{_init:function(){if(this.options.helper=="original"&&!(/^(?:r|a|f)/).test(this.element.css("position"))){this.element[0].style.position="relative"}(this.options.addClasses&&this.element.addClass("ui-draggable"));(this.options.disabled&&this.element.addClass("ui-draggable-disabled"));this._mouseInit()},destroy:function(){if(!this.element.data("draggable")){return}this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy()},_mouseCapture:function(b){var c=this.options;if(this.helper||c.disabled||a(b.target).is(".ui-resizable-handle")){return false}this.handle=this._getHandle(b);if(!this.handle){return false}return true},_mouseStart:function(b){var c=this.options;this.helper=this._createHelper(b);this._cacheHelperProportions();if(a.ui.ddmanager){a.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(b);this.originalPageX=b.pageX;this.originalPageY=b.pageY;if(c.cursorAt){this._adjustOffsetFromHelper(c.cursorAt)}if(c.containment){this._setContainment()}this._trigger("start",b);this._cacheHelperProportions();if(a.ui.ddmanager&&!c.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,b)}this.helper.addClass("ui-draggable-dragging");this._mouseDrag(b,true);return true},_mouseDrag:function(b,d){this.position=this._generatePosition(b);this.positionAbs=this._convertPositionTo("absolute");if(!d){var c=this._uiHash();this._trigger("drag",b,c);this.position=c.position}if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}if(a.ui.ddmanager){a.ui.ddmanager.drag(this,b)}return false},_mouseStop:function(c){var d=false;if(a.ui.ddmanager&&!this.options.dropBehaviour){d=a.ui.ddmanager.drop(this,c)}if(this.dropped){d=this.dropped;this.dropped=false}if((this.options.revert=="invalid"&&!d)||(this.options.revert=="valid"&&d)||this.options.revert===true||(a.isFunction(this.options.revert)&&this.options.revert.call(this.element,d))){var b=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){b._trigger("stop",c);b._clear()})}else{this._trigger("stop",c);this._clear()}return false},_getHandle:function(b){var c=!this.options.handle||!a(this.options.handle,this.element).length?true:false;a(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==b.target){c=true}});return c},_createHelper:function(c){var d=this.options;var b=a.isFunction(d.helper)?a(d.helper.apply(this.element[0],[c])):(d.helper=="clone"?this.element.clone():this.element);if(!b.parents("body").length){b.appendTo((d.appendTo=="parent"?this.element[0].parentNode:d.appendTo))}if(b[0]!=this.element[0]&&!(/(fixed|absolute)/).test(b.css("position"))){b.css("position","absolute")}return b},_adjustOffsetFromHelper:function(b){if(b.left!=undefined){this.offset.click.left=b.left+this.margins.left}if(b.right!=undefined){this.offset.click.left=this.helperProportions.width-b.right+this.margins.left}if(b.top!=undefined){this.offset.click.top=b.top+this.margins.top}if(b.bottom!=undefined){this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();b.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)){b={top:0,left:0}}return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var b=this.element.position();return{top:b.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:b.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e=this.options;if(e.containment=="parent"){e.containment=this.helper[0].parentNode}if(e.containment=="document"||e.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(e.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(e.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(e.containment)&&e.containment.constructor!=Array){var c=a(e.containment)[0];if(!c){return}var d=a(e.containment).offset();var b=(a(c).css("overflow")!="hidden");this.containment=[d.left+(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0)-this.margins.left,d.top+(parseInt(a(c).css("borderTopWidth"),10)||0)+(parseInt(a(c).css("paddingTop"),10)||0)-this.margins.top,d.left+(b?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,d.top+(b?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}else{if(e.containment.constructor==Array){this.containment=e.containment}}},_convertPositionTo:function(f,h){if(!h){h=this.position}var c=f=="absolute"?1:-1;var e=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=(/(html|body)/i).test(b[0].tagName);return{top:(h.top+this.offset.relative.top*c+this.offset.parent.top*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(g?0:b.scrollTop()))*c)),left:(h.left+this.offset.relative.left*c+this.offset.parent.left*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:b.scrollLeft())*c))}},_generatePosition:function(e){var h=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,i=(/(html|body)/i).test(b[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var d=e.pageX;var c=e.pageY;if(this.originalPosition){if(this.containment){if(e.pageX-this.offset.click.left<this.containment[0]){d=this.containment[0]+this.offset.click.left}if(e.pageY-this.offset.click.top<this.containment[1]){c=this.containment[1]+this.offset.click.top}if(e.pageX-this.offset.click.left>this.containment[2]){d=this.containment[2]+this.offset.click.left}if(e.pageY-this.offset.click.top>this.containment[3]){c=this.containment[3]+this.offset.click.top}}if(h.grid){var g=this.originalPageY+Math.round((c-this.originalPageY)/h.grid[1])*h.grid[1];c=this.containment?(!(g-this.offset.click.top<this.containment[1]||g-this.offset.click.top>this.containment[3])?g:(!(g-this.offset.click.top<this.containment[1])?g-h.grid[1]:g+h.grid[1])):g;var f=this.originalPageX+Math.round((d-this.originalPageX)/h.grid[0])*h.grid[0];d=this.containment?(!(f-this.offset.click.left<this.containment[0]||f-this.offset.click.left>this.containment[2])?f:(!(f-this.offset.click.left<this.containment[0])?f-h.grid[0]:f+h.grid[0])):f}}return{top:(c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(i?0:b.scrollTop())))),left:(d-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():i?0:b.scrollLeft())))}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval){this.helper.remove()}this.helper=null;this.cancelHelperRemoval=false},_trigger:function(b,c,d){d=d||this._uiHash();a.ui.plugin.call(this,b,[c,d]);if(b=="drag"){this.positionAbs=this._convertPositionTo("absolute")}return a.widget.prototype._trigger.call(this,b,c,d)},plugins:{},_uiHash:function(b){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,offset:this.positionAbs}}}));a.extend(a.ui.draggable,{version:"1.7.2",eventPrefix:"drag",defaults:{addClasses:true,appendTo:"parent",axis:false,cancel:":input,option",connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,delay:0,distance:1,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false}});a.ui.plugin.add("draggable","connectToSortable",{start:function(c,e){var d=a(this).data("draggable"),f=d.options,b=a.extend({},e,{item:d.element});d.sortables=[];a(f.connectToSortable).each(function(){var g=a.data(this,"sortable");if(g&&!g.options.disabled){d.sortables.push({instance:g,shouldRevert:g.options.revert});g._refreshItems();g._trigger("activate",c,b)}})},stop:function(c,e){var d=a(this).data("draggable"),b=a.extend({},e,{item:d.element});a.each(d.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;d.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance._mouseStop(c);this.instance.options.helper=this.instance.options._helper;if(d.options.helper=="original"){this.instance.currentItem.css({top:"auto",left:"auto"})}}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",c,b)}})},drag:function(c,f){var e=a(this).data("draggable"),b=this;var d=function(i){var n=this.offset.click.top,m=this.offset.click.left;var g=this.positionAbs.top,k=this.positionAbs.left;var j=i.height,l=i.width;var p=i.top,h=i.left;return a.ui.isOver(g+n,k+m,p,h,j,l)};a.each(e.sortables,function(g){this.instance.positionAbs=e.positionAbs;this.instance.helperProportions=e.helperProportions;this.instance.offset.click=e.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=a(b).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return f.helper[0]};c.target=this.instance.currentItem[0];this.instance._mouseCapture(c,true);this.instance._mouseStart(c,true,true);this.instance.offset.click.top=e.offset.click.top;this.instance.offset.click.left=e.offset.click.left;this.instance.offset.parent.left-=e.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=e.offset.parent.top-this.instance.offset.parent.top;e._trigger("toSortable",c);e.dropped=this.instance.element;e.currentItem=e.element;this.instance.fromOutside=e}if(this.instance.currentItem){this.instance._mouseDrag(c)}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",c,this.instance._uiHash(this.instance));this.instance._mouseStop(c,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove()}e._trigger("fromSortable",c);e.dropped=false}}})}});a.ui.plugin.add("draggable","cursor",{start:function(c,d){var b=a("body"),e=a(this).data("draggable").options;if(b.css("cursor")){e._cursor=b.css("cursor")}b.css("cursor",e.cursor)},stop:function(b,c){var d=a(this).data("draggable").options;if(d._cursor){a("body").css("cursor",d._cursor)}}});a.ui.plugin.add("draggable","iframeFix",{start:function(b,c){var d=a(this).data("draggable").options;a(d.iframeFix===true?"iframe":d.iframeFix).each(function(){a('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(a(this).offset()).appendTo("body")})},stop:function(b,c){a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});a.ui.plugin.add("draggable","opacity",{start:function(c,d){var b=a(d.helper),e=a(this).data("draggable").options;if(b.css("opacity")){e._opacity=b.css("opacity")}b.css("opacity",e.opacity)},stop:function(b,c){var d=a(this).data("draggable").options;if(d._opacity){a(c.helper).css("opacity",d._opacity)}}});a.ui.plugin.add("draggable","scroll",{start:function(c,d){var b=a(this).data("draggable");if(b.scrollParent[0]!=document&&b.scrollParent[0].tagName!="HTML"){b.overflowOffset=b.scrollParent.offset()}},drag:function(d,e){var c=a(this).data("draggable"),f=c.options,b=false;if(c.scrollParent[0]!=document&&c.scrollParent[0].tagName!="HTML"){if(!f.axis||f.axis!="x"){if((c.overflowOffset.top+c.scrollParent[0].offsetHeight)-d.pageY<f.scrollSensitivity){c.scrollParent[0].scrollTop=b=c.scrollParent[0].scrollTop+f.scrollSpeed}else{if(d.pageY-c.overflowOffset.top<f.scrollSensitivity){c.scrollParent[0].scrollTop=b=c.scrollParent[0].scrollTop-f.scrollSpeed}}}if(!f.axis||f.axis!="y"){if((c.overflowOffset.left+c.scrollParent[0].offsetWidth)-d.pageX<f.scrollSensitivity){c.scrollParent[0].scrollLeft=b=c.scrollParent[0].scrollLeft+f.scrollSpeed}else{if(d.pageX-c.overflowOffset.left<f.scrollSensitivity){c.scrollParent[0].scrollLeft=b=c.scrollParent[0].scrollLeft-f.scrollSpeed}}}}else{if(!f.axis||f.axis!="x"){if(d.pageY-a(document).scrollTop()<f.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()-f.scrollSpeed)}else{if(a(window).height()-(d.pageY-a(document).scrollTop())<f.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()+f.scrollSpeed)}}}if(!f.axis||f.axis!="y"){if(d.pageX-a(document).scrollLeft()<f.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()-f.scrollSpeed)}else{if(a(window).width()-(d.pageX-a(document).scrollLeft())<f.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()+f.scrollSpeed)}}}}if(b!==false&&a.ui.ddmanager&&!f.dropBehaviour){a.ui.ddmanager.prepareOffsets(c,d)}}});a.ui.plugin.add("draggable","snap",{start:function(c,d){var b=a(this).data("draggable"),e=b.options;b.snapElements=[];a(e.snap.constructor!=String?(e.snap.items||":data(draggable)"):e.snap).each(function(){var g=a(this);var f=g.offset();if(this!=b.element[0]){b.snapElements.push({item:this,width:g.outerWidth(),height:g.outerHeight(),top:f.top,left:f.left})}})},drag:function(u,p){var g=a(this).data("draggable"),q=g.options;var y=q.snapTolerance;var x=p.offset.left,w=x+g.helperProportions.width,f=p.offset.top,e=f+g.helperProportions.height;for(var v=g.snapElements.length-1;v>=0;v--){var s=g.snapElements[v].left,n=s+g.snapElements[v].width,m=g.snapElements[v].top,A=m+g.snapElements[v].height;if(!((s-y<x&&x<n+y&&m-y<f&&f<A+y)||(s-y<x&&x<n+y&&m-y<e&&e<A+y)||(s-y<w&&w<n+y&&m-y<f&&f<A+y)||(s-y<w&&w<n+y&&m-y<e&&e<A+y))){if(g.snapElements[v].snapping){(g.options.snap.release&&g.options.snap.release.call(g.element,u,a.extend(g._uiHash(),{snapItem:g.snapElements[v].item})))}g.snapElements[v].snapping=false;continue}if(q.snapMode!="inner"){var c=Math.abs(m-e)<=y;var z=Math.abs(A-f)<=y;var j=Math.abs(s-w)<=y;var k=Math.abs(n-x)<=y;if(c){p.position.top=g._convertPositionTo("relative",{top:m-g.helperProportions.height,left:0}).top-g.margins.top}if(z){p.position.top=g._convertPositionTo("relative",{top:A,left:0}).top-g.margins.top}if(j){p.position.left=g._convertPositionTo("relative",{top:0,left:s-g.helperProportions.width}).left-g.margins.left}if(k){p.position.left=g._convertPositionTo("relative",{top:0,left:n}).left-g.margins.left}}var h=(c||z||j||k);if(q.snapMode!="outer"){var c=Math.abs(m-f)<=y;var z=Math.abs(A-e)<=y;var j=Math.abs(s-x)<=y;var k=Math.abs(n-w)<=y;if(c){p.position.top=g._convertPositionTo("relative",{top:m,left:0}).top-g.margins.top}if(z){p.position.top=g._convertPositionTo("relative",{top:A-g.helperProportions.height,left:0}).top-g.margins.top}if(j){p.position.left=g._convertPositionTo("relative",{top:0,left:s}).left-g.margins.left}if(k){p.position.left=g._convertPositionTo("relative",{top:0,left:n-g.helperProportions.width}).left-g.margins.left}}if(!g.snapElements[v].snapping&&(c||z||j||k||h)){(g.options.snap.snap&&g.options.snap.snap.call(g.element,u,a.extend(g._uiHash(),{snapItem:g.snapElements[v].item})))}g.snapElements[v].snapping=(c||z||j||k||h)}}});a.ui.plugin.add("draggable","stack",{start:function(b,c){var e=a(this).data("draggable").options;var d=a.makeArray(a(e.stack.group)).sort(function(g,f){return(parseInt(a(g).css("zIndex"),10)||e.stack.min)-(parseInt(a(f).css("zIndex"),10)||e.stack.min)});a(d).each(function(f){this.style.zIndex=e.stack.min+f});this[0].style.zIndex=e.stack.min+d.length}});a.ui.plugin.add("draggable","zIndex",{start:function(c,d){var b=a(d.helper),e=a(this).data("draggable").options;if(b.css("zIndex")){e._zIndex=b.css("zIndex")}b.css("zIndex",e.zIndex)},stop:function(b,c){var d=a(this).data("draggable").options;if(d._zIndex){a(c.helper).css("zIndex",d._zIndex)}}})})(jQuery);;/*
+ * jQuery UI Droppable 1.7.2
*
- * Copyright (c) 2008 Paul Bakaus
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
- *
+ *
* http://docs.jquery.com/UI/Droppables
*
* Depends:
* ui.core.js
* ui.draggable.js
*/
-(function($) {
-
-$.widget("ui.droppable", {
- init: function() {
-
- this.element.addClass("ui-droppable");
- this.isover = 0; this.isout = 1;
-
- //Prepare the passed options
- var o = this.options, accept = o.accept;
- o = $.extend(o, {
- accept: o.accept && o.accept.constructor == Function ? o.accept : function(d) {
- return $(d).is(accept);
- }
- });
-
- //Store the droppable's proportions
- this.proportions = { width: this.element[0].offsetWidth, height: this.element[0].offsetHeight };
-
- // Add the reference and positions to the manager
- $.ui.ddmanager.droppables.push(this);
-
- },
- plugins: {},
- ui: function(c) {
- return {
- draggable: (c.currentItem || c.element),
- helper: c.helper,
- position: c.position,
- absolutePosition: c.positionAbs,
- options: this.options,
- element: this.element
- };
- },
- destroy: function() {
- var drop = $.ui.ddmanager.droppables;
- for ( var i = 0; i < drop.length; i++ )
- if ( drop[i] == this )
- drop.splice(i, 1);
-
- this.element
- .removeClass("ui-droppable ui-droppable-disabled")
- .removeData("droppable")
- .unbind(".droppable");
- },
- over: function(e) {
-
- var draggable = $.ui.ddmanager.current;
- if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return; // Bail if draggable and droppable are same element
-
- if (this.options.accept.call(this.element,(draggable.currentItem || draggable.element))) {
- $.ui.plugin.call(this, 'over', [e, this.ui(draggable)]);
- this.element.triggerHandler("dropover", [e, this.ui(draggable)], this.options.over);
- }
-
- },
- out: function(e) {
-
- var draggable = $.ui.ddmanager.current;
- if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return; // Bail if draggable and droppable are same element
-
- if (this.options.accept.call(this.element,(draggable.currentItem || draggable.element))) {
- $.ui.plugin.call(this, 'out', [e, this.ui(draggable)]);
- this.element.triggerHandler("dropout", [e, this.ui(draggable)], this.options.out);
- }
-
- },
- drop: function(e,custom) {
-
- var draggable = custom || $.ui.ddmanager.current;
- if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return false; // Bail if draggable and droppable are same element
-
- var childrenIntersection = false;
- this.element.find(".ui-droppable").not(".ui-draggable-dragging").each(function() {
- var inst = $.data(this, 'droppable');
- if(inst.options.greedy && $.ui.intersect(draggable, $.extend(inst, { offset: inst.element.offset() }), inst.options.tolerance)) {
- childrenIntersection = true; return false;
- }
- });
- if(childrenIntersection) return false;
-
- if(this.options.accept.call(this.element,(draggable.currentItem || draggable.element))) {
- $.ui.plugin.call(this, 'drop', [e, this.ui(draggable)]);
- this.element.triggerHandler("drop", [e, this.ui(draggable)], this.options.drop);
- return true;
- }
-
- return false;
-
- },
- activate: function(e) {
-
- var draggable = $.ui.ddmanager.current;
- $.ui.plugin.call(this, 'activate', [e, this.ui(draggable)]);
- if(draggable) this.element.triggerHandler("dropactivate", [e, this.ui(draggable)], this.options.activate);
-
- },
- deactivate: function(e) {
-
- var draggable = $.ui.ddmanager.current;
- $.ui.plugin.call(this, 'deactivate', [e, this.ui(draggable)]);
- if(draggable) this.element.triggerHandler("dropdeactivate", [e, this.ui(draggable)], this.options.deactivate);
-
- }
-});
-
-$.extend($.ui.droppable, {
- defaults: {
- disabled: false,
- tolerance: 'intersect'
- }
-});
-
-$.ui.intersect = function(draggable, droppable, toleranceMode) {
-
- if (!droppable.offset) return false;
-
- var x1 = (draggable.positionAbs || draggable.position.absolute).left, x2 = x1 + draggable.helperProportions.width,
- y1 = (draggable.positionAbs || draggable.position.absolute).top, y2 = y1 + draggable.helperProportions.height;
- var l = droppable.offset.left, r = l + droppable.proportions.width,
- t = droppable.offset.top, b = t + droppable.proportions.height;
-
- switch (toleranceMode) {
- case 'fit':
- return (l < x1 && x2 < r
- && t < y1 && y2 < b);
- break;
- case 'intersect':
- return (l < x1 + (draggable.helperProportions.width / 2) // Right Half
- && x2 - (draggable.helperProportions.width / 2) < r // Left Half
- && t < y1 + (draggable.helperProportions.height / 2) // Bottom Half
- && y2 - (draggable.helperProportions.height / 2) < b ); // Top Half
- break;
- case 'pointer':
- return (l < ((draggable.positionAbs || draggable.position.absolute).left + (draggable.clickOffset || draggable.offset.click).left) && ((draggable.positionAbs || draggable.position.absolute).left + (draggable.clickOffset || draggable.offset.click).left) < r
- && t < ((draggable.positionAbs || draggable.position.absolute).top + (draggable.clickOffset || draggable.offset.click).top) && ((draggable.positionAbs || draggable.position.absolute).top + (draggable.clickOffset || draggable.offset.click).top) < b);
- break;
- case 'touch':
- return (
- (y1 >= t && y1 <= b) || // Top edge touching
- (y2 >= t && y2 <= b) || // Bottom edge touching
- (y1 < t && y2 > b) // Surrounded vertically
- ) && (
- (x1 >= l && x1 <= r) || // Left edge touching
- (x2 >= l && x2 <= r) || // Right edge touching
- (x1 < l && x2 > r) // Surrounded horizontally
- );
- break;
- default:
- return false;
- break;
- }
-
-};
-
-/*
- This manager tracks offsets of draggables and droppables
-*/
-$.ui.ddmanager = {
- current: null,
- droppables: [],
- prepareOffsets: function(t, e) {
-
- var m = $.ui.ddmanager.droppables;
- var type = e ? e.type : null; // workaround for #2317
-
- for (var i = 0; i < m.length; i++) {
- if(m[i].options.disabled || (t && !m[i].options.accept.call(m[i].element,(t.currentItem || t.element)))) continue;
- m[i].visible = m[i].element.css("display") != "none"; if(!m[i].visible) continue; //If the element is not visible, continue
- m[i].offset = m[i].element.offset();
- m[i].proportions = { width: m[i].element[0].offsetWidth, height: m[i].element[0].offsetHeight };
-
- if(type == "dragstart" || type == "sortactivate") m[i].activate.call(m[i], e); //Activate the droppable if used directly from draggables
- }
-
- },
- drop: function(draggable, e) {
-
- var dropped = false;
- $.each($.ui.ddmanager.droppables, function() {
-
- if(!this.options) return;
- if (!this.options.disabled && this.visible && $.ui.intersect(draggable, this, this.options.tolerance))
- dropped = this.drop.call(this, e);
-
- if (!this.options.disabled && this.visible && this.options.accept.call(this.element,(draggable.currentItem || draggable.element))) {
- this.isout = 1; this.isover = 0;
- this.deactivate.call(this, e);
- }
-
- });
- return dropped;
-
- },
- drag: function(draggable, e) {
-
- //If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse.
- if(draggable.options.refreshPositions) $.ui.ddmanager.prepareOffsets(draggable, e);
-
- //Run through all droppables and check their positions based on specific tolerance options
-
- $.each($.ui.ddmanager.droppables, function() {
-
- if(this.options.disabled || this.greedyChild || !this.visible) return;
- var intersects = $.ui.intersect(draggable, this, this.options.tolerance);
-
- var c = !intersects && this.isover == 1 ? 'isout' : (intersects && this.isover == 0 ? 'isover' : null);
- if(!c) return;
-
- var parentInstance;
- if (this.options.greedy) {
- var parent = this.element.parents('.ui-droppable:eq(0)');
- if (parent.length) {
- parentInstance = $.data(parent[0], 'droppable');
- parentInstance.greedyChild = (c == 'isover' ? 1 : 0);
- }
- }
-
- // we just moved into a greedy child
- if (parentInstance && c == 'isover') {
- parentInstance['isover'] = 0;
- parentInstance['isout'] = 1;
- parentInstance.out.call(parentInstance, e);
- }
-
- this[c] = 1; this[c == 'isout' ? 'isover' : 'isout'] = 0;
- this[c == "isover" ? "over" : "out"].call(this, e);
-
- // we just moved out of a greedy child
- if (parentInstance && c == 'isout') {
- parentInstance['isout'] = 0;
- parentInstance['isover'] = 1;
- parentInstance.over.call(parentInstance, e);
- }
- });
-
- }
-};
-
-/*
- * Droppable Extensions
- */
-
-$.ui.plugin.add("droppable", "activeClass", {
- activate: function(e, ui) {
- $(this).addClass(ui.options.activeClass);
- },
- deactivate: function(e, ui) {
- $(this).removeClass(ui.options.activeClass);
- },
- drop: function(e, ui) {
- $(this).removeClass(ui.options.activeClass);
- }
-});
-
-$.ui.plugin.add("droppable", "hoverClass", {
- over: function(e, ui) {
- $(this).addClass(ui.options.hoverClass);
- },
- out: function(e, ui) {
- $(this).removeClass(ui.options.hoverClass);
- },
- drop: function(e, ui) {
- $(this).removeClass(ui.options.hoverClass);
- }
-});
-
-})(jQuery);
-/*
- * jQuery UI Resizable
+(function(a){a.widget("ui.droppable",{_init:function(){var c=this.options,b=c.accept;this.isover=0;this.isout=1;this.options.accept=this.options.accept&&a.isFunction(this.options.accept)?this.options.accept:function(e){return e.is(b)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};a.ui.ddmanager.droppables[this.options.scope]=a.ui.ddmanager.droppables[this.options.scope]||[];a.ui.ddmanager.droppables[this.options.scope].push(this);(this.options.addClasses&&this.element.addClass("ui-droppable"))},destroy:function(){var b=a.ui.ddmanager.droppables[this.options.scope];for(var c=0;c<b.length;c++){if(b[c]==this){b.splice(c,1)}}this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable")},_setData:function(b,c){if(b=="accept"){this.options.accept=c&&a.isFunction(c)?c:function(e){return e.is(c)}}else{a.widget.prototype._setData.apply(this,arguments)}},_activate:function(c){var b=a.ui.ddmanager.current;if(this.options.activeClass){this.element.addClass(this.options.activeClass)}(b&&this._trigger("activate",c,this.ui(b)))},_deactivate:function(c){var b=a.ui.ddmanager.current;if(this.options.activeClass){this.element.removeClass(this.options.activeClass)}(b&&this._trigger("deactivate",c,this.ui(b)))},_over:function(c){var b=a.ui.ddmanager.current;if(!b||(b.currentItem||b.element)[0]==this.element[0]){return}if(this.options.accept.call(this.element[0],(b.currentItem||b.element))){if(this.options.hoverClass){this.element.addClass(this.options.hoverClass)}this._trigger("over",c,this.ui(b))}},_out:function(c){var b=a.ui.ddmanager.current;if(!b||(b.currentItem||b.element)[0]==this.element[0]){return}if(this.options.accept.call(this.element[0],(b.currentItem||b.element))){if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}this._trigger("out",c,this.ui(b))}},_drop:function(c,d){var b=d||a.ui.ddmanager.current;if(!b||(b.currentItem||b.element)[0]==this.element[0]){return false}var e=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var f=a.data(this,"droppable");if(f.options.greedy&&a.ui.intersect(b,a.extend(f,{offset:f.element.offset()}),f.options.tolerance)){e=true;return false}});if(e){return false}if(this.options.accept.call(this.element[0],(b.currentItem||b.element))){if(this.options.activeClass){this.element.removeClass(this.options.activeClass)}if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}this._trigger("drop",c,this.ui(b));return this.element}return false},ui:function(b){return{draggable:(b.currentItem||b.element),helper:b.helper,position:b.position,absolutePosition:b.positionAbs,offset:b.positionAbs}}});a.extend(a.ui.droppable,{version:"1.7.2",eventPrefix:"drop",defaults:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"}});a.ui.intersect=function(q,j,o){if(!j.offset){return false}var e=(q.positionAbs||q.position.absolute).left,d=e+q.helperProportions.width,n=(q.positionAbs||q.position.absolute).top,m=n+q.helperProportions.height;var g=j.offset.left,c=g+j.proportions.width,p=j.offset.top,k=p+j.proportions.height;switch(o){case"fit":return(g<e&&d<c&&p<n&&m<k);break;case"intersect":return(g<e+(q.helperProportions.width/2)&&d-(q.helperProportions.width/2)<c&&p<n+(q.helperProportions.height/2)&&m-(q.helperProportions.height/2)<k);break;case"pointer":var h=((q.positionAbs||q.position.absolute).left+(q.clickOffset||q.offset.click).left),i=((q.positionAbs||q.position.absolute).top+(q.clickOffset||q.offset.click).top),f=a.ui.isOver(i,h,p,g,j.proportions.height,j.proportions.width);return f;break;case"touch":return((n>=p&&n<=k)||(m>=p&&m<=k)||(n<p&&m>k))&&((e>=g&&e<=c)||(d>=g&&d<=c)||(e<g&&d>c));break;default:return false;break}};a.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,g){var b=a.ui.ddmanager.droppables[e.options.scope];var f=g?g.type:null;var h=(e.currentItem||e.element).find(":data(droppable)").andSelf();droppablesLoop:for(var d=0;d<b.length;d++){if(b[d].options.disabled||(e&&!b[d].options.accept.call(b[d].element[0],(e.currentItem||e.element)))){continue}for(var c=0;c<h.length;c++){if(h[c]==b[d].element[0]){b[d].proportions.height=0;continue droppablesLoop}}b[d].visible=b[d].element.css("display")!="none";if(!b[d].visible){continue}b[d].offset=b[d].element.offset();b[d].proportions={width:b[d].element[0].offsetWidth,height:b[d].element[0].offsetHeight};if(f=="mousedown"){b[d]._activate.call(b[d],g)}}},drop:function(b,c){var d=false;a.each(a.ui.ddmanager.droppables[b.options.scope],function(){if(!this.options){return}if(!this.options.disabled&&this.visible&&a.ui.intersect(b,this,this.options.tolerance)){d=this._drop.call(this,c)}if(!this.options.disabled&&this.visible&&this.options.accept.call(this.element[0],(b.currentItem||b.element))){this.isout=1;this.isover=0;this._deactivate.call(this,c)}});return d},drag:function(b,c){if(b.options.refreshPositions){a.ui.ddmanager.prepareOffsets(b,c)}a.each(a.ui.ddmanager.droppables[b.options.scope],function(){if(this.options.disabled||this.greedyChild||!this.visible){return}var e=a.ui.intersect(b,this,this.options.tolerance);var g=!e&&this.isover==1?"isout":(e&&this.isover==0?"isover":null);if(!g){return}var f;if(this.options.greedy){var d=this.element.parents(":data(droppable):eq(0)");if(d.length){f=a.data(d[0],"droppable");f.greedyChild=(g=="isover"?1:0)}}if(f&&g=="isover"){f.isover=0;f.isout=1;f._out.call(f,c)}this[g]=1;this[g=="isout"?"isover":"isout"]=0;this[g=="isover"?"_over":"_out"].call(this,c);if(f&&g=="isout"){f.isout=0;f.isover=1;f._over.call(f,c)}})}}})(jQuery);;/*
+ * jQuery UI Resizable 1.7.2
*
- * Copyright (c) 2008 Paul Bakaus
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
- *
+ *
* http://docs.jquery.com/UI/Resizables
*
* Depends:
* ui.core.js
*/
-(function($) {
-
-$.widget("ui.resizable", $.extend({}, $.ui.mouse, {
- init: function() {
-
- var self = this, o = this.options;
-
- var elpos = this.element.css('position');
-
- this.originalElement = this.element;
-
- // simulate .ui-resizable { position: relative; }
- this.element.addClass("ui-resizable").css({ position: /static/.test(elpos) ? 'relative' : elpos });
-
- $.extend(o, {
- _aspectRatio: !!(o.aspectRatio),
- helper: o.helper || o.ghost || o.animate ? o.helper || 'proxy' : null,
- knobHandles: o.knobHandles === true ? 'ui-resizable-knob-handle' : o.knobHandles
- });
-
- //Default Theme
- var aBorder = '1px solid #DEDEDE';
-
- o.defaultTheme = {
- 'ui-resizable': { display: 'block' },
- 'ui-resizable-handle': { position: 'absolute', background: '#F2F2F2', fontSize: '0.1px' },
- 'ui-resizable-n': { cursor: 'n-resize', height: '4px', left: '0px', right: '0px', borderTop: aBorder },
- 'ui-resizable-s': { cursor: 's-resize', height: '4px', left: '0px', right: '0px', borderBottom: aBorder },
- 'ui-resizable-e': { cursor: 'e-resize', width: '4px', top: '0px', bottom: '0px', borderRight: aBorder },
- 'ui-resizable-w': { cursor: 'w-resize', width: '4px', top: '0px', bottom: '0px', borderLeft: aBorder },
- 'ui-resizable-se': { cursor: 'se-resize', width: '4px', height: '4px', borderRight: aBorder, borderBottom: aBorder },
- 'ui-resizable-sw': { cursor: 'sw-resize', width: '4px', height: '4px', borderBottom: aBorder, borderLeft: aBorder },
- 'ui-resizable-ne': { cursor: 'ne-resize', width: '4px', height: '4px', borderRight: aBorder, borderTop: aBorder },
- 'ui-resizable-nw': { cursor: 'nw-resize', width: '4px', height: '4px', borderLeft: aBorder, borderTop: aBorder }
- };
-
- o.knobTheme = {
- 'ui-resizable-handle': { background: '#F2F2F2', border: '1px solid #808080', height: '8px', width: '8px' },
- 'ui-resizable-n': { cursor: 'n-resize', top: '0px', left: '45%' },
- 'ui-resizable-s': { cursor: 's-resize', bottom: '0px', left: '45%' },
- 'ui-resizable-e': { cursor: 'e-resize', right: '0px', top: '45%' },
- 'ui-resizable-w': { cursor: 'w-resize', left: '0px', top: '45%' },
- 'ui-resizable-se': { cursor: 'se-resize', right: '0px', bottom: '0px' },
- 'ui-resizable-sw': { cursor: 'sw-resize', left: '0px', bottom: '0px' },
- 'ui-resizable-nw': { cursor: 'nw-resize', left: '0px', top: '0px' },
- 'ui-resizable-ne': { cursor: 'ne-resize', right: '0px', top: '0px' }
- };
-
- o._nodeName = this.element[0].nodeName;
-
- //Wrap the element if it cannot hold child nodes
- if(o._nodeName.match(/canvas|textarea|input|select|button|img/i)) {
- var el = this.element;
-
- //Opera fixing relative position
- if (/relative/.test(el.css('position')) && $.browser.opera)
- el.css({ position: 'relative', top: 'auto', left: 'auto' });
-
- //Create a wrapper element and set the wrapper to the new current internal element
- el.wrap(
- $('<div class="ui-wrapper" style="overflow: hidden;"></div>').css( {
- position: el.css('position'),
- width: el.outerWidth(),
- height: el.outerHeight(),
- top: el.css('top'),
- left: el.css('left')
- })
- );
-
- var oel = this.element; this.element = this.element.parent();
-
- // store instance on wrapper
- this.element.data('resizable', this);
-
- //Move margins to the wrapper
- this.element.css({ marginLeft: oel.css("marginLeft"), marginTop: oel.css("marginTop"),
- marginRight: oel.css("marginRight"), marginBottom: oel.css("marginBottom")
- });
-
- oel.css({ marginLeft: 0, marginTop: 0, marginRight: 0, marginBottom: 0});
-
- //Prevent Safari textarea resize
- if ($.browser.safari && o.preventDefault) oel.css('resize', 'none');
-
- o.proportionallyResize = oel.css({ position: 'static', zoom: 1, display: 'block' });
-
- // avoid IE jump
- this.element.css({ margin: oel.css('margin') });
-
- // fix handlers offset
- this._proportionallyResize();
- }
-
- if(!o.handles) o.handles = !$('.ui-resizable-handle', this.element).length ? "e,s,se" : { n: '.ui-resizable-n', e: '.ui-resizable-e', s: '.ui-resizable-s', w: '.ui-resizable-w', se: '.ui-resizable-se', sw: '.ui-resizable-sw', ne: '.ui-resizable-ne', nw: '.ui-resizable-nw' };
- if(o.handles.constructor == String) {
-
- o.zIndex = o.zIndex || 1000;
-
- if(o.handles == 'all') o.handles = 'n,e,s,w,se,sw,ne,nw';
-
- var n = o.handles.split(","); o.handles = {};
-
- // insertions are applied when don't have theme loaded
- var insertionsDefault = {
- handle: 'position: absolute; display: none; overflow:hidden;',
- n: 'top: 0pt; width:100%;',
- e: 'right: 0pt; height:100%;',
- s: 'bottom: 0pt; width:100%;',
- w: 'left: 0pt; height:100%;',
- se: 'bottom: 0pt; right: 0px;',
- sw: 'bottom: 0pt; left: 0px;',
- ne: 'top: 0pt; right: 0px;',
- nw: 'top: 0pt; left: 0px;'
- };
-
- for(var i = 0; i < n.length; i++) {
- var handle = $.trim(n[i]), dt = o.defaultTheme, hname = 'ui-resizable-'+handle, loadDefault = !$.ui.css(hname) && !o.knobHandles, userKnobClass = $.ui.css('ui-resizable-knob-handle'),
- allDefTheme = $.extend(dt[hname], dt['ui-resizable-handle']), allKnobTheme = $.extend(o.knobTheme[hname], !userKnobClass ? o.knobTheme['ui-resizable-handle'] : {});
-
- // increase zIndex of sw, se, ne, nw axis
- var applyZIndex = /sw|se|ne|nw/.test(handle) ? { zIndex: ++o.zIndex } : {};
-
- var defCss = (loadDefault ? insertionsDefault[handle] : ''),
- axis = $(['<div class="ui-resizable-handle ', hname, '" style="', defCss, insertionsDefault.handle, '"></div>'].join('')).css( applyZIndex );
- o.handles[handle] = '.ui-resizable-'+handle;
-
- this.element.append(
- //Theme detection, if not loaded, load o.defaultTheme
- axis.css( loadDefault ? allDefTheme : {} )
- // Load the knobHandle css, fix width, height, top, left...
- .css( o.knobHandles ? allKnobTheme : {} ).addClass(o.knobHandles ? 'ui-resizable-knob-handle' : '').addClass(o.knobHandles)
- );
- }
-
- if (o.knobHandles) this.element.addClass('ui-resizable-knob').css( !$.ui.css('ui-resizable-knob') ? { /*border: '1px #fff dashed'*/ } : {} );
- }
-
- this._renderAxis = function(target) {
- target = target || this.element;
-
- for(var i in o.handles) {
- if(o.handles[i].constructor == String)
- o.handles[i] = $(o.handles[i], this.element).show();
-
- if (o.transparent)
- o.handles[i].css({opacity:0});
-
- //Apply pad to wrapper element, needed to fix axis position (textarea, inputs, scrolls)
- if (this.element.is('.ui-wrapper') &&
- o._nodeName.match(/textarea|input|select|button/i)) {
-
- var axis = $(o.handles[i], this.element), padWrapper = 0;
-
- //Checking the correct pad and border
- padWrapper = /sw|ne|nw|se|n|s/.test(i) ? axis.outerHeight() : axis.outerWidth();
-
- //The padding type i have to apply...
- var padPos = [ 'padding',
- /ne|nw|n/.test(i) ? 'Top' :
- /se|sw|s/.test(i) ? 'Bottom' :
- /^e$/.test(i) ? 'Right' : 'Left' ].join("");
-
- if (!o.transparent)
- target.css(padPos, padWrapper);
-
- this._proportionallyResize();
- }
- if(!$(o.handles[i]).length) continue;
- }
- };
-
- this._renderAxis(this.element);
- o._handles = $('.ui-resizable-handle', self.element);
-
- if (o.disableSelection)
- o._handles.each(function(i, e) { $.ui.disableSelection(e); });
-
- //Matching axis name
- o._handles.mouseover(function() {
- if (!o.resizing) {
- if (this.className)
- var axis = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);
- //Axis, default = se
- self.axis = o.axis = axis && axis[1] ? axis[1] : 'se';
- }
- });
-
- //If we want to auto hide the elements
- if (o.autoHide) {
- o._handles.hide();
- $(self.element).addClass("ui-resizable-autohide").hover(function() {
- $(this).removeClass("ui-resizable-autohide");
- o._handles.show();
- },
- function(){
- if (!o.resizing) {
- $(this).addClass("ui-resizable-autohide");
- o._handles.hide();
- }
- });
- }
-
- this.mouseInit();
- },
- plugins: {},
- ui: function() {
- return {
- originalElement: this.originalElement,
- element: this.element,
- helper: this.helper,
- position: this.position,
- size: this.size,
- options: this.options,
- originalSize: this.originalSize,
- originalPosition: this.originalPosition
- };
- },
- propagate: function(n,e) {
- $.ui.plugin.call(this, n, [e, this.ui()]);
- if (n != "resize") this.element.triggerHandler(["resize", n].join(""), [e, this.ui()], this.options[n]);
- },
- destroy: function() {
- var el = this.element, wrapped = el.children(".ui-resizable").get(0);
-
- this.mouseDestroy();
-
- var _destroy = function(exp) {
- $(exp).removeClass("ui-resizable ui-resizable-disabled")
- .removeData("resizable").unbind(".resizable").find('.ui-resizable-handle').remove();
- };
-
- _destroy(el);
-
- if (el.is('.ui-wrapper') && wrapped) {
- el.parent().append(
- $(wrapped).css({
- position: el.css('position'),
- width: el.outerWidth(),
- height: el.outerHeight(),
- top: el.css('top'),
- left: el.css('left')
- })
- ).end().remove();
-
- _destroy(wrapped);
- }
- },
- mouseStart: function(e) {
- if(this.options.disabled) return false;
-
- var handle = false;
- for(var i in this.options.handles) {
- if($(this.options.handles[i])[0] == e.target) handle = true;
- }
- if (!handle) return false;
-
- var o = this.options, iniPos = this.element.position(), el = this.element,
- num = function(v) { return parseInt(v, 10) || 0; }, ie6 = $.browser.msie && $.browser.version < 7;
- o.resizing = true;
- o.documentScroll = { top: $(document).scrollTop(), left: $(document).scrollLeft() };
-
- // bugfix #1749
- if (el.is('.ui-draggable') || (/absolute/).test(el.css('position'))) {
-
- // sOffset decides if document scrollOffset will be added to the top/left of the resizable element
- var sOffset = $.browser.msie && !o.containment && (/absolute/).test(el.css('position')) && !(/relative/).test(el.parent().css('position'));
- var dscrollt = sOffset ? o.documentScroll.top : 0, dscrolll = sOffset ? o.documentScroll.left : 0;
-
- el.css({ position: 'absolute', top: (iniPos.top + dscrollt), left: (iniPos.left + dscrolll) });
- }
-
- //Opera fixing relative position
- if ($.browser.opera && /relative/.test(el.css('position')))
- el.css({ position: 'relative', top: 'auto', left: 'auto' });
-
- this._renderProxy();
-
- var curleft = num(this.helper.css('left')), curtop = num(this.helper.css('top'));
-
- if (o.containment) {
- curleft += $(o.containment).scrollLeft()||0;
- curtop += $(o.containment).scrollTop()||0;
- }
-
- //Store needed variables
- this.offset = this.helper.offset();
- this.position = { left: curleft, top: curtop };
- this.size = o.helper || ie6 ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };
- this.originalSize = o.helper || ie6 ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };
- this.originalPosition = { left: curleft, top: curtop };
- this.sizeDiff = { width: el.outerWidth() - el.width(), height: el.outerHeight() - el.height() };
- this.originalMousePosition = { left: e.pageX, top: e.pageY };
-
- //Aspect Ratio
- o.aspectRatio = (typeof o.aspectRatio == 'number') ? o.aspectRatio : ((this.originalSize.height / this.originalSize.width)||1);
-
- if (o.preserveCursor)
- $('body').css('cursor', this.axis + '-resize');
-
- this.propagate("start", e);
- return true;
- },
- mouseDrag: function(e) {
-
- //Increase performance, avoid regex
- var el = this.helper, o = this.options, props = {},
- self = this, smp = this.originalMousePosition, a = this.axis;
-
- var dx = (e.pageX-smp.left)||0, dy = (e.pageY-smp.top)||0;
- var trigger = this._change[a];
- if (!trigger) return false;
-
- // Calculate the attrs that will be change
- var data = trigger.apply(this, [e, dx, dy]), ie6 = $.browser.msie && $.browser.version < 7, csdif = this.sizeDiff;
-
- if (o._aspectRatio || e.shiftKey)
- data = this._updateRatio(data, e);
-
- data = this._respectSize(data, e);
-
- // plugins callbacks need to be called first
- this.propagate("resize", e);
-
- el.css({
- top: this.position.top + "px", left: this.position.left + "px",
- width: this.size.width + "px", height: this.size.height + "px"
- });
-
- if (!o.helper && o.proportionallyResize)
- this._proportionallyResize();
-
- this._updateCache(data);
-
- // calling the user callback at the end
- this.element.triggerHandler("resize", [e, this.ui()], this.options["resize"]);
-
- return false;
- },
- mouseStop: function(e) {
-
- this.options.resizing = false;
- var o = this.options, num = function(v) { return parseInt(v, 10) || 0; }, self = this;
-
- if(o.helper) {
- var pr = o.proportionallyResize, ista = pr && (/textarea/i).test(pr.get(0).nodeName),
- soffseth = ista && $.ui.hasScroll(pr.get(0), 'left') /* TODO - jump height */ ? 0 : self.sizeDiff.height,
- soffsetw = ista ? 0 : self.sizeDiff.width;
-
- var s = { width: (self.size.width - soffsetw), height: (self.size.height - soffseth) },
- left = (parseInt(self.element.css('left'), 10) + (self.position.left - self.originalPosition.left)) || null,
- top = (parseInt(self.element.css('top'), 10) + (self.position.top - self.originalPosition.top)) || null;
-
- if (!o.animate)
- this.element.css($.extend(s, { top: top, left: left }));
-
- if (o.helper && !o.animate) this._proportionallyResize();
- }
-
- if (o.preserveCursor)
- $('body').css('cursor', 'auto');
-
- this.propagate("stop", e);
-
- if (o.helper) this.helper.remove();
-
- return false;
- },
- _updateCache: function(data) {
- var o = this.options;
- this.offset = this.helper.offset();
- if (data.left) this.position.left = data.left;
- if (data.top) this.position.top = data.top;
- if (data.height) this.size.height = data.height;
- if (data.width) this.size.width = data.width;
- },
- _updateRatio: function(data, e) {
- var o = this.options, cpos = this.position, csize = this.size, a = this.axis;
-
- if (data.height) data.width = (csize.height / o.aspectRatio);
- else if (data.width) data.height = (csize.width * o.aspectRatio);
-
- if (a == 'sw') {
- data.left = cpos.left + (csize.width - data.width);
- data.top = null;
- }
- if (a == 'nw') {
- data.top = cpos.top + (csize.height - data.height);
- data.left = cpos.left + (csize.width - data.width);
- }
-
- return data;
- },
- _respectSize: function(data, e) {
-
- var el = this.helper, o = this.options, pRatio = o._aspectRatio || e.shiftKey, a = this.axis,
- ismaxw = data.width && o.maxWidth && o.maxWidth < data.width, ismaxh = data.height && o.maxHeight && o.maxHeight < data.height,
- isminw = data.width && o.minWidth && o.minWidth > data.width, isminh = data.height && o.minHeight && o.minHeight > data.height;
-
- if (isminw) data.width = o.minWidth;
- if (isminh) data.height = o.minHeight;
- if (ismaxw) data.width = o.maxWidth;
- if (ismaxh) data.height = o.maxHeight;
-
- var dw = this.originalPosition.left + this.originalSize.width, dh = this.position.top + this.size.height;
- var cw = /sw|nw|w/.test(a), ch = /nw|ne|n/.test(a);
-
- if (isminw && cw) data.left = dw - o.minWidth;
- if (ismaxw && cw) data.left = dw - o.maxWidth;
- if (isminh && ch) data.top = dh - o.minHeight;
- if (ismaxh && ch) data.top = dh - o.maxHeight;
-
- // fixing jump error on top/left - bug #2330
- var isNotwh = !data.width && !data.height;
- if (isNotwh && !data.left && data.top) data.top = null;
- else if (isNotwh && !data.top && data.left) data.left = null;
-
- return data;
- },
- _proportionallyResize: function() {
- var o = this.options;
- if (!o.proportionallyResize) return;
- var prel = o.proportionallyResize, el = this.helper || this.element;
-
- if (!o.borderDif) {
- var b = [prel.css('borderTopWidth'), prel.css('borderRightWidth'), prel.css('borderBottomWidth'), prel.css('borderLeftWidth')],
- p = [prel.css('paddingTop'), prel.css('paddingRight'), prel.css('paddingBottom'), prel.css('paddingLeft')];
-
- o.borderDif = $.map(b, function(v, i) {
- var border = parseInt(v,10)||0, padding = parseInt(p[i],10)||0;
- return border + padding;
- });
- }
- prel.css({
- height: (el.height() - o.borderDif[0] - o.borderDif[2]) + "px",
- width: (el.width() - o.borderDif[1] - o.borderDif[3]) + "px"
- });
- },
- _renderProxy: function() {
- var el = this.element, o = this.options;
- this.elementOffset = el.offset();
-
- if(o.helper) {
- this.helper = this.helper || $('<div style="overflow:hidden;"></div>');
-
- // fix ie6 offset
- var ie6 = $.browser.msie && $.browser.version < 7, ie6offset = (ie6 ? 1 : 0),
- pxyoffset = ( ie6 ? 2 : -1 );
-
- this.helper.addClass(o.helper).css({
- width: el.outerWidth() + pxyoffset,
- height: el.outerHeight() + pxyoffset,
- position: 'absolute',
- left: this.elementOffset.left - ie6offset +'px',
- top: this.elementOffset.top - ie6offset +'px',
- zIndex: ++o.zIndex
- });
-
- this.helper.appendTo("body");
-
- if (o.disableSelection)
- $.ui.disableSelection(this.helper.get(0));
-
- } else {
- this.helper = el;
- }
- },
- _change: {
- e: function(e, dx, dy) {
- return { width: this.originalSize.width + dx };
- },
- w: function(e, dx, dy) {
- var o = this.options, cs = this.originalSize, sp = this.originalPosition;
- return { left: sp.left + dx, width: cs.width - dx };
- },
- n: function(e, dx, dy) {
- var o = this.options, cs = this.originalSize, sp = this.originalPosition;
- return { top: sp.top + dy, height: cs.height - dy };
- },
- s: function(e, dx, dy) {
- return { height: this.originalSize.height + dy };
- },
- se: function(e, dx, dy) {
- return $.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [e, dx, dy]));
- },
- sw: function(e, dx, dy) {
- return $.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [e, dx, dy]));
- },
- ne: function(e, dx, dy) {
- return $.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [e, dx, dy]));
- },
- nw: function(e, dx, dy) {
- return $.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [e, dx, dy]));
- }
- }
-}));
-
-$.extend($.ui.resizable, {
- defaults: {
- cancel: ":input",
- distance: 1,
- delay: 0,
- preventDefault: true,
- transparent: false,
- minWidth: 10,
- minHeight: 10,
- aspectRatio: false,
- disableSelection: true,
- preserveCursor: true,
- autoHide: false,
- knobHandles: false
- }
-});
-
-/*
- * Resizable Extensions
- */
-
-$.ui.plugin.add("resizable", "containment", {
-
- start: function(e, ui) {
- var o = ui.options, self = $(this).data("resizable"), el = self.element;
- var oc = o.containment, ce = (oc instanceof $) ? oc.get(0) : (/parent/.test(oc)) ? el.parent().get(0) : oc;
- if (!ce) return;
-
- self.containerElement = $(ce);
-
- if (/document/.test(oc) || oc == document) {
- self.containerOffset = { left: 0, top: 0 };
- self.containerPosition = { left: 0, top: 0 };
-
- self.parentData = {
- element: $(document), left: 0, top: 0,
- width: $(document).width(), height: $(document).height() || document.body.parentNode.scrollHeight
- };
- }
-
-
- // i'm a node, so compute top, left, right, bottom
- else{
- self.containerOffset = $(ce).offset();
- self.containerPosition = $(ce).position();
- self.containerSize = { height: $(ce).innerHeight(), width: $(ce).innerWidth() };
-
- var co = self.containerOffset, ch = self.containerSize.height, cw = self.containerSize.width,
- width = ($.ui.hasScroll(ce, "left") ? ce.scrollWidth : cw ), height = ($.ui.hasScroll(ce) ? ce.scrollHeight : ch);
-
- self.parentData = {
- element: ce, left: co.left, top: co.top, width: width, height: height
- };
- }
- },
-
- resize: function(e, ui) {
- var o = ui.options, self = $(this).data("resizable"),
- ps = self.containerSize, co = self.containerOffset, cs = self.size, cp = self.position,
- pRatio = o._aspectRatio || e.shiftKey, cop = { top:0, left:0 }, ce = self.containerElement;
-
- if (ce[0] != document && /static/.test(ce.css('position')))
- cop = self.containerPosition;
-
- if (cp.left < (o.helper ? co.left : cop.left)) {
- self.size.width = self.size.width + (o.helper ? (self.position.left - co.left) : (self.position.left - cop.left));
- if (pRatio) self.size.height = self.size.width * o.aspectRatio;
- self.position.left = o.helper ? co.left : cop.left;
- }
-
- if (cp.top < (o.helper ? co.top : 0)) {
- self.size.height = self.size.height + (o.helper ? (self.position.top - co.top) : self.position.top);
- if (pRatio) self.size.width = self.size.height / o.aspectRatio;
- self.position.top = o.helper ? co.top : 0;
- }
-
- var woset = (o.helper ? self.offset.left - co.left : (self.position.left - cop.left)) + self.sizeDiff.width,
- hoset = (o.helper ? self.offset.top - co.top : self.position.top) + self.sizeDiff.height;
-
- if (woset + self.size.width >= self.parentData.width) {
- self.size.width = self.parentData.width - woset;
- if (pRatio) self.size.height = self.size.width * o.aspectRatio;
- }
-
- if (hoset + self.size.height >= self.parentData.height) {
- self.size.height = self.parentData.height - hoset;
- if (pRatio) self.size.width = self.size.height / o.aspectRatio;
- }
- },
-
- stop: function(e, ui){
- var o = ui.options, self = $(this).data("resizable"), cp = self.position,
- co = self.containerOffset, cop = self.containerPosition, ce = self.containerElement;
-
- var helper = $(self.helper), ho = helper.offset(), w = helper.innerWidth(), h = helper.innerHeight();
-
-
- if (o.helper && !o.animate && /relative/.test(ce.css('position')))
- $(this).css({ left: (ho.left - co.left), top: (ho.top - co.top), width: w, height: h });
-
- if (o.helper && !o.animate && /static/.test(ce.css('position')))
- $(this).css({ left: cop.left + (ho.left - co.left), top: cop.top + (ho.top - co.top), width: w, height: h });
-
- }
-});
-
-$.ui.plugin.add("resizable", "grid", {
-
- resize: function(e, ui) {
- var o = ui.options, self = $(this).data("resizable"), cs = self.size, os = self.originalSize, op = self.originalPosition, a = self.axis, ratio = o._aspectRatio || e.shiftKey;
- o.grid = typeof o.grid == "number" ? [o.grid, o.grid] : o.grid;
- var ox = Math.round((cs.width - os.width) / (o.grid[0]||1)) * (o.grid[0]||1), oy = Math.round((cs.height - os.height) / (o.grid[1]||1)) * (o.grid[1]||1);
-
- if (/^(se|s|e)$/.test(a)) {
- self.size.width = os.width + ox;
- self.size.height = os.height + oy;
- }
- else if (/^(ne)$/.test(a)) {
- self.size.width = os.width + ox;
- self.size.height = os.height + oy;
- self.position.top = op.top - oy;
- }
- else if (/^(sw)$/.test(a)) {
- self.size.width = os.width + ox;
- self.size.height = os.height + oy;
- self.position.left = op.left - ox;
- }
- else {
- self.size.width = os.width + ox;
- self.size.height = os.height + oy;
- self.position.top = op.top - oy;
- self.position.left = op.left - ox;
- }
- }
-
-});
-
-$.ui.plugin.add("resizable", "animate", {
-
- stop: function(e, ui) {
- var o = ui.options, self = $(this).data("resizable");
-
- var pr = o.proportionallyResize, ista = pr && (/textarea/i).test(pr.get(0).nodeName),
- soffseth = ista && $.ui.hasScroll(pr.get(0), 'left') /* TODO - jump height */ ? 0 : self.sizeDiff.height,
- soffsetw = ista ? 0 : self.sizeDiff.width;
-
- var style = { width: (self.size.width - soffsetw), height: (self.size.height - soffseth) },
- left = (parseInt(self.element.css('left'), 10) + (self.position.left - self.originalPosition.left)) || null,
- top = (parseInt(self.element.css('top'), 10) + (self.position.top - self.originalPosition.top)) || null;
-
- self.element.animate(
- $.extend(style, top && left ? { top: top, left: left } : {}), {
- duration: o.animateDuration || "slow", easing: o.animateEasing || "swing",
- step: function() {
-
- var data = {
- width: parseInt(self.element.css('width'), 10),
- height: parseInt(self.element.css('height'), 10),
- top: parseInt(self.element.css('top'), 10),
- left: parseInt(self.element.css('left'), 10)
- };
-
- if (pr) pr.css({ width: data.width, height: data.height });
-
- // propagating resize, and updating values for each animation step
- self._updateCache(data);
- self.propagate("animate", e);
-
- }
- }
- );
- }
-
-});
-
-$.ui.plugin.add("resizable", "ghost", {
-
- start: function(e, ui) {
- var o = ui.options, self = $(this).data("resizable"), pr = o.proportionallyResize, cs = self.size;
-
- if (!pr) self.ghost = self.element.clone();
- else self.ghost = pr.clone();
-
- self.ghost.css(
- { opacity: .25, display: 'block', position: 'relative', height: cs.height, width: cs.width, margin: 0, left: 0, top: 0 }
- )
- .addClass('ui-resizable-ghost').addClass(typeof o.ghost == 'string' ? o.ghost : '');
-
- self.ghost.appendTo(self.helper);
-
- },
-
- resize: function(e, ui){
- var o = ui.options, self = $(this).data("resizable"), pr = o.proportionallyResize;
-
- if (self.ghost) self.ghost.css({ position: 'relative', height: self.size.height, width: self.size.width });
-
- },
-
- stop: function(e, ui){
- var o = ui.options, self = $(this).data("resizable"), pr = o.proportionallyResize;
- if (self.ghost && self.helper) self.helper.get(0).removeChild(self.ghost.get(0));
- }
-
-});
-
-$.ui.plugin.add("resizable", "alsoResize", {
-
- start: function(e, ui) {
- var o = ui.options, self = $(this).data("resizable"),
-
- _store = function(exp) {
- $(exp).each(function() {
- $(this).data("resizable-alsoresize", {
- width: parseInt($(this).width(), 10), height: parseInt($(this).height(), 10),
- left: parseInt($(this).css('left'), 10), top: parseInt($(this).css('top'), 10)
- });
- });
- };
-
- if (typeof(o.alsoResize) == 'object') {
- if (o.alsoResize.length) { o.alsoResize = o.alsoResize[0]; _store(o.alsoResize); }
- else { $.each(o.alsoResize, function(exp, c) { _store(exp); }); }
- }else{
- _store(o.alsoResize);
- }
- },
-
- resize: function(e, ui){
- var o = ui.options, self = $(this).data("resizable"), os = self.originalSize, op = self.originalPosition;
-
- var delta = {
- height: (self.size.height - os.height) || 0, width: (self.size.width - os.width) || 0,
- top: (self.position.top - op.top) || 0, left: (self.position.left - op.left) || 0
- },
-
- _alsoResize = function(exp, c) {
- $(exp).each(function() {
- var start = $(this).data("resizable-alsoresize"), style = {}, css = c && c.length ? c : ['width', 'height', 'top', 'left'];
-
- $.each(css || ['width', 'height', 'top', 'left'], function(i, prop) {
- var sum = (start[prop]||0) + (delta[prop]||0);
- if (sum && sum >= 0)
- style[prop] = sum || null;
- });
- $(this).css(style);
- });
- };
-
- if (typeof(o.alsoResize) == 'object') {
- $.each(o.alsoResize, function(exp, c) { _alsoResize(exp, c); });
- }else{
- _alsoResize(o.alsoResize);
- }
- },
-
- stop: function(e, ui){
- $(this).removeData("resizable-alsoresize-start");
- }
-});
-
-})(jQuery);
-/*
- * jQuery UI Selectable
+(function(c){c.widget("ui.resizable",c.extend({},c.ui.mouse,{_init:function(){var e=this,j=this.options;this.element.addClass("ui-resizable");c.extend(this,{_aspectRatio:!!(j.aspectRatio),aspectRatio:j.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:j.helper||j.ghost||j.animate?j.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){if(/relative/.test(this.element.css("position"))&&c.browser.opera){this.element.css({position:"relative",top:"auto",left:"auto"})}this.element.wrap(c('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=j.handles||(!c(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var k=this.handles.split(",");this.handles={};for(var f=0;f<k.length;f++){var h=c.trim(k[f]),d="ui-resizable-"+h;var g=c('<div class="ui-resizable-handle '+d+'"></div>');if(/sw|se|ne|nw/.test(h)){g.css({zIndex:++j.zIndex})}if("se"==h){g.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[h]=".ui-resizable-"+h;this.element.append(g)}}this._renderAxis=function(p){p=p||this.element;for(var m in this.handles){if(this.handles[m].constructor==String){this.handles[m]=c(this.handles[m],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var n=c(this.handles[m],this.element),o=0;o=/sw|ne|nw|se|n|s/.test(m)?n.outerHeight():n.outerWidth();var l=["padding",/ne|nw|n/.test(m)?"Top":/se|sw|s/.test(m)?"Bottom":/^e$/.test(m)?"Right":"Left"].join("");p.css(l,o);this._proportionallyResize()}if(!c(this.handles[m]).length){continue}}};this._renderAxis(this.element);this._handles=c(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!e.resizing){if(this.className){var i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}e.axis=i&&i[1]?i[1]:"se"}});if(j.autoHide){this._handles.hide();c(this.element).addClass("ui-resizable-autohide").hover(function(){c(this).removeClass("ui-resizable-autohide");e._handles.show()},function(){if(!e.resizing){c(this).addClass("ui-resizable-autohide");e._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var d=function(f){c(f).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){d(this.element);var e=this.element;e.parent().append(this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")})).end().remove()}this.originalElement.css("resize",this.originalResizeStyle);d(this.originalElement)},_mouseCapture:function(e){var f=false;for(var d in this.handles){if(c(this.handles[d])[0]==e.target){f=true}}return this.options.disabled||!!f},_mouseStart:function(f){var i=this.options,e=this.element.position(),d=this.element;this.resizing=true;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};if(d.is(".ui-draggable")||(/absolute/).test(d.css("position"))){d.css({position:"absolute",top:e.top,left:e.left})}if(c.browser.opera&&(/relative/).test(d.css("position"))){d.css({position:"relative",top:"auto",left:"auto"})}this._renderProxy();var j=b(this.helper.css("left")),g=b(this.helper.css("top"));if(i.containment){j+=c(i.containment).scrollLeft()||0;g+=c(i.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:j,top:g};this.size=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalSize=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalPosition={left:j,top:g};this.sizeDiff={width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:f.pageX,top:f.pageY};this.aspectRatio=(typeof i.aspectRatio=="number")?i.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var h=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor",h=="auto"?this.axis+"-resize":h);d.addClass("ui-resizable-resizing");this._propagate("start",f);return true},_mouseDrag:function(d){var g=this.helper,f=this.options,l={},p=this,i=this.originalMousePosition,m=this.axis;var q=(d.pageX-i.left)||0,n=(d.pageY-i.top)||0;var h=this._change[m];if(!h){return false}var k=h.apply(this,[d,q,n]),j=c.browser.msie&&c.browser.version<7,e=this.sizeDiff;if(this._aspectRatio||d.shiftKey){k=this._updateRatio(k,d)}k=this._respectSize(k,d);this._propagate("resize",d);g.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(k);this._trigger("resize",d,this.ui());return false},_mouseStop:function(g){this.resizing=false;var h=this.options,l=this;if(this._helper){var f=this._proportionallyResizeElements,d=f.length&&(/textarea/i).test(f[0].nodeName),e=d&&c.ui.hasScroll(f[0],"left")?0:l.sizeDiff.height,j=d?0:l.sizeDiff.width;var m={width:(l.size.width-j),height:(l.size.height-e)},i=(parseInt(l.element.css("left"),10)+(l.position.left-l.originalPosition.left))||null,k=(parseInt(l.element.css("top"),10)+(l.position.top-l.originalPosition.top))||null;if(!h.animate){this.element.css(c.extend(m,{top:k,left:i}))}l.helper.height(l.size.height);l.helper.width(l.size.width);if(this._helper&&!h.animate){this._proportionallyResize()}}c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",g);if(this._helper){this.helper.remove()}return false},_updateCache:function(d){var e=this.options;this.offset=this.helper.offset();if(a(d.left)){this.position.left=d.left}if(a(d.top)){this.position.top=d.top}if(a(d.height)){this.size.height=d.height}if(a(d.width)){this.size.width=d.width}},_updateRatio:function(g,f){var h=this.options,i=this.position,e=this.size,d=this.axis;if(g.height){g.width=(e.height*this.aspectRatio)}else{if(g.width){g.height=(e.width/this.aspectRatio)}}if(d=="sw"){g.left=i.left+(e.width-g.width);g.top=null}if(d=="nw"){g.top=i.top+(e.height-g.height);g.left=i.left+(e.width-g.width)}return g},_respectSize:function(k,f){var i=this.helper,h=this.options,q=this._aspectRatio||f.shiftKey,p=this.axis,s=a(k.width)&&h.maxWidth&&(h.maxWidth<k.width),l=a(k.height)&&h.maxHeight&&(h.maxHeight<k.height),g=a(k.width)&&h.minWidth&&(h.minWidth>k.width),r=a(k.height)&&h.minHeight&&(h.minHeight>k.height);if(g){k.width=h.minWidth}if(r){k.height=h.minHeight}if(s){k.width=h.maxWidth}if(l){k.height=h.maxHeight}var e=this.originalPosition.left+this.originalSize.width,n=this.position.top+this.size.height;var j=/sw|nw|w/.test(p),d=/nw|ne|n/.test(p);if(g&&j){k.left=e-h.minWidth}if(s&&j){k.left=e-h.maxWidth}if(r&&d){k.top=n-h.minHeight}if(l&&d){k.top=n-h.maxHeight}var m=!k.width&&!k.height;if(m&&!k.left&&k.top){k.top=null}else{if(m&&!k.top&&k.left){k.left=null}}return k},_proportionallyResize:function(){var j=this.options;if(!this._proportionallyResizeElements.length){return}var f=this.helper||this.element;for(var e=0;e<this._proportionallyResizeElements.length;e++){var g=this._proportionallyResizeElements[e];if(!this.borderDif){var d=[g.css("borderTopWidth"),g.css("borderRightWidth"),g.css("borderBottomWidth"),g.css("borderLeftWidth")],h=[g.css("paddingTop"),g.css("paddingRight"),g.css("paddingBottom"),g.css("paddingLeft")];this.borderDif=c.map(d,function(k,m){var l=parseInt(k,10)||0,n=parseInt(h[m],10)||0;return l+n})}if(c.browser.msie&&!(!(c(f).is(":hidden")||c(f).parents(":hidden").length))){continue}g.css({height:(f.height()-this.borderDif[0]-this.borderDif[2])||0,width:(f.width()-this.borderDif[1]-this.borderDif[3])||0})}},_renderProxy:function(){var e=this.element,h=this.options;this.elementOffset=e.offset();if(this._helper){this.helper=this.helper||c('<div style="overflow:hidden;"></div>');var d=c.browser.msie&&c.browser.version<7,f=(d?1:0),g=(d?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+g,height:this.element.outerHeight()+g,position:"absolute",left:this.elementOffset.left-f+"px",top:this.elementOffset.top-f+"px",zIndex:++h.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(f,e,d){return{width:this.originalSize.width+e}},w:function(g,e,d){var i=this.options,f=this.originalSize,h=this.originalPosition;return{left:h.left+e,width:f.width-e}},n:function(g,e,d){var i=this.options,f=this.originalSize,h=this.originalPosition;return{top:h.top+d,height:f.height-d}},s:function(f,e,d){return{height:this.originalSize.height+d}},se:function(f,e,d){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[f,e,d]))},sw:function(f,e,d){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[f,e,d]))},ne:function(f,e,d){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[f,e,d]))},nw:function(f,e,d){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[f,e,d]))}},_propagate:function(e,d){c.ui.plugin.call(this,e,[d,this.ui()]);(e!="resize"&&this._trigger(e,d,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}));c.extend(c.ui.resizable,{version:"1.7.2",eventPrefix:"resize",defaults:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,cancel:":input,option",containment:false,delay:0,distance:1,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000}});c.ui.plugin.add("resizable","alsoResize",{start:function(e,f){var d=c(this).data("resizable"),g=d.options;_store=function(h){c(h).each(function(){c(this).data("resizable-alsoresize",{width:parseInt(c(this).width(),10),height:parseInt(c(this).height(),10),left:parseInt(c(this).css("left"),10),top:parseInt(c(this).css("top"),10)})})};if(typeof(g.alsoResize)=="object"&&!g.alsoResize.parentNode){if(g.alsoResize.length){g.alsoResize=g.alsoResize[0];_store(g.alsoResize)}else{c.each(g.alsoResize,function(h,i){_store(h)})}}else{_store(g.alsoResize)}},resize:function(f,h){var e=c(this).data("resizable"),i=e.options,g=e.originalSize,k=e.originalPosition;var j={height:(e.size.height-g.height)||0,width:(e.size.width-g.width)||0,top:(e.position.top-k.top)||0,left:(e.position.left-k.left)||0},d=function(l,m){c(l).each(function(){var p=c(this),q=c(this).data("resizable-alsoresize"),o={},n=m&&m.length?m:["width","height","top","left"];c.each(n||["width","height","top","left"],function(r,t){var s=(q[t]||0)+(j[t]||0);if(s&&s>=0){o[t]=s||null}});if(/relative/.test(p.css("position"))&&c.browser.opera){e._revertToRelativePosition=true;p.css({position:"absolute",top:"auto",left:"auto"})}p.css(o)})};if(typeof(i.alsoResize)=="object"&&!i.alsoResize.nodeType){c.each(i.alsoResize,function(l,m){d(l,m)})}else{d(i.alsoResize)}},stop:function(e,f){var d=c(this).data("resizable");if(d._revertToRelativePosition&&c.browser.opera){d._revertToRelativePosition=false;el.css({position:"relative"})}c(this).removeData("resizable-alsoresize-start")}});c.ui.plugin.add("resizable","animate",{stop:function(h,m){var n=c(this).data("resizable"),i=n.options;var g=n._proportionallyResizeElements,d=g.length&&(/textarea/i).test(g[0].nodeName),e=d&&c.ui.hasScroll(g[0],"left")?0:n.sizeDiff.height,k=d?0:n.sizeDiff.width;var f={width:(n.size.width-k),height:(n.size.height-e)},j=(parseInt(n.element.css("left"),10)+(n.position.left-n.originalPosition.left))||null,l=(parseInt(n.element.css("top"),10)+(n.position.top-n.originalPosition.top))||null;n.element.animate(c.extend(f,l&&j?{top:l,left:j}:{}),{duration:i.animateDuration,easing:i.animateEasing,step:function(){var o={width:parseInt(n.element.css("width"),10),height:parseInt(n.element.css("height"),10),top:parseInt(n.element.css("top"),10),left:parseInt(n.element.css("left"),10)};if(g&&g.length){c(g[0]).css({width:o.width,height:o.height})}n._updateCache(o);n._propagate("resize",h)}})}});c.ui.plugin.add("resizable","containment",{start:function(e,q){var s=c(this).data("resizable"),i=s.options,k=s.element;var f=i.containment,j=(f instanceof c)?f.get(0):(/parent/.test(f))?k.parent().get(0):f;if(!j){return}s.containerElement=c(j);if(/document/.test(f)||f==document){s.containerOffset={left:0,top:0};s.containerPosition={left:0,top:0};s.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}}else{var m=c(j),h=[];c(["Top","Right","Left","Bottom"]).each(function(p,o){h[p]=b(m.css("padding"+o))});s.containerOffset=m.offset();s.containerPosition=m.position();s.containerSize={height:(m.innerHeight()-h[3]),width:(m.innerWidth()-h[1])};var n=s.containerOffset,d=s.containerSize.height,l=s.containerSize.width,g=(c.ui.hasScroll(j,"left")?j.scrollWidth:l),r=(c.ui.hasScroll(j)?j.scrollHeight:d);s.parentData={element:j,left:n.left,top:n.top,width:g,height:r}}},resize:function(f,p){var s=c(this).data("resizable"),h=s.options,e=s.containerSize,n=s.containerOffset,l=s.size,m=s.position,q=s._aspectRatio||f.shiftKey,d={top:0,left:0},g=s.containerElement;if(g[0]!=document&&(/static/).test(g.css("position"))){d=n}if(m.left<(s._helper?n.left:0)){s.size.width=s.size.width+(s._helper?(s.position.left-n.left):(s.position.left-d.left));if(q){s.size.height=s.size.width/h.aspectRatio}s.position.left=h.helper?n.left:0}if(m.top<(s._helper?n.top:0)){s.size.height=s.size.height+(s._helper?(s.position.top-n.top):s.position.top);if(q){s.size.width=s.size.height*h.aspectRatio}s.position.top=s._helper?n.top:0}s.offset.left=s.parentData.left+s.position.left;s.offset.top=s.parentData.top+s.position.top;var k=Math.abs((s._helper?s.offset.left-d.left:(s.offset.left-d.left))+s.sizeDiff.width),r=Math.abs((s._helper?s.offset.top-d.top:(s.offset.top-n.top))+s.sizeDiff.height);var j=s.containerElement.get(0)==s.element.parent().get(0),i=/relative|absolute/.test(s.containerElement.css("position"));if(j&&i){k-=s.parentData.left}if(k+s.size.width>=s.parentData.width){s.size.width=s.parentData.width-k;if(q){s.size.height=s.size.width/s.aspectRatio}}if(r+s.size.height>=s.parentData.height){s.size.height=s.parentData.height-r;if(q){s.size.width=s.size.height*s.aspectRatio}}},stop:function(e,m){var p=c(this).data("resizable"),f=p.options,k=p.position,l=p.containerOffset,d=p.containerPosition,g=p.containerElement;var i=c(p.helper),q=i.offset(),n=i.outerWidth()-p.sizeDiff.width,j=i.outerHeight()-p.sizeDiff.height;if(p._helper&&!f.animate&&(/relative/).test(g.css("position"))){c(this).css({left:q.left-d.left-l.left,width:n,height:j})}if(p._helper&&!f.animate&&(/static/).test(g.css("position"))){c(this).css({left:q.left-d.left-l.left,width:n,height:j})}}});c.ui.plugin.add("resizable","ghost",{start:function(f,g){var d=c(this).data("resizable"),h=d.options,e=d.size;d.ghost=d.originalElement.clone();d.ghost.css({opacity:0.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof h.ghost=="string"?h.ghost:"");d.ghost.appendTo(d.helper)},resize:function(e,f){var d=c(this).data("resizable"),g=d.options;if(d.ghost){d.ghost.css({position:"relative",height:d.size.height,width:d.size.width})}},stop:function(e,f){var d=c(this).data("resizable"),g=d.options;if(d.ghost&&d.helper){d.helper.get(0).removeChild(d.ghost.get(0))}}});c.ui.plugin.add("resizable","grid",{resize:function(d,l){var n=c(this).data("resizable"),g=n.options,j=n.size,h=n.originalSize,i=n.originalPosition,m=n.axis,k=g._aspectRatio||d.shiftKey;g.grid=typeof g.grid=="number"?[g.grid,g.grid]:g.grid;var f=Math.round((j.width-h.width)/(g.grid[0]||1))*(g.grid[0]||1),e=Math.round((j.height-h.height)/(g.grid[1]||1))*(g.grid[1]||1);if(/^(se|s|e)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e}else{if(/^(ne)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e;n.position.top=i.top-e}else{if(/^(sw)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e;n.position.left=i.left-f}else{n.size.width=h.width+f;n.size.height=h.height+e;n.position.top=i.top-e;n.position.left=i.left-f}}}}});var b=function(d){return parseInt(d,10)||0};var a=function(d){return !isNaN(parseInt(d,10))}})(jQuery);;/*
+ * jQuery UI Selectable 1.7.2
*
- * Copyright (c) 2008 Richard D. Worth (rdworth.org)
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
- *
+ *
* http://docs.jquery.com/UI/Selectables
*
* Depends:
* ui.core.js
*/
-(function($) {
-
-$.widget("ui.selectable", $.extend({}, $.ui.mouse, {
- init: function() {
- var self = this;
-
- this.element.addClass("ui-selectable");
-
- this.dragged = false;
-
- // cache selectee children based on filter
- var selectees;
- this.refresh = function() {
- selectees = $(self.options.filter, self.element[0]);
- selectees.each(function() {
- var $this = $(this);
- var pos = $this.offset();
- $.data(this, "selectable-item", {
- element: this,
- $element: $this,
- left: pos.left,
- top: pos.top,
- right: pos.left + $this.width(),
- bottom: pos.top + $this.height(),
- startselected: false,
- selected: $this.hasClass('ui-selected'),
- selecting: $this.hasClass('ui-selecting'),
- unselecting: $this.hasClass('ui-unselecting')
- });
- });
- };
- this.refresh();
-
- this.selectees = selectees.addClass("ui-selectee");
-
- this.mouseInit();
-
- this.helper = $(document.createElement('div')).css({border:'1px dotted black'});
- },
- toggle: function() {
- if(this.options.disabled){
- this.enable();
- } else {
- this.disable();
- }
- },
- destroy: function() {
- this.element
- .removeClass("ui-selectable ui-selectable-disabled")
- .removeData("selectable")
- .unbind(".selectable");
- this.mouseDestroy();
- },
- mouseStart: function(e) {
- var self = this;
-
- this.opos = [e.pageX, e.pageY];
-
- if (this.options.disabled)
- return;
-
- var options = this.options;
-
- this.selectees = $(options.filter, this.element[0]);
-
- // selectable START callback
- this.element.triggerHandler("selectablestart", [e, {
- "selectable": this.element[0],
- "options": options
- }], options.start);
-
- $('body').append(this.helper);
- // position helper (lasso)
- this.helper.css({
- "z-index": 100,
- "position": "absolute",
- "left": e.clientX,
- "top": e.clientY,
- "width": 0,
- "height": 0
- });
-
- if (options.autoRefresh) {
- this.refresh();
- }
-
- this.selectees.filter('.ui-selected').each(function() {
- var selectee = $.data(this, "selectable-item");
- selectee.startselected = true;
- if (!e.ctrlKey) {
- selectee.$element.removeClass('ui-selected');
- selectee.selected = false;
- selectee.$element.addClass('ui-unselecting');
- selectee.unselecting = true;
- // selectable UNSELECTING callback
- self.element.triggerHandler("selectableunselecting", [e, {
- selectable: self.element[0],
- unselecting: selectee.element,
- options: options
- }], options.unselecting);
- }
- });
-
- var isSelectee = false;
- $(e.target).parents().andSelf().each(function() {
- if($.data(this, "selectable-item")) isSelectee = true;
- });
- return this.options.keyboard ? !isSelectee : true;
- },
- mouseDrag: function(e) {
- var self = this;
- this.dragged = true;
-
- if (this.options.disabled)
- return;
-
- var options = this.options;
-
- var x1 = this.opos[0], y1 = this.opos[1], x2 = e.pageX, y2 = e.pageY;
- if (x1 > x2) { var tmp = x2; x2 = x1; x1 = tmp; }
- if (y1 > y2) { var tmp = y2; y2 = y1; y1 = tmp; }
- this.helper.css({left: x1, top: y1, width: x2-x1, height: y2-y1});
-
- this.selectees.each(function() {
- var selectee = $.data(this, "selectable-item");
- //prevent helper from being selected if appendTo: selectable
- if (!selectee || selectee.element == self.element[0])
- return;
- var hit = false;
- if (options.tolerance == 'touch') {
- hit = ( !(selectee.left > x2 || selectee.right < x1 || selectee.top > y2 || selectee.bottom < y1) );
- } else if (options.tolerance == 'fit') {
- hit = (selectee.left > x1 && selectee.right < x2 && selectee.top > y1 && selectee.bottom < y2);
- }
-
- if (hit) {
- // SELECT
- if (selectee.selected) {
- selectee.$element.removeClass('ui-selected');
- selectee.selected = false;
- }
- if (selectee.unselecting) {
- selectee.$element.removeClass('ui-unselecting');
- selectee.unselecting = false;
- }
- if (!selectee.selecting) {
- selectee.$element.addClass('ui-selecting');
- selectee.selecting = true;
- // selectable SELECTING callback
- self.element.triggerHandler("selectableselecting", [e, {
- selectable: self.element[0],
- selecting: selectee.element,
- options: options
- }], options.selecting);
- }
- } else {
- // UNSELECT
- if (selectee.selecting) {
- if (e.ctrlKey && selectee.startselected) {
- selectee.$element.removeClass('ui-selecting');
- selectee.selecting = false;
- selectee.$element.addClass('ui-selected');
- selectee.selected = true;
- } else {
- selectee.$element.removeClass('ui-selecting');
- selectee.selecting = false;
- if (selectee.startselected) {
- selectee.$element.addClass('ui-unselecting');
- selectee.unselecting = true;
- }
- // selectable UNSELECTING callback
- self.element.triggerHandler("selectableunselecting", [e, {
- selectable: self.element[0],
- unselecting: selectee.element,
- options: options
- }], options.unselecting);
- }
- }
- if (selectee.selected) {
- if (!e.ctrlKey && !selectee.startselected) {
- selectee.$element.removeClass('ui-selected');
- selectee.selected = false;
-
- selectee.$element.addClass('ui-unselecting');
- selectee.unselecting = true;
- // selectable UNSELECTING callback
- self.element.triggerHandler("selectableunselecting", [e, {
- selectable: self.element[0],
- unselecting: selectee.element,
- options: options
- }], options.unselecting);
- }
- }
- }
- });
-
- return false;
- },
- mouseStop: function(e) {
- var self = this;
-
- this.dragged = false;
-
- var options = this.options;
-
- $('.ui-unselecting', this.element[0]).each(function() {
- var selectee = $.data(this, "selectable-item");
- selectee.$element.removeClass('ui-unselecting');
- selectee.unselecting = false;
- selectee.startselected = false;
- self.element.triggerHandler("selectableunselected", [e, {
- selectable: self.element[0],
- unselected: selectee.element,
- options: options
- }], options.unselected);
- });
- $('.ui-selecting', this.element[0]).each(function() {
- var selectee = $.data(this, "selectable-item");
- selectee.$element.removeClass('ui-selecting').addClass('ui-selected');
- selectee.selecting = false;
- selectee.selected = true;
- selectee.startselected = true;
- self.element.triggerHandler("selectableselected", [e, {
- selectable: self.element[0],
- selected: selectee.element,
- options: options
- }], options.selected);
- });
- this.element.triggerHandler("selectablestop", [e, {
- selectable: self.element[0],
- options: this.options
- }], this.options.stop);
-
- this.helper.remove();
-
- return false;
- }
-}));
-
-$.extend($.ui.selectable, {
- defaults: {
- distance: 1,
- delay: 0,
- cancel: ":input",
- appendTo: 'body',
- autoRefresh: true,
- filter: '*',
- tolerance: 'touch'
- }
-});
-
-})(jQuery);
-/*
- * jQuery UI Sortable
+(function(a){a.widget("ui.selectable",a.extend({},a.ui.mouse,{_init:function(){var b=this;this.element.addClass("ui-selectable");this.dragged=false;var c;this.refresh=function(){c=a(b.options.filter,b.element[0]);c.each(function(){var d=a(this);var e=d.offset();a.data(this,"selectable-item",{element:this,$element:d,left:e.left,top:e.top,right:e.left+d.outerWidth(),bottom:e.top+d.outerHeight(),startselected:false,selected:d.hasClass("ui-selected"),selecting:d.hasClass("ui-selecting"),unselecting:d.hasClass("ui-unselecting")})})};this.refresh();this.selectees=c.addClass("ui-selectee");this._mouseInit();this.helper=a(document.createElement("div")).css({border:"1px dotted black"}).addClass("ui-selectable-helper")},destroy:function(){this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy()},_mouseStart:function(d){var b=this;this.opos=[d.pageX,d.pageY];if(this.options.disabled){return}var c=this.options;this.selectees=a(c.filter,this.element[0]);this._trigger("start",d);a(c.appendTo).append(this.helper);this.helper.css({"z-index":100,position:"absolute",left:d.clientX,top:d.clientY,width:0,height:0});if(c.autoRefresh){this.refresh()}this.selectees.filter(".ui-selected").each(function(){var e=a.data(this,"selectable-item");e.startselected=true;if(!d.metaKey){e.$element.removeClass("ui-selected");e.selected=false;e.$element.addClass("ui-unselecting");e.unselecting=true;b._trigger("unselecting",d,{unselecting:e.element})}});a(d.target).parents().andSelf().each(function(){var e=a.data(this,"selectable-item");if(e){e.$element.removeClass("ui-unselecting").addClass("ui-selecting");e.unselecting=false;e.selecting=true;e.selected=true;b._trigger("selecting",d,{selecting:e.element});return false}})},_mouseDrag:function(i){var c=this;this.dragged=true;if(this.options.disabled){return}var e=this.options;var d=this.opos[0],h=this.opos[1],b=i.pageX,g=i.pageY;if(d>b){var f=b;b=d;d=f}if(h>g){var f=g;g=h;h=f}this.helper.css({left:d,top:h,width:b-d,height:g-h});this.selectees.each(function(){var j=a.data(this,"selectable-item");if(!j||j.element==c.element[0]){return}var k=false;if(e.tolerance=="touch"){k=(!(j.left>b||j.right<d||j.top>g||j.bottom<h))}else{if(e.tolerance=="fit"){k=(j.left>d&&j.right<b&&j.top>h&&j.bottom<g)}}if(k){if(j.selected){j.$element.removeClass("ui-selected");j.selected=false}if(j.unselecting){j.$element.removeClass("ui-unselecting");j.unselecting=false}if(!j.selecting){j.$element.addClass("ui-selecting");j.selecting=true;c._trigger("selecting",i,{selecting:j.element})}}else{if(j.selecting){if(i.metaKey&&j.startselected){j.$element.removeClass("ui-selecting");j.selecting=false;j.$element.addClass("ui-selected");j.selected=true}else{j.$element.removeClass("ui-selecting");j.selecting=false;if(j.startselected){j.$element.addClass("ui-unselecting");j.unselecting=true}c._trigger("unselecting",i,{unselecting:j.element})}}if(j.selected){if(!i.metaKey&&!j.startselected){j.$element.removeClass("ui-selected");j.selected=false;j.$element.addClass("ui-unselecting");j.unselecting=true;c._trigger("unselecting",i,{unselecting:j.element})}}}});return false},_mouseStop:function(d){var b=this;this.dragged=false;var c=this.options;a(".ui-unselecting",this.element[0]).each(function(){var e=a.data(this,"selectable-item");e.$element.removeClass("ui-unselecting");e.unselecting=false;e.startselected=false;b._trigger("unselected",d,{unselected:e.element})});a(".ui-selecting",this.element[0]).each(function(){var e=a.data(this,"selectable-item");e.$element.removeClass("ui-selecting").addClass("ui-selected");e.selecting=false;e.selected=true;e.startselected=true;b._trigger("selected",d,{selected:e.element})});this._trigger("stop",d);this.helper.remove();return false}}));a.extend(a.ui.selectable,{version:"1.7.2",defaults:{appendTo:"body",autoRefresh:true,cancel:":input,option",delay:0,distance:0,filter:"*",tolerance:"touch"}})})(jQuery);;/*
+ * jQuery UI Sortable 1.7.2
*
- * Copyright (c) 2008 Paul Bakaus
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
- *
+ *
* http://docs.jquery.com/UI/Sortables
*
* Depends:
* ui.core.js
*/
-(function($) {
-
-function contains(a, b) {
- var safari2 = $.browser.safari && $.browser.version < 522;
- if (a.contains && !safari2) {
- return a.contains(b);
- }
- if (a.compareDocumentPosition)
- return !!(a.compareDocumentPosition(b) & 16);
- while (b = b.parentNode)
- if (b == a) return true;
- return false;
-};
-
-$.widget("ui.sortable", $.extend({}, $.ui.mouse, {
- init: function() {
-
- var o = this.options;
- this.containerCache = {};
- this.element.addClass("ui-sortable");
-
- //Get the items
- this.refresh();
-
- //Let's determine if the items are floating
- this.floating = this.items.length ? (/left|right/).test(this.items[0].item.css('float')) : false;
-
- //Let's determine the parent's offset
- if(!(/(relative|absolute|fixed)/).test(this.element.css('position'))) this.element.css('position', 'relative');
- this.offset = this.element.offset();
-
- //Initialize mouse events for interaction
- this.mouseInit();
-
- },
- plugins: {},
- ui: function(inst) {
- return {
- helper: (inst || this)["helper"],
- placeholder: (inst || this)["placeholder"] || $([]),
- position: (inst || this)["position"],
- absolutePosition: (inst || this)["positionAbs"],
- options: this.options,
- element: this.element,
- item: (inst || this)["currentItem"],
- sender: inst ? inst.element : null
- };
- },
- propagate: function(n,e,inst, noPropagation) {
- $.ui.plugin.call(this, n, [e, this.ui(inst)]);
- if(!noPropagation) this.element.triggerHandler(n == "sort" ? n : "sort"+n, [e, this.ui(inst)], this.options[n]);
- },
- serialize: function(o) {
-
- var items = ($.isFunction(this.options.items) ? this.options.items.call(this.element) : $(this.options.items, this.element)).not('.ui-sortable-helper'); //Only the items of the sortable itself
- var str = []; o = o || {};
-
- items.each(function() {
- var res = ($(this).attr(o.attribute || 'id') || '').match(o.expression || (/(.+)[-=_](.+)/));
- if(res) str.push((o.key || res[1])+'[]='+(o.key && o.expression ? res[1] : res[2]));
- });
-
- return str.join('&');
-
- },
- toArray: function(attr) {
-
- var items = ($.isFunction(this.options.items) ? this.options.items.call(this.element) : $(this.options.items, this.element)).not('.ui-sortable-helper'); //Only the items of the sortable itself
- var ret = [];
-
- items.each(function() { ret.push($(this).attr(attr || 'id')); });
- return ret;
-
- },
- /* Be careful with the following core functions */
- intersectsWith: function(item) {
-
- var x1 = this.positionAbs.left, x2 = x1 + this.helperProportions.width,
- y1 = this.positionAbs.top, y2 = y1 + this.helperProportions.height;
- var l = item.left, r = l + item.width,
- t = item.top, b = t + item.height;
-
- if(this.options.tolerance == "pointer" || this.options.forcePointerForContainers || (this.options.tolerance == "guess" && this.helperProportions[this.floating ? 'width' : 'height'] > item[this.floating ? 'width' : 'height'])) {
- return (y1 + this.offset.click.top > t && y1 + this.offset.click.top < b && x1 + this.offset.click.left > l && x1 + this.offset.click.left < r);
- } else {
-
- return (l < x1 + (this.helperProportions.width / 2) // Right Half
- && x2 - (this.helperProportions.width / 2) < r // Left Half
- && t < y1 + (this.helperProportions.height / 2) // Bottom Half
- && y2 - (this.helperProportions.height / 2) < b ); // Top Half
-
- }
-
- },
- intersectsWithEdge: function(item) {
- var x1 = this.positionAbs.left, x2 = x1 + this.helperProportions.width,
- y1 = this.positionAbs.top, y2 = y1 + this.helperProportions.height;
- var l = item.left, r = l + item.width,
- t = item.top, b = t + item.height;
-
- if(this.options.tolerance == "pointer" || (this.options.tolerance == "guess" && this.helperProportions[this.floating ? 'width' : 'height'] > item[this.floating ? 'width' : 'height'])) {
-
- if(!(y1 + this.offset.click.top > t && y1 + this.offset.click.top < b && x1 + this.offset.click.left > l && x1 + this.offset.click.left < r)) return false;
-
- if(this.floating) {
- if(x1 + this.offset.click.left > l && x1 + this.offset.click.left < l + item.width/2) return 2;
- if(x1 + this.offset.click.left > l+item.width/2 && x1 + this.offset.click.left < r) return 1;
- } else {
- if(y1 + this.offset.click.top > t && y1 + this.offset.click.top < t + item.height/2) return 2;
- if(y1 + this.offset.click.top > t+item.height/2 && y1 + this.offset.click.top < b) return 1;
- }
-
- } else {
-
- if (!(l < x1 + (this.helperProportions.width / 2) // Right Half
- && x2 - (this.helperProportions.width / 2) < r // Left Half
- && t < y1 + (this.helperProportions.height / 2) // Bottom Half
- && y2 - (this.helperProportions.height / 2) < b )) return false; // Top Half
-
- if(this.floating) {
- if(x2 > l && x1 < l) return 2; //Crosses left edge
- if(x1 < r && x2 > r) return 1; //Crosses right edge
- } else {
- if(y2 > t && y1 < t) return 1; //Crosses top edge
- if(y1 < b && y2 > b) return 2; //Crosses bottom edge
- }
-
- }
-
- return false;
-
- },
- refresh: function() {
- this.refreshItems();
- this.refreshPositions();
- },
- refreshItems: function() {
-
- this.items = [];
- this.containers = [this];
- var items = this.items;
- var self = this;
- var queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element), this]];
-
- if(this.options.connectWith) {
- for (var i = this.options.connectWith.length - 1; i >= 0; i--){
- var cur = $(this.options.connectWith[i]);
- for (var j = cur.length - 1; j >= 0; j--){
- var inst = $.data(cur[j], 'sortable');
- if(inst && !inst.options.disabled) {
- queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element), inst]);
- this.containers.push(inst);
- }
- };
- };
- }
-
- for (var i = queries.length - 1; i >= 0; i--){
- queries[i][0].each(function() {
- $.data(this, 'sortable-item', queries[i][1]); // Data for target checking (mouse manager)
- items.push({
- item: $(this),
- instance: queries[i][1],
- width: 0, height: 0,
- left: 0, top: 0
- });
- });
- };
-
- },
- refreshPositions: function(fast) {
-
- //This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change
- if(this.offsetParent) {
- var po = this.offsetParent.offset();
- this.offset.parent = { top: po.top + this.offsetParentBorders.top, left: po.left + this.offsetParentBorders.left };
- }
-
- for (var i = this.items.length - 1; i >= 0; i--){
-
- //We ignore calculating positions of all connected containers when we're not over them
- if(this.items[i].instance != this.currentContainer && this.currentContainer && this.items[i].item[0] != this.currentItem[0])
- continue;
-
- var t = this.options.toleranceElement ? $(this.options.toleranceElement, this.items[i].item) : this.items[i].item;
-
- if(!fast) {
- this.items[i].width = t[0].offsetWidth;
- this.items[i].height = t[0].offsetHeight;
- }
-
- var p = t.offset();
- this.items[i].left = p.left;
- this.items[i].top = p.top;
-
- };
-
- if(this.options.custom && this.options.custom.refreshContainers) {
- this.options.custom.refreshContainers.call(this);
- } else {
- for (var i = this.containers.length - 1; i >= 0; i--){
- var p =this.containers[i].element.offset();
- this.containers[i].containerCache.left = p.left;
- this.containers[i].containerCache.top = p.top;
- this.containers[i].containerCache.width = this.containers[i].element.outerWidth();
- this.containers[i].containerCache.height = this.containers[i].element.outerHeight();
- };
- }
-
- },
- destroy: function() {
- this.element
- .removeClass("ui-sortable ui-sortable-disabled")
- .removeData("sortable")
- .unbind(".sortable");
- this.mouseDestroy();
-
- for ( var i = this.items.length - 1; i >= 0; i-- )
- this.items[i].item.removeData("sortable-item");
- },
- createPlaceholder: function(that) {
-
- var self = that || this, o = self.options;
-
- if(o.placeholder.constructor == String) {
- var className = o.placeholder;
- o.placeholder = {
- element: function() {
- return $('<div></div>').addClass(className)[0];
- },
- update: function(i, p) {
- p.css(i.offset()).css({ width: i.outerWidth(), height: i.outerHeight() });
- }
- };
- }
-
- self.placeholder = $(o.placeholder.element.call(self.element, self.currentItem)).appendTo('body').css({ position: 'absolute' });
- o.placeholder.update.call(self.element, self.currentItem, self.placeholder);
- },
- contactContainers: function(e) {
- for (var i = this.containers.length - 1; i >= 0; i--){
-
- if(this.intersectsWith(this.containers[i].containerCache)) {
- if(!this.containers[i].containerCache.over) {
-
-
- if(this.currentContainer != this.containers[i]) {
-
- //When entering a new container, we will find the item with the least distance and append our item near it
- var dist = 10000; var itemWithLeastDistance = null; var base = this.positionAbs[this.containers[i].floating ? 'left' : 'top'];
- for (var j = this.items.length - 1; j >= 0; j--) {
- if(!contains(this.containers[i].element[0], this.items[j].item[0])) continue;
- var cur = this.items[j][this.containers[i].floating ? 'left' : 'top'];
- if(Math.abs(cur - base) < dist) {
- dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j];
- }
- }
-
- if(!itemWithLeastDistance && !this.options.dropOnEmpty) //Check if dropOnEmpty is enabled
- continue;
-
- //We also need to exchange the placeholder
- if(this.placeholder) this.placeholder.remove();
- if(this.containers[i].options.placeholder) {
- this.containers[i].createPlaceholder(this);
- } else {
- this.placeholder = null;;
- }
-
- this.currentContainer = this.containers[i];
- itemWithLeastDistance ? this.rearrange(e, itemWithLeastDistance, null, true) : this.rearrange(e, null, this.containers[i].element, true);
- this.propagate("change", e); //Call plugins and callbacks
- this.containers[i].propagate("change", e, this); //Call plugins and callbacks
-
- }
-
- this.containers[i].propagate("over", e, this);
- this.containers[i].containerCache.over = 1;
- }
- } else {
- if(this.containers[i].containerCache.over) {
- this.containers[i].propagate("out", e, this);
- this.containers[i].containerCache.over = 0;
- }
- }
-
- };
- },
- mouseCapture: function(e, overrideHandle) {
-
- if(this.options.disabled || this.options.type == 'static') return false;
-
- //We have to refresh the items data once first
- this.refreshItems();
-
- //Find out if the clicked node (or one of its parents) is a actual item in this.items
- var currentItem = null, self = this, nodes = $(e.target).parents().each(function() {
- if($.data(this, 'sortable-item') == self) {
- currentItem = $(this);
- return false;
- }
- });
- if($.data(e.target, 'sortable-item') == self) currentItem = $(e.target);
-
- if(!currentItem) return false;
- if(this.options.handle && !overrideHandle) {
- var validHandle = false;
-
- $(this.options.handle, currentItem).find("*").andSelf().each(function() { if(this == e.target) validHandle = true; });
- if(!validHandle) return false;
- }
-
- this.currentItem = currentItem;
- return true;
-
- },
- mouseStart: function(e, overrideHandle, noActivation) {
-
- var o = this.options;
- this.currentContainer = this;
-
- //We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture
- this.refreshPositions();
-
- //Create and append the visible helper
- this.helper = typeof o.helper == 'function' ? $(o.helper.apply(this.element[0], [e, this.currentItem])) : this.currentItem.clone();
- if (!this.helper.parents('body').length) $(o.appendTo != 'parent' ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(this.helper[0]); //Add the helper to the DOM if that didn't happen already
- this.helper.css({ position: 'absolute', clear: 'both' }).addClass('ui-sortable-helper'); //Position it absolutely and add a helper class
-
- /*
- * - Position generation -
- * This block generates everything position related - it's the core of draggables.
- */
-
- this.margins = { //Cache the margins
- left: (parseInt(this.currentItem.css("marginLeft"),10) || 0),
- top: (parseInt(this.currentItem.css("marginTop"),10) || 0)
- };
-
- this.offset = this.currentItem.offset(); //The element's absolute position on the page
- this.offset = { //Substract the margins from the element's absolute offset
- top: this.offset.top - this.margins.top,
- left: this.offset.left - this.margins.left
- };
-
- this.offset.click = { //Where the click happened, relative to the element
- left: e.pageX - this.offset.left,
- top: e.pageY - this.offset.top
- };
-
- this.offsetParent = this.helper.offsetParent(); //Get the offsetParent and cache its position
- var po = this.offsetParent.offset();
-
- this.offsetParentBorders = {
- top: (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
- left: (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
- };
- this.offset.parent = { //Store its position plus border
- top: po.top + this.offsetParentBorders.top,
- left: po.left + this.offsetParentBorders.left
- };
-
- this.originalPosition = this.generatePosition(e); //Generate the original position
- this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] }; //Cache the former DOM position
-
- //If o.placeholder is used, create a new element at the given position with the class
- this.helperProportions = { width: this.helper.outerWidth(), height: this.helper.outerHeight() };//Cache the helper size
- if(o.placeholder) this.createPlaceholder();
-
- //Call plugins and callbacks
- this.propagate("start", e);
- this.helperProportions = { width: this.helper.outerWidth(), height: this.helper.outerHeight() };//Recache the helper size
-
- if(o.cursorAt) {
- if(o.cursorAt.left != undefined) this.offset.click.left = o.cursorAt.left;
- if(o.cursorAt.right != undefined) this.offset.click.left = this.helperProportions.width - o.cursorAt.right;
- if(o.cursorAt.top != undefined) this.offset.click.top = o.cursorAt.top;
- if(o.cursorAt.bottom != undefined) this.offset.click.top = this.helperProportions.height - o.cursorAt.bottom;
- }
-
- /*
- * - Position constraining -
- * Here we prepare position constraining like grid and containment.
- */
-
- if(o.containment) {
- if(o.containment == 'parent') o.containment = this.helper[0].parentNode;
- if(o.containment == 'document' || o.containment == 'window') this.containment = [
- 0 - this.offset.parent.left,
- 0 - this.offset.parent.top,
- $(o.containment == 'document' ? document : window).width() - this.offset.parent.left - this.helperProportions.width - this.margins.left - (parseInt(this.element.css("marginRight"),10) || 0),
- ($(o.containment == 'document' ? document : window).height() || document.body.parentNode.scrollHeight) - this.offset.parent.top - this.helperProportions.height - this.margins.top - (parseInt(this.element.css("marginBottom"),10) || 0)
- ];
-
- if(!(/^(document|window|parent)$/).test(o.containment)) {
- var ce = $(o.containment)[0];
- var co = $(o.containment).offset();
-
- this.containment = [
- co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) - this.offset.parent.left,
- co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) - this.offset.parent.top,
- co.left+Math.max(ce.scrollWidth,ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - this.offset.parent.left - this.helperProportions.width - this.margins.left - (parseInt(this.currentItem.css("marginRight"),10) || 0),
- co.top+Math.max(ce.scrollHeight,ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - this.offset.parent.top - this.helperProportions.height - this.margins.top - (parseInt(this.currentItem.css("marginBottom"),10) || 0)
- ];
- }
- }
-
- //Set the original element visibility to hidden to still fill out the white space
- if(this.options.placeholder != 'clone')
- this.currentItem.css('visibility', 'hidden');
-
- //Post 'activate' events to possible containers
- if(!noActivation) {
- for (var i = this.containers.length - 1; i >= 0; i--) { this.containers[i].propagate("activate", e, this); }
- }
-
- //Prepare possible droppables
- if($.ui.ddmanager) $.ui.ddmanager.current = this;
- if ($.ui.ddmanager && !o.dropBehaviour) $.ui.ddmanager.prepareOffsets(this, e);
-
- this.dragging = true;
-
- this.mouseDrag(e); //Execute the drag once - this causes the helper not to be visible before getting its correct position
- return true;
-
-
- },
- convertPositionTo: function(d, pos) {
- if(!pos) pos = this.position;
- var mod = d == "absolute" ? 1 : -1;
- return {
- top: (
- pos.top // the calculated relative position
- + this.offset.parent.top * mod // The offsetParent's offset without borders (offset + border)
- - (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollTop) * mod // The offsetParent's scroll position
- + this.margins.top * mod //Add the margin (you don't want the margin counting in intersection methods)
- ),
- left: (
- pos.left // the calculated relative position
- + this.offset.parent.left * mod // The offsetParent's offset without borders (offset + border)
- - (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollLeft) * mod // The offsetParent's scroll position
- + this.margins.left * mod //Add the margin (you don't want the margin counting in intersection methods)
- )
- };
- },
- generatePosition: function(e) {
-
- var o = this.options;
- var position = {
- top: (
- e.pageY // The absolute mouse position
- - this.offset.click.top // Click offset (relative to the element)
- - this.offset.parent.top // The offsetParent's offset without borders (offset + border)
- + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollTop) // The offsetParent's scroll position, not if the element is fixed
- ),
- left: (
- e.pageX // The absolute mouse position
- - this.offset.click.left // Click offset (relative to the element)
- - this.offset.parent.left // The offsetParent's offset without borders (offset + border)
- + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollLeft) // The offsetParent's scroll position, not if the element is fixed
- )
- };
-
- if(!this.originalPosition) return position; //If we are not dragging yet, we won't check for options
-
- /*
- * - Position constraining -
- * Constrain the position to a mix of grid, containment.
- */
- if(this.containment) {
- if(position.left < this.containment[0]) position.left = this.containment[0];
- if(position.top < this.containment[1]) position.top = this.containment[1];
- if(position.left > this.containment[2]) position.left = this.containment[2];
- if(position.top > this.containment[3]) position.top = this.containment[3];
- }
-
- if(o.grid) {
- var top = this.originalPosition.top + Math.round((position.top - this.originalPosition.top) / o.grid[1]) * o.grid[1];
- position.top = this.containment ? (!(top < this.containment[1] || top > this.containment[3]) ? top : (!(top < this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
-
- var left = this.originalPosition.left + Math.round((position.left - this.originalPosition.left) / o.grid[0]) * o.grid[0];
- position.left = this.containment ? (!(left < this.containment[0] || left > this.containment[2]) ? left : (!(left < this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
- }
-
- return position;
- },
- mouseDrag: function(e) {
-
- //Compute the helpers position
- this.position = this.generatePosition(e);
- this.positionAbs = this.convertPositionTo("absolute");
-
- //Call the internal plugins
- $.ui.plugin.call(this, "sort", [e, this.ui()]);
-
- //Regenerate the absolute position used for position checks
- this.positionAbs = this.convertPositionTo("absolute");
-
- //Set the helper's position
- this.helper[0].style.left = this.position.left+'px';
- this.helper[0].style.top = this.position.top+'px';
-
- //Rearrange
- for (var i = this.items.length - 1; i >= 0; i--) {
- var intersection = this.intersectsWithEdge(this.items[i]);
- if(!intersection) continue;
-
- if(this.items[i].item[0] != this.currentItem[0] //cannot intersect with itself
- && this.currentItem[intersection == 1 ? "next" : "prev"]()[0] != this.items[i].item[0] //no useless actions that have been done before
- && !contains(this.currentItem[0], this.items[i].item[0]) //no action if the item moved is the parent of the item checked
- && (this.options.type == 'semi-dynamic' ? !contains(this.element[0], this.items[i].item[0]) : true)
- ) {
-
- this.direction = intersection == 1 ? "down" : "up";
- this.rearrange(e, this.items[i]);
- this.propagate("change", e); //Call plugins and callbacks
- break;
- }
- }
-
- //Post events to containers
- this.contactContainers(e);
-
- //Interconnect with droppables
- if($.ui.ddmanager) $.ui.ddmanager.drag(this, e);
-
- //Call callbacks
- this.element.triggerHandler("sort", [e, this.ui()], this.options["sort"]);
-
- return false;
-
- },
- rearrange: function(e, i, a, hardRefresh) {
- a ? a[0].appendChild(this.currentItem[0]) : i.item[0].parentNode.insertBefore(this.currentItem[0], (this.direction == 'down' ? i.item[0] : i.item[0].nextSibling));
-
- //Various things done here to improve the performance:
- // 1. we create a setTimeout, that calls refreshPositions
- // 2. on the instance, we have a counter variable, that get's higher after every append
- // 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same
- // 4. this lets only the last addition to the timeout stack through
- this.counter = this.counter ? ++this.counter : 1;
- var self = this, counter = this.counter;
-
- window.setTimeout(function() {
- if(counter == self.counter) self.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove
- },0);
-
- if(this.options.placeholder)
- this.options.placeholder.update.call(this.element, this.currentItem, this.placeholder);
- },
- mouseStop: function(e, noPropagation) {
-
- //If we are using droppables, inform the manager about the drop
- if ($.ui.ddmanager && !this.options.dropBehaviour)
- $.ui.ddmanager.drop(this, e);
-
- if(this.options.revert) {
- var self = this;
- var cur = self.currentItem.offset();
-
- //Also animate the placeholder if we have one
- if(self.placeholder) self.placeholder.animate({ opacity: 'hide' }, (parseInt(this.options.revert, 10) || 500)-50);
-
- $(this.helper).animate({
- left: cur.left - this.offset.parent.left - self.margins.left + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollLeft),
- top: cur.top - this.offset.parent.top - self.margins.top + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollTop)
- }, parseInt(this.options.revert, 10) || 500, function() {
- self.clear(e);
- });
- } else {
- this.clear(e, noPropagation);
- }
-
- return false;
-
- },
- clear: function(e, noPropagation) {
-
- if(this.domPosition.prev != this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent != this.currentItem.parent()[0]) this.propagate("update", e, null, noPropagation); //Trigger update callback if the DOM position has changed
- if(!contains(this.element[0], this.currentItem[0])) { //Node was moved out of the current element
- this.propagate("remove", e, null, noPropagation);
- for (var i = this.containers.length - 1; i >= 0; i--){
- if(contains(this.containers[i].element[0], this.currentItem[0])) {
- this.containers[i].propagate("update", e, this, noPropagation);
- this.containers[i].propagate("receive", e, this, noPropagation);
- }
- };
- };
-
- //Post events to containers
- for (var i = this.containers.length - 1; i >= 0; i--){
- this.containers[i].propagate("deactivate", e, this, noPropagation);
- if(this.containers[i].containerCache.over) {
- this.containers[i].propagate("out", e, this);
- this.containers[i].containerCache.over = 0;
- }
- }
-
- this.dragging = false;
- if(this.cancelHelperRemoval) {
- this.propagate("stop", e, null, noPropagation);
- return false;
- }
-
- $(this.currentItem).css('visibility', '');
- if(this.placeholder) this.placeholder.remove();
- this.helper.remove(); this.helper = null;
- this.propagate("stop", e, null, noPropagation);
-
- return true;
-
- }
-}));
-
-$.extend($.ui.sortable, {
- getter: "serialize toArray",
- defaults: {
- helper: "clone",
- tolerance: "guess",
- distance: 1,
- delay: 0,
- scroll: true,
- scrollSensitivity: 20,
- scrollSpeed: 20,
- cancel: ":input",
- items: '> *',
- zIndex: 1000,
- dropOnEmpty: true,
- appendTo: "parent"
- }
-});
-
-/*
- * Sortable Extensions
- */
-
-$.ui.plugin.add("sortable", "cursor", {
- start: function(e, ui) {
- var t = $('body');
- if (t.css("cursor")) ui.options._cursor = t.css("cursor");
- t.css("cursor", ui.options.cursor);
- },
- stop: function(e, ui) {
- if (ui.options._cursor) $('body').css("cursor", ui.options._cursor);
- }
-});
-
-$.ui.plugin.add("sortable", "zIndex", {
- start: function(e, ui) {
- var t = ui.helper;
- if(t.css("zIndex")) ui.options._zIndex = t.css("zIndex");
- t.css('zIndex', ui.options.zIndex);
- },
- stop: function(e, ui) {
- if(ui.options._zIndex) $(ui.helper).css('zIndex', ui.options._zIndex);
- }
-});
-
-$.ui.plugin.add("sortable", "opacity", {
- start: function(e, ui) {
- var t = ui.helper;
- if(t.css("opacity")) ui.options._opacity = t.css("opacity");
- t.css('opacity', ui.options.opacity);
- },
- stop: function(e, ui) {
- if(ui.options._opacity) $(ui.helper).css('opacity', ui.options._opacity);
- }
-});
-
-$.ui.plugin.add("sortable", "scroll", {
- start: function(e, ui) {
- var o = ui.options;
- var i = $(this).data("sortable");
-
- i.overflowY = function(el) {
- do { if(/auto|scroll/.test(el.css('overflow')) || (/auto|scroll/).test(el.css('overflow-y'))) return el; el = el.parent(); } while (el[0].parentNode);
- return $(document);
- }(i.currentItem);
- i.overflowX = function(el) {
- do { if(/auto|scroll/.test(el.css('overflow')) || (/auto|scroll/).test(el.css('overflow-x'))) return el; el = el.parent(); } while (el[0].parentNode);
- return $(document);
- }(i.currentItem);
-
- if(i.overflowY[0] != document && i.overflowY[0].tagName != 'HTML') i.overflowYOffset = i.overflowY.offset();
- if(i.overflowX[0] != document && i.overflowX[0].tagName != 'HTML') i.overflowXOffset = i.overflowX.offset();
-
- },
- sort: function(e, ui) {
-
- var o = ui.options;
- var i = $(this).data("sortable");
-
- if(i.overflowY[0] != document && i.overflowY[0].tagName != 'HTML') {
- if((i.overflowYOffset.top + i.overflowY[0].offsetHeight) - e.pageY < o.scrollSensitivity)
- i.overflowY[0].scrollTop = i.overflowY[0].scrollTop + o.scrollSpeed;
- if(e.pageY - i.overflowYOffset.top < o.scrollSensitivity)
- i.overflowY[0].scrollTop = i.overflowY[0].scrollTop - o.scrollSpeed;
- } else {
- if(e.pageY - $(document).scrollTop() < o.scrollSensitivity)
- $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
- if($(window).height() - (e.pageY - $(document).scrollTop()) < o.scrollSensitivity)
- $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
- }
-
- if(i.overflowX[0] != document && i.overflowX[0].tagName != 'HTML') {
- if((i.overflowXOffset.left + i.overflowX[0].offsetWidth) - e.pageX < o.scrollSensitivity)
- i.overflowX[0].scrollLeft = i.overflowX[0].scrollLeft + o.scrollSpeed;
- if(e.pageX - i.overflowXOffset.left < o.scrollSensitivity)
- i.overflowX[0].scrollLeft = i.overflowX[0].scrollLeft - o.scrollSpeed;
- } else {
- if(e.pageX - $(document).scrollLeft() < o.scrollSensitivity)
- $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
- if($(window).width() - (e.pageX - $(document).scrollLeft()) < o.scrollSensitivity)
- $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
- }
-
- }
-});
-
-$.ui.plugin.add("sortable", "axis", {
- sort: function(e, ui) {
-
- var i = $(this).data("sortable");
-
- if(ui.options.axis == "y") i.position.left = i.originalPosition.left;
- if(ui.options.axis == "x") i.position.top = i.originalPosition.top;
-
- }
-});
-
-})(jQuery);
-/*
- * jQuery UI Effects 1.5.3
+(function(a){a.widget("ui.sortable",a.extend({},a.ui.mouse,{_init:function(){var b=this.options;this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?(/left|right/).test(this.items[0].item.css("float")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var b=this.items.length-1;b>=0;b--){this.items[b].item.removeData("sortable-item")}},_mouseCapture:function(e,f){if(this.reverting){return false}if(this.options.disabled||this.options.type=="static"){return false}this._refreshItems(e);var d=null,c=this,b=a(e.target).parents().each(function(){if(a.data(this,"sortable-item")==c){d=a(this);return false}});if(a.data(e.target,"sortable-item")==c){d=a(e.target)}if(!d){return false}if(this.options.handle&&!f){var g=false;a(this.options.handle,d).find("*").andSelf().each(function(){if(this==e.target){g=true}});if(!g){return false}}this.currentItem=d;this._removeCurrentsFromItems();return true},_mouseStart:function(e,f,b){var g=this.options,c=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(e);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");a.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(e);this.originalPageX=e.pageX;this.originalPageY=e.pageY;if(g.cursorAt){this._adjustOffsetFromHelper(g.cursorAt)}this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};if(this.helper[0]!=this.currentItem[0]){this.currentItem.hide()}this._createPlaceholder();if(g.containment){this._setContainment()}if(g.cursor){if(a("body").css("cursor")){this._storedCursor=a("body").css("cursor")}a("body").css("cursor",g.cursor)}if(g.opacity){if(this.helper.css("opacity")){this._storedOpacity=this.helper.css("opacity")}this.helper.css("opacity",g.opacity)}if(g.zIndex){if(this.helper.css("zIndex")){this._storedZIndex=this.helper.css("zIndex")}this.helper.css("zIndex",g.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){this.overflowOffset=this.scrollParent.offset()}this._trigger("start",e,this._uiHash());if(!this._preserveHelperProportions){this._cacheHelperProportions()}if(!b){for(var d=this.containers.length-1;d>=0;d--){this.containers[d]._trigger("activate",e,c._uiHash(this))}}if(a.ui.ddmanager){a.ui.ddmanager.current=this}if(a.ui.ddmanager&&!g.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,e)}this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(e);return true},_mouseDrag:function(f){this.position=this._generatePosition(f);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs}if(this.options.scroll){var g=this.options,b=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if((this.overflowOffset.top+this.scrollParent[0].offsetHeight)-f.pageY<g.scrollSensitivity){this.scrollParent[0].scrollTop=b=this.scrollParent[0].scrollTop+g.scrollSpeed}else{if(f.pageY-this.overflowOffset.top<g.scrollSensitivity){this.scrollParent[0].scrollTop=b=this.scrollParent[0].scrollTop-g.scrollSpeed}}if((this.overflowOffset.left+this.scrollParent[0].offsetWidth)-f.pageX<g.scrollSensitivity){this.scrollParent[0].scrollLeft=b=this.scrollParent[0].scrollLeft+g.scrollSpeed}else{if(f.pageX-this.overflowOffset.left<g.scrollSensitivity){this.scrollParent[0].scrollLeft=b=this.scrollParent[0].scrollLeft-g.scrollSpeed}}}else{if(f.pageY-a(document).scrollTop()<g.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()-g.scrollSpeed)}else{if(a(window).height()-(f.pageY-a(document).scrollTop())<g.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()+g.scrollSpeed)}}if(f.pageX-a(document).scrollLeft()<g.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()-g.scrollSpeed)}else{if(a(window).width()-(f.pageX-a(document).scrollLeft())<g.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()+g.scrollSpeed)}}}if(b!==false&&a.ui.ddmanager&&!g.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,f)}}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}for(var d=this.items.length-1;d>=0;d--){var e=this.items[d],c=e.item[0],h=this._intersectsWithPointer(e);if(!h){continue}if(c!=this.currentItem[0]&&this.placeholder[h==1?"next":"prev"]()[0]!=c&&!a.ui.contains(this.placeholder[0],c)&&(this.options.type=="semi-dynamic"?!a.ui.contains(this.element[0],c):true)){this.direction=h==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(e)){this._rearrange(f,e)}else{break}this._trigger("change",f,this._uiHash());break}}this._contactContainers(f);if(a.ui.ddmanager){a.ui.ddmanager.drag(this,f)}this._trigger("sort",f,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(c,d){if(!c){return}if(a.ui.ddmanager&&!this.options.dropBehaviour){a.ui.ddmanager.drop(this,c)}if(this.options.revert){var b=this;var e=b.placeholder.offset();b.reverting=true;a(this.helper).animate({left:e.left-this.offset.parent.left-b.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:e.top-this.offset.parent.top-b.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){b._clear(c)})}else{this._clear(c,d)}return false},cancel:function(){var b=this;if(this.dragging){this._mouseUp();if(this.options.helper=="original"){this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}for(var c=this.containers.length-1;c>=0;c--){this.containers[c]._trigger("deactivate",null,b._uiHash(this));if(this.containers[c].containerCache.over){this.containers[c]._trigger("out",null,b._uiHash(this));this.containers[c].containerCache.over=0}}}if(this.placeholder[0].parentNode){this.placeholder[0].parentNode.removeChild(this.placeholder[0])}if(this.options.helper!="original"&&this.helper&&this.helper[0].parentNode){this.helper.remove()}a.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});if(this.domPosition.prev){a(this.domPosition.prev).after(this.currentItem)}else{a(this.domPosition.parent).prepend(this.currentItem)}return true},serialize:function(d){var b=this._getItemsAsjQuery(d&&d.connected);var c=[];d=d||{};a(b).each(function(){var e=(a(d.item||this).attr(d.attribute||"id")||"").match(d.expression||(/(.+)[-=_](.+)/));if(e){c.push((d.key||e[1]+"[]")+"="+(d.key&&d.expression?e[1]:e[2]))}});return c.join("&")},toArray:function(d){var b=this._getItemsAsjQuery(d&&d.connected);var c=[];d=d||{};b.each(function(){c.push(a(d.item||this).attr(d.attribute||"id")||"")});return c},_intersectsWith:function(m){var e=this.positionAbs.left,d=e+this.helperProportions.width,k=this.positionAbs.top,j=k+this.helperProportions.height;var f=m.left,c=f+m.width,n=m.top,i=n+m.height;var o=this.offset.click.top,h=this.offset.click.left;var g=(k+o)>n&&(k+o)<i&&(e+h)>f&&(e+h)<c;if(this.options.tolerance=="pointer"||this.options.forcePointerForContainers||(this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>m[this.floating?"width":"height"])){return g}else{return(f<e+(this.helperProportions.width/2)&&d-(this.helperProportions.width/2)<c&&n<k+(this.helperProportions.height/2)&&j-(this.helperProportions.height/2)<i)}},_intersectsWithPointer:function(d){var e=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,d.top,d.height),c=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,d.left,d.width),g=e&&c,b=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();if(!g){return false}return this.floating?(((f&&f=="right")||b=="down")?2:1):(b&&(b=="down"?2:1))},_intersectsWithSides:function(e){var c=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,e.top+(e.height/2),e.height),d=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,e.left+(e.width/2),e.width),b=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();if(this.floating&&f){return((f=="right"&&d)||(f=="left"&&!d))}else{return b&&((b=="down"&&c)||(b=="up"&&!c))}},_getDragVerticalDirection:function(){var b=this.positionAbs.top-this.lastPositionAbs.top;return b!=0&&(b>0?"down":"up")},_getDragHorizontalDirection:function(){var b=this.positionAbs.left-this.lastPositionAbs.left;return b!=0&&(b>0?"right":"left")},refresh:function(b){this._refreshItems(b);this.refreshPositions()},_connectWith:function(){var b=this.options;return b.connectWith.constructor==String?[b.connectWith]:b.connectWith},_getItemsAsjQuery:function(b){var l=this;var g=[];var e=[];var h=this._connectWith();if(h&&b){for(var d=h.length-1;d>=0;d--){var k=a(h[d]);for(var c=k.length-1;c>=0;c--){var f=a.data(k[c],"sortable");if(f&&f!=this&&!f.options.disabled){e.push([a.isFunction(f.options.items)?f.options.items.call(f.element):a(f.options.items,f.element).not(".ui-sortable-helper"),f])}}}}e.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper"),this]);for(var d=e.length-1;d>=0;d--){e[d][0].each(function(){g.push(this)})}return a(g)},_removeCurrentsFromItems:function(){var d=this.currentItem.find(":data(sortable-item)");for(var c=0;c<this.items.length;c++){for(var b=0;b<d.length;b++){if(d[b]==this.items[c].item[0]){this.items.splice(c,1)}}}},_refreshItems:function(b){this.items=[];this.containers=[this];var h=this.items;var p=this;var f=[[a.isFunction(this.options.items)?this.options.items.call(this.element[0],b,{item:this.currentItem}):a(this.options.items,this.element),this]];var l=this._connectWith();if(l){for(var e=l.length-1;e>=0;e--){var m=a(l[e]);for(var d=m.length-1;d>=0;d--){var g=a.data(m[d],"sortable");if(g&&g!=this&&!g.options.disabled){f.push([a.isFunction(g.options.items)?g.options.items.call(g.element[0],b,{item:this.currentItem}):a(g.options.items,g.element),g]);this.containers.push(g)}}}}for(var e=f.length-1;e>=0;e--){var k=f[e][1];var c=f[e][0];for(var d=0,n=c.length;d<n;d++){var o=a(c[d]);o.data("sortable-item",k);h.push({item:o,instance:k,width:0,height:0,left:0,top:0})}}},refreshPositions:function(b){if(this.offsetParent&&this.helper){this.offset.parent=this._getParentOffset()}for(var d=this.items.length-1;d>=0;d--){var e=this.items[d];if(e.instance!=this.currentContainer&&this.currentContainer&&e.item[0]!=this.currentItem[0]){continue}var c=this.options.toleranceElement?a(this.options.toleranceElement,e.item):e.item;if(!b){e.width=c.outerWidth();e.height=c.outerHeight()}var f=c.offset();e.left=f.left;e.top=f.top}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(var d=this.containers.length-1;d>=0;d--){var f=this.containers[d].element.offset();this.containers[d].containerCache.left=f.left;this.containers[d].containerCache.top=f.top;this.containers[d].containerCache.width=this.containers[d].element.outerWidth();this.containers[d].containerCache.height=this.containers[d].element.outerHeight()}}},_createPlaceholder:function(d){var b=d||this,e=b.options;if(!e.placeholder||e.placeholder.constructor==String){var c=e.placeholder;e.placeholder={element:function(){var f=a(document.createElement(b.currentItem[0].nodeName)).addClass(c||b.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!c){f.style.visibility="hidden"}return f},update:function(f,g){if(c&&!e.forcePlaceholderSize){return}if(!g.height()){g.height(b.currentItem.innerHeight()-parseInt(b.currentItem.css("paddingTop")||0,10)-parseInt(b.currentItem.css("paddingBottom")||0,10))}if(!g.width()){g.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css("paddingLeft")||0,10)-parseInt(b.currentItem.css("paddingRight")||0,10))}}}}b.placeholder=a(e.placeholder.element.call(b.element,b.currentItem));b.currentItem.after(b.placeholder);e.placeholder.update(b,b.placeholder)},_contactContainers:function(d){for(var c=this.containers.length-1;c>=0;c--){if(this._intersectsWith(this.containers[c].containerCache)){if(!this.containers[c].containerCache.over){if(this.currentContainer!=this.containers[c]){var h=10000;var g=null;var e=this.positionAbs[this.containers[c].floating?"left":"top"];for(var b=this.items.length-1;b>=0;b--){if(!a.ui.contains(this.containers[c].element[0],this.items[b].item[0])){continue}var f=this.items[b][this.containers[c].floating?"left":"top"];if(Math.abs(f-e)<h){h=Math.abs(f-e);g=this.items[b]}}if(!g&&!this.options.dropOnEmpty){continue}this.currentContainer=this.containers[c];g?this._rearrange(d,g,null,true):this._rearrange(d,null,this.containers[c].element,true);this._trigger("change",d,this._uiHash());this.containers[c]._trigger("change",d,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder)}this.containers[c]._trigger("over",d,this._uiHash(this));this.containers[c].containerCache.over=1}}else{if(this.containers[c].containerCache.over){this.containers[c]._trigger("out",d,this._uiHash(this));this.containers[c].containerCache.over=0}}}},_createHelper:function(c){var d=this.options;var b=a.isFunction(d.helper)?a(d.helper.apply(this.element[0],[c,this.currentItem])):(d.helper=="clone"?this.currentItem.clone():this.currentItem);if(!b.parents("body").length){a(d.appendTo!="parent"?d.appendTo:this.currentItem[0].parentNode)[0].appendChild(b[0])}if(b[0]==this.currentItem[0]){this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}}if(b[0].style.width==""||d.forceHelperSize){b.width(this.currentItem.width())}if(b[0].style.height==""||d.forceHelperSize){b.height(this.currentItem.height())}return b},_adjustOffsetFromHelper:function(b){if(b.left!=undefined){this.offset.click.left=b.left+this.margins.left}if(b.right!=undefined){this.offset.click.left=this.helperProportions.width-b.right+this.margins.left}if(b.top!=undefined){this.offset.click.top=b.top+this.margins.top}if(b.bottom!=undefined){this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();b.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)){b={top:0,left:0}}return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var b=this.currentItem.position();return{top:b.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:b.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.currentItem.css("marginLeft"),10)||0),top:(parseInt(this.currentItem.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e=this.options;if(e.containment=="parent"){e.containment=this.helper[0].parentNode}if(e.containment=="document"||e.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(e.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(e.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(e.containment)){var c=a(e.containment)[0];var d=a(e.containment).offset();var b=(a(c).css("overflow")!="hidden");this.containment=[d.left+(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0)-this.margins.left,d.top+(parseInt(a(c).css("borderTopWidth"),10)||0)+(parseInt(a(c).css("paddingTop"),10)||0)-this.margins.top,d.left+(b?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,d.top+(b?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(f,h){if(!h){h=this.position}var c=f=="absolute"?1:-1;var e=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=(/(html|body)/i).test(b[0].tagName);return{top:(h.top+this.offset.relative.top*c+this.offset.parent.top*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(g?0:b.scrollTop()))*c)),left:(h.left+this.offset.relative.left*c+this.offset.parent.left*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:b.scrollLeft())*c))}},_generatePosition:function(e){var h=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,i=(/(html|body)/i).test(b[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var d=e.pageX;var c=e.pageY;if(this.originalPosition){if(this.containment){if(e.pageX-this.offset.click.left<this.containment[0]){d=this.containment[0]+this.offset.click.left}if(e.pageY-this.offset.click.top<this.containment[1]){c=this.containment[1]+this.offset.click.top}if(e.pageX-this.offset.click.left>this.containment[2]){d=this.containment[2]+this.offset.click.left}if(e.pageY-this.offset.click.top>this.containment[3]){c=this.containment[3]+this.offset.click.top}}if(h.grid){var g=this.originalPageY+Math.round((c-this.originalPageY)/h.grid[1])*h.grid[1];c=this.containment?(!(g-this.offset.click.top<this.containment[1]||g-this.offset.click.top>this.containment[3])?g:(!(g-this.offset.click.top<this.containment[1])?g-h.grid[1]:g+h.grid[1])):g;var f=this.originalPageX+Math.round((d-this.originalPageX)/h.grid[0])*h.grid[0];d=this.containment?(!(f-this.offset.click.left<this.containment[0]||f-this.offset.click.left>this.containment[2])?f:(!(f-this.offset.click.left<this.containment[0])?f-h.grid[0]:f+h.grid[0])):f}}return{top:(c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(i?0:b.scrollTop())))),left:(d-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():i?0:b.scrollLeft())))}},_rearrange:function(g,f,c,e){c?c[0].appendChild(this.placeholder[0]):f.item[0].parentNode.insertBefore(this.placeholder[0],(this.direction=="down"?f.item[0]:f.item[0].nextSibling));this.counter=this.counter?++this.counter:1;var d=this,b=this.counter;window.setTimeout(function(){if(b==d.counter){d.refreshPositions(!e)}},0)},_clear:function(d,e){this.reverting=false;var f=[],b=this;if(!this._noFinalSort&&this.currentItem[0].parentNode){this.placeholder.before(this.currentItem)}this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var c in this._storedCSS){if(this._storedCSS[c]=="auto"||this._storedCSS[c]=="static"){this._storedCSS[c]=""}}this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}if(this.fromOutside&&!e){f.push(function(g){this._trigger("receive",g,this._uiHash(this.fromOutside))})}if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!e){f.push(function(g){this._trigger("update",g,this._uiHash())})}if(!a.ui.contains(this.element[0],this.currentItem[0])){if(!e){f.push(function(g){this._trigger("remove",g,this._uiHash())})}for(var c=this.containers.length-1;c>=0;c--){if(a.ui.contains(this.containers[c].element[0],this.currentItem[0])&&!e){f.push((function(g){return function(h){g._trigger("receive",h,this._uiHash(this))}}).call(this,this.containers[c]));f.push((function(g){return function(h){g._trigger("update",h,this._uiHash(this))}}).call(this,this.containers[c]))}}}for(var c=this.containers.length-1;c>=0;c--){if(!e){f.push((function(g){return function(h){g._trigger("deactivate",h,this._uiHash(this))}}).call(this,this.containers[c]))}if(this.containers[c].containerCache.over){f.push((function(g){return function(h){g._trigger("out",h,this._uiHash(this))}}).call(this,this.containers[c]));this.containers[c].containerCache.over=0}}if(this._storedCursor){a("body").css("cursor",this._storedCursor)}if(this._storedOpacity){this.helper.css("opacity",this._storedOpacity)}if(this._storedZIndex){this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex)}this.dragging=false;if(this.cancelHelperRemoval){if(!e){this._trigger("beforeStop",d,this._uiHash());for(var c=0;c<f.length;c++){f[c].call(this,d)}this._trigger("stop",d,this._uiHash())}return false}if(!e){this._trigger("beforeStop",d,this._uiHash())}this.placeholder[0].parentNode.removeChild(this.placeholder[0]);if(this.helper[0]!=this.currentItem[0]){this.helper.remove()}this.helper=null;if(!e){for(var c=0;c<f.length;c++){f[c].call(this,d)}this._trigger("stop",d,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){if(a.widget.prototype._trigger.apply(this,arguments)===false){this.cancel()}},_uiHash:function(c){var b=c||this;return{helper:b.helper,placeholder:b.placeholder||a([]),position:b.position,absolutePosition:b.positionAbs,offset:b.positionAbs,item:b.currentItem,sender:c?c.element:null}}}));a.extend(a.ui.sortable,{getter:"serialize toArray",version:"1.7.2",eventPrefix:"sort",defaults:{appendTo:"parent",axis:false,cancel:":input,option",connectWith:false,containment:false,cursor:"auto",cursorAt:false,delay:0,distance:1,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1000}})})(jQuery);;/*
+ * jQuery UI Accordion 1.7.2
*
- * Copyright (c) 2008 Aaron Eisenberger (aaronchi@gmail.com)
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://docs.jquery.com/UI/Effects/
- */
-;(function($) {
-
-$.effects = $.effects || {}; //Add the 'effects' scope
-
-$.extend($.effects, {
- save: function(el, set) {
- for(var i=0;i<set.length;i++) {
- if(set[i] !== null) $.data(el[0], "ec.storage."+set[i], el[0].style[set[i]]);
- }
- },
- restore: function(el, set) {
- for(var i=0;i<set.length;i++) {
- if(set[i] !== null) el.css(set[i], $.data(el[0], "ec.storage."+set[i]));
- }
- },
- setMode: function(el, mode) {
- if (mode == 'toggle') mode = el.is(':hidden') ? 'show' : 'hide'; // Set for toggle
- return mode;
- },
- getBaseline: function(origin, original) { // Translates a [top,left] array into a baseline value
- // this should be a little more flexible in the future to handle a string & hash
- var y, x;
- switch (origin[0]) {
- case 'top': y = 0; break;
- case 'middle': y = 0.5; break;
- case 'bottom': y = 1; break;
- default: y = origin[0] / original.height;
- };
- switch (origin[1]) {
- case 'left': x = 0; break;
- case 'center': x = 0.5; break;
- case 'right': x = 1; break;
- default: x = origin[1] / original.width;
- };
- return {x: x, y: y};
- },
- createWrapper: function(el) {
- if (el.parent().attr('id') == 'fxWrapper')
- return el;
- var props = {width: el.outerWidth({margin:true}), height: el.outerHeight({margin:true}), 'float': el.css('float')};
- el.wrap('<div id="fxWrapper" style="font-size:100%;background:transparent;border:none;margin:0;padding:0"></div>');
- var wrapper = el.parent();
- if (el.css('position') == 'static'){
- wrapper.css({position: 'relative'});
- el.css({position: 'relative'});
- } else {
- var top = el.css('top'); if(isNaN(parseInt(top))) top = 'auto';
- var left = el.css('left'); if(isNaN(parseInt(left))) left = 'auto';
- wrapper.css({ position: el.css('position'), top: top, left: left, zIndex: el.css('z-index') }).show();
- el.css({position: 'relative', top:0, left:0});
- }
- wrapper.css(props);
- return wrapper;
- },
- removeWrapper: function(el) {
- if (el.parent().attr('id') == 'fxWrapper')
- return el.parent().replaceWith(el);
- return el;
- },
- setTransition: function(el, list, factor, val) {
- val = val || {};
- $.each(list,function(i, x){
- unit = el.cssUnit(x);
- if (unit[0] > 0) val[x] = unit[0] * factor + unit[1];
- });
- return val;
- },
- animateClass: function(value, duration, easing, callback) {
-
- var cb = (typeof easing == "function" ? easing : (callback ? callback : null));
- var ea = (typeof easing == "object" ? easing : null);
-
- return this.each(function() {
-
- var offset = {}; var that = $(this); var oldStyleAttr = that.attr("style") || '';
- if(typeof oldStyleAttr == 'object') oldStyleAttr = oldStyleAttr["cssText"]; /* Stupidly in IE, style is a object.. */
- if(value.toggle) { that.hasClass(value.toggle) ? value.remove = value.toggle : value.add = value.toggle; }
-
- //Let's get a style offset
- var oldStyle = $.extend({}, (document.defaultView ? document.defaultView.getComputedStyle(this,null) : this.currentStyle));
- if(value.add) that.addClass(value.add); if(value.remove) that.removeClass(value.remove);
- var newStyle = $.extend({}, (document.defaultView ? document.defaultView.getComputedStyle(this,null) : this.currentStyle));
- if(value.add) that.removeClass(value.add); if(value.remove) that.addClass(value.remove);
-
- // The main function to form the object for animation
- for(var n in newStyle) {
- if( typeof newStyle[n] != "function" && newStyle[n] /* No functions and null properties */
- && n.indexOf("Moz") == -1 && n.indexOf("length") == -1 /* No mozilla spezific render properties. */
- && newStyle[n] != oldStyle[n] /* Only values that have changed are used for the animation */
- && (n.match(/color/i) || (!n.match(/color/i) && !isNaN(parseInt(newStyle[n],10)))) /* Only things that can be parsed to integers or colors */
- && (oldStyle.position != "static" || (oldStyle.position == "static" && !n.match(/left|top|bottom|right/))) /* No need for positions when dealing with static positions */
- ) offset[n] = newStyle[n];
- }
-
- that.animate(offset, duration, ea, function() { // Animate the newly constructed offset object
- // Change style attribute back to original. For stupid IE, we need to clear the damn object.
- if(typeof $(this).attr("style") == 'object') { $(this).attr("style")["cssText"] = ""; $(this).attr("style")["cssText"] = oldStyleAttr; } else $(this).attr("style", oldStyleAttr);
- if(value.add) $(this).addClass(value.add); if(value.remove) $(this).removeClass(value.remove);
- if(cb) cb.apply(this, arguments);
- });
-
- });
- }
-});
-
-//Extend the methods of jQuery
-$.fn.extend({
- //Save old methods
- _show: $.fn.show,
- _hide: $.fn.hide,
- __toggle: $.fn.toggle,
- _addClass: $.fn.addClass,
- _removeClass: $.fn.removeClass,
- _toggleClass: $.fn.toggleClass,
- // New ec methods
- effect: function(fx,o,speed,callback) {
- return $.effects[fx] ? $.effects[fx].call(this, {method: fx, options: o || {}, duration: speed, callback: callback }) : null;
- },
- show: function() {
- if(!arguments[0] || (arguments[0].constructor == Number || /(slow|normal|fast)/.test(arguments[0])))
- return this._show.apply(this, arguments);
- else {
- var o = arguments[1] || {}; o['mode'] = 'show';
- return this.effect.apply(this, [arguments[0], o, arguments[2] || o.duration, arguments[3] || o.callback]);
- }
- },
- hide: function() {
- if(!arguments[0] || (arguments[0].constructor == Number || /(slow|normal|fast)/.test(arguments[0])))
- return this._hide.apply(this, arguments);
- else {
- var o = arguments[1] || {}; o['mode'] = 'hide';
- return this.effect.apply(this, [arguments[0], o, arguments[2] || o.duration, arguments[3] || o.callback]);
- }
- },
- toggle: function(){
- if(!arguments[0] || (arguments[0].constructor == Number || /(slow|normal|fast)/.test(arguments[0])) || (arguments[0].constructor == Function))
- return this.__toggle.apply(this, arguments);
- else {
- var o = arguments[1] || {}; o['mode'] = 'toggle';
- return this.effect.apply(this, [arguments[0], o, arguments[2] || o.duration, arguments[3] || o.callback]);
- }
- },
- addClass: function(classNames,speed,easing,callback) {
- return speed ? $.effects.animateClass.apply(this, [{ add: classNames },speed,easing,callback]) : this._addClass(classNames);
- },
- removeClass: function(classNames,speed,easing,callback) {
- return speed ? $.effects.animateClass.apply(this, [{ remove: classNames },speed,easing,callback]) : this._removeClass(classNames);
- },
- toggleClass: function(classNames,speed,easing,callback) {
- return speed ? $.effects.animateClass.apply(this, [{ toggle: classNames },speed,easing,callback]) : this._toggleClass(classNames);
- },
- morph: function(remove,add,speed,easing,callback) {
- return $.effects.animateClass.apply(this, [{ add: add, remove: remove },speed,easing,callback]);
- },
- switchClass: function() {
- return this.morph.apply(this, arguments);
- },
- // helper functions
- cssUnit: function(key) {
- var style = this.css(key), val = [];
- $.each( ['em','px','%','pt'], function(i, unit){
- if(style.indexOf(unit) > 0)
- val = [parseFloat(style), unit];
- });
- return val;
- }
-});
-
-/*
- * jQuery Color Animations
- * Copyright 2007 John Resig
- * Released under the MIT and GPL licenses.
- */
-
-// We override the animation for all of these color styles
-jQuery.each(['backgroundColor', 'borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor', 'color', 'outlineColor'], function(i,attr){
- jQuery.fx.step[attr] = function(fx){
- if ( fx.state == 0 ) {
- fx.start = getColor( fx.elem, attr );
- fx.end = getRGB( fx.end );
- }
-
- fx.elem.style[attr] = "rgb(" + [
- Math.max(Math.min( parseInt((fx.pos * (fx.end[0] - fx.start[0])) + fx.start[0]), 255), 0),
- Math.max(Math.min( parseInt((fx.pos * (fx.end[1] - fx.start[1])) + fx.start[1]), 255), 0),
- Math.max(Math.min( parseInt((fx.pos * (fx.end[2] - fx.start[2])) + fx.start[2]), 255), 0)
- ].join(",") + ")";
- }
-});
-
-// Color Conversion functions from highlightFade
-// By Blair Mitchelmore
-// http://jquery.offput.ca/highlightFade/
-
-// Parse strings looking for color tuples [255,255,255]
-function getRGB(color) {
- var result;
-
- // Check if we're already dealing with an array of colors
- if ( color && color.constructor == Array && color.length == 3 )
- return color;
-
- // Look for rgb(num,num,num)
- if (result = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color))
- return [parseInt(result[1]), parseInt(result[2]), parseInt(result[3])];
-
- // Look for rgb(num%,num%,num%)
- if (result = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color))
- return [parseFloat(result[1])*2.55, parseFloat(result[2])*2.55, parseFloat(result[3])*2.55];
-
- // Look for #a0b1c2
- if (result = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color))
- return [parseInt(result[1],16), parseInt(result[2],16), parseInt(result[3],16)];
-
- // Look for #fff
- if (result = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color))
- return [parseInt(result[1]+result[1],16), parseInt(result[2]+result[2],16), parseInt(result[3]+result[3],16)];
-
- // Look for rgba(0, 0, 0, 0) == transparent in Safari 3
- if (result = /rgba\(0, 0, 0, 0\)/.exec(color))
- return colors['transparent']
-
- // Otherwise, we're most likely dealing with a named color
- return colors[jQuery.trim(color).toLowerCase()];
-}
-
-function getColor(elem, attr) {
- var color;
-
- do {
- color = jQuery.curCSS(elem, attr);
-
- // Keep going until we find an element that has color, or we hit the body
- if ( color != '' && color != 'transparent' || jQuery.nodeName(elem, "body") )
- break;
-
- attr = "backgroundColor";
- } while ( elem = elem.parentNode );
-
- return getRGB(color);
-};
-
-// Some named colors to work with
-// From Interface by Stefan Petre
-// http://interface.eyecon.ro/
-
-var colors = {
- aqua:[0,255,255],
- azure:[240,255,255],
- beige:[245,245,220],
- black:[0,0,0],
- blue:[0,0,255],
- brown:[165,42,42],
- cyan:[0,255,255],
- darkblue:[0,0,139],
- darkcyan:[0,139,139],
- darkgrey:[169,169,169],
- darkgreen:[0,100,0],
- darkkhaki:[189,183,107],
- darkmagenta:[139,0,139],
- darkolivegreen:[85,107,47],
- darkorange:[255,140,0],
- darkorchid:[153,50,204],
- darkred:[139,0,0],
- darksalmon:[233,150,122],
- darkviolet:[148,0,211],
- fuchsia:[255,0,255],
- gold:[255,215,0],
- green:[0,128,0],
- indigo:[75,0,130],
- khaki:[240,230,140],
- lightblue:[173,216,230],
- lightcyan:[224,255,255],
- lightgreen:[144,238,144],
- lightgrey:[211,211,211],
- lightpink:[255,182,193],
- lightyellow:[255,255,224],
- lime:[0,255,0],
- magenta:[255,0,255],
- maroon:[128,0,0],
- navy:[0,0,128],
- olive:[128,128,0],
- orange:[255,165,0],
- pink:[255,192,203],
- purple:[128,0,128],
- violet:[128,0,128],
- red:[255,0,0],
- silver:[192,192,192],
- white:[255,255,255],
- yellow:[255,255,0],
- transparent: [255,255,255]
-};
-
-/*
- * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
*
- * Uses the built in easing capabilities added In jQuery 1.1
- * to offer multiple easing options
+ * http://docs.jquery.com/UI/Accordion
*
- * TERMS OF USE - jQuery Easing
- *
- * Open source under the BSD License.
- *
- * Copyright © 2008 George McGinley Smith
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this list of
- * conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice, this list
- * of conditions and the following disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * Neither the name of the author nor the names of contributors may be used to endorse
- * or promote products derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
- * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
+ * Depends:
+ * ui.core.js
+ */
+(function(a){a.widget("ui.accordion",{_init:function(){var d=this.options,b=this;this.running=0;if(d.collapsible==a.ui.accordion.defaults.collapsible&&d.alwaysOpen!=a.ui.accordion.defaults.alwaysOpen){d.collapsible=!d.alwaysOpen}if(d.navigation){var c=this.element.find("a").filter(d.navigationFilter);if(c.length){if(c.filter(d.header).length){this.active=c}else{this.active=c.parent().parent().prev();c.addClass("ui-accordion-content-active")}}}this.element.addClass("ui-accordion ui-widget ui-helper-reset");if(this.element[0].nodeName=="UL"){this.element.children("li").addClass("ui-accordion-li-fix")}this.headers=this.element.find(d.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){a(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){a(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){a(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){a(this).removeClass("ui-state-focus")});this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");this.active=this._findActive(this.active||d.active).toggleClass("ui-state-default").toggleClass("ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");this.active.next().addClass("ui-accordion-content-active");a("<span/>").addClass("ui-icon "+d.icons.header).prependTo(this.headers);this.active.find(".ui-icon").toggleClass(d.icons.header).toggleClass(d.icons.headerSelected);if(a.browser.msie){this.element.find("a").css("zoom","1")}this.resize();this.element.attr("role","tablist");this.headers.attr("role","tab").bind("keydown",function(e){return b._keydown(e)}).next().attr("role","tabpanel");this.headers.not(this.active||"").attr("aria-expanded","false").attr("tabIndex","-1").next().hide();if(!this.active.length){this.headers.eq(0).attr("tabIndex","0")}else{this.active.attr("aria-expanded","true").attr("tabIndex","0")}if(!a.browser.safari){this.headers.find("a").attr("tabIndex","-1")}if(d.event){this.headers.bind((d.event)+".accordion",function(e){return b._clickHandler.call(b,e,this)})}},destroy:function(){var c=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role").unbind(".accordion").removeData("accordion");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabindex");this.headers.find("a").removeAttr("tabindex");this.headers.children(".ui-icon").remove();var b=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active");if(c.autoHeight||c.fillHeight){b.css("height","")}},_setData:function(b,c){if(b=="alwaysOpen"){b="collapsible";c=!c}a.widget.prototype._setData.apply(this,arguments)},_keydown:function(e){var g=this.options,f=a.ui.keyCode;if(g.disabled||e.altKey||e.ctrlKey){return}var d=this.headers.length;var b=this.headers.index(e.target);var c=false;switch(e.keyCode){case f.RIGHT:case f.DOWN:c=this.headers[(b+1)%d];break;case f.LEFT:case f.UP:c=this.headers[(b-1+d)%d];break;case f.SPACE:case f.ENTER:return this._clickHandler({target:e.target},e.target)}if(c){a(e.target).attr("tabIndex","-1");a(c).attr("tabIndex","0");c.focus();return false}return true},resize:function(){var e=this.options,d;if(e.fillSpace){if(a.browser.msie){var b=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}d=this.element.parent().height();if(a.browser.msie){this.element.parent().css("overflow",b)}this.headers.each(function(){d-=a(this).outerHeight()});var c=0;this.headers.next().each(function(){c=Math.max(c,a(this).innerHeight()-a(this).height())}).height(Math.max(0,d-c)).css("overflow","auto")}else{if(e.autoHeight){d=0;this.headers.next().each(function(){d=Math.max(d,a(this).outerHeight())}).height(d)}}},activate:function(b){var c=this._findActive(b)[0];this._clickHandler({target:c},c)},_findActive:function(b){return b?typeof b=="number"?this.headers.filter(":eq("+b+")"):this.headers.not(this.headers.not(b)):b===false?a([]):this.headers.filter(":eq(0)")},_clickHandler:function(b,f){var d=this.options;if(d.disabled){return false}if(!b.target&&d.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);this.active.next().addClass("ui-accordion-content-active");var h=this.active.next(),e={options:d,newHeader:a([]),oldHeader:d.active,newContent:a([]),oldContent:h},c=(this.active=a([]));this._toggle(c,h,e);return false}var g=a(b.currentTarget||f);var i=g[0]==this.active[0];if(this.running||(!d.collapsible&&i)){return false}this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);this.active.next().addClass("ui-accordion-content-active");if(!i){g.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").find(".ui-icon").removeClass(d.icons.header).addClass(d.icons.headerSelected);g.next().addClass("ui-accordion-content-active")}var c=g.next(),h=this.active.next(),e={options:d,newHeader:i&&d.collapsible?a([]):g,oldHeader:this.active,newContent:i&&d.collapsible?a([]):c.find("> *"),oldContent:h.find("> *")},j=this.headers.index(this.active[0])>this.headers.index(g[0]);this.active=i?a([]):g;this._toggle(c,h,e,i,j);return false},_toggle:function(b,i,g,j,k){var d=this.options,m=this;this.toShow=b;this.toHide=i;this.data=g;var c=function(){if(!m){return}return m._completed.apply(m,arguments)};this._trigger("changestart",null,this.data);this.running=i.size()===0?b.size():i.size();if(d.animated){var f={};if(d.collapsible&&j){f={toShow:a([]),toHide:i,complete:c,down:k,autoHeight:d.autoHeight||d.fillSpace}}else{f={toShow:b,toHide:i,complete:c,down:k,autoHeight:d.autoHeight||d.fillSpace}}if(!d.proxied){d.proxied=d.animated}if(!d.proxiedDuration){d.proxiedDuration=d.duration}d.animated=a.isFunction(d.proxied)?d.proxied(f):d.proxied;d.duration=a.isFunction(d.proxiedDuration)?d.proxiedDuration(f):d.proxiedDuration;var l=a.ui.accordion.animations,e=d.duration,h=d.animated;if(!l[h]){l[h]=function(n){this.slide(n,{easing:h,duration:e||700})}}l[h](f)}else{if(d.collapsible&&j){b.toggle()}else{i.hide();b.show()}c(true)}i.prev().attr("aria-expanded","false").attr("tabIndex","-1").blur();b.prev().attr("aria-expanded","true").attr("tabIndex","0").focus()},_completed:function(b){var c=this.options;this.running=b?0:--this.running;if(this.running){return}if(c.clearStyle){this.toShow.add(this.toHide).css({height:"",overflow:""})}this._trigger("change",null,this.data)}});a.extend(a.ui.accordion,{version:"1.7.2",defaults:{active:null,alwaysOpen:true,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase()}},animations:{slide:function(j,h){j=a.extend({easing:"swing",duration:300},j,h);if(!j.toHide.size()){j.toShow.animate({height:"show"},j);return}if(!j.toShow.size()){j.toHide.animate({height:"hide"},j);return}var c=j.toShow.css("overflow"),g,d={},f={},e=["height","paddingTop","paddingBottom"],b;var i=j.toShow;b=i[0].style.width;i.width(parseInt(i.parent().width(),10)-parseInt(i.css("paddingLeft"),10)-parseInt(i.css("paddingRight"),10)-(parseInt(i.css("borderLeftWidth"),10)||0)-(parseInt(i.css("borderRightWidth"),10)||0));a.each(e,function(k,m){f[m]="hide";var l=(""+a.css(j.toShow[0],m)).match(/^([\d+-.]+)(.*)$/);d[m]={value:l[1],unit:l[2]||"px"}});j.toShow.css({height:0,overflow:"hidden"}).show();j.toHide.filter(":hidden").each(j.complete).end().filter(":visible").animate(f,{step:function(k,l){if(l.prop=="height"){g=(l.now-l.start)/(l.end-l.start)}j.toShow[0].style[l.prop]=(g*d[l.prop].value)+d[l.prop].unit},duration:j.duration,easing:j.easing,complete:function(){if(!j.autoHeight){j.toShow.css("height","")}j.toShow.css("width",b);j.toShow.css({overflow:c});j.complete()}})},bounceslide:function(b){this.slide(b,{easing:b.down?"easeOutBounce":"swing",duration:b.down?1000:200})},easeslide:function(b){this.slide(b,{easing:"easeinout",duration:700})}}})})(jQuery);;/*
+ * jQuery UI Dialog 1.7.2
*
-*/
-
-// t: current time, b: begInnIng value, c: change In value, d: duration
-jQuery.easing['jswing'] = jQuery.easing['swing'];
-
-jQuery.extend( jQuery.easing,
-{
- def: 'easeOutQuad',
- swing: function (x, t, b, c, d) {
- //alert(jQuery.easing.default);
- return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
- },
- easeInQuad: function (x, t, b, c, d) {
- return c*(t/=d)*t + b;
- },
- easeOutQuad: function (x, t, b, c, d) {
- return -c *(t/=d)*(t-2) + b;
- },
- easeInOutQuad: function (x, t, b, c, d) {
- if ((t/=d/2) < 1) return c/2*t*t + b;
- return -c/2 * ((--t)*(t-2) - 1) + b;
- },
- easeInCubic: function (x, t, b, c, d) {
- return c*(t/=d)*t*t + b;
- },
- easeOutCubic: function (x, t, b, c, d) {
- return c*((t=t/d-1)*t*t + 1) + b;
- },
- easeInOutCubic: function (x, t, b, c, d) {
- if ((t/=d/2) < 1) return c/2*t*t*t + b;
- return c/2*((t-=2)*t*t + 2) + b;
- },
- easeInQuart: function (x, t, b, c, d) {
- return c*(t/=d)*t*t*t + b;
- },
- easeOutQuart: function (x, t, b, c, d) {
- return -c * ((t=t/d-1)*t*t*t - 1) + b;
- },
- easeInOutQuart: function (x, t, b, c, d) {
- if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
- return -c/2 * ((t-=2)*t*t*t - 2) + b;
- },
- easeInQuint: function (x, t, b, c, d) {
- return c*(t/=d)*t*t*t*t + b;
- },
- easeOutQuint: function (x, t, b, c, d) {
- return c*((t=t/d-1)*t*t*t*t + 1) + b;
- },
- easeInOutQuint: function (x, t, b, c, d) {
- if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
- return c/2*((t-=2)*t*t*t*t + 2) + b;
- },
- easeInSine: function (x, t, b, c, d) {
- return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
- },
- easeOutSine: function (x, t, b, c, d) {
- return c * Math.sin(t/d * (Math.PI/2)) + b;
- },
- easeInOutSine: function (x, t, b, c, d) {
- return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
- },
- easeInExpo: function (x, t, b, c, d) {
- return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
- },
- easeOutExpo: function (x, t, b, c, d) {
- return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
- },
- easeInOutExpo: function (x, t, b, c, d) {
- if (t==0) return b;
- if (t==d) return b+c;
- if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
- return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
- },
- easeInCirc: function (x, t, b, c, d) {
- return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
- },
- easeOutCirc: function (x, t, b, c, d) {
- return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
- },
- easeInOutCirc: function (x, t, b, c, d) {
- if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
- return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
- },
- easeInElastic: function (x, t, b, c, d) {
- var s=1.70158;var p=0;var a=c;
- if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
- if (a < Math.abs(c)) { a=c; var s=p/4; }
- else var s = p/(2*Math.PI) * Math.asin (c/a);
- return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
- },
- easeOutElastic: function (x, t, b, c, d) {
- var s=1.70158;var p=0;var a=c;
- if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
- if (a < Math.abs(c)) { a=c; var s=p/4; }
- else var s = p/(2*Math.PI) * Math.asin (c/a);
- return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
- },
- easeInOutElastic: function (x, t, b, c, d) {
- var s=1.70158;var p=0;var a=c;
- if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5);
- if (a < Math.abs(c)) { a=c; var s=p/4; }
- else var s = p/(2*Math.PI) * Math.asin (c/a);
- if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
- return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
- },
- easeInBack: function (x, t, b, c, d, s) {
- if (s == undefined) s = 1.70158;
- return c*(t/=d)*t*((s+1)*t - s) + b;
- },
- easeOutBack: function (x, t, b, c, d, s) {
- if (s == undefined) s = 1.70158;
- return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
- },
- easeInOutBack: function (x, t, b, c, d, s) {
- if (s == undefined) s = 1.70158;
- if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
- return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
- },
- easeInBounce: function (x, t, b, c, d) {
- return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
- },
- easeOutBounce: function (x, t, b, c, d) {
- if ((t/=d) < (1/2.75)) {
- return c*(7.5625*t*t) + b;
- } else if (t < (2/2.75)) {
- return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
- } else if (t < (2.5/2.75)) {
- return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
- } else {
- return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
- }
- },
- easeInOutBounce: function (x, t, b, c, d) {
- if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
- return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
- }
-});
-
-/*
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
*
- * TERMS OF USE - EASING EQUATIONS
- *
- * Open source under the BSD License.
- *
- * Copyright © 2001 Robert Penner
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this list of
- * conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice, this list
- * of conditions and the following disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * Neither the name of the author nor the names of contributors may be used to endorse
- * or promote products derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
- * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
+ * http://docs.jquery.com/UI/Dialog
*
+ * Depends:
+ * ui.core.js
+ * ui.draggable.js
+ * ui.resizable.js
*/
-
-})(jQuery);
-/*
- * jQuery UI Effects Blind
+(function(c){var b={dragStart:"start.draggable",drag:"drag.draggable",dragStop:"stop.draggable",maxHeight:"maxHeight.resizable",minHeight:"minHeight.resizable",maxWidth:"maxWidth.resizable",minWidth:"minWidth.resizable",resizeStart:"start.resizable",resize:"drag.resizable",resizeStop:"stop.resizable"},a="ui-dialog ui-widget ui-widget-content ui-corner-all ";c.widget("ui.dialog",{_init:function(){this.originalTitle=this.element.attr("title");var l=this,m=this.options,j=m.title||this.originalTitle||"&nbsp;",e=c.ui.dialog.getTitleId(this.element),k=(this.uiDialog=c("<div/>")).appendTo(document.body).hide().addClass(a+m.dialogClass).css({position:"absolute",overflow:"hidden",zIndex:m.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(n){(m.closeOnEscape&&n.keyCode&&n.keyCode==c.ui.keyCode.ESCAPE&&l.close(n))}).attr({role:"dialog","aria-labelledby":e}).mousedown(function(n){l.moveToTop(false,n)}),g=this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(k),f=(this.uiDialogTitlebar=c("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(k),i=c('<a href="#"/>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){i.addClass("ui-state-hover")},function(){i.removeClass("ui-state-hover")}).focus(function(){i.addClass("ui-state-focus")}).blur(function(){i.removeClass("ui-state-focus")}).mousedown(function(n){n.stopPropagation()}).click(function(n){l.close(n);return false}).appendTo(f),h=(this.uiDialogTitlebarCloseText=c("<span/>")).addClass("ui-icon ui-icon-closethick").text(m.closeText).appendTo(i),d=c("<span/>").addClass("ui-dialog-title").attr("id",e).html(j).prependTo(f);f.find("*").add(f).disableSelection();(m.draggable&&c.fn.draggable&&this._makeDraggable());(m.resizable&&c.fn.resizable&&this._makeResizable());this._createButtons(m.buttons);this._isOpen=false;(m.bgiframe&&c.fn.bgiframe&&k.bgiframe());(m.autoOpen&&this.open())},destroy:function(){(this.overlay&&this.overlay.destroy());this.uiDialog.hide();this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");this.uiDialog.remove();(this.originalTitle&&this.element.attr("title",this.originalTitle))},close:function(f){var d=this;if(false===d._trigger("beforeclose",f)){return}(d.overlay&&d.overlay.destroy());d.uiDialog.unbind("keypress.ui-dialog");(d.options.hide?d.uiDialog.hide(d.options.hide,function(){d._trigger("close",f)}):d.uiDialog.hide()&&d._trigger("close",f));c.ui.dialog.overlay.resize();d._isOpen=false;if(d.options.modal){var e=0;c(".ui-dialog").each(function(){if(this!=d.uiDialog[0]){e=Math.max(e,c(this).css("z-index"))}});c.ui.dialog.maxZ=e}},isOpen:function(){return this._isOpen},moveToTop:function(f,e){if((this.options.modal&&!f)||(!this.options.stack&&!this.options.modal)){return this._trigger("focus",e)}if(this.options.zIndex>c.ui.dialog.maxZ){c.ui.dialog.maxZ=this.options.zIndex}(this.overlay&&this.overlay.$el.css("z-index",c.ui.dialog.overlay.maxZ=++c.ui.dialog.maxZ));var d={scrollTop:this.element.attr("scrollTop"),scrollLeft:this.element.attr("scrollLeft")};this.uiDialog.css("z-index",++c.ui.dialog.maxZ);this.element.attr(d);this._trigger("focus",e)},open:function(){if(this._isOpen){return}var e=this.options,d=this.uiDialog;this.overlay=e.modal?new c.ui.dialog.overlay(this):null;(d.next().length&&d.appendTo("body"));this._size();this._position(e.position);d.show(e.show);this.moveToTop(true);(e.modal&&d.bind("keypress.ui-dialog",function(h){if(h.keyCode!=c.ui.keyCode.TAB){return}var g=c(":tabbable",this),i=g.filter(":first")[0],f=g.filter(":last")[0];if(h.target==f&&!h.shiftKey){setTimeout(function(){i.focus()},1)}else{if(h.target==i&&h.shiftKey){setTimeout(function(){f.focus()},1)}}}));c([]).add(d.find(".ui-dialog-content :tabbable:first")).add(d.find(".ui-dialog-buttonpane :tabbable:first")).add(d).filter(":first").focus();this._trigger("open");this._isOpen=true},_createButtons:function(g){var f=this,d=false,e=c("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");this.uiDialog.find(".ui-dialog-buttonpane").remove();(typeof g=="object"&&g!==null&&c.each(g,function(){return !(d=true)}));if(d){c.each(g,function(h,i){c('<button type="button"></button>').addClass("ui-state-default ui-corner-all").text(h).click(function(){i.apply(f.element[0],arguments)}).hover(function(){c(this).addClass("ui-state-hover")},function(){c(this).removeClass("ui-state-hover")}).focus(function(){c(this).addClass("ui-state-focus")}).blur(function(){c(this).removeClass("ui-state-focus")}).appendTo(e)});e.appendTo(this.uiDialog)}},_makeDraggable:function(){var d=this,f=this.options,e;this.uiDialog.draggable({cancel:".ui-dialog-content",handle:".ui-dialog-titlebar",containment:"document",start:function(){e=f.height;c(this).height(c(this).height()).addClass("ui-dialog-dragging");(f.dragStart&&f.dragStart.apply(d.element[0],arguments))},drag:function(){(f.drag&&f.drag.apply(d.element[0],arguments))},stop:function(){c(this).removeClass("ui-dialog-dragging").height(e);(f.dragStop&&f.dragStop.apply(d.element[0],arguments));c.ui.dialog.overlay.resize()}})},_makeResizable:function(g){g=(g===undefined?this.options.resizable:g);var d=this,f=this.options,e=typeof g=="string"?g:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",alsoResize:this.element,maxWidth:f.maxWidth,maxHeight:f.maxHeight,minWidth:f.minWidth,minHeight:f.minHeight,start:function(){c(this).addClass("ui-dialog-resizing");(f.resizeStart&&f.resizeStart.apply(d.element[0],arguments))},resize:function(){(f.resize&&f.resize.apply(d.element[0],arguments))},handles:e,stop:function(){c(this).removeClass("ui-dialog-resizing");f.height=c(this).height();f.width=c(this).width();(f.resizeStop&&f.resizeStop.apply(d.element[0],arguments));c.ui.dialog.overlay.resize()}}).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_position:function(i){var e=c(window),f=c(document),g=f.scrollTop(),d=f.scrollLeft(),h=g;if(c.inArray(i,["center","top","right","bottom","left"])>=0){i=[i=="right"||i=="left"?i:"center",i=="top"||i=="bottom"?i:"middle"]}if(i.constructor!=Array){i=["center","middle"]}if(i[0].constructor==Number){d+=i[0]}else{switch(i[0]){case"left":d+=0;break;case"right":d+=e.width()-this.uiDialog.outerWidth();break;default:case"center":d+=(e.width()-this.uiDialog.outerWidth())/2}}if(i[1].constructor==Number){g+=i[1]}else{switch(i[1]){case"top":g+=0;break;case"bottom":g+=e.height()-this.uiDialog.outerHeight();break;default:case"middle":g+=(e.height()-this.uiDialog.outerHeight())/2}}g=Math.max(g,h);this.uiDialog.css({top:g,left:d})},_setData:function(e,f){(b[e]&&this.uiDialog.data(b[e],f));switch(e){case"buttons":this._createButtons(f);break;case"closeText":this.uiDialogTitlebarCloseText.text(f);break;case"dialogClass":this.uiDialog.removeClass(this.options.dialogClass).addClass(a+f);break;case"draggable":(f?this._makeDraggable():this.uiDialog.draggable("destroy"));break;case"height":this.uiDialog.height(f);break;case"position":this._position(f);break;case"resizable":var d=this.uiDialog,g=this.uiDialog.is(":data(resizable)");(g&&!f&&d.resizable("destroy"));(g&&typeof f=="string"&&d.resizable("option","handles",f));(g||this._makeResizable(f));break;case"title":c(".ui-dialog-title",this.uiDialogTitlebar).html(f||"&nbsp;");break;case"width":this.uiDialog.width(f);break}c.widget.prototype._setData.apply(this,arguments)},_size:function(){var e=this.options;this.element.css({height:0,minHeight:0,width:"auto"});var d=this.uiDialog.css({height:"auto",width:e.width}).height();this.element.css({minHeight:Math.max(e.minHeight-d,0),height:e.height=="auto"?"auto":Math.max(e.height-d,0)})}});c.extend(c.ui.dialog,{version:"1.7.2",defaults:{autoOpen:true,bgiframe:false,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:"center",resizable:true,show:null,stack:true,title:"",width:300,zIndex:1000},getter:"isOpen",uuid:0,maxZ:0,getTitleId:function(d){return"ui-dialog-title-"+(d.attr("id")||++this.uuid)},overlay:function(d){this.$el=c.ui.dialog.overlay.create(d)}});c.extend(c.ui.dialog.overlay,{instances:[],maxZ:0,events:c.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(d){return d+".dialog-overlay"}).join(" "),create:function(e){if(this.instances.length===0){setTimeout(function(){if(c.ui.dialog.overlay.instances.length){c(document).bind(c.ui.dialog.overlay.events,function(f){var g=c(f.target).parents(".ui-dialog").css("zIndex")||0;return(g>c.ui.dialog.overlay.maxZ)})}},1);c(document).bind("keydown.dialog-overlay",function(f){(e.options.closeOnEscape&&f.keyCode&&f.keyCode==c.ui.keyCode.ESCAPE&&e.close(f))});c(window).bind("resize.dialog-overlay",c.ui.dialog.overlay.resize)}var d=c("<div></div>").appendTo(document.body).addClass("ui-widget-overlay").css({width:this.width(),height:this.height()});(e.options.bgiframe&&c.fn.bgiframe&&d.bgiframe());this.instances.push(d);return d},destroy:function(d){this.instances.splice(c.inArray(this.instances,d),1);if(this.instances.length===0){c([document,window]).unbind(".dialog-overlay")}d.remove();var e=0;c.each(this.instances,function(){e=Math.max(e,this.css("z-index"))});this.maxZ=e},height:function(){if(c.browser.msie&&c.browser.version<7){var e=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);var d=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(e<d){return c(window).height()+"px"}else{return e+"px"}}else{return c(document).height()+"px"}},width:function(){if(c.browser.msie&&c.browser.version<7){var d=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);var e=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);if(d<e){return c(window).width()+"px"}else{return d+"px"}}else{return c(document).width()+"px"}},resize:function(){var d=c([]);c.each(c.ui.dialog.overlay.instances,function(){d=d.add(this)});d.css({width:0,height:0}).css({width:c.ui.dialog.overlay.width(),height:c.ui.dialog.overlay.height()})}});c.extend(c.ui.dialog.overlay.prototype,{destroy:function(){c.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);;/*
+ * jQuery UI Slider 1.7.2
*
- * Copyright (c) 2008 Aaron Eisenberger (aaronchi@gmail.com)
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://docs.jquery.com/UI/Effects/Blind
+ *
+ * http://docs.jquery.com/UI/Slider
*
* Depends:
- * effects.core.js
+ * ui.core.js
*/
-(function($) {
-
-$.effects.blind = function(o) {
-
- return this.queue(function() {
-
- // Create element
- var el = $(this), props = ['position','top','left'];
-
- // Set options
- var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
- var direction = o.options.direction || 'vertical'; // Default direction
-
- // Adjust
- $.effects.save(el, props); el.show(); // Save & Show
- var wrapper = $.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper
- var ref = (direction == 'vertical') ? 'height' : 'width';
- var distance = (direction == 'vertical') ? wrapper.height() : wrapper.width();
- if(mode == 'show') wrapper.css(ref, 0); // Shift
-
- // Animation
- var animation = {};
- animation[ref] = mode == 'show' ? distance : 0;
-
- // Animate
- wrapper.animate(animation, o.duration, o.options.easing, function() {
- if(mode == 'hide') el.hide(); // Hide
- $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
- if(o.callback) o.callback.apply(el[0], arguments); // Callback
- el.dequeue();
- });
-
- });
-
-};
-
-})(jQuery);
-/*
- * jQuery UI Effects Bounce
+(function(a){a.widget("ui.slider",a.extend({},a.ui.mouse,{_init:function(){var b=this,c=this.options;this._keySliding=false;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");this.range=a([]);if(c.range){if(c.range===true){this.range=a("<div></div>");if(!c.values){c.values=[this._valueMin(),this._valueMin()]}if(c.values.length&&c.values.length!=2){c.values=[c.values[0],c.values[0]]}}else{this.range=a("<div></div>")}this.range.appendTo(this.element).addClass("ui-slider-range");if(c.range=="min"||c.range=="max"){this.range.addClass("ui-slider-range-"+c.range)}this.range.addClass("ui-widget-header")}if(a(".ui-slider-handle",this.element).length==0){a('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle")}if(c.values&&c.values.length){while(a(".ui-slider-handle",this.element).length<c.values.length){a('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle")}}this.handles=a(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(d){d.preventDefault()}).hover(function(){if(!c.disabled){a(this).addClass("ui-state-hover")}},function(){a(this).removeClass("ui-state-hover")}).focus(function(){if(!c.disabled){a(".ui-slider .ui-state-focus").removeClass("ui-state-focus");a(this).addClass("ui-state-focus")}else{a(this).blur()}}).blur(function(){a(this).removeClass("ui-state-focus")});this.handles.each(function(d){a(this).data("index.ui-slider-handle",d)});this.handles.keydown(function(i){var f=true;var e=a(this).data("index.ui-slider-handle");if(b.options.disabled){return}switch(i.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:f=false;if(!b._keySliding){b._keySliding=true;a(this).addClass("ui-state-active");b._start(i,e)}break}var g,d,h=b._step();if(b.options.values&&b.options.values.length){g=d=b.values(e)}else{g=d=b.value()}switch(i.keyCode){case a.ui.keyCode.HOME:d=b._valueMin();break;case a.ui.keyCode.END:d=b._valueMax();break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(g==b._valueMax()){return}d=g+h;break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(g==b._valueMin()){return}d=g-h;break}b._slide(i,e,d);return f}).keyup(function(e){var d=a(this).data("index.ui-slider-handle");if(b._keySliding){b._stop(e,d);b._change(e,d);b._keySliding=false;a(this).removeClass("ui-state-active")}});this._refreshValue()},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy()},_mouseCapture:function(d){var e=this.options;if(e.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();var h={x:d.pageX,y:d.pageY};var j=this._normValueFromMouse(h);var c=this._valueMax()-this._valueMin()+1,f;var k=this,i;this.handles.each(function(l){var m=Math.abs(j-k.values(l));if(c>m){c=m;f=a(this);i=l}});if(e.range==true&&this.values(1)==e.min){f=a(this.handles[++i])}this._start(d,i);k._handleIndex=i;f.addClass("ui-state-active").focus();var g=f.offset();var b=!a(d.target).parents().andSelf().is(".ui-slider-handle");this._clickOffset=b?{left:0,top:0}:{left:d.pageX-g.left-(f.width()/2),top:d.pageY-g.top-(f.height()/2)-(parseInt(f.css("borderTopWidth"),10)||0)-(parseInt(f.css("borderBottomWidth"),10)||0)+(parseInt(f.css("marginTop"),10)||0)};j=this._normValueFromMouse(h);this._slide(d,i,j);return true},_mouseStart:function(b){return true},_mouseDrag:function(d){var b={x:d.pageX,y:d.pageY};var c=this._normValueFromMouse(b);this._slide(d,this._handleIndex,c);return false},_mouseStop:function(b){this.handles.removeClass("ui-state-active");this._stop(b,this._handleIndex);this._change(b,this._handleIndex);this._handleIndex=null;this._clickOffset=null;return false},_detectOrientation:function(){this.orientation=this.options.orientation=="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(d){var c,h;if("horizontal"==this.orientation){c=this.elementSize.width;h=d.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{c=this.elementSize.height;h=d.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}var f=(h/c);if(f>1){f=1}if(f<0){f=0}if("vertical"==this.orientation){f=1-f}var e=this._valueMax()-this._valueMin(),i=f*e,b=i%this.options.step,g=this._valueMin()+i-b;if(b>(this.options.step/2)){g+=this.options.step}return parseFloat(g.toFixed(5))},_start:function(d,c){var b={handle:this.handles[c],value:this.value()};if(this.options.values&&this.options.values.length){b.value=this.values(c);b.values=this.values()}this._trigger("start",d,b)},_slide:function(f,e,d){var g=this.handles[e];if(this.options.values&&this.options.values.length){var b=this.values(e?0:1);if((this.options.values.length==2&&this.options.range===true)&&((e==0&&d>b)||(e==1&&d<b))){d=b}if(d!=this.values(e)){var c=this.values();c[e]=d;var h=this._trigger("slide",f,{handle:this.handles[e],value:d,values:c});var b=this.values(e?0:1);if(h!==false){this.values(e,d,(f.type=="mousedown"&&this.options.animate),true)}}}else{if(d!=this.value()){var h=this._trigger("slide",f,{handle:this.handles[e],value:d});if(h!==false){this._setData("value",d,(f.type=="mousedown"&&this.options.animate))}}}},_stop:function(d,c){var b={handle:this.handles[c],value:this.value()};if(this.options.values&&this.options.values.length){b.value=this.values(c);b.values=this.values()}this._trigger("stop",d,b)},_change:function(d,c){var b={handle:this.handles[c],value:this.value()};if(this.options.values&&this.options.values.length){b.value=this.values(c);b.values=this.values()}this._trigger("change",d,b)},value:function(b){if(arguments.length){this._setData("value",b);this._change(null,0)}return this._value()},values:function(b,e,c,d){if(arguments.length>1){this.options.values[b]=e;this._refreshValue(c);if(!d){this._change(null,b)}}if(arguments.length){if(this.options.values&&this.options.values.length){return this._values(b)}else{return this.value()}}else{return this._values()}},_setData:function(b,d,c){a.widget.prototype._setData.apply(this,arguments);switch(b){case"disabled":if(d){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled")}else{this.handles.removeAttr("disabled")}case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue(c);break;case"value":this._refreshValue(c);break}},_step:function(){var b=this.options.step;return b},_value:function(){var b=this.options.value;if(b<this._valueMin()){b=this._valueMin()}if(b>this._valueMax()){b=this._valueMax()}return b},_values:function(b){if(arguments.length){var c=this.options.values[b];if(c<this._valueMin()){c=this._valueMin()}if(c>this._valueMax()){c=this._valueMax()}return c}else{return this.options.values}},_valueMin:function(){var b=this.options.min;return b},_valueMax:function(){var b=this.options.max;return b},_refreshValue:function(c){var f=this.options.range,d=this.options,l=this;if(this.options.values&&this.options.values.length){var i,h;this.handles.each(function(p,n){var o=(l.values(p)-l._valueMin())/(l._valueMax()-l._valueMin())*100;var m={};m[l.orientation=="horizontal"?"left":"bottom"]=o+"%";a(this).stop(1,1)[c?"animate":"css"](m,d.animate);if(l.options.range===true){if(l.orientation=="horizontal"){(p==0)&&l.range.stop(1,1)[c?"animate":"css"]({left:o+"%"},d.animate);(p==1)&&l.range[c?"animate":"css"]({width:(o-lastValPercent)+"%"},{queue:false,duration:d.animate})}else{(p==0)&&l.range.stop(1,1)[c?"animate":"css"]({bottom:(o)+"%"},d.animate);(p==1)&&l.range[c?"animate":"css"]({height:(o-lastValPercent)+"%"},{queue:false,duration:d.animate})}}lastValPercent=o})}else{var j=this.value(),g=this._valueMin(),k=this._valueMax(),e=k!=g?(j-g)/(k-g)*100:0;var b={};b[l.orientation=="horizontal"?"left":"bottom"]=e+"%";this.handle.stop(1,1)[c?"animate":"css"](b,d.animate);(f=="min")&&(this.orientation=="horizontal")&&this.range.stop(1,1)[c?"animate":"css"]({width:e+"%"},d.animate);(f=="max")&&(this.orientation=="horizontal")&&this.range[c?"animate":"css"]({width:(100-e)+"%"},{queue:false,duration:d.animate});(f=="min")&&(this.orientation=="vertical")&&this.range.stop(1,1)[c?"animate":"css"]({height:e+"%"},d.animate);(f=="max")&&(this.orientation=="vertical")&&this.range[c?"animate":"css"]({height:(100-e)+"%"},{queue:false,duration:d.animate})}}}));a.extend(a.ui.slider,{getter:"value values",version:"1.7.2",eventPrefix:"slide",defaults:{animate:false,delay:0,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null}})})(jQuery);;/*
+ * jQuery UI Tabs 1.7.2
*
- * Copyright (c) 2008 Aaron Eisenberger (aaronchi@gmail.com)
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://docs.jquery.com/UI/Effects/Bounce
+ *
+ * http://docs.jquery.com/UI/Tabs
*
* Depends:
- * effects.core.js
+ * ui.core.js
*/
-(function($) {
-
-$.effects.bounce = function(o) {
-
- return this.queue(function() {
-
- // Create element
- var el = $(this), props = ['position','top','left'];
-
- // Set options
- var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode
- var direction = o.options.direction || 'up'; // Default direction
- var distance = o.options.distance || 20; // Default distance
- var times = o.options.times || 5; // Default # of times
- var speed = o.duration || 250; // Default speed per bounce
- if (/show|hide/.test(mode)) props.push('opacity'); // Avoid touching opacity to prevent clearType and PNG issues in IE
-
- // Adjust
- $.effects.save(el, props); el.show(); // Save & Show
- $.effects.createWrapper(el); // Create Wrapper
- var ref = (direction == 'up' || direction == 'down') ? 'top' : 'left';
- var motion = (direction == 'up' || direction == 'left') ? 'pos' : 'neg';
- var distance = o.options.distance || (ref == 'top' ? el.outerHeight({margin:true}) / 3 : el.outerWidth({margin:true}) / 3);
- if (mode == 'show') el.css('opacity', 0).css(ref, motion == 'pos' ? -distance : distance); // Shift
- if (mode == 'hide') distance = distance / (times * 2);
- if (mode != 'hide') times--;
-
- // Animate
- if (mode == 'show') { // Show Bounce
- var animation = {opacity: 1};
- animation[ref] = (motion == 'pos' ? '+=' : '-=') + distance;
- el.animate(animation, speed / 2, o.options.easing);
- distance = distance / 2;
- times--;
- };
- for (var i = 0; i < times; i++) { // Bounces
- var animation1 = {}, animation2 = {};
- animation1[ref] = (motion == 'pos' ? '-=' : '+=') + distance;
- animation2[ref] = (motion == 'pos' ? '+=' : '-=') + distance;
- el.animate(animation1, speed / 2, o.options.easing).animate(animation2, speed / 2, o.options.easing);
- distance = (mode == 'hide') ? distance * 2 : distance / 2;
- };
- if (mode == 'hide') { // Last Bounce
- var animation = {opacity: 0};
- animation[ref] = (motion == 'pos' ? '-=' : '+=') + distance;
- el.animate(animation, speed / 2, o.options.easing, function(){
- el.hide(); // Hide
- $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
- if(o.callback) o.callback.apply(this, arguments); // Callback
- });
- } else {
- var animation1 = {}, animation2 = {};
- animation1[ref] = (motion == 'pos' ? '-=' : '+=') + distance;
- animation2[ref] = (motion == 'pos' ? '+=' : '-=') + distance;
- el.animate(animation1, speed / 2, o.options.easing).animate(animation2, speed / 2, o.options.easing, function(){
- $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
- if(o.callback) o.callback.apply(this, arguments); // Callback
- });
- };
- el.queue('fx', function() { el.dequeue(); });
- el.dequeue();
- });
-
-};
-
-})(jQuery);
-/*
- * jQuery UI Effects Clip
+(function(a){a.widget("ui.tabs",{_init:function(){if(this.options.deselectable!==undefined){this.options.collapsible=this.options.deselectable}this._tabify(true)},_setData:function(b,c){if(b=="selected"){if(this.options.collapsible&&c==this.options.selected){return}this.select(c)}else{this.options[b]=c;if(b=="deselectable"){this.options.collapsible=c}this._tabify()}},_tabId:function(b){return b.title&&b.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+a.data(b)},_sanitizeSelector:function(b){return b.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+a.data(this.list[0]));return a.cookie.apply(null,[b].concat(a.makeArray(arguments)))},_ui:function(c,b){return{tab:c,panel:b,index:this.anchors.index(c)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b=a(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(n){this.list=this.element.children("ul:first");this.lis=a("li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return a("a",this)[0]});this.panels=a([]);var p=this,d=this.options;var c=/^#.+/;this.anchors.each(function(r,o){var q=a(o).attr("href");var s=q.split("#")[0],u;if(s&&(s===location.toString().split("#")[0]||(u=a("base")[0])&&s===u.href)){q=o.hash;o.href=q}if(c.test(q)){p.panels=p.panels.add(p._sanitizeSelector(q))}else{if(q!="#"){a.data(o,"href.tabs",q);a.data(o,"load.tabs",q.replace(/#.*$/,""));var w=p._tabId(o);o.href="#"+w;var v=a("#"+w);if(!v.length){v=a(d.panelTemplate).attr("id",w).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(p.panels[r-1]||p.list);v.data("destroy.tabs",true)}p.panels=p.panels.add(v)}else{d.disabled.push(r)}}});if(n){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(d.selected===undefined){if(location.hash){this.anchors.each(function(q,o){if(o.hash==location.hash){d.selected=q;return false}})}if(typeof d.selected!="number"&&d.cookie){d.selected=parseInt(p._cookie(),10)}if(typeof d.selected!="number"&&this.lis.filter(".ui-tabs-selected").length){d.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}d.selected=d.selected||0}else{if(d.selected===null){d.selected=-1}}d.selected=((d.selected>=0&&this.anchors[d.selected])||d.selected<0)?d.selected:0;d.disabled=a.unique(d.disabled.concat(a.map(this.lis.filter(".ui-state-disabled"),function(q,o){return p.lis.index(q)}))).sort();if(a.inArray(d.selected,d.disabled)!=-1){d.disabled.splice(a.inArray(d.selected,d.disabled),1)}this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(d.selected>=0&&this.anchors.length){this.panels.eq(d.selected).removeClass("ui-tabs-hide");this.lis.eq(d.selected).addClass("ui-tabs-selected ui-state-active");p.element.queue("tabs",function(){p._trigger("show",null,p._ui(p.anchors[d.selected],p.panels[d.selected]))});this.load(d.selected)}a(window).bind("unload",function(){p.lis.add(p.anchors).unbind(".tabs");p.lis=p.anchors=p.panels=null})}else{d.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}this.element[d.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");if(d.cookie){this._cookie(d.selected,d.cookie)}for(var g=0,m;(m=this.lis[g]);g++){a(m)[a.inArray(g,d.disabled)!=-1&&!a(m).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled")}if(d.cache===false){this.anchors.removeData("cache.tabs")}this.lis.add(this.anchors).unbind(".tabs");if(d.event!="mouseover"){var f=function(o,i){if(i.is(":not(.ui-state-disabled)")){i.addClass("ui-state-"+o)}};var j=function(o,i){i.removeClass("ui-state-"+o)};this.lis.bind("mouseover.tabs",function(){f("hover",a(this))});this.lis.bind("mouseout.tabs",function(){j("hover",a(this))});this.anchors.bind("focus.tabs",function(){f("focus",a(this).closest("li"))});this.anchors.bind("blur.tabs",function(){j("focus",a(this).closest("li"))})}var b,h;if(d.fx){if(a.isArray(d.fx)){b=d.fx[0];h=d.fx[1]}else{b=h=d.fx}}function e(i,o){i.css({display:""});if(a.browser.msie&&o.opacity){i[0].style.removeAttribute("filter")}}var k=h?function(i,o){a(i).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");o.hide().removeClass("ui-tabs-hide").animate(h,h.duration||"normal",function(){e(o,h);p._trigger("show",null,p._ui(i,o[0]))})}:function(i,o){a(i).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");o.removeClass("ui-tabs-hide");p._trigger("show",null,p._ui(i,o[0]))};var l=b?function(o,i){i.animate(b,b.duration||"normal",function(){p.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");i.addClass("ui-tabs-hide");e(i,b);p.element.dequeue("tabs")})}:function(o,i,q){p.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");i.addClass("ui-tabs-hide");p.element.dequeue("tabs")};this.anchors.bind(d.event+".tabs",function(){var o=this,r=a(this).closest("li"),i=p.panels.filter(":not(.ui-tabs-hide)"),q=a(p._sanitizeSelector(this.hash));if((r.hasClass("ui-tabs-selected")&&!d.collapsible)||r.hasClass("ui-state-disabled")||r.hasClass("ui-state-processing")||p._trigger("select",null,p._ui(this,q[0]))===false){this.blur();return false}d.selected=p.anchors.index(this);p.abort();if(d.collapsible){if(r.hasClass("ui-tabs-selected")){d.selected=-1;if(d.cookie){p._cookie(d.selected,d.cookie)}p.element.queue("tabs",function(){l(o,i)}).dequeue("tabs");this.blur();return false}else{if(!i.length){if(d.cookie){p._cookie(d.selected,d.cookie)}p.element.queue("tabs",function(){k(o,q)});p.load(p.anchors.index(this));this.blur();return false}}}if(d.cookie){p._cookie(d.selected,d.cookie)}if(q.length){if(i.length){p.element.queue("tabs",function(){l(o,i)})}p.element.queue("tabs",function(){k(o,q)});p.load(p.anchors.index(this))}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}if(a.browser.msie){this.blur()}});this.anchors.bind("click.tabs",function(){return false})},destroy:function(){var b=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var c=a.data(this,"href.tabs");if(c){this.href=c}var d=a(this).unbind(".tabs");a.each(["href","load","cache"],function(e,f){d.removeData(f+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){if(a.data(this,"destroy.tabs")){a(this).remove()}else{a(this).removeClass(["ui-state-default","ui-corner-top","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-corner-bottom","ui-tabs-hide"].join(" "))}});if(b.cookie){this._cookie(null,b.cookie)}},add:function(e,d,c){if(c===undefined){c=this.anchors.length}var b=this,g=this.options,i=a(g.tabTemplate.replace(/#\{href\}/g,e).replace(/#\{label\}/g,d)),h=!e.indexOf("#")?e.replace("#",""):this._tabId(a("a",i)[0]);i.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var f=a("#"+h);if(!f.length){f=a(g.panelTemplate).attr("id",h).data("destroy.tabs",true)}f.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(c>=this.lis.length){i.appendTo(this.list);f.appendTo(this.list[0].parentNode)}else{i.insertBefore(this.lis[c]);f.insertBefore(this.panels[c])}g.disabled=a.map(g.disabled,function(k,j){return k>=c?++k:k});this._tabify();if(this.anchors.length==1){i.addClass("ui-tabs-selected ui-state-active");f.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){b._trigger("show",null,b._ui(b.anchors[0],b.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[c],this.panels[c]))},remove:function(b){var d=this.options,e=this.lis.eq(b).remove(),c=this.panels.eq(b).remove();if(e.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(b+(b+1<this.anchors.length?1:-1))}d.disabled=a.map(a.grep(d.disabled,function(g,f){return g!=b}),function(g,f){return g>=b?--g:g});this._tabify();this._trigger("remove",null,this._ui(e.find("a")[0],c[0]))},enable:function(b){var c=this.options;if(a.inArray(b,c.disabled)==-1){return}this.lis.eq(b).removeClass("ui-state-disabled");c.disabled=a.grep(c.disabled,function(e,d){return e!=b});this._trigger("enable",null,this._ui(this.anchors[b],this.panels[b]))},disable:function(c){var b=this,d=this.options;if(c!=d.selected){this.lis.eq(c).addClass("ui-state-disabled");d.disabled.push(c);d.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[c],this.panels[c]))}},select:function(b){if(typeof b=="string"){b=this.anchors.index(this.anchors.filter("[href$="+b+"]"))}else{if(b===null){b=-1}}if(b==-1&&this.options.collapsible){b=this.options.selected}this.anchors.eq(b).trigger(this.options.event+".tabs")},load:function(e){var c=this,g=this.options,b=this.anchors.eq(e)[0],d=a.data(b,"load.tabs");this.abort();if(!d||this.element.queue("tabs").length!==0&&a.data(b,"cache.tabs")){this.element.dequeue("tabs");return}this.lis.eq(e).addClass("ui-state-processing");if(g.spinner){var f=a("span",b);f.data("label.tabs",f.html()).html(g.spinner)}this.xhr=a.ajax(a.extend({},g.ajaxOptions,{url:d,success:function(i,h){a(c._sanitizeSelector(b.hash)).html(i);c._cleanup();if(g.cache){a.data(b,"cache.tabs",true)}c._trigger("load",null,c._ui(c.anchors[e],c.panels[e]));try{g.ajaxOptions.success(i,h)}catch(j){}c.element.dequeue("tabs")}}))},abort:function(){this.element.queue([]);this.panels.stop(false,true);if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup()},url:function(c,b){this.anchors.eq(c).removeData("cache.tabs").data("load.tabs",b)},length:function(){return this.anchors.length}});a.extend(a.ui.tabs,{version:"1.7.2",getter:"length",defaults:{ajaxOptions:null,cache:false,cookie:null,collapsible:false,disabled:[],event:"click",fx:null,idPrefix:"ui-tabs-",panelTemplate:"<div></div>",spinner:"<em>Loading&#8230;</em>",tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>'}});a.extend(a.ui.tabs.prototype,{rotation:null,rotate:function(d,f){var b=this,g=this.options;var c=b._rotate||(b._rotate=function(h){clearTimeout(b.rotation);b.rotation=setTimeout(function(){var i=g.selected;b.select(++i<b.anchors.length?i:0)},d);if(h){h.stopPropagation()}});var e=b._unrotate||(b._unrotate=!f?function(h){if(h.clientX){b.rotate(null)}}:function(h){t=g.selected;c()});if(d){this.element.bind("tabsshow",c);this.anchors.bind(g.event+".tabs",e);c()}else{clearTimeout(b.rotation);this.element.unbind("tabsshow",c);this.anchors.unbind(g.event+".tabs",e);delete this._rotate;delete this._unrotate}}})})(jQuery);;/*
+ * jQuery UI Datepicker 1.7.2
*
- * Copyright (c) 2008 Aaron Eisenberger (aaronchi@gmail.com)
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://docs.jquery.com/UI/Effects/Clip
+ *
+ * http://docs.jquery.com/UI/Datepicker
*
* Depends:
- * effects.core.js
+ * ui.core.js
*/
-(function($) {
-
-$.effects.clip = function(o) {
-
- return this.queue(function() {
-
- // Create element
- var el = $(this), props = ['position','top','left','height','width'];
-
- // Set options
- var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
- var direction = o.options.direction || 'vertical'; // Default direction
-
- // Adjust
- $.effects.save(el, props); el.show(); // Save & Show
- var wrapper = $.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper
- var animate = el[0].tagName == 'IMG' ? wrapper : el;
- var ref = {
- size: (direction == 'vertical') ? 'height' : 'width',
- position: (direction == 'vertical') ? 'top' : 'left'
- };
- var distance = (direction == 'vertical') ? animate.height() : animate.width();
- if(mode == 'show') { animate.css(ref.size, 0); animate.css(ref.position, distance / 2); } // Shift
-
- // Animation
- var animation = {};
- animation[ref.size] = mode == 'show' ? distance : 0;
- animation[ref.position] = mode == 'show' ? 0 : distance / 2;
-
- // Animate
- animate.animate(animation, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() {
- if(mode == 'hide') el.hide(); // Hide
- $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
- if(o.callback) o.callback.apply(el[0], arguments); // Callback
- el.dequeue();
- }});
-
- });
-
-};
-
-})(jQuery);
-/*
- * jQuery UI Effects Drop
+(function($){$.extend($.ui,{datepicker:{version:"1.7.2"}});var PROP_NAME="datepicker";function Datepicker(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._datepickerShowing=false;this._inDialog=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass="ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],dateFormat:"mm/dd/yy",firstDay:0,isRTL:false};this._defaults={showOn:"focus",showAnim:"show",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,showMonthAfterYear:false,yearRange:"-10:+10",showOtherMonths:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"normal",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false};$.extend(this._defaults,this.regional[""]);this.dpDiv=$('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible"></div>')}$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",log:function(){if(this.debug){console.log.apply("",arguments)}},setDefaults:function(settings){extendRemove(this._defaults,settings||{});return this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase();var inline=(nodeName=="div"||nodeName=="span");if(!target.id){target.id="dp"+(++this.uuid)}var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{});if(nodeName=="input"){this._connectDatepicker(target,inst)}else{if(inline){this._inlineDatepicker(target,inst)}}},_newInst:function(target,inline){var id=target[0].id.replace(/([:\[\]\.])/g,"\\\\$1");return{id:id,input:target,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:inline,dpDiv:(!inline?this.dpDiv:$('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}},_connectDatepicker:function(target,inst){var input=$(target);inst.append=$([]);inst.trigger=$([]);if(input.hasClass(this.markerClassName)){return}var appendText=this._get(inst,"appendText");var isRTL=this._get(inst,"isRTL");if(appendText){inst.append=$('<span class="'+this._appendClass+'">'+appendText+"</span>");input[isRTL?"before":"after"](inst.append)}var showOn=this._get(inst,"showOn");if(showOn=="focus"||showOn=="both"){input.focus(this._showDatepicker)}if(showOn=="button"||showOn=="both"){var buttonText=this._get(inst,"buttonText");var buttonImage=this._get(inst,"buttonImage");inst.trigger=$(this._get(inst,"buttonImageOnly")?$("<img/>").addClass(this._triggerClass).attr({src:buttonImage,alt:buttonText,title:buttonText}):$('<button type="button"></button>').addClass(this._triggerClass).html(buttonImage==""?buttonText:$("<img/>").attr({src:buttonImage,alt:buttonText,title:buttonText})));input[isRTL?"before":"after"](inst.trigger);inst.trigger.click(function(){if($.datepicker._datepickerShowing&&$.datepicker._lastInput==target){$.datepicker._hideDatepicker()}else{$.datepicker._showDatepicker(target)}return false})}input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst)},_inlineDatepicker:function(target,inst){var divSpan=$(target);if(divSpan.hasClass(this.markerClassName)){return}divSpan.addClass(this.markerClassName).append(inst.dpDiv).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst);this._setDate(inst,this._getDefaultDate(inst));this._updateDatepicker(inst);this._updateAlternate(inst)},_dialogDatepicker:function(input,dateText,onSelect,settings,pos){var inst=this._dialogInst;if(!inst){var id="dp"+(++this.uuid);this._dialogInput=$('<input type="text" id="'+id+'" size="1" style="position: absolute; top: -100px;"/>');this._dialogInput.keydown(this._doKeyDown);$("body").append(this._dialogInput);inst=this._dialogInst=this._newInst(this._dialogInput,false);inst.settings={};$.data(this._dialogInput[0],PROP_NAME,inst)}extendRemove(inst.settings,settings||{});this._dialogInput.val(dateText);this._pos=(pos?(pos.length?pos:[pos.pageX,pos.pageY]):null);if(!this._pos){var browserWidth=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var browserHeight=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[(browserWidth/2)-100+scrollX,(browserHeight/2)-150+scrollY]}this._dialogInput.css("left",this._pos[0]+"px").css("top",this._pos[1]+"px");inst.settings.onSelect=onSelect;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if($.blockUI){$.blockUI(this.dpDiv)}$.data(this._dialogInput[0],PROP_NAME,inst);return this},_destroyDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();$.removeData(target,PROP_NAME);if(nodeName=="input"){inst.append.remove();inst.trigger.remove();$target.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress)}else{if(nodeName=="div"||nodeName=="span"){$target.removeClass(this.markerClassName).empty()}}},_enableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=false;inst.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().removeClass("ui-state-disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)})},_disableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=true;inst.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().addClass("ui-state-disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)});this._disabledInputs[this._disabledInputs.length]=target},_isDisabledDatepicker:function(target){if(!target){return false}for(var i=0;i<this._disabledInputs.length;i++){if(this._disabledInputs[i]==target){return true}}return false},_getInst:function(target){try{return $.data(target,PROP_NAME)}catch(err){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(target,name,value){var inst=this._getInst(target);if(arguments.length==2&&typeof name=="string"){return(name=="defaults"?$.extend({},$.datepicker._defaults):(inst?(name=="all"?$.extend({},inst.settings):this._get(inst,name)):null))}var settings=name||{};if(typeof name=="string"){settings={};settings[name]=value}if(inst){if(this._curInst==inst){this._hideDatepicker(null)}var date=this._getDateDatepicker(target);extendRemove(inst.settings,settings);this._setDateDatepicker(target,date);this._updateDatepicker(inst)}},_changeDatepicker:function(target,name,value){this._optionDatepicker(target,name,value)},_refreshDatepicker:function(target){var inst=this._getInst(target);if(inst){this._updateDatepicker(inst)}},_setDateDatepicker:function(target,date,endDate){var inst=this._getInst(target);if(inst){this._setDate(inst,date,endDate);this._updateDatepicker(inst);this._updateAlternate(inst)}},_getDateDatepicker:function(target){var inst=this._getInst(target);if(inst&&!inst.inline){this._setDateFromField(inst)}return(inst?this._getDate(inst):null)},_doKeyDown:function(event){var inst=$.datepicker._getInst(event.target);var handled=true;var isRTL=inst.dpDiv.is(".ui-datepicker-rtl");inst._keyEvent=true;if($.datepicker._datepickerShowing){switch(event.keyCode){case 9:$.datepicker._hideDatepicker(null,"");break;case 13:var sel=$("td."+$.datepicker._dayOverClass+", td."+$.datepicker._currentClass,inst.dpDiv);if(sel[0]){$.datepicker._selectDay(event.target,inst.selectedMonth,inst.selectedYear,sel[0])}else{$.datepicker._hideDatepicker(null,$.datepicker._get(inst,"duration"))}return false;break;case 27:$.datepicker._hideDatepicker(null,$.datepicker._get(inst,"duration"));break;case 33:$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths")),"M");break;case 34:$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths")),"M");break;case 35:if(event.ctrlKey||event.metaKey){$.datepicker._clearDate(event.target)}handled=event.ctrlKey||event.metaKey;break;case 36:if(event.ctrlKey||event.metaKey){$.datepicker._gotoToday(event.target)}handled=event.ctrlKey||event.metaKey;break;case 37:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,(isRTL?+1:-1),"D")}handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths")),"M")}break;case 38:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,-7,"D")}handled=event.ctrlKey||event.metaKey;break;case 39:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,(isRTL?-1:+1),"D")}handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths")),"M")}break;case 40:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,+7,"D")}handled=event.ctrlKey||event.metaKey;break;default:handled=false}}else{if(event.keyCode==36&&event.ctrlKey){$.datepicker._showDatepicker(this)}else{handled=false}}if(handled){event.preventDefault();event.stopPropagation()}},_doKeyPress:function(event){var inst=$.datepicker._getInst(event.target);if($.datepicker._get(inst,"constrainInput")){var chars=$.datepicker._possibleChars($.datepicker._get(inst,"dateFormat"));var chr=String.fromCharCode(event.charCode==undefined?event.keyCode:event.charCode);return event.ctrlKey||(chr<" "||!chars||chars.indexOf(chr)>-1)}},_showDatepicker:function(input){input=input.target||input;if(input.nodeName.toLowerCase()!="input"){input=$("input",input.parentNode)[0]}if($.datepicker._isDisabledDatepicker(input)||$.datepicker._lastInput==input){return}var inst=$.datepicker._getInst(input);var beforeShow=$.datepicker._get(inst,"beforeShow");extendRemove(inst.settings,(beforeShow?beforeShow.apply(input,[input,inst]):{}));$.datepicker._hideDatepicker(null,"");$.datepicker._lastInput=input;$.datepicker._setDateFromField(inst);if($.datepicker._inDialog){input.value=""}if(!$.datepicker._pos){$.datepicker._pos=$.datepicker._findPos(input);$.datepicker._pos[1]+=input.offsetHeight}var isFixed=false;$(input).parents().each(function(){isFixed|=$(this).css("position")=="fixed";return !isFixed});if(isFixed&&$.browser.opera){$.datepicker._pos[0]-=document.documentElement.scrollLeft;$.datepicker._pos[1]-=document.documentElement.scrollTop}var offset={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null;inst.rangeStart=null;inst.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});$.datepicker._updateDatepicker(inst);offset=$.datepicker._checkOffset(inst,offset,isFixed);inst.dpDiv.css({position:($.datepicker._inDialog&&$.blockUI?"static":(isFixed?"fixed":"absolute")),display:"none",left:offset.left+"px",top:offset.top+"px"});if(!inst.inline){var showAnim=$.datepicker._get(inst,"showAnim")||"show";var duration=$.datepicker._get(inst,"duration");var postProcess=function(){$.datepicker._datepickerShowing=true;if($.browser.msie&&parseInt($.browser.version,10)<7){$("iframe.ui-datepicker-cover").css({width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4})}};if($.effects&&$.effects[showAnim]){inst.dpDiv.show(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[showAnim](duration,postProcess)}if(duration==""){postProcess()}if(inst.input[0].type!="hidden"){inst.input[0].focus()}$.datepicker._curInst=inst}},_updateDatepicker:function(inst){var dims={width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4};var self=this;inst.dpDiv.empty().append(this._generateHTML(inst)).find("iframe.ui-datepicker-cover").css({width:dims.width,height:dims.height}).end().find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout",function(){$(this).removeClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).removeClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).removeClass("ui-datepicker-next-hover")}}).bind("mouseover",function(){if(!self._isDisabledDatepicker(inst.inline?inst.dpDiv.parent()[0]:inst.input[0])){$(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");$(this).addClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).addClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).addClass("ui-datepicker-next-hover")}}}).end().find("."+this._dayOverClass+" a").trigger("mouseover").end();var numMonths=this._getNumberOfMonths(inst);var cols=numMonths[1];var width=17;if(cols>1){inst.dpDiv.addClass("ui-datepicker-multi-"+cols).css("width",(width*cols)+"em")}else{inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("")}inst.dpDiv[(numMonths[0]!=1||numMonths[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");inst.dpDiv[(this._get(inst,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");if(inst.input&&inst.input[0].type!="hidden"&&inst==$.datepicker._curInst){$(inst.input[0]).focus()}},_checkOffset:function(inst,offset,isFixed){var dpWidth=inst.dpDiv.outerWidth();var dpHeight=inst.dpDiv.outerHeight();var inputWidth=inst.input?inst.input.outerWidth():0;var inputHeight=inst.input?inst.input.outerHeight():0;var viewWidth=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)+$(document).scrollLeft();var viewHeight=(window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)+$(document).scrollTop();offset.left-=(this._get(inst,"isRTL")?(dpWidth-inputWidth):0);offset.left-=(isFixed&&offset.left==inst.input.offset().left)?$(document).scrollLeft():0;offset.top-=(isFixed&&offset.top==(inst.input.offset().top+inputHeight))?$(document).scrollTop():0;offset.left-=(offset.left+dpWidth>viewWidth&&viewWidth>dpWidth)?Math.abs(offset.left+dpWidth-viewWidth):0;offset.top-=(offset.top+dpHeight>viewHeight&&viewHeight>dpHeight)?Math.abs(offset.top+dpHeight+inputHeight*2-viewHeight):0;return offset},_findPos:function(obj){while(obj&&(obj.type=="hidden"||obj.nodeType!=1)){obj=obj.nextSibling}var position=$(obj).offset();return[position.left,position.top]},_hideDatepicker:function(input,duration){var inst=this._curInst;if(!inst||(input&&inst!=$.data(input,PROP_NAME))){return}if(inst.stayOpen){this._selectDate("#"+inst.id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear))}inst.stayOpen=false;if(this._datepickerShowing){duration=(duration!=null?duration:this._get(inst,"duration"));var showAnim=this._get(inst,"showAnim");var postProcess=function(){$.datepicker._tidyDialog(inst)};if(duration!=""&&$.effects&&$.effects[showAnim]){inst.dpDiv.hide(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[(duration==""?"hide":(showAnim=="slideDown"?"slideUp":(showAnim=="fadeIn"?"fadeOut":"hide")))](duration,postProcess)}if(duration==""){this._tidyDialog(inst)}var onClose=this._get(inst,"onClose");if(onClose){onClose.apply((inst.input?inst.input[0]:null),[(inst.input?inst.input.val():""),inst])}this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if($.blockUI){$.unblockUI();$("body").append(this.dpDiv)}}this._inDialog=false}this._curInst=null},_tidyDialog:function(inst){inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(event){if(!$.datepicker._curInst){return}var $target=$(event.target);if(($target.parents("#"+$.datepicker._mainDivId).length==0)&&!$target.hasClass($.datepicker.markerClassName)&&!$target.hasClass($.datepicker._triggerClass)&&$.datepicker._datepickerShowing&&!($.datepicker._inDialog&&$.blockUI)){$.datepicker._hideDatepicker(null,"")}},_adjustDate:function(id,offset,period){var target=$(id);var inst=this._getInst(target[0]);if(this._isDisabledDatepicker(target[0])){return}this._adjustInstDate(inst,offset+(period=="M"?this._get(inst,"showCurrentAtPos"):0),period);this._updateDatepicker(inst)},_gotoToday:function(id){var target=$(id);var inst=this._getInst(target[0]);if(this._get(inst,"gotoCurrent")&&inst.currentDay){inst.selectedDay=inst.currentDay;inst.drawMonth=inst.selectedMonth=inst.currentMonth;inst.drawYear=inst.selectedYear=inst.currentYear}else{var date=new Date();inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear()}this._notifyChange(inst);this._adjustDate(target)},_selectMonthYear:function(id,select,period){var target=$(id);var inst=this._getInst(target[0]);inst._selectingMonthYear=false;inst["selected"+(period=="M"?"Month":"Year")]=inst["draw"+(period=="M"?"Month":"Year")]=parseInt(select.options[select.selectedIndex].value,10);this._notifyChange(inst);this._adjustDate(target)},_clickMonthYear:function(id){var target=$(id);var inst=this._getInst(target[0]);if(inst.input&&inst._selectingMonthYear&&!$.browser.msie){inst.input[0].focus()}inst._selectingMonthYear=!inst._selectingMonthYear},_selectDay:function(id,month,year,td){var target=$(id);if($(td).hasClass(this._unselectableClass)||this._isDisabledDatepicker(target[0])){return}var inst=this._getInst(target[0]);inst.selectedDay=inst.currentDay=$("a",td).html();inst.selectedMonth=inst.currentMonth=month;inst.selectedYear=inst.currentYear=year;if(inst.stayOpen){inst.endDay=inst.endMonth=inst.endYear=null}this._selectDate(id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear));if(inst.stayOpen){inst.rangeStart=this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay));this._updateDatepicker(inst)}},_clearDate:function(id){var target=$(id);var inst=this._getInst(target[0]);inst.stayOpen=false;inst.endDay=inst.endMonth=inst.endYear=inst.rangeStart=null;this._selectDate(target,"")},_selectDate:function(id,dateStr){var target=$(id);var inst=this._getInst(target[0]);dateStr=(dateStr!=null?dateStr:this._formatDate(inst));if(inst.input){inst.input.val(dateStr)}this._updateAlternate(inst);var onSelect=this._get(inst,"onSelect");if(onSelect){onSelect.apply((inst.input?inst.input[0]:null),[dateStr,inst])}else{if(inst.input){inst.input.trigger("change")}}if(inst.inline){this._updateDatepicker(inst)}else{if(!inst.stayOpen){this._hideDatepicker(null,this._get(inst,"duration"));this._lastInput=inst.input[0];if(typeof(inst.input[0])!="object"){inst.input[0].focus()}this._lastInput=null}}},_updateAlternate:function(inst){var altField=this._get(inst,"altField");if(altField){var altFormat=this._get(inst,"altFormat")||this._get(inst,"dateFormat");var date=this._getDate(inst);dateStr=this.formatDate(altFormat,date,this._getFormatConfig(inst));$(altField).each(function(){$(this).val(dateStr)})}},noWeekends:function(date){var day=date.getDay();return[(day>0&&day<6),""]},iso8601Week:function(date){var checkDate=new Date(date.getFullYear(),date.getMonth(),date.getDate());var firstMon=new Date(checkDate.getFullYear(),1-1,4);var firstDay=firstMon.getDay()||7;firstMon.setDate(firstMon.getDate()+1-firstDay);if(firstDay<4&&checkDate<firstMon){checkDate.setDate(checkDate.getDate()-3);return $.datepicker.iso8601Week(checkDate)}else{if(checkDate>new Date(checkDate.getFullYear(),12-1,28)){firstDay=new Date(checkDate.getFullYear()+1,1-1,4).getDay()||7;if(firstDay>4&&(checkDate.getDay()||7)<firstDay-3){return 1}}}return Math.floor(((checkDate-firstMon)/86400000)/7)+1},parseDate:function(format,value,settings){if(format==null||value==null){throw"Invalid arguments"}value=(typeof value=="object"?value.toString():value+"");if(value==""){return null}var shortYearCutoff=(settings?settings.shortYearCutoff:null)||this._defaults.shortYearCutoff;var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var year=-1;var month=-1;var day=-1;var doy=-1;var literal=false;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};var getNumber=function(match){lookAhead(match);var origSize=(match=="@"?14:(match=="y"?4:(match=="o"?3:2)));var size=origSize;var num=0;while(size>0&&iValue<value.length&&value.charAt(iValue)>="0"&&value.charAt(iValue)<="9"){num=num*10+parseInt(value.charAt(iValue++),10);size--}if(size==origSize){throw"Missing number at position "+iValue}return num};var getName=function(match,shortNames,longNames){var names=(lookAhead(match)?longNames:shortNames);var size=0;for(var j=0;j<names.length;j++){size=Math.max(size,names[j].length)}var name="";var iInit=iValue;while(size>0&&iValue<value.length){name+=value.charAt(iValue++);for(var i=0;i<names.length;i++){if(name==names[i]){return i+1}}size--}throw"Unknown name at position "+iInit};var checkLiteral=function(){if(value.charAt(iValue)!=format.charAt(iFormat)){throw"Unexpected literal at position "+iValue}iValue++};var iValue=0;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{checkLiteral()}}else{switch(format.charAt(iFormat)){case"d":day=getNumber("d");break;case"D":getName("D",dayNamesShort,dayNames);break;case"o":doy=getNumber("o");break;case"m":month=getNumber("m");break;case"M":month=getName("M",monthNamesShort,monthNames);break;case"y":year=getNumber("y");break;case"@":var date=new Date(getNumber("@"));year=date.getFullYear();month=date.getMonth()+1;day=date.getDate();break;case"'":if(lookAhead("'")){checkLiteral()}else{literal=true}break;default:checkLiteral()}}}if(year==-1){year=new Date().getFullYear()}else{if(year<100){year+=new Date().getFullYear()-new Date().getFullYear()%100+(year<=shortYearCutoff?0:-100)}}if(doy>-1){month=1;day=doy;do{var dim=this._getDaysInMonth(year,month-1);if(day<=dim){break}month++;day-=dim}while(true)}var date=this._daylightSavingAdjust(new Date(year,month-1,day));if(date.getFullYear()!=year||date.getMonth()+1!=month||date.getDate()!=day){throw"Invalid date"}return date},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TIMESTAMP:"@",W3C:"yy-mm-dd",formatDate:function(format,date,settings){if(!date){return""}var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};var formatNumber=function(match,value,len){var num=""+value;if(lookAhead(match)){while(num.length<len){num="0"+num}}return num};var formatName=function(match,value,shortNames,longNames){return(lookAhead(match)?longNames[value]:shortNames[value])};var output="";var literal=false;if(date){for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{output+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d":output+=formatNumber("d",date.getDate(),2);break;case"D":output+=formatName("D",date.getDay(),dayNamesShort,dayNames);break;case"o":var doy=date.getDate();for(var m=date.getMonth()-1;m>=0;m--){doy+=this._getDaysInMonth(date.getFullYear(),m)}output+=formatNumber("o",doy,3);break;case"m":output+=formatNumber("m",date.getMonth()+1,2);break;case"M":output+=formatName("M",date.getMonth(),monthNamesShort,monthNames);break;case"y":output+=(lookAhead("y")?date.getFullYear():(date.getYear()%100<10?"0":"")+date.getYear()%100);break;case"@":output+=date.getTime();break;case"'":if(lookAhead("'")){output+="'"}else{literal=true}break;default:output+=format.charAt(iFormat)}}}}return output},_possibleChars:function(format){var chars="";var literal=false;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{chars+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d":case"m":case"y":case"@":chars+="0123456789";break;case"D":case"M":return null;case"'":if(lookAhead("'")){chars+="'"}else{literal=true}break;default:chars+=format.charAt(iFormat)}}}return chars},_get:function(inst,name){return inst.settings[name]!==undefined?inst.settings[name]:this._defaults[name]},_setDateFromField:function(inst){var dateFormat=this._get(inst,"dateFormat");var dates=inst.input?inst.input.val():null;inst.endDay=inst.endMonth=inst.endYear=null;var date=defaultDate=this._getDefaultDate(inst);var settings=this._getFormatConfig(inst);try{date=this.parseDate(dateFormat,dates,settings)||defaultDate}catch(event){this.log(event);date=defaultDate}inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();inst.currentDay=(dates?date.getDate():0);inst.currentMonth=(dates?date.getMonth():0);inst.currentYear=(dates?date.getFullYear():0);this._adjustInstDate(inst)},_getDefaultDate:function(inst){var date=this._determineDate(this._get(inst,"defaultDate"),new Date());var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);return date},_determineDate:function(date,defaultDate){var offsetNumeric=function(offset){var date=new Date();date.setDate(date.getDate()+offset);return date};var offsetString=function(offset,getDaysInMonth){var date=new Date();var year=date.getFullYear();var month=date.getMonth();var day=date.getDate();var pattern=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;var matches=pattern.exec(offset);while(matches){switch(matches[2]||"d"){case"d":case"D":day+=parseInt(matches[1],10);break;case"w":case"W":day+=parseInt(matches[1],10)*7;break;case"m":case"M":month+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break;case"y":case"Y":year+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break}matches=pattern.exec(offset)}return new Date(year,month,day)};date=(date==null?defaultDate:(typeof date=="string"?offsetString(date,this._getDaysInMonth):(typeof date=="number"?(isNaN(date)?defaultDate:offsetNumeric(date)):date)));date=(date&&date.toString()=="Invalid Date"?defaultDate:date);if(date){date.setHours(0);date.setMinutes(0);date.setSeconds(0);date.setMilliseconds(0)}return this._daylightSavingAdjust(date)},_daylightSavingAdjust:function(date){if(!date){return null}date.setHours(date.getHours()>12?date.getHours()+2:0);return date},_setDate:function(inst,date,endDate){var clear=!(date);var origMonth=inst.selectedMonth;var origYear=inst.selectedYear;date=this._determineDate(date,new Date());inst.selectedDay=inst.currentDay=date.getDate();inst.drawMonth=inst.selectedMonth=inst.currentMonth=date.getMonth();inst.drawYear=inst.selectedYear=inst.currentYear=date.getFullYear();if(origMonth!=inst.selectedMonth||origYear!=inst.selectedYear){this._notifyChange(inst)}this._adjustInstDate(inst);if(inst.input){inst.input.val(clear?"":this._formatDate(inst))}},_getDate:function(inst){var startDate=(!inst.currentYear||(inst.input&&inst.input.val()=="")?null:this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return startDate},_generateHTML:function(inst){var today=new Date();today=this._daylightSavingAdjust(new Date(today.getFullYear(),today.getMonth(),today.getDate()));var isRTL=this._get(inst,"isRTL");var showButtonPanel=this._get(inst,"showButtonPanel");var hideIfNoPrevNext=this._get(inst,"hideIfNoPrevNext");var navigationAsDateFormat=this._get(inst,"navigationAsDateFormat");var numMonths=this._getNumberOfMonths(inst);var showCurrentAtPos=this._get(inst,"showCurrentAtPos");var stepMonths=this._get(inst,"stepMonths");var stepBigMonths=this._get(inst,"stepBigMonths");var isMultiMonth=(numMonths[0]!=1||numMonths[1]!=1);var currentDate=this._daylightSavingAdjust((!inst.currentDay?new Date(9999,9,9):new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");var drawMonth=inst.drawMonth-showCurrentAtPos;var drawYear=inst.drawYear;if(drawMonth<0){drawMonth+=12;drawYear--}if(maxDate){var maxDraw=this._daylightSavingAdjust(new Date(maxDate.getFullYear(),maxDate.getMonth()-numMonths[1]+1,maxDate.getDate()));maxDraw=(minDate&&maxDraw<minDate?minDate:maxDraw);while(this._daylightSavingAdjust(new Date(drawYear,drawMonth,1))>maxDraw){drawMonth--;if(drawMonth<0){drawMonth=11;drawYear--}}}inst.drawMonth=drawMonth;inst.drawYear=drawYear;var prevText=this._get(inst,"prevText");prevText=(!navigationAsDateFormat?prevText:this.formatDate(prevText,this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepMonths,1)),this._getFormatConfig(inst)));var prev=(this._canAdjustMonth(inst,-1,drawYear,drawMonth)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery.datepicker._adjustDate(\'#'+inst.id+"', -"+stepMonths+", 'M');\" title=\""+prevText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"e":"w")+'">'+prevText+"</span></a>":(hideIfNoPrevNext?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+prevText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"e":"w")+'">'+prevText+"</span></a>"));var nextText=this._get(inst,"nextText");nextText=(!navigationAsDateFormat?nextText:this.formatDate(nextText,this._daylightSavingAdjust(new Date(drawYear,drawMonth+stepMonths,1)),this._getFormatConfig(inst)));var next=(this._canAdjustMonth(inst,+1,drawYear,drawMonth)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery.datepicker._adjustDate(\'#'+inst.id+"', +"+stepMonths+", 'M');\" title=\""+nextText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"w":"e")+'">'+nextText+"</span></a>":(hideIfNoPrevNext?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+nextText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"w":"e")+'">'+nextText+"</span></a>"));var currentText=this._get(inst,"currentText");var gotoDate=(this._get(inst,"gotoCurrent")&&inst.currentDay?currentDate:today);currentText=(!navigationAsDateFormat?currentText:this.formatDate(currentText,gotoDate,this._getFormatConfig(inst)));var controls=(!inst.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery.datepicker._hideDatepicker();">'+this._get(inst,"closeText")+"</button>":"");var buttonPanel=(showButtonPanel)?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(isRTL?controls:"")+(this._isInRange(inst,gotoDate)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery.datepicker._gotoToday(\'#'+inst.id+"');\">"+currentText+"</button>":"")+(isRTL?"":controls)+"</div>":"";var firstDay=parseInt(this._get(inst,"firstDay"),10);firstDay=(isNaN(firstDay)?0:firstDay);var dayNames=this._get(inst,"dayNames");var dayNamesShort=this._get(inst,"dayNamesShort");var dayNamesMin=this._get(inst,"dayNamesMin");var monthNames=this._get(inst,"monthNames");var monthNamesShort=this._get(inst,"monthNamesShort");var beforeShowDay=this._get(inst,"beforeShowDay");var showOtherMonths=this._get(inst,"showOtherMonths");var calculateWeek=this._get(inst,"calculateWeek")||this.iso8601Week;var endDate=inst.endDay?this._daylightSavingAdjust(new Date(inst.endYear,inst.endMonth,inst.endDay)):currentDate;var defaultDate=this._getDefaultDate(inst);var html="";for(var row=0;row<numMonths[0];row++){var group="";for(var col=0;col<numMonths[1];col++){var selectedDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,inst.selectedDay));var cornerClass=" ui-corner-all";var calender="";if(isMultiMonth){calender+='<div class="ui-datepicker-group ui-datepicker-group-';switch(col){case 0:calender+="first";cornerClass=" ui-corner-"+(isRTL?"right":"left");break;case numMonths[1]-1:calender+="last";cornerClass=" ui-corner-"+(isRTL?"left":"right");break;default:calender+="middle";cornerClass="";break}calender+='">'}calender+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+cornerClass+'">'+(/all|left/.test(cornerClass)&&row==0?(isRTL?next:prev):"")+(/all|right/.test(cornerClass)&&row==0?(isRTL?prev:next):"")+this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,row>0||col>0,monthNames,monthNamesShort)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var thead="";for(var dow=0;dow<7;dow++){var day=(dow+firstDay)%7;thead+="<th"+((dow+firstDay+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+dayNames[day]+'">'+dayNamesMin[day]+"</span></th>"}calender+=thead+"</tr></thead><tbody>";var daysInMonth=this._getDaysInMonth(drawYear,drawMonth);if(drawYear==inst.selectedYear&&drawMonth==inst.selectedMonth){inst.selectedDay=Math.min(inst.selectedDay,daysInMonth)}var leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;var numRows=(isMultiMonth?6:Math.ceil((leadDays+daysInMonth)/7));var printDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,1-leadDays));for(var dRow=0;dRow<numRows;dRow++){calender+="<tr>";var tbody="";for(var dow=0;dow<7;dow++){var daySettings=(beforeShowDay?beforeShowDay.apply((inst.input?inst.input[0]:null),[printDate]):[true,""]);var otherMonth=(printDate.getMonth()!=drawMonth);var unselectable=otherMonth||!daySettings[0]||(minDate&&printDate<minDate)||(maxDate&&printDate>maxDate);tbody+='<td class="'+((dow+firstDay+6)%7>=5?" ui-datepicker-week-end":"")+(otherMonth?" ui-datepicker-other-month":"")+((printDate.getTime()==selectedDate.getTime()&&drawMonth==inst.selectedMonth&&inst._keyEvent)||(defaultDate.getTime()==printDate.getTime()&&defaultDate.getTime()==selectedDate.getTime())?" "+this._dayOverClass:"")+(unselectable?" "+this._unselectableClass+" ui-state-disabled":"")+(otherMonth&&!showOtherMonths?"":" "+daySettings[1]+(printDate.getTime()>=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" "+this._currentClass:"")+(printDate.getTime()==today.getTime()?" ui-datepicker-today":""))+'"'+((!otherMonth||showOtherMonths)&&daySettings[2]?' title="'+daySettings[2]+'"':"")+(unselectable?"":" onclick=\"DP_jQuery.datepicker._selectDay('#"+inst.id+"',"+drawMonth+","+drawYear+', this);return false;"')+">"+(otherMonth?(showOtherMonths?printDate.getDate():"&#xa0;"):(unselectable?'<span class="ui-state-default">'+printDate.getDate()+"</span>":'<a class="ui-state-default'+(printDate.getTime()==today.getTime()?" ui-state-highlight":"")+(printDate.getTime()>=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" ui-state-active":"")+'" href="#">'+printDate.getDate()+"</a>"))+"</td>";printDate.setDate(printDate.getDate()+1);printDate=this._daylightSavingAdjust(printDate)}calender+=tbody+"</tr>"}drawMonth++;if(drawMonth>11){drawMonth=0;drawYear++}calender+="</tbody></table>"+(isMultiMonth?"</div>"+((numMonths[0]>0&&col==numMonths[1]-1)?'<div class="ui-datepicker-row-break"></div>':""):"");group+=calender}html+=group}html+=buttonPanel+($.browser.msie&&parseInt($.browser.version,10)<7&&!inst.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':"");inst._keyEvent=false;return html},_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,secondary,monthNames,monthNamesShort){minDate=(inst.rangeStart&&minDate&&selectedDate<minDate?selectedDate:minDate);var changeMonth=this._get(inst,"changeMonth");var changeYear=this._get(inst,"changeYear");var showMonthAfterYear=this._get(inst,"showMonthAfterYear");var html='<div class="ui-datepicker-title">';var monthHtml="";if(secondary||!changeMonth){monthHtml+='<span class="ui-datepicker-month">'+monthNames[drawMonth]+"</span> "}else{var inMinYear=(minDate&&minDate.getFullYear()==drawYear);var inMaxYear=(maxDate&&maxDate.getFullYear()==drawYear);monthHtml+='<select class="ui-datepicker-month" onchange="DP_jQuery.datepicker._selectMonthYear(\'#'+inst.id+"', this, 'M');\" onclick=\"DP_jQuery.datepicker._clickMonthYear('#"+inst.id+"');\">";for(var month=0;month<12;month++){if((!inMinYear||month>=minDate.getMonth())&&(!inMaxYear||month<=maxDate.getMonth())){monthHtml+='<option value="'+month+'"'+(month==drawMonth?' selected="selected"':"")+">"+monthNamesShort[month]+"</option>"}}monthHtml+="</select>"}if(!showMonthAfterYear){html+=monthHtml+((secondary||changeMonth||changeYear)&&(!(changeMonth&&changeYear))?"&#xa0;":"")}if(secondary||!changeYear){html+='<span class="ui-datepicker-year">'+drawYear+"</span>"}else{var years=this._get(inst,"yearRange").split(":");var year=0;var endYear=0;if(years.length!=2){year=drawYear-10;endYear=drawYear+10}else{if(years[0].charAt(0)=="+"||years[0].charAt(0)=="-"){year=drawYear+parseInt(years[0],10);endYear=drawYear+parseInt(years[1],10)}else{year=parseInt(years[0],10);endYear=parseInt(years[1],10)}}year=(minDate?Math.max(year,minDate.getFullYear()):year);endYear=(maxDate?Math.min(endYear,maxDate.getFullYear()):endYear);html+='<select class="ui-datepicker-year" onchange="DP_jQuery.datepicker._selectMonthYear(\'#'+inst.id+"', this, 'Y');\" onclick=\"DP_jQuery.datepicker._clickMonthYear('#"+inst.id+"');\">";for(;year<=endYear;year++){html+='<option value="'+year+'"'+(year==drawYear?' selected="selected"':"")+">"+year+"</option>"}html+="</select>"}if(showMonthAfterYear){html+=(secondary||changeMonth||changeYear?"&#xa0;":"")+monthHtml}html+="</div>";return html},_adjustInstDate:function(inst,offset,period){var year=inst.drawYear+(period=="Y"?offset:0);var month=inst.drawMonth+(period=="M"?offset:0);var day=Math.min(inst.selectedDay,this._getDaysInMonth(year,month))+(period=="D"?offset:0);var date=this._daylightSavingAdjust(new Date(year,month,day));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();if(period=="M"||period=="Y"){this._notifyChange(inst)}},_notifyChange:function(inst){var onChange=this._get(inst,"onChangeMonthYear");if(onChange){onChange.apply((inst.input?inst.input[0]:null),[inst.selectedYear,inst.selectedMonth+1,inst])}},_getNumberOfMonths:function(inst){var numMonths=this._get(inst,"numberOfMonths");return(numMonths==null?[1,1]:(typeof numMonths=="number"?[1,numMonths]:numMonths))},_getMinMaxDate:function(inst,minMax,checkRange){var date=this._determineDate(this._get(inst,minMax+"Date"),null);return(!checkRange||!inst.rangeStart?date:(!date||inst.rangeStart>date?inst.rangeStart:date))},_getDaysInMonth:function(year,month){return 32-new Date(year,month,32).getDate()},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay()},_canAdjustMonth:function(inst,offset,curYear,curMonth){var numMonths=this._getNumberOfMonths(inst);var date=this._daylightSavingAdjust(new Date(curYear,curMonth+(offset<0?offset:numMonths[1]),1));if(offset<0){date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()))}return this._isInRange(inst,date)},_isInRange:function(inst,date){var newMinDate=(!inst.rangeStart?null:this._daylightSavingAdjust(new Date(inst.selectedYear,inst.selectedMonth,inst.selectedDay)));newMinDate=(newMinDate&&inst.rangeStart<newMinDate?inst.rangeStart:newMinDate);var minDate=newMinDate||this._getMinMaxDate(inst,"min");var maxDate=this._getMinMaxDate(inst,"max");return((!minDate||date>=minDate)&&(!maxDate||date<=maxDate))},_getFormatConfig:function(inst){var shortYearCutoff=this._get(inst,"shortYearCutoff");shortYearCutoff=(typeof shortYearCutoff!="string"?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));return{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get(inst,"dayNamesShort"),dayNames:this._get(inst,"dayNames"),monthNamesShort:this._get(inst,"monthNamesShort"),monthNames:this._get(inst,"monthNames")}},_formatDate:function(inst,day,month,year){if(!day){inst.currentDay=inst.selectedDay;inst.currentMonth=inst.selectedMonth;inst.currentYear=inst.selectedYear}var date=(day?(typeof day=="object"?day:this._daylightSavingAdjust(new Date(year,month,day))):this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return this.formatDate(this._get(inst,"dateFormat"),date,this._getFormatConfig(inst))}});function extendRemove(target,props){$.extend(target,props);for(var name in props){if(props[name]==null||props[name]==undefined){target[name]=props[name]}}return target}function isArray(a){return(a&&(($.browser.safari&&typeof a=="object"&&a.length)||(a.constructor&&a.constructor.toString().match(/\Array\(\)/))))}$.fn.datepicker=function(options){if(!$.datepicker.initialized){$(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv);$.datepicker.initialized=true}var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options=="string"&&(options=="isDisabled"||options=="getDate")){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}if(options=="option"&&arguments.length==2&&typeof arguments[1]=="string"){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}return this.each(function(){typeof options=="string"?$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options)})};$.datepicker=new Datepicker();$.datepicker.initialized=false;$.datepicker.uuid=new Date().getTime();$.datepicker.version="1.7.2";window.DP_jQuery=$})(jQuery);;/*
+ * jQuery UI Progressbar 1.7.2
*
- * Copyright (c) 2008 Aaron Eisenberger (aaronchi@gmail.com)
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://docs.jquery.com/UI/Effects/Drop
+ *
+ * http://docs.jquery.com/UI/Progressbar
*
* Depends:
- * effects.core.js
+ * ui.core.js
*/
-(function($) {
-
-$.effects.drop = function(o) {
-
- return this.queue(function() {
-
- // Create element
- var el = $(this), props = ['position','top','left','opacity'];
-
- // Set options
- var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
- var direction = o.options.direction || 'left'; // Default Direction
-
- // Adjust
- $.effects.save(el, props); el.show(); // Save & Show
- $.effects.createWrapper(el); // Create Wrapper
- var ref = (direction == 'up' || direction == 'down') ? 'top' : 'left';
- var motion = (direction == 'up' || direction == 'left') ? 'pos' : 'neg';
- var distance = o.options.distance || (ref == 'top' ? el.outerHeight({margin:true}) / 2 : el.outerWidth({margin:true}) / 2);
- if (mode == 'show') el.css('opacity', 0).css(ref, motion == 'pos' ? -distance : distance); // Shift
-
- // Animation
- var animation = {opacity: mode == 'show' ? 1 : 0};
- animation[ref] = (mode == 'show' ? (motion == 'pos' ? '+=' : '-=') : (motion == 'pos' ? '-=' : '+=')) + distance;
-
- // Animate
- el.animate(animation, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() {
- if(mode == 'hide') el.hide(); // Hide
- $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
- if(o.callback) o.callback.apply(this, arguments); // Callback
- el.dequeue();
- }});
-
- });
-
-};
-
-})(jQuery);
-/*
- * jQuery UI Effects Explode
+(function(a){a.widget("ui.progressbar",{_init:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this._valueMin(),"aria-valuemax":this._valueMax(),"aria-valuenow":this._value()});this.valueDiv=a('<div class="ui-progressbar-value ui-widget-header ui-corner-left"></div>').appendTo(this.element);this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow").removeData("progressbar").unbind(".progressbar");this.valueDiv.remove();a.widget.prototype.destroy.apply(this,arguments)},value:function(b){if(b===undefined){return this._value()}this._setData("value",b);return this},_setData:function(b,c){switch(b){case"value":this.options.value=c;this._refreshValue();this._trigger("change",null,{});break}a.widget.prototype._setData.apply(this,arguments)},_value:function(){var b=this.options.value;if(b<this._valueMin()){b=this._valueMin()}if(b>this._valueMax()){b=this._valueMax()}return b},_valueMin:function(){var b=0;return b},_valueMax:function(){var b=100;return b},_refreshValue:function(){var b=this.value();this.valueDiv[b==this._valueMax()?"addClass":"removeClass"]("ui-corner-right");this.valueDiv.width(b+"%");this.element.attr("aria-valuenow",b)}});a.extend(a.ui.progressbar,{version:"1.7.2",defaults:{value:0}})})(jQuery);;/*
+ * jQuery UI Effects 1.7.2
*
- * Copyright (c) 2008 Paul Bakaus (ui.jquery.com)
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://docs.jquery.com/UI/Effects/Explode
*
- * Depends:
- * effects.core.js
+ * http://docs.jquery.com/UI/Effects/
*/
-(function($) {
-
-$.effects.explode = function(o) {
-
- return this.queue(function() {
-
- var rows = o.options.pieces ? Math.round(Math.sqrt(o.options.pieces)) : 3;
- var cells = o.options.pieces ? Math.round(Math.sqrt(o.options.pieces)) : 3;
-
- o.options.mode = o.options.mode == 'toggle' ? ($(this).is(':visible') ? 'hide' : 'show') : o.options.mode;
- var el = $(this).show().css('visibility', 'hidden');
- var offset = el.offset();
-
- //Substract the margins - not fixing the problem yet.
- offset.top -= parseInt(el.css("marginTop")) || 0;
- offset.left -= parseInt(el.css("marginLeft")) || 0;
-
- var width = el.outerWidth(true);
- var height = el.outerHeight(true);
-
- for(var i=0;i<rows;i++) { // =
- for(var j=0;j<cells;j++) { // ||
- el
- .clone()
- .appendTo('body')
- .wrap('<div></div>')
- .css({
- position: 'absolute',
- visibility: 'visible',
- left: -j*(width/cells),
- top: -i*(height/rows)
- })
- .parent()
- .addClass('effects-explode')
- .css({
- position: 'absolute',
- overflow: 'hidden',
- width: width/cells,
- height: height/rows,
- left: offset.left + j*(width/cells) + (o.options.mode == 'show' ? (j-Math.floor(cells/2))*(width/cells) : 0),
- top: offset.top + i*(height/rows) + (o.options.mode == 'show' ? (i-Math.floor(rows/2))*(height/rows) : 0),
- opacity: o.options.mode == 'show' ? 0 : 1
- }).animate({
- left: offset.left + j*(width/cells) + (o.options.mode == 'show' ? 0 : (j-Math.floor(cells/2))*(width/cells)),
- top: offset.top + i*(height/rows) + (o.options.mode == 'show' ? 0 : (i-Math.floor(rows/2))*(height/rows)),
- opacity: o.options.mode == 'show' ? 1 : 0
- }, o.duration || 500);
- }
- }
-
- // Set a timeout, to call the callback approx. when the other animations have finished
- setTimeout(function() {
-
- o.options.mode == 'show' ? el.css({ visibility: 'visible' }) : el.css({ visibility: 'visible' }).hide();
- if(o.callback) o.callback.apply(el[0]); // Callback
- el.dequeue();
-
- $('.effects-explode').remove();
-
- }, o.duration || 500);
-
-
- });
-
-};
-
-})(jQuery);
-/*
- * jQuery UI Effects Fold
+jQuery.effects||(function(d){d.effects={version:"1.7.2",save:function(g,h){for(var f=0;f<h.length;f++){if(h[f]!==null){g.data("ec.storage."+h[f],g[0].style[h[f]])}}},restore:function(g,h){for(var f=0;f<h.length;f++){if(h[f]!==null){g.css(h[f],g.data("ec.storage."+h[f]))}}},setMode:function(f,g){if(g=="toggle"){g=f.is(":hidden")?"show":"hide"}return g},getBaseline:function(g,h){var i,f;switch(g[0]){case"top":i=0;break;case"middle":i=0.5;break;case"bottom":i=1;break;default:i=g[0]/h.height}switch(g[1]){case"left":f=0;break;case"center":f=0.5;break;case"right":f=1;break;default:f=g[1]/h.width}return{x:f,y:i}},createWrapper:function(f){if(f.parent().is(".ui-effects-wrapper")){return f.parent()}var g={width:f.outerWidth(true),height:f.outerHeight(true),"float":f.css("float")};f.wrap('<div class="ui-effects-wrapper" style="font-size:100%;background:transparent;border:none;margin:0;padding:0"></div>');var j=f.parent();if(f.css("position")=="static"){j.css({position:"relative"});f.css({position:"relative"})}else{var i=f.css("top");if(isNaN(parseInt(i,10))){i="auto"}var h=f.css("left");if(isNaN(parseInt(h,10))){h="auto"}j.css({position:f.css("position"),top:i,left:h,zIndex:f.css("z-index")}).show();f.css({position:"relative",top:0,left:0})}j.css(g);return j},removeWrapper:function(f){if(f.parent().is(".ui-effects-wrapper")){return f.parent().replaceWith(f)}return f},setTransition:function(g,i,f,h){h=h||{};d.each(i,function(k,j){unit=g.cssUnit(j);if(unit[0]>0){h[j]=unit[0]*f+unit[1]}});return h},animateClass:function(h,i,k,j){var f=(typeof k=="function"?k:(j?j:null));var g=(typeof k=="string"?k:null);return this.each(function(){var q={};var o=d(this);var p=o.attr("style")||"";if(typeof p=="object"){p=p.cssText}if(h.toggle){o.hasClass(h.toggle)?h.remove=h.toggle:h.add=h.toggle}var l=d.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(h.add){o.addClass(h.add)}if(h.remove){o.removeClass(h.remove)}var m=d.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(h.add){o.removeClass(h.add)}if(h.remove){o.addClass(h.remove)}for(var r in m){if(typeof m[r]!="function"&&m[r]&&r.indexOf("Moz")==-1&&r.indexOf("length")==-1&&m[r]!=l[r]&&(r.match(/color/i)||(!r.match(/color/i)&&!isNaN(parseInt(m[r],10))))&&(l.position!="static"||(l.position=="static"&&!r.match(/left|top|bottom|right/)))){q[r]=m[r]}}o.animate(q,i,g,function(){if(typeof d(this).attr("style")=="object"){d(this).attr("style")["cssText"]="";d(this).attr("style")["cssText"]=p}else{d(this).attr("style",p)}if(h.add){d(this).addClass(h.add)}if(h.remove){d(this).removeClass(h.remove)}if(f){f.apply(this,arguments)}})})}};function c(g,f){var i=g[1]&&g[1].constructor==Object?g[1]:{};if(f){i.mode=f}var h=g[1]&&g[1].constructor!=Object?g[1]:(i.duration?i.duration:g[2]);h=d.fx.off?0:typeof h==="number"?h:d.fx.speeds[h]||d.fx.speeds._default;var j=i.callback||(d.isFunction(g[1])&&g[1])||(d.isFunction(g[2])&&g[2])||(d.isFunction(g[3])&&g[3]);return[g[0],i,h,j]}d.fn.extend({_show:d.fn.show,_hide:d.fn.hide,__toggle:d.fn.toggle,_addClass:d.fn.addClass,_removeClass:d.fn.removeClass,_toggleClass:d.fn.toggleClass,effect:function(g,f,h,i){return d.effects[g]?d.effects[g].call(this,{method:g,options:f||{},duration:h,callback:i}):null},show:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))){return this._show.apply(this,arguments)}else{return this.effect.apply(this,c(arguments,"show"))}},hide:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))){return this._hide.apply(this,arguments)}else{return this.effect.apply(this,c(arguments,"hide"))}},toggle:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))||(d.isFunction(arguments[0])||typeof arguments[0]=="boolean")){return this.__toggle.apply(this,arguments)}else{return this.effect.apply(this,c(arguments,"toggle"))}},addClass:function(g,f,i,h){return f?d.effects.animateClass.apply(this,[{add:g},f,i,h]):this._addClass(g)},removeClass:function(g,f,i,h){return f?d.effects.animateClass.apply(this,[{remove:g},f,i,h]):this._removeClass(g)},toggleClass:function(g,f,i,h){return((typeof f!=="boolean")&&f)?d.effects.animateClass.apply(this,[{toggle:g},f,i,h]):this._toggleClass(g,f)},morph:function(f,h,g,j,i){return d.effects.animateClass.apply(this,[{add:h,remove:f},g,j,i])},switchClass:function(){return this.morph.apply(this,arguments)},cssUnit:function(f){var g=this.css(f),h=[];d.each(["em","px","%","pt"],function(j,k){if(g.indexOf(k)>0){h=[parseFloat(g),k]}});return h}});d.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(g,f){d.fx.step[f]=function(h){if(h.state==0){h.start=e(h.elem,f);h.end=b(h.end)}h.elem.style[f]="rgb("+[Math.max(Math.min(parseInt((h.pos*(h.end[0]-h.start[0]))+h.start[0],10),255),0),Math.max(Math.min(parseInt((h.pos*(h.end[1]-h.start[1]))+h.start[1],10),255),0),Math.max(Math.min(parseInt((h.pos*(h.end[2]-h.start[2]))+h.start[2],10),255),0)].join(",")+")"}});function b(g){var f;if(g&&g.constructor==Array&&g.length==3){return g}if(f=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(g)){return[parseInt(f[1],10),parseInt(f[2],10),parseInt(f[3],10)]}if(f=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(g)){return[parseFloat(f[1])*2.55,parseFloat(f[2])*2.55,parseFloat(f[3])*2.55]}if(f=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(g)){return[parseInt(f[1],16),parseInt(f[2],16),parseInt(f[3],16)]}if(f=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(g)){return[parseInt(f[1]+f[1],16),parseInt(f[2]+f[2],16),parseInt(f[3]+f[3],16)]}if(f=/rgba\(0, 0, 0, 0\)/.exec(g)){return a.transparent}return a[d.trim(g).toLowerCase()]}function e(h,f){var g;do{g=d.curCSS(h,f);if(g!=""&&g!="transparent"||d.nodeName(h,"body")){break}f="backgroundColor"}while(h=h.parentNode);return b(g)}var a={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]};d.easing.jswing=d.easing.swing;d.extend(d.easing,{def:"easeOutQuad",swing:function(g,h,f,j,i){return d.easing[d.easing.def](g,h,f,j,i)},easeInQuad:function(g,h,f,j,i){return j*(h/=i)*h+f},easeOutQuad:function(g,h,f,j,i){return -j*(h/=i)*(h-2)+f},easeInOutQuad:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h+f}return -j/2*((--h)*(h-2)-1)+f},easeInCubic:function(g,h,f,j,i){return j*(h/=i)*h*h+f},easeOutCubic:function(g,h,f,j,i){return j*((h=h/i-1)*h*h+1)+f},easeInOutCubic:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h*h+f}return j/2*((h-=2)*h*h+2)+f},easeInQuart:function(g,h,f,j,i){return j*(h/=i)*h*h*h+f},easeOutQuart:function(g,h,f,j,i){return -j*((h=h/i-1)*h*h*h-1)+f},easeInOutQuart:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h*h*h+f}return -j/2*((h-=2)*h*h*h-2)+f},easeInQuint:function(g,h,f,j,i){return j*(h/=i)*h*h*h*h+f},easeOutQuint:function(g,h,f,j,i){return j*((h=h/i-1)*h*h*h*h+1)+f},easeInOutQuint:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h*h*h*h+f}return j/2*((h-=2)*h*h*h*h+2)+f},easeInSine:function(g,h,f,j,i){return -j*Math.cos(h/i*(Math.PI/2))+j+f},easeOutSine:function(g,h,f,j,i){return j*Math.sin(h/i*(Math.PI/2))+f},easeInOutSine:function(g,h,f,j,i){return -j/2*(Math.cos(Math.PI*h/i)-1)+f},easeInExpo:function(g,h,f,j,i){return(h==0)?f:j*Math.pow(2,10*(h/i-1))+f},easeOutExpo:function(g,h,f,j,i){return(h==i)?f+j:j*(-Math.pow(2,-10*h/i)+1)+f},easeInOutExpo:function(g,h,f,j,i){if(h==0){return f}if(h==i){return f+j}if((h/=i/2)<1){return j/2*Math.pow(2,10*(h-1))+f}return j/2*(-Math.pow(2,-10*--h)+2)+f},easeInCirc:function(g,h,f,j,i){return -j*(Math.sqrt(1-(h/=i)*h)-1)+f},easeOutCirc:function(g,h,f,j,i){return j*Math.sqrt(1-(h=h/i-1)*h)+f},easeInOutCirc:function(g,h,f,j,i){if((h/=i/2)<1){return -j/2*(Math.sqrt(1-h*h)-1)+f}return j/2*(Math.sqrt(1-(h-=2)*h)+1)+f},easeInElastic:function(g,i,f,m,l){var j=1.70158;var k=0;var h=m;if(i==0){return f}if((i/=l)==1){return f+m}if(!k){k=l*0.3}if(h<Math.abs(m)){h=m;var j=k/4}else{var j=k/(2*Math.PI)*Math.asin(m/h)}return -(h*Math.pow(2,10*(i-=1))*Math.sin((i*l-j)*(2*Math.PI)/k))+f},easeOutElastic:function(g,i,f,m,l){var j=1.70158;var k=0;var h=m;if(i==0){return f}if((i/=l)==1){return f+m}if(!k){k=l*0.3}if(h<Math.abs(m)){h=m;var j=k/4}else{var j=k/(2*Math.PI)*Math.asin(m/h)}return h*Math.pow(2,-10*i)*Math.sin((i*l-j)*(2*Math.PI)/k)+m+f},easeInOutElastic:function(g,i,f,m,l){var j=1.70158;var k=0;var h=m;if(i==0){return f}if((i/=l/2)==2){return f+m}if(!k){k=l*(0.3*1.5)}if(h<Math.abs(m)){h=m;var j=k/4}else{var j=k/(2*Math.PI)*Math.asin(m/h)}if(i<1){return -0.5*(h*Math.pow(2,10*(i-=1))*Math.sin((i*l-j)*(2*Math.PI)/k))+f}return h*Math.pow(2,-10*(i-=1))*Math.sin((i*l-j)*(2*Math.PI)/k)*0.5+m+f},easeInBack:function(g,h,f,k,j,i){if(i==undefined){i=1.70158}return k*(h/=j)*h*((i+1)*h-i)+f},easeOutBack:function(g,h,f,k,j,i){if(i==undefined){i=1.70158}return k*((h=h/j-1)*h*((i+1)*h+i)+1)+f},easeInOutBack:function(g,h,f,k,j,i){if(i==undefined){i=1.70158}if((h/=j/2)<1){return k/2*(h*h*(((i*=(1.525))+1)*h-i))+f}return k/2*((h-=2)*h*(((i*=(1.525))+1)*h+i)+2)+f},easeInBounce:function(g,h,f,j,i){return j-d.easing.easeOutBounce(g,i-h,0,j,i)+f},easeOutBounce:function(g,h,f,j,i){if((h/=i)<(1/2.75)){return j*(7.5625*h*h)+f}else{if(h<(2/2.75)){return j*(7.5625*(h-=(1.5/2.75))*h+0.75)+f}else{if(h<(2.5/2.75)){return j*(7.5625*(h-=(2.25/2.75))*h+0.9375)+f}else{return j*(7.5625*(h-=(2.625/2.75))*h+0.984375)+f}}}},easeInOutBounce:function(g,h,f,j,i){if(h<i/2){return d.easing.easeInBounce(g,h*2,0,j,i)*0.5+f}return d.easing.easeOutBounce(g,h*2-i,0,j,i)*0.5+j*0.5+f}})})(jQuery);;/*
+ * jQuery UI Effects Blind 1.7.2
*
- * Copyright (c) 2008 Aaron Eisenberger (aaronchi@gmail.com)
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://docs.jquery.com/UI/Effects/Fold
+ *
+ * http://docs.jquery.com/UI/Effects/Blind
*
* Depends:
* effects.core.js
*/
-(function($) {
-
-$.effects.fold = function(o) {
-
- return this.queue(function() {
-
- // Create element
- var el = $(this), props = ['position','top','left'];
-
- // Set options
- var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
- var size = o.options.size || 15; // Default fold size
- var horizFirst = !(!o.options.horizFirst); // Ensure a boolean value
-
- // Adjust
- $.effects.save(el, props); el.show(); // Save & Show
- var wrapper = $.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper
- var widthFirst = ((mode == 'show') != horizFirst);
- var ref = widthFirst ? ['width', 'height'] : ['height', 'width'];
- var distance = widthFirst ? [wrapper.width(), wrapper.height()] : [wrapper.height(), wrapper.width()];
- var percent = /([0-9]+)%/.exec(size);
- if(percent) size = parseInt(percent[1]) / 100 * distance[mode == 'hide' ? 0 : 1];
- if(mode == 'show') wrapper.css(horizFirst ? {height: 0, width: size} : {height: size, width: 0}); // Shift
-
- // Animation
- var animation1 = {}, animation2 = {};
- animation1[ref[0]] = mode == 'show' ? distance[0] : size;
- animation2[ref[1]] = mode == 'show' ? distance[1] : 0;
-
- // Animate
- wrapper.animate(animation1, o.duration / 2, o.options.easing)
- .animate(animation2, o.duration / 2, o.options.easing, function() {
- if(mode == 'hide') el.hide(); // Hide
- $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
- if(o.callback) o.callback.apply(el[0], arguments); // Callback
- el.dequeue();
- });
-
- });
-
-};
-
-})(jQuery);
-/*
- * jQuery UI Effects Highlight
+(function(a){a.effects.blind=function(b){return this.queue(function(){var d=a(this),c=["position","top","left"];var h=a.effects.setMode(d,b.options.mode||"hide");var g=b.options.direction||"vertical";a.effects.save(d,c);d.show();var j=a.effects.createWrapper(d).css({overflow:"hidden"});var e=(g=="vertical")?"height":"width";var i=(g=="vertical")?j.height():j.width();if(h=="show"){j.css(e,0)}var f={};f[e]=h=="show"?i:0;j.animate(f,b.duration,b.options.easing,function(){if(h=="hide"){d.hide()}a.effects.restore(d,c);a.effects.removeWrapper(d);if(b.callback){b.callback.apply(d[0],arguments)}d.dequeue()})})}})(jQuery);;/*
+ * jQuery UI Effects Bounce 1.7.2
*
- * Copyright (c) 2008 Aaron Eisenberger (aaronchi@gmail.com)
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://docs.jquery.com/UI/Effects/Highlight
+ *
+ * http://docs.jquery.com/UI/Effects/Bounce
*
* Depends:
* effects.core.js
*/
-;(function($) {
-
-$.effects.highlight = function(o) {
-
- return this.queue(function() {
-
- // Create element
- var el = $(this), props = ['backgroundImage','backgroundColor','opacity'];
-
- // Set options
- var mode = $.effects.setMode(el, o.options.mode || 'show'); // Set Mode
- var color = o.options.color || "#ffff99"; // Default highlight color
- var oldColor = el.css("backgroundColor");
-
- // Adjust
- $.effects.save(el, props); el.show(); // Save & Show
- el.css({backgroundImage: 'none', backgroundColor: color}); // Shift
-
- // Animation
- var animation = {backgroundColor: oldColor };
- if (mode == "hide") animation['opacity'] = 0;
-
- // Animate
- el.animate(animation, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() {
- if(mode == "hide") el.hide();
- $.effects.restore(el, props);
- if (mode == "show" && jQuery.browser.msie) this.style.removeAttribute('filter');
- if(o.callback) o.callback.apply(this, arguments);
- el.dequeue();
- }});
-
- });
-
-};
-
-})(jQuery);
-/*
- * jQuery UI Effects Pulsate
+(function(a){a.effects.bounce=function(b){return this.queue(function(){var e=a(this),l=["position","top","left"];var k=a.effects.setMode(e,b.options.mode||"effect");var n=b.options.direction||"up";var c=b.options.distance||20;var d=b.options.times||5;var g=b.duration||250;if(/show|hide/.test(k)){l.push("opacity")}a.effects.save(e,l);e.show();a.effects.createWrapper(e);var f=(n=="up"||n=="down")?"top":"left";var p=(n=="up"||n=="left")?"pos":"neg";var c=b.options.distance||(f=="top"?e.outerHeight({margin:true})/3:e.outerWidth({margin:true})/3);if(k=="show"){e.css("opacity",0).css(f,p=="pos"?-c:c)}if(k=="hide"){c=c/(d*2)}if(k!="hide"){d--}if(k=="show"){var h={opacity:1};h[f]=(p=="pos"?"+=":"-=")+c;e.animate(h,g/2,b.options.easing);c=c/2;d--}for(var j=0;j<d;j++){var o={},m={};o[f]=(p=="pos"?"-=":"+=")+c;m[f]=(p=="pos"?"+=":"-=")+c;e.animate(o,g/2,b.options.easing).animate(m,g/2,b.options.easing);c=(k=="hide")?c*2:c/2}if(k=="hide"){var h={opacity:0};h[f]=(p=="pos"?"-=":"+=")+c;e.animate(h,g/2,b.options.easing,function(){e.hide();a.effects.restore(e,l);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(this,arguments)}})}else{var o={},m={};o[f]=(p=="pos"?"-=":"+=")+c;m[f]=(p=="pos"?"+=":"-=")+c;e.animate(o,g/2,b.options.easing).animate(m,g/2,b.options.easing,function(){a.effects.restore(e,l);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(this,arguments)}})}e.queue("fx",function(){e.dequeue()});e.dequeue()})}})(jQuery);;/*
+ * jQuery UI Effects Clip 1.7.2
*
- * Copyright (c) 2008 Aaron Eisenberger (aaronchi@gmail.com)
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://docs.jquery.com/UI/Effects/Pulsate
+ *
+ * http://docs.jquery.com/UI/Effects/Clip
*
* Depends:
* effects.core.js
*/
-(function($) {
-
-$.effects.pulsate = function(o) {
-
- return this.queue(function() {
-
- // Create element
- var el = $(this);
-
- // Set options
- var mode = $.effects.setMode(el, o.options.mode || 'show'); // Set Mode
- var times = o.options.times || 5; // Default # of times
-
- // Adjust
- if (mode == 'hide') times--;
- if (el.is(':hidden')) { // Show fadeIn
- el.css('opacity', 0);
- el.show(); // Show
- el.animate({opacity: 1}, o.duration / 2, o.options.easing);
- times = times-2;
- }
-
- // Animate
- for (var i = 0; i < times; i++) { // Pulsate
- el.animate({opacity: 0}, o.duration / 2, o.options.easing).animate({opacity: 1}, o.duration / 2, o.options.easing);
- };
- if (mode == 'hide') { // Last Pulse
- el.animate({opacity: 0}, o.duration / 2, o.options.easing, function(){
- el.hide(); // Hide
- if(o.callback) o.callback.apply(this, arguments); // Callback
- });
- } else {
- el.animate({opacity: 0}, o.duration / 2, o.options.easing).animate({opacity: 1}, o.duration / 2, o.options.easing, function(){
- if(o.callback) o.callback.apply(this, arguments); // Callback
- });
- };
- el.queue('fx', function() { el.dequeue(); });
- el.dequeue();
- });
-
-};
-
-})(jQuery);
-/*
- * jQuery UI Effects Scale
+(function(a){a.effects.clip=function(b){return this.queue(function(){var f=a(this),j=["position","top","left","height","width"];var i=a.effects.setMode(f,b.options.mode||"hide");var k=b.options.direction||"vertical";a.effects.save(f,j);f.show();var c=a.effects.createWrapper(f).css({overflow:"hidden"});var e=f[0].tagName=="IMG"?c:f;var g={size:(k=="vertical")?"height":"width",position:(k=="vertical")?"top":"left"};var d=(k=="vertical")?e.height():e.width();if(i=="show"){e.css(g.size,0);e.css(g.position,d/2)}var h={};h[g.size]=i=="show"?d:0;h[g.position]=i=="show"?0:d/2;e.animate(h,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(i=="hide"){f.hide()}a.effects.restore(f,j);a.effects.removeWrapper(f);if(b.callback){b.callback.apply(f[0],arguments)}f.dequeue()}})})}})(jQuery);;/*
+ * jQuery UI Effects Drop 1.7.2
*
- * Copyright (c) 2008 Aaron Eisenberger (aaronchi@gmail.com)
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://docs.jquery.com/UI/Effects/Scale
+ *
+ * http://docs.jquery.com/UI/Effects/Drop
*
* Depends:
* effects.core.js
*/
-(function($) {
-
-$.effects.puff = function(o) {
-
- return this.queue(function() {
-
- // Create element
- var el = $(this);
-
- // Set options
- var options = $.extend(true, {}, o.options);
- var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
- var percent = parseInt(o.options.percent) || 150; // Set default puff percent
- options.fade = true; // It's not a puff if it doesn't fade! :)
- var original = {height: el.height(), width: el.width()}; // Save original
-
- // Adjust
- var factor = percent / 100;
- el.from = (mode == 'hide') ? original : {height: original.height * factor, width: original.width * factor};
-
- // Animation
- options.from = el.from;
- options.percent = (mode == 'hide') ? percent : 100;
- options.mode = mode;
-
- // Animate
- el.effect('scale', options, o.duration, o.callback);
- el.dequeue();
- });
-
-};
-
-$.effects.scale = function(o) {
-
- return this.queue(function() {
-
- // Create element
- var el = $(this);
-
- // Set options
- var options = $.extend(true, {}, o.options);
- var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode
- var percent = parseInt(o.options.percent) || (parseInt(o.options.percent) == 0 ? 0 : (mode == 'hide' ? 0 : 100)); // Set default scaling percent
- var direction = o.options.direction || 'both'; // Set default axis
- var origin = o.options.origin; // The origin of the scaling
- if (mode != 'effect') { // Set default origin and restore for show/hide
- options.origin = origin || ['middle','center'];
- options.restore = true;
- }
- var original = {height: el.height(), width: el.width()}; // Save original
- el.from = o.options.from || (mode == 'show' ? {height: 0, width: 0} : original); // Default from state
-
- // Adjust
- var factor = { // Set scaling factor
- y: direction != 'horizontal' ? (percent / 100) : 1,
- x: direction != 'vertical' ? (percent / 100) : 1
- };
- el.to = {height: original.height * factor.y, width: original.width * factor.x}; // Set to state
-
- if (o.options.fade) { // Fade option to support puff
- if (mode == 'show') {el.from.opacity = 0; el.to.opacity = 1;};
- if (mode == 'hide') {el.from.opacity = 1; el.to.opacity = 0;};
- };
-
- // Animation
- options.from = el.from; options.to = el.to; options.mode = mode;
-
- // Animate
- el.effect('size', options, o.duration, o.callback);
- el.dequeue();
- });
-
-};
-
-$.effects.size = function(o) {
-
- return this.queue(function() {
-
- // Create element
- var el = $(this), props = ['position','top','left','width','height','overflow','opacity'];
- var props1 = ['position','top','left','overflow','opacity']; // Always restore
- var props2 = ['width','height','overflow']; // Copy for children
- var cProps = ['fontSize'];
- var vProps = ['borderTopWidth', 'borderBottomWidth', 'paddingTop', 'paddingBottom'];
- var hProps = ['borderLeftWidth', 'borderRightWidth', 'paddingLeft', 'paddingRight'];
-
- // Set options
- var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode
- var restore = o.options.restore || false; // Default restore
- var scale = o.options.scale || 'both'; // Default scale mode
- var origin = o.options.origin; // The origin of the sizing
- var original = {height: el.height(), width: el.width()}; // Save original
- el.from = o.options.from || original; // Default from state
- el.to = o.options.to || original; // Default to state
- // Adjust
- if (origin) { // Calculate baseline shifts
- var baseline = $.effects.getBaseline(origin, original);
- el.from.top = (original.height - el.from.height) * baseline.y;
- el.from.left = (original.width - el.from.width) * baseline.x;
- el.to.top = (original.height - el.to.height) * baseline.y;
- el.to.left = (original.width - el.to.width) * baseline.x;
- };
- var factor = { // Set scaling factor
- from: {y: el.from.height / original.height, x: el.from.width / original.width},
- to: {y: el.to.height / original.height, x: el.to.width / original.width}
- };
- if (scale == 'box' || scale == 'both') { // Scale the css box
- if (factor.from.y != factor.to.y) { // Vertical props scaling
- props = props.concat(vProps);
- el.from = $.effects.setTransition(el, vProps, factor.from.y, el.from);
- el.to = $.effects.setTransition(el, vProps, factor.to.y, el.to);
- };
- if (factor.from.x != factor.to.x) { // Horizontal props scaling
- props = props.concat(hProps);
- el.from = $.effects.setTransition(el, hProps, factor.from.x, el.from);
- el.to = $.effects.setTransition(el, hProps, factor.to.x, el.to);
- };
- };
- if (scale == 'content' || scale == 'both') { // Scale the content
- if (factor.from.y != factor.to.y) { // Vertical props scaling
- props = props.concat(cProps);
- el.from = $.effects.setTransition(el, cProps, factor.from.y, el.from);
- el.to = $.effects.setTransition(el, cProps, factor.to.y, el.to);
- };
- };
- $.effects.save(el, restore ? props : props1); el.show(); // Save & Show
- $.effects.createWrapper(el); // Create Wrapper
- el.css('overflow','hidden').css(el.from); // Shift
-
- // Animate
- if (scale == 'content' || scale == 'both') { // Scale the children
- vProps = vProps.concat(['marginTop','marginBottom']).concat(cProps); // Add margins/font-size
- hProps = hProps.concat(['marginLeft','marginRight']); // Add margins
- props2 = props.concat(vProps).concat(hProps); // Concat
- el.find("*[width]").each(function(){
- child = $(this);
- if (restore) $.effects.save(child, props2);
- var c_original = {height: child.height(), width: child.width()}; // Save original
- child.from = {height: c_original.height * factor.from.y, width: c_original.width * factor.from.x};
- child.to = {height: c_original.height * factor.to.y, width: c_original.width * factor.to.x};
- if (factor.from.y != factor.to.y) { // Vertical props scaling
- child.from = $.effects.setTransition(child, vProps, factor.from.y, child.from);
- child.to = $.effects.setTransition(child, vProps, factor.to.y, child.to);
- };
- if (factor.from.x != factor.to.x) { // Horizontal props scaling
- child.from = $.effects.setTransition(child, hProps, factor.from.x, child.from);
- child.to = $.effects.setTransition(child, hProps, factor.to.x, child.to);
- };
- child.css(child.from); // Shift children
- child.animate(child.to, o.duration, o.options.easing, function(){
- if (restore) $.effects.restore(child, props2); // Restore children
- }); // Animate children
- });
- };
-
- // Animate
- el.animate(el.to, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() {
- if(mode == 'hide') el.hide(); // Hide
- $.effects.restore(el, restore ? props : props1); $.effects.removeWrapper(el); // Restore
- if(o.callback) o.callback.apply(this, arguments); // Callback
- el.dequeue();
- }});
-
- });
-
-};
-
-})(jQuery);
-/*
- * jQuery UI Effects Shake
+(function(a){a.effects.drop=function(b){return this.queue(function(){var e=a(this),d=["position","top","left","opacity"];var i=a.effects.setMode(e,b.options.mode||"hide");var h=b.options.direction||"left";a.effects.save(e,d);e.show();a.effects.createWrapper(e);var f=(h=="up"||h=="down")?"top":"left";var c=(h=="up"||h=="left")?"pos":"neg";var j=b.options.distance||(f=="top"?e.outerHeight({margin:true})/2:e.outerWidth({margin:true})/2);if(i=="show"){e.css("opacity",0).css(f,c=="pos"?-j:j)}var g={opacity:i=="show"?1:0};g[f]=(i=="show"?(c=="pos"?"+=":"-="):(c=="pos"?"-=":"+="))+j;e.animate(g,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(i=="hide"){e.hide()}a.effects.restore(e,d);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(this,arguments)}e.dequeue()}})})}})(jQuery);;/*
+ * jQuery UI Effects Explode 1.7.2
*
- * Copyright (c) 2008 Aaron Eisenberger (aaronchi@gmail.com)
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://docs.jquery.com/UI/Effects/Shake
+ *
+ * http://docs.jquery.com/UI/Effects/Explode
*
* Depends:
* effects.core.js
*/
-(function($) {
-
-$.effects.shake = function(o) {
-
- return this.queue(function() {
-
- // Create element
- var el = $(this), props = ['position','top','left'];
-
- // Set options
- var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode
- var direction = o.options.direction || 'left'; // Default direction
- var distance = o.options.distance || 20; // Default distance
- var times = o.options.times || 3; // Default # of times
- var speed = o.duration || o.options.duration || 140; // Default speed per shake
-
- // Adjust
- $.effects.save(el, props); el.show(); // Save & Show
- $.effects.createWrapper(el); // Create Wrapper
- var ref = (direction == 'up' || direction == 'down') ? 'top' : 'left';
- var motion = (direction == 'up' || direction == 'left') ? 'pos' : 'neg';
-
- // Animation
- var animation = {}, animation1 = {}, animation2 = {};
- animation[ref] = (motion == 'pos' ? '-=' : '+=') + distance;
- animation1[ref] = (motion == 'pos' ? '+=' : '-=') + distance * 2;
- animation2[ref] = (motion == 'pos' ? '-=' : '+=') + distance * 2;
-
- // Animate
- el.animate(animation, speed, o.options.easing);
- for (var i = 1; i < times; i++) { // Shakes
- el.animate(animation1, speed, o.options.easing).animate(animation2, speed, o.options.easing);
- };
- el.animate(animation1, speed, o.options.easing).
- animate(animation, speed / 2, o.options.easing, function(){ // Last shake
- $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
- if(o.callback) o.callback.apply(this, arguments); // Callback
- });
- el.queue('fx', function() { el.dequeue(); });
- el.dequeue();
- });
-
-};
-
-})(jQuery);
-/*
- * jQuery UI Effects Slide
+(function(a){a.effects.explode=function(b){return this.queue(function(){var k=b.options.pieces?Math.round(Math.sqrt(b.options.pieces)):3;var e=b.options.pieces?Math.round(Math.sqrt(b.options.pieces)):3;b.options.mode=b.options.mode=="toggle"?(a(this).is(":visible")?"hide":"show"):b.options.mode;var h=a(this).show().css("visibility","hidden");var l=h.offset();l.top-=parseInt(h.css("marginTop"),10)||0;l.left-=parseInt(h.css("marginLeft"),10)||0;var g=h.outerWidth(true);var c=h.outerHeight(true);for(var f=0;f<k;f++){for(var d=0;d<e;d++){h.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-d*(g/e),top:-f*(c/k)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:g/e,height:c/k,left:l.left+d*(g/e)+(b.options.mode=="show"?(d-Math.floor(e/2))*(g/e):0),top:l.top+f*(c/k)+(b.options.mode=="show"?(f-Math.floor(k/2))*(c/k):0),opacity:b.options.mode=="show"?0:1}).animate({left:l.left+d*(g/e)+(b.options.mode=="show"?0:(d-Math.floor(e/2))*(g/e)),top:l.top+f*(c/k)+(b.options.mode=="show"?0:(f-Math.floor(k/2))*(c/k)),opacity:b.options.mode=="show"?1:0},b.duration||500)}}setTimeout(function(){b.options.mode=="show"?h.css({visibility:"visible"}):h.css({visibility:"visible"}).hide();if(b.callback){b.callback.apply(h[0])}h.dequeue();a("div.ui-effects-explode").remove()},b.duration||500)})}})(jQuery);;/*
+ * jQuery UI Effects Fold 1.7.2
*
- * Copyright (c) 2008 Aaron Eisenberger (aaronchi@gmail.com)
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://docs.jquery.com/UI/Effects/Slide
+ *
+ * http://docs.jquery.com/UI/Effects/Fold
*
* Depends:
* effects.core.js
*/
-(function($) {
-
-$.effects.slide = function(o) {
-
- return this.queue(function() {
-
- // Create element
- var el = $(this), props = ['position','top','left'];
-
- // Set options
- var mode = $.effects.setMode(el, o.options.mode || 'show'); // Set Mode
- var direction = o.options.direction || 'left'; // Default Direction
-
- // Adjust
- $.effects.save(el, props); el.show(); // Save & Show
- $.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper
- var ref = (direction == 'up' || direction == 'down') ? 'top' : 'left';
- var motion = (direction == 'up' || direction == 'left') ? 'pos' : 'neg';
- var distance = o.options.distance || (ref == 'top' ? el.outerHeight({margin:true}) : el.outerWidth({margin:true}));
- if (mode == 'show') el.css(ref, motion == 'pos' ? -distance : distance); // Shift
-
- // Animation
- var animation = {};
- animation[ref] = (mode == 'show' ? (motion == 'pos' ? '+=' : '-=') : (motion == 'pos' ? '-=' : '+=')) + distance;
-
- // Animate
- el.animate(animation, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() {
- if(mode == 'hide') el.hide(); // Hide
- $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
- if(o.callback) o.callback.apply(this, arguments); // Callback
- el.dequeue();
- }});
-
- });
-
-};
-
-})(jQuery);
-/*
- * jQuery UI Effects Transfer
+(function(a){a.effects.fold=function(b){return this.queue(function(){var e=a(this),k=["position","top","left"];var h=a.effects.setMode(e,b.options.mode||"hide");var o=b.options.size||15;var n=!(!b.options.horizFirst);var g=b.duration?b.duration/2:a.fx.speeds._default/2;a.effects.save(e,k);e.show();var d=a.effects.createWrapper(e).css({overflow:"hidden"});var i=((h=="show")!=n);var f=i?["width","height"]:["height","width"];var c=i?[d.width(),d.height()]:[d.height(),d.width()];var j=/([0-9]+)%/.exec(o);if(j){o=parseInt(j[1],10)/100*c[h=="hide"?0:1]}if(h=="show"){d.css(n?{height:0,width:o}:{height:o,width:0})}var m={},l={};m[f[0]]=h=="show"?c[0]:o;l[f[1]]=h=="show"?c[1]:0;d.animate(m,g,b.options.easing).animate(l,g,b.options.easing,function(){if(h=="hide"){e.hide()}a.effects.restore(e,k);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(e[0],arguments)}e.dequeue()})})}})(jQuery);;/*
+ * jQuery UI Effects Highlight 1.7.2
*
- * Copyright (c) 2008 Aaron Eisenberger (aaronchi@gmail.com)
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://docs.jquery.com/UI/Effects/Transfer
+ *
+ * http://docs.jquery.com/UI/Effects/Highlight
*
* Depends:
* effects.core.js
*/
-(function($) {
-
-$.effects.transfer = function(o) {
-
- return this.queue(function() {
-
- // Create element
- var el = $(this);
-
- // Set options
- var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode
- var target = $(o.options.to); // Find Target
- var position = el.offset();
- var transfer = $('<div class="ui-effects-transfer"></div>').appendTo(document.body);
- if(o.options.className) transfer.addClass(o.options.className);
-
- // Set target css
- transfer.addClass(o.options.className);
- transfer.css({
- top: position.top,
- left: position.left,
- height: el.outerHeight() - parseInt(transfer.css('borderTopWidth')) - parseInt(transfer.css('borderBottomWidth')),
- width: el.outerWidth() - parseInt(transfer.css('borderLeftWidth')) - parseInt(transfer.css('borderRightWidth')),
- position: 'absolute'
- });
-
- // Animation
- position = target.offset();
- animation = {
- top: position.top,
- left: position.left,
- height: target.outerHeight() - parseInt(transfer.css('borderTopWidth')) - parseInt(transfer.css('borderBottomWidth')),
- width: target.outerWidth() - parseInt(transfer.css('borderLeftWidth')) - parseInt(transfer.css('borderRightWidth'))
- };
-
- // Animate
- transfer.animate(animation, o.duration, o.options.easing, function() {
- transfer.remove(); // Remove div
- if(o.callback) o.callback.apply(el[0], arguments); // Callback
- el.dequeue();
- });
-
- });
-
-};
-
-})(jQuery);
-/*
- * jQuery UI Accordion
- *
- * Copyright (c) 2007, 2008 Jörn Zaefferer
+(function(a){a.effects.highlight=function(b){return this.queue(function(){var e=a(this),d=["backgroundImage","backgroundColor","opacity"];var h=a.effects.setMode(e,b.options.mode||"show");var c=b.options.color||"#ffff99";var g=e.css("backgroundColor");a.effects.save(e,d);e.show();e.css({backgroundImage:"none",backgroundColor:c});var f={backgroundColor:g};if(h=="hide"){f.opacity=0}e.animate(f,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(h=="hide"){e.hide()}a.effects.restore(e,d);if(h=="show"&&a.browser.msie){this.style.removeAttribute("filter")}if(b.callback){b.callback.apply(this,arguments)}e.dequeue()}})})}})(jQuery);;/*
+ * jQuery UI Effects Pulsate 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
- * http://docs.jquery.com/UI/Accordion
+ * http://docs.jquery.com/UI/Effects/Pulsate
*
* Depends:
- * ui.core.js
+ * effects.core.js
*/
-(function($) {
-
-$.widget("ui.accordion", {
- init: function() {
- var options = this.options;
-
- if ( options.navigation ) {
- var current = this.element.find("a").filter(options.navigationFilter);
- if ( current.length ) {
- if ( current.filter(options.header).length ) {
- options.active = current;
- } else {
- options.active = current.parent().parent().prev();
- current.addClass("current");
- }
- }
- }
-
- // calculate active if not specified, using the first header
- options.headers = this.element.find(options.header);
- options.active = findActive(options.headers, options.active);
-
- // IE7-/Win - Extra vertical space in Lists fixed
- if ($.browser.msie) {
- this.element.find('a').css('zoom', '1');
- }
-
- if (!this.element.hasClass("ui-accordion")) {
- this.element.addClass("ui-accordion");
- $("<span class='ui-accordion-left'/>").insertBefore(options.headers);
- $("<span class='ui-accordion-right'/>").appendTo(options.headers);
- options.headers.addClass("ui-accordion-header").attr("tabindex", "0");
- }
-
- var maxHeight;
- if ( options.fillSpace ) {
- maxHeight = this.element.parent().height();
- options.headers.each(function() {
- maxHeight -= $(this).outerHeight();
- });
- var maxPadding = 0;
- options.headers.next().each(function() {
- maxPadding = Math.max(maxPadding, $(this).innerHeight() - $(this).height());
- }).height(maxHeight - maxPadding);
- } else if ( options.autoHeight ) {
- maxHeight = 0;
- options.headers.next().each(function() {
- maxHeight = Math.max(maxHeight, $(this).outerHeight());
- }).height(maxHeight);
- }
-
- options.headers
- .not(options.active || "")
- .next()
- .hide();
- options.active.parent().andSelf().addClass(options.selectedClass);
-
- if (options.event) {
- this.element.bind((options.event) + ".accordion", clickHandler);
- }
- },
- activate: function(index) {
- // call clickHandler with custom event
- clickHandler.call(this.element[0], {
- target: findActive( this.options.headers, index )[0]
- });
- },
- destroy: function() {
- this.options.headers.next().css("display", "");
- if ( this.options.fillSpace || this.options.autoHeight ) {
- this.options.headers.next().css("height", "");
- }
- $.removeData(this.element[0], "accordion");
- this.element.removeClass("ui-accordion").unbind(".accordion");
- }
-});
-
-function scopeCallback(callback, scope) {
- return function() {
- return callback.apply(scope, arguments);
- };
-};
-
-function completed(cancel) {
- // if removed while animated data can be empty
- if (!$.data(this, "accordion")) {
- return;
- }
-
- var instance = $.data(this, "accordion");
- var options = instance.options;
- options.running = cancel ? 0 : --options.running;
- if ( options.running ) {
- return;
- }
- if ( options.clearStyle ) {
- options.toShow.add(options.toHide).css({
- height: "",
- overflow: ""
- });
- }
- $(this).triggerHandler("accordionchange", [$.event.fix({type: 'accordionchange', target: instance.element[0]}), options.data], options.change);
-}
-
-function toggle(toShow, toHide, data, clickedActive, down) {
- var options = $.data(this, "accordion").options;
- options.toShow = toShow;
- options.toHide = toHide;
- options.data = data;
- var complete = scopeCallback(completed, this);
-
- // count elements to animate
- options.running = toHide.size() === 0 ? toShow.size() : toHide.size();
-
- if ( options.animated ) {
- if ( !options.alwaysOpen && clickedActive ) {
- $.ui.accordion.animations[options.animated]({
- toShow: jQuery([]),
- toHide: toHide,
- complete: complete,
- down: down,
- autoHeight: options.autoHeight
- });
- } else {
- $.ui.accordion.animations[options.animated]({
- toShow: toShow,
- toHide: toHide,
- complete: complete,
- down: down,
- autoHeight: options.autoHeight
- });
- }
- } else {
- if ( !options.alwaysOpen && clickedActive ) {
- toShow.toggle();
- } else {
- toHide.hide();
- toShow.show();
- }
- complete(true);
- }
-}
-
-function clickHandler(event) {
- var options = $.data(this, "accordion").options;
- if (options.disabled) {
- return false;
- }
-
- // called only when using activate(false) to close all parts programmatically
- if ( !event.target && !options.alwaysOpen ) {
- options.active.parent().andSelf().toggleClass(options.selectedClass);
- var toHide = options.active.next(),
- data = {
- options: options,
- newHeader: jQuery([]),
- oldHeader: options.active,
- newContent: jQuery([]),
- oldContent: toHide
- },
- toShow = (options.active = $([]));
- toggle.call(this, toShow, toHide, data );
- return false;
- }
- // get the click target
- var clicked = $(event.target);
-
- // due to the event delegation model, we have to check if one
- // of the parent elements is our actual header, and find that
- // otherwise stick with the initial target
- clicked = $( clicked.parents(options.header)[0] || clicked );
-
- var clickedActive = clicked[0] == options.active[0];
-
- // if animations are still active, or the active header is the target, ignore click
- if (options.running || (options.alwaysOpen && clickedActive)) {
- return false;
- }
- if (!clicked.is(options.header)) {
- return;
- }
-
- // switch classes
- options.active.parent().andSelf().toggleClass(options.selectedClass);
- if ( !clickedActive ) {
- clicked.parent().andSelf().addClass(options.selectedClass);
- }
-
- // find elements to show and hide
- var toShow = clicked.next(),
- toHide = options.active.next(),
- //data = [clicked, options.active, toShow, toHide],
- data = {
- options: options,
- newHeader: clicked,
- oldHeader: options.active,
- newContent: toShow,
- oldContent: toHide
- },
- down = options.headers.index( options.active[0] ) > options.headers.index( clicked[0] );
-
- options.active = clickedActive ? $([]) : clicked;
- toggle.call(this, toShow, toHide, data, clickedActive, down );
-
- return false;
-};
-
-function findActive(headers, selector) {
- return selector != undefined
- ? typeof selector == "number"
- ? headers.filter(":eq(" + selector + ")")
- : headers.not(headers.not(selector))
- : selector === false
- ? $([])
- : headers.filter(":eq(0)");
-}
-
-$.extend($.ui.accordion, {
- defaults: {
- selectedClass: "selected",
- alwaysOpen: true,
- animated: 'slide',
- event: "click",
- header: "a",
- autoHeight: true,
- running: 0,
- navigationFilter: function() {
- return this.href.toLowerCase() == location.href.toLowerCase();
- }
- },
- animations: {
- slide: function(options, additions) {
- options = $.extend({
- easing: "swing",
- duration: 300
- }, options, additions);
- if ( !options.toHide.size() ) {
- options.toShow.animate({height: "show"}, options);
- return;
- }
- var hideHeight = options.toHide.height(),
- showHeight = options.toShow.height(),
- difference = showHeight / hideHeight;
- options.toShow.css({ height: 0, overflow: 'hidden' }).show();
- options.toHide.filter(":hidden").each(options.complete).end().filter(":visible").animate({height:"hide"},{
- step: function(now) {
- var current = (hideHeight - now) * difference;
- if ($.browser.msie || $.browser.opera) {
- current = Math.ceil(current);
- }
- options.toShow.height( current );
- },
- duration: options.duration,
- easing: options.easing,
- complete: function() {
- if ( !options.autoHeight ) {
- options.toShow.css("height", "auto");
- }
- options.complete();
- }
- });
- },
- bounceslide: function(options) {
- this.slide(options, {
- easing: options.down ? "bounceout" : "swing",
- duration: options.down ? 1000 : 200
- });
- },
- easeslide: function(options) {
- this.slide(options, {
- easing: "easeinout",
- duration: 700
- });
- }
- }
-});
-
-// deprecated, use accordion("activate", index) instead
-$.fn.activate = function(index) {
- return this.accordion("activate", index);
-};
-
-})(jQuery);
-/*
- * jQuery UI Datepicker
+(function(a){a.effects.pulsate=function(b){return this.queue(function(){var d=a(this);var g=a.effects.setMode(d,b.options.mode||"show");var f=b.options.times||5;var e=b.duration?b.duration/2:a.fx.speeds._default/2;if(g=="hide"){f--}if(d.is(":hidden")){d.css("opacity",0);d.show();d.animate({opacity:1},e,b.options.easing);f=f-2}for(var c=0;c<f;c++){d.animate({opacity:0},e,b.options.easing).animate({opacity:1},e,b.options.easing)}if(g=="hide"){d.animate({opacity:0},e,b.options.easing,function(){d.hide();if(b.callback){b.callback.apply(this,arguments)}})}else{d.animate({opacity:0},e,b.options.easing).animate({opacity:1},e,b.options.easing,function(){if(b.callback){b.callback.apply(this,arguments)}})}d.queue("fx",function(){d.dequeue()});d.dequeue()})}})(jQuery);;/*
+ * jQuery UI Effects Scale 1.7.2
*
- * Copyright (c) 2006, 2007, 2008 Marc Grabanski
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://docs.jquery.com/UI/Datepicker
*
- * Depends:
- * ui.core.js
+ * http://docs.jquery.com/UI/Effects/Scale
*
- * Marc Grabanski (m@marcgrabanski.com) and Keith Wood (kbwood@virginbroadband.com.au).
+ * Depends:
+ * effects.core.js
*/
-
-(function($) { // hide the namespace
-
-var PROP_NAME = 'datepicker';
-
-/* Date picker manager.
- Use the singleton instance of this class, $.datepicker, to interact with the date picker.
- Settings for (groups of) date pickers are maintained in an instance object,
- allowing multiple different settings on the same page. */
-
-function Datepicker() {
- this.debug = false; // Change this to true to start debugging
- this._curInst = null; // The current instance in use
- this._disabledInputs = []; // List of date picker inputs that have been disabled
- this._datepickerShowing = false; // True if the popup picker is showing , false if not
- this._inDialog = false; // True if showing within a "dialog", false if not
- this._mainDivId = 'ui-datepicker-div'; // The ID of the main datepicker division
- this._appendClass = 'ui-datepicker-append'; // The name of the append marker class
- this._triggerClass = 'ui-datepicker-trigger'; // The name of the trigger marker class
- this._dialogClass = 'ui-datepicker-dialog'; // The name of the dialog marker class
- this._promptClass = 'ui-datepicker-prompt'; // The name of the dialog prompt marker class
- this._unselectableClass = 'ui-datepicker-unselectable'; // The name of the unselectable cell marker class
- this._currentClass = 'ui-datepicker-current-day'; // The name of the current day marker class
- this.regional = []; // Available regional settings, indexed by language code
- this.regional[''] = { // Default regional settings
- clearText: 'Clear', // Display text for clear link
- clearStatus: 'Erase the current date', // Status text for clear link
- closeText: 'Close', // Display text for close link
- closeStatus: 'Close without change', // Status text for close link
- prevText: '&#x3c;Prev', // Display text for previous month link
- prevStatus: 'Show the previous month', // Status text for previous month link
- nextText: 'Next&#x3e;', // Display text for next month link
- nextStatus: 'Show the next month', // Status text for next month link
- currentText: 'Today', // Display text for current month link
- currentStatus: 'Show the current month', // Status text for current month link
- monthNames: ['January','February','March','April','May','June',
- 'July','August','September','October','November','December'], // Names of months for drop-down and formatting
- monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], // For formatting
- monthStatus: 'Show a different month', // Status text for selecting a month
- yearStatus: 'Show a different year', // Status text for selecting a year
- weekHeader: 'Wk', // Header for the week of the year column
- weekStatus: 'Week of the year', // Status text for the week of the year column
- dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], // For formatting
- dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], // For formatting
- dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'], // Column headings for days starting at Sunday
- dayStatus: 'Set DD as first week day', // Status text for the day of the week selection
- dateStatus: 'Select DD, M d', // Status text for the date selection
- dateFormat: 'mm/dd/yy', // See format options on parseDate
- firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ...
- initStatus: 'Select a date', // Initial Status text on opening
- isRTL: false // True if right-to-left language, false if left-to-right
- };
- this._defaults = { // Global defaults for all the date picker instances
- showOn: 'focus', // 'focus' for popup on focus,
- // 'button' for trigger button, or 'both' for either
- showAnim: 'show', // Name of jQuery animation for popup
- showOptions: {}, // Options for enhanced animations
- defaultDate: null, // Used when field is blank: actual date,
- // +/-number for offset from today, null for today
- appendText: '', // Display text following the input box, e.g. showing the format
- buttonText: '...', // Text for trigger button
- buttonImage: '', // URL for trigger button image
- buttonImageOnly: false, // True if the image appears alone, false if it appears on a button
- closeAtTop: true, // True to have the clear/close at the top,
- // false to have them at the bottom
- mandatory: false, // True to hide the Clear link, false to include it
- hideIfNoPrevNext: false, // True to hide next/previous month links
- // if not applicable, false to just disable them
- navigationAsDateFormat: false, // True if date formatting applied to prev/today/next links
- gotoCurrent: false, // True if today link goes back to current selection instead
- changeMonth: true, // True if month can be selected directly, false if only prev/next
- changeYear: true, // True if year can be selected directly, false if only prev/next
- yearRange: '-10:+10', // Range of years to display in drop-down,
- // either relative to current year (-nn:+nn) or absolute (nnnn:nnnn)
- changeFirstDay: true, // True to click on day name to change, false to remain as set
- highlightWeek: false, // True to highlight the selected week
- showOtherMonths: false, // True to show dates in other months, false to leave blank
- showWeeks: false, // True to show week of the year, false to omit
- calculateWeek: this.iso8601Week, // How to calculate the week of the year,
- // takes a Date and returns the number of the week for it
- shortYearCutoff: '+10', // Short year values < this are in the current century,
- // > this are in the previous century,
- // string value starting with '+' for current year + value
- showStatus: false, // True to show status bar at bottom, false to not show it
- statusForDate: this.dateStatus, // Function to provide status text for a date -
- // takes date and instance as parameters, returns display text
- minDate: null, // The earliest selectable date, or null for no limit
- maxDate: null, // The latest selectable date, or null for no limit
- duration: 'normal', // Duration of display/closure
- beforeShowDay: null, // Function that takes a date and returns an array with
- // [0] = true if selectable, false if not, [1] = custom CSS class name(s) or '',
- // [2] = cell title (optional), e.g. $.datepicker.noWeekends
- beforeShow: null, // Function that takes an input field and
- // returns a set of custom settings for the date picker
- onSelect: null, // Define a callback function when a date is selected
- onChangeMonthYear: null, // Define a callback function when the month or year is changed
- onClose: null, // Define a callback function when the datepicker is closed
- numberOfMonths: 1, // Number of months to show at a time
- stepMonths: 1, // Number of months to step back/forward
- rangeSelect: false, // Allows for selecting a date range on one date picker
- rangeSeparator: ' - ', // Text between two dates in a range
- altField: '', // Selector for an alternate field to store selected dates into
- altFormat: '' // The date format to use for the alternate field
- };
- $.extend(this._defaults, this.regional['']);
- this.dpDiv = $('<div id="' + this._mainDivId + '" style="display: none;"></div>');
-}
-
-$.extend(Datepicker.prototype, {
- /* Class name added to elements to indicate already configured with a date picker. */
- markerClassName: 'hasDatepicker',
-
- /* Debug logging (if enabled). */
- log: function () {
- if (this.debug)
- console.log.apply('', arguments);
- },
-
- /* Override the default settings for all instances of the date picker.
- @param settings object - the new settings to use as defaults (anonymous object)
- @return the manager object */
- setDefaults: function(settings) {
- extendRemove(this._defaults, settings || {});
- return this;
- },
-
- /* Attach the date picker to a jQuery selection.
- @param target element - the target input field or division or span
- @param settings object - the new settings to use for this date picker instance (anonymous) */
- _attachDatepicker: function(target, settings) {
- // check for settings on the control itself - in namespace 'date:'
- var inlineSettings = null;
- for (attrName in this._defaults) {
- var attrValue = target.getAttribute('date:' + attrName);
- if (attrValue) {
- inlineSettings = inlineSettings || {};
- try {
- inlineSettings[attrName] = eval(attrValue);
- } catch (err) {
- inlineSettings[attrName] = attrValue;
- }
- }
- }
- var nodeName = target.nodeName.toLowerCase();
- var inline = (nodeName == 'div' || nodeName == 'span');
- if (!target.id)
- target.id = 'dp' + new Date().getTime();
- var inst = this._newInst($(target), inline);
- inst.settings = $.extend({}, settings || {}, inlineSettings || {});
- if (nodeName == 'input') {
- this._connectDatepicker(target, inst);
- } else if (inline) {
- this._inlineDatepicker(target, inst);
- }
- },
-
- /* Create a new instance object. */
- _newInst: function(target, inline) {
- return {id: target[0].id, input: target, // associated target
- selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection
- drawMonth: 0, drawYear: 0, // month being drawn
- inline: inline, // is datepicker inline or not
- dpDiv: (!inline ? this.dpDiv : // presentation div
- $('<div class="ui-datepicker-inline"></div>'))};
- },
-
- /* Attach the date picker to an input field. */
- _connectDatepicker: function(target, inst) {
- var input = $(target);
- if (input.hasClass(this.markerClassName))
- return;
- var appendText = this._get(inst, 'appendText');
- var isRTL = this._get(inst, 'isRTL');
- if (appendText)
- input[isRTL ? 'before' : 'after']('<span class="' + this._appendClass + '">' + appendText + '</span>');
- var showOn = this._get(inst, 'showOn');
- if (showOn == 'focus' || showOn == 'both') // pop-up date picker when in the marked field
- input.focus(this._showDatepicker);
- if (showOn == 'button' || showOn == 'both') { // pop-up date picker when button clicked
- var buttonText = this._get(inst, 'buttonText');
- var buttonImage = this._get(inst, 'buttonImage');
- var trigger = $(this._get(inst, 'buttonImageOnly') ?
- $('<img/>').addClass(this._triggerClass).
- attr({ src: buttonImage, alt: buttonText, title: buttonText }) :
- $('<button type="button"></button>').addClass(this._triggerClass).
- html(buttonImage == '' ? buttonText : $('<img/>').attr(
- { src:buttonImage, alt:buttonText, title:buttonText })));
- input[isRTL ? 'before' : 'after'](trigger);
- trigger.click(function() {
- if ($.datepicker._datepickerShowing && $.datepicker._lastInput == target)
- $.datepicker._hideDatepicker();
- else
- $.datepicker._showDatepicker(target);
- return false;
- });
- }
- input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).
- bind("setData.datepicker", function(event, key, value) {
- inst.settings[key] = value;
- }).bind("getData.datepicker", function(event, key) {
- return this._get(inst, key);
- });
- $.data(target, PROP_NAME, inst);
- },
-
- /* Attach an inline date picker to a div. */
- _inlineDatepicker: function(target, inst) {
- var input = $(target);
- if (input.hasClass(this.markerClassName))
- return;
- input.addClass(this.markerClassName).append(inst.dpDiv).
- bind("setData.datepicker", function(event, key, value){
- inst.settings[key] = value;
- }).bind("getData.datepicker", function(event, key){
- return this._get(inst, key);
- });
- $.data(target, PROP_NAME, inst);
- this._setDate(inst, this._getDefaultDate(inst));
- this._updateDatepicker(inst);
- },
-
- /* Pop-up the date picker in a "dialog" box.
- @param input element - ignored
- @param dateText string - the initial date to display (in the current format)
- @param onSelect function - the function(dateText) to call when a date is selected
- @param settings object - update the dialog date picker instance's settings (anonymous object)
- @param pos int[2] - coordinates for the dialog's position within the screen or
- event - with x/y coordinates or
- leave empty for default (screen centre)
- @return the manager object */
- _dialogDatepicker: function(input, dateText, onSelect, settings, pos) {
- var inst = this._dialogInst; // internal instance
- if (!inst) {
- var id = 'dp' + new Date().getTime();
- this._dialogInput = $('<input type="text" id="' + id +
- '" size="1" style="position: absolute; top: -100px;"/>');
- this._dialogInput.keydown(this._doKeyDown);
- $('body').append(this._dialogInput);
- inst = this._dialogInst = this._newInst(this._dialogInput, false);
- inst.settings = {};
- $.data(this._dialogInput[0], PROP_NAME, inst);
- }
- extendRemove(inst.settings, settings || {});
- this._dialogInput.val(dateText);
-
- this._pos = (pos ? (pos.length ? pos : [pos.pageX, pos.pageY]) : null);
- if (!this._pos) {
- var browserWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
- var browserHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
- var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
- var scrollY = document.documentElement.scrollTop || document.body.scrollTop;
- this._pos = // should use actual width/height below
- [(browserWidth / 2) - 100 + scrollX, (browserHeight / 2) - 150 + scrollY];
- }
-
- // move input on screen for focus, but hidden behind dialog
- this._dialogInput.css('left', this._pos[0] + 'px').css('top', this._pos[1] + 'px');
- inst.settings.onSelect = onSelect;
- this._inDialog = true;
- this.dpDiv.addClass(this._dialogClass);
- this._showDatepicker(this._dialogInput[0]);
- if ($.blockUI)
- $.blockUI(this.dpDiv);
- $.data(this._dialogInput[0], PROP_NAME, inst);
- return this;
- },
-
- /* Detach a datepicker from its control.
- @param target element - the target input field or division or span */
- _destroyDatepicker: function(target) {
- var nodeName = target.nodeName.toLowerCase();
- var $target = $(target);
- $.removeData(target, PROP_NAME);
- if (nodeName == 'input') {
- $target.siblings('.' + this._appendClass).remove().end().
- siblings('.' + this._triggerClass).remove().end().
- removeClass(this.markerClassName).
- unbind('focus', this._showDatepicker).
- unbind('keydown', this._doKeyDown).
- unbind('keypress', this._doKeyPress);
- } else if (nodeName == 'div' || nodeName == 'span')
- $target.removeClass(this.markerClassName).empty();
- },
-
- /* Enable the date picker to a jQuery selection.
- @param target element - the target input field or division or span */
- _enableDatepicker: function(target) {
- target.disabled = false;
- $(target).siblings('button.' + this._triggerClass).each(function() { this.disabled = false; }).end().
- siblings('img.' + this._triggerClass).css({opacity: '1.0', cursor: ''});
- this._disabledInputs = $.map(this._disabledInputs,
- function(value) { return (value == target ? null : value); }); // delete entry
- },
-
- /* Disable the date picker to a jQuery selection.
- @param target element - the target input field or division or span */
- _disableDatepicker: function(target) {
- target.disabled = true;
- $(target).siblings('button.' + this._triggerClass).each(function() { this.disabled = true; }).end().
- siblings('img.' + this._triggerClass).css({opacity: '0.5', cursor: 'default'});
- this._disabledInputs = $.map(this._disabledInputs,
- function(value) { return (value == target ? null : value); }); // delete entry
- this._disabledInputs[this._disabledInputs.length] = target;
- },
-
- /* Is the first field in a jQuery collection disabled as a datepicker?
- @param target element - the target input field or division or span
- @return boolean - true if disabled, false if enabled */
- _isDisabledDatepicker: function(target) {
- if (!target)
- return false;
- for (var i = 0; i < this._disabledInputs.length; i++) {
- if (this._disabledInputs[i] == target)
- return true;
- }
- return false;
- },
-
- /* Update the settings for a date picker attached to an input field or division.
- @param target element - the target input field or division or span
- @param name object - the new settings to update or
- string - the name of the setting to change or
- @param value any - the new value for the setting (omit if above is an object) */
- _changeDatepicker: function(target, name, value) {
- var settings = name || {};
- if (typeof name == 'string') {
- settings = {};
- settings[name] = value;
- }
- if (inst = $.data(target, PROP_NAME)) {
- extendRemove(inst.settings, settings);
- this._updateDatepicker(inst);
- }
- },
-
- /* Set the dates for a jQuery selection.
- @param target element - the target input field or division or span
- @param date Date - the new date
- @param endDate Date - the new end date for a range (optional) */
- _setDateDatepicker: function(target, date, endDate) {
- var inst = $.data(target, PROP_NAME);
- if (inst) {
- this._setDate(inst, date, endDate);
- this._updateDatepicker(inst);
- }
- },
-
- /* Get the date(s) for the first entry in a jQuery selection.
- @param target element - the target input field or division or span
- @return Date - the current date or
- Date[2] - the current dates for a range */
- _getDateDatepicker: function(target) {
- var inst = $.data(target, PROP_NAME);
- if (inst)
- this._setDateFromField(inst);
- return (inst ? this._getDate(inst) : null);
- },
-
- /* Handle keystrokes. */
- _doKeyDown: function(e) {
- var inst = $.data(e.target, PROP_NAME);
- var handled = true;
- if ($.datepicker._datepickerShowing)
- switch (e.keyCode) {
- case 9: $.datepicker._hideDatepicker(null, '');
- break; // hide on tab out
- case 13: $.datepicker._selectDay(e.target, inst.selectedMonth, inst.selectedYear,
- $('td.ui-datepicker-days-cell-over', inst.dpDiv)[0]);
- return false; // don't submit the form
- break; // select the value on enter
- case 27: $.datepicker._hideDatepicker(null, $.datepicker._get(inst, 'duration'));
- break; // hide on escape
- case 33: $.datepicker._adjustDate(e.target, (e.ctrlKey ? -1 :
- -$.datepicker._get(inst, 'stepMonths')), (e.ctrlKey ? 'Y' : 'M'));
- break; // previous month/year on page up/+ ctrl
- case 34: $.datepicker._adjustDate(e.target, (e.ctrlKey ? +1 :
- +$.datepicker._get(inst, 'stepMonths')), (e.ctrlKey ? 'Y' : 'M'));
- break; // next month/year on page down/+ ctrl
- case 35: if (e.ctrlKey) $.datepicker._clearDate(e.target);
- break; // clear on ctrl+end
- case 36: if (e.ctrlKey) $.datepicker._gotoToday(e.target);
- break; // current on ctrl+home
- case 37: if (e.ctrlKey) $.datepicker._adjustDate(e.target, -1, 'D');
- break; // -1 day on ctrl+left
- case 38: if (e.ctrlKey) $.datepicker._adjustDate(e.target, -7, 'D');
- break; // -1 week on ctrl+up
- case 39: if (e.ctrlKey) $.datepicker._adjustDate(e.target, +1, 'D');
- break; // +1 day on ctrl+right
- case 40: if (e.ctrlKey) $.datepicker._adjustDate(e.target, +7, 'D');
- break; // +1 week on ctrl+down
- default: handled = false;
- }
- else if (e.keyCode == 36 && e.ctrlKey) // display the date picker on ctrl+home
- $.datepicker._showDatepicker(this);
- else
- handled = false;
- if (handled) {
- e.preventDefault();
- e.stopPropagation();
- }
- },
-
- /* Filter entered characters - based on date format. */
- _doKeyPress: function(e) {
- var inst = $.data(e.target, PROP_NAME);
- var chars = $.datepicker._possibleChars($.datepicker._get(inst, 'dateFormat'));
- var chr = String.fromCharCode(e.charCode == undefined ? e.keyCode : e.charCode);
- return e.ctrlKey || (chr < ' ' || !chars || chars.indexOf(chr) > -1);
- },
-
- /* Pop-up the date picker for a given input field.
- @param input element - the input field attached to the date picker or
- event - if triggered by focus */
- _showDatepicker: function(input) {
- input = input.target || input;
- if (input.nodeName.toLowerCase() != 'input') // find from button/image trigger
- input = $('input', input.parentNode)[0];
- if ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput == input) // already here
- return;
- var inst = $.data(input, PROP_NAME);
- var beforeShow = $.datepicker._get(inst, 'beforeShow');
- extendRemove(inst.settings, (beforeShow ? beforeShow.apply(input, [input, inst]) : {}));
- $.datepicker._hideDatepicker(null, '');
- $.datepicker._lastInput = input;
- $.datepicker._setDateFromField(inst);
- if ($.datepicker._inDialog) // hide cursor
- input.value = '';
- if (!$.datepicker._pos) { // position below input
- $.datepicker._pos = $.datepicker._findPos(input);
- $.datepicker._pos[1] += input.offsetHeight; // add the height
- }
- var isFixed = false;
- $(input).parents().each(function() {
- isFixed |= $(this).css('position') == 'fixed';
- return !isFixed;
- });
- if (isFixed && $.browser.opera) { // correction for Opera when fixed and scrolled
- $.datepicker._pos[0] -= document.documentElement.scrollLeft;
- $.datepicker._pos[1] -= document.documentElement.scrollTop;
- }
- var offset = {left: $.datepicker._pos[0], top: $.datepicker._pos[1]};
- $.datepicker._pos = null;
- inst.rangeStart = null;
- // determine sizing offscreen
- inst.dpDiv.css({position: 'absolute', display: 'block', top: '-1000px'});
- $.datepicker._updateDatepicker(inst);
- // fix width for dynamic number of date pickers
- inst.dpDiv.width($.datepicker._getNumberOfMonths(inst)[1] *
- $('.ui-datepicker', inst.dpDiv[0])[0].offsetWidth);
- // and adjust position before showing
- offset = $.datepicker._checkOffset(inst, offset, isFixed);
- inst.dpDiv.css({position: ($.datepicker._inDialog && $.blockUI ?
- 'static' : (isFixed ? 'fixed' : 'absolute')), display: 'none',
- left: offset.left + 'px', top: offset.top + 'px'});
- if (!inst.inline) {
- var showAnim = $.datepicker._get(inst, 'showAnim') || 'show';
- var duration = $.datepicker._get(inst, 'duration');
- var postProcess = function() {
- $.datepicker._datepickerShowing = true;
- if ($.browser.msie && parseInt($.browser.version) < 7) // fix IE < 7 select problems
- $('iframe.ui-datepicker-cover').css({width: inst.dpDiv.width() + 4,
- height: inst.dpDiv.height() + 4});
- };
- if ($.effects && $.effects[showAnim])
- inst.dpDiv.show(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess);
- else
- inst.dpDiv[showAnim](duration, postProcess);
- if (duration == '')
- postProcess();
- if (inst.input[0].type != 'hidden')
- inst.input[0].focus();
- $.datepicker._curInst = inst;
- }
- },
-
- /* Generate the date picker content. */
- _updateDatepicker: function(inst) {
- var dims = {width: inst.dpDiv.width() + 4,
- height: inst.dpDiv.height() + 4};
- inst.dpDiv.empty().append(this._generateDatepicker(inst)).
- find('iframe.ui-datepicker-cover').
- css({width: dims.width, height: dims.height});
- var numMonths = this._getNumberOfMonths(inst);
- inst.dpDiv[(numMonths[0] != 1 || numMonths[1] != 1 ? 'add' : 'remove') +
- 'Class']('ui-datepicker-multi');
- inst.dpDiv[(this._get(inst, 'isRTL') ? 'add' : 'remove') +
- 'Class']('ui-datepicker-rtl');
- if (inst.input && inst.input[0].type != 'hidden')
- $(inst.input[0]).focus();
- },
-
- /* Check positioning to remain on screen. */
- _checkOffset: function(inst, offset, isFixed) {
- var pos = inst.input ? this._findPos(inst.input[0]) : null;
- var browserWidth = window.innerWidth || document.documentElement.clientWidth;
- var browserHeight = window.innerHeight || document.documentElement.clientHeight;
- var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
- var scrollY = document.documentElement.scrollTop || document.body.scrollTop;
- // reposition date picker horizontally if outside the browser window
- if (this._get(inst, 'isRTL') || (offset.left + inst.dpDiv.width() - scrollX) > browserWidth)
- offset.left = Math.max((isFixed ? 0 : scrollX),
- pos[0] + (inst.input ? inst.input.width() : 0) - (isFixed ? scrollX : 0) - inst.dpDiv.width() -
- (isFixed && $.browser.opera ? document.documentElement.scrollLeft : 0));
- else
- offset.left -= (isFixed ? scrollX : 0);
- // reposition date picker vertically if outside the browser window
- if ((offset.top + inst.dpDiv.height() - scrollY) > browserHeight)
- offset.top = Math.max((isFixed ? 0 : scrollY),
- pos[1] - (isFixed ? scrollY : 0) - (this._inDialog ? 0 : inst.dpDiv.height()) -
- (isFixed && $.browser.opera ? document.documentElement.scrollTop : 0));
- else
- offset.top -= (isFixed ? scrollY : 0);
- return offset;
- },
-
- /* Find an object's position on the screen. */
- _findPos: function(obj) {
- while (obj && (obj.type == 'hidden' || obj.nodeType != 1)) {
- obj = obj.nextSibling;
- }
- var position = $(obj).offset();
- return [position.left, position.top];
- },
-
- /* Hide the date picker from view.
- @param input element - the input field attached to the date picker
- @param duration string - the duration over which to close the date picker */
- _hideDatepicker: function(input, duration) {
- var inst = this._curInst;
- if (!inst)
- return;
- var rangeSelect = this._get(inst, 'rangeSelect');
- if (rangeSelect && this._stayOpen)
- this._selectDate('#' + inst.id, this._formatDate(inst,
- inst.currentDay, inst.currentMonth, inst.currentYear));
- this._stayOpen = false;
- if (this._datepickerShowing) {
- duration = (duration != null ? duration : this._get(inst, 'duration'));
- var showAnim = this._get(inst, 'showAnim');
- var postProcess = function() {
- $.datepicker._tidyDialog(inst);
- };
- if (duration != '' && $.effects && $.effects[showAnim])
- inst.dpDiv.hide(showAnim, $.datepicker._get(inst, 'showOptions'),
- duration, postProcess);
- else
- inst.dpDiv[(duration == '' ? 'hide' : (showAnim == 'slideDown' ? 'slideUp' :
- (showAnim == 'fadeIn' ? 'fadeOut' : 'hide')))](duration, postProcess);
- if (duration == '')
- this._tidyDialog(inst);
- var onClose = this._get(inst, 'onClose');
- if (onClose)
- onClose.apply((inst.input ? inst.input[0] : null),
- [this._getDate(inst), inst]); // trigger custom callback
- this._datepickerShowing = false;
- this._lastInput = null;
- inst.settings.prompt = null;
- if (this._inDialog) {
- this._dialogInput.css({ position: 'absolute', left: '0', top: '-100px' });
- if ($.blockUI) {
- $.unblockUI();
- $('body').append(this.dpDiv);
- }
- }
- this._inDialog = false;
- }
- this._curInst = null;
- },
-
- /* Tidy up after a dialog display. */
- _tidyDialog: function(inst) {
- inst.dpDiv.removeClass(this._dialogClass).unbind('.ui-datepicker');
- $('.' + this._promptClass, inst.dpDiv).remove();
- },
-
- /* Close date picker if clicked elsewhere. */
- _checkExternalClick: function(event) {
- if (!$.datepicker._curInst)
- return;
- var $target = $(event.target);
- if (($target.parents('#' + $.datepicker._mainDivId).length == 0) &&
- !$target.hasClass($.datepicker.markerClassName) &&
- !$target.hasClass($.datepicker._triggerClass) &&
- $.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI))
- $.datepicker._hideDatepicker(null, '');
- },
-
- /* Adjust one of the date sub-fields. */
- _adjustDate: function(id, offset, period) {
- var target = $(id);
- var inst = $.data(target[0], PROP_NAME);
- this._adjustInstDate(inst, offset, period);
- this._updateDatepicker(inst);
- },
-
- /* Action for current link. */
- _gotoToday: function(id) {
- var target = $(id);
- var inst = $.data(target[0], PROP_NAME);
- if (this._get(inst, 'gotoCurrent') && inst.currentDay) {
- inst.selectedDay = inst.currentDay;
- inst.drawMonth = inst.selectedMonth = inst.currentMonth;
- inst.drawYear = inst.selectedYear = inst.currentYear;
- }
- else {
- var date = new Date();
- inst.selectedDay = date.getDate();
- inst.drawMonth = inst.selectedMonth = date.getMonth();
- inst.drawYear = inst.selectedYear = date.getFullYear();
- }
- this._adjustDate(target);
- this._notifyChange(inst);
- },
-
- /* Action for selecting a new month/year. */
- _selectMonthYear: function(id, select, period) {
- var target = $(id);
- var inst = $.data(target[0], PROP_NAME);
- inst._selectingMonthYear = false;
- inst[period == 'M' ? 'drawMonth' : 'drawYear'] =
- select.options[select.selectedIndex].value - 0;
- this._adjustDate(target);
- this._notifyChange(inst);
- },
-
- /* Restore input focus after not changing month/year. */
- _clickMonthYear: function(id) {
- var target = $(id);
- var inst = $.data(target[0], PROP_NAME);
- if (inst.input && inst._selectingMonthYear && !$.browser.msie)
- inst.input[0].focus();
- inst._selectingMonthYear = !inst._selectingMonthYear;
- },
-
- /* Action for changing the first week day. */
- _changeFirstDay: function(id, day) {
- var target = $(id);
- var inst = $.data(target[0], PROP_NAME);
- inst.settings.firstDay = day;
- this._updateDatepicker(inst);
- },
-
- /* Action for selecting a day. */
- _selectDay: function(id, month, year, td) {
- if ($(td).hasClass(this._unselectableClass))
- return;
- var target = $(id);
- var inst = $.data(target[0], PROP_NAME);
- var rangeSelect = this._get(inst, 'rangeSelect');
- if (rangeSelect) {
- this._stayOpen = !this._stayOpen;
- if (this._stayOpen) {
- $('.ui-datepicker td').removeClass(this._currentClass);
- $(td).addClass(this._currentClass);
- }
- }
- inst.selectedDay = inst.currentDay = $('a', td).html();
- inst.selectedMonth = inst.currentMonth = month;
- inst.selectedYear = inst.currentYear = year;
- if (this._stayOpen) {
- inst.endDay = inst.endMonth = inst.endYear = null;
- }
- else if (rangeSelect) {
- inst.endDay = inst.currentDay;
- inst.endMonth = inst.currentMonth;
- inst.endYear = inst.currentYear;
- }
- this._selectDate(id, this._formatDate(inst,
- inst.currentDay, inst.currentMonth, inst.currentYear));
- if (this._stayOpen) {
- inst.rangeStart = this._daylightSavingAdjust(
- new Date(inst.currentYear, inst.currentMonth, inst.currentDay));
- this._updateDatepicker(inst);
- }
- else if (rangeSelect) {
- inst.selectedDay = inst.currentDay = inst.rangeStart.getDate();
- inst.selectedMonth = inst.currentMonth = inst.rangeStart.getMonth();
- inst.selectedYear = inst.currentYear = inst.rangeStart.getFullYear();
- inst.rangeStart = null;
- if (inst.inline)
- this._updateDatepicker(inst);
- }
- },
-
- /* Erase the input field and hide the date picker. */
- _clearDate: function(id) {
- var target = $(id);
- var inst = $.data(target[0], PROP_NAME);
- if (this._get(inst, 'mandatory'))
- return;
- this._stayOpen = false;
- inst.endDay = inst.endMonth = inst.endYear = inst.rangeStart = null;
- this._selectDate(target, '');
- },
-
- /* Update the input field with the selected date. */
- _selectDate: function(id, dateStr) {
- var target = $(id);
- var inst = $.data(target[0], PROP_NAME);
- dateStr = (dateStr != null ? dateStr : this._formatDate(inst));
- if (this._get(inst, 'rangeSelect') && dateStr)
- dateStr = (inst.rangeStart ? this._formatDate(inst, inst.rangeStart) :
- dateStr) + this._get(inst, 'rangeSeparator') + dateStr;
- if (inst.input)
- inst.input.val(dateStr);
- this._updateAlternate(inst);
- var onSelect = this._get(inst, 'onSelect');
- if (onSelect)
- onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]); // trigger custom callback
- else if (inst.input)
- inst.input.trigger('change'); // fire the change event
- if (inst.inline)
- this._updateDatepicker(inst);
- else if (!this._stayOpen) {
- this._hideDatepicker(null, this._get(inst, 'duration'));
- this._lastInput = inst.input[0];
- if (typeof(inst.input[0]) != 'object')
- inst.input[0].focus(); // restore focus
- this._lastInput = null;
- }
- },
-
- /* Update any alternate field to synchronise with the main field. */
- _updateAlternate: function(inst) {
- var altField = this._get(inst, 'altField');
- if (altField) { // update alternate field too
- var altFormat = this._get(inst, 'altFormat');
- var date = this._getDate(inst);
- dateStr = (isArray(date) ? (!date[0] && !date[1] ? '' :
- this.formatDate(altFormat, date[0], this._getFormatConfig(inst)) +
- this._get(inst, 'rangeSeparator') + this.formatDate(
- altFormat, date[1] || date[0], this._getFormatConfig(inst))) :
- this.formatDate(altFormat, date, this._getFormatConfig(inst)));
- $(altField).each(function() { $(this).val(dateStr); });
- }
- },
-
- /* Set as beforeShowDay function to prevent selection of weekends.
- @param date Date - the date to customise
- @return [boolean, string] - is this date selectable?, what is its CSS class? */
- noWeekends: function(date) {
- var day = date.getDay();
- return [(day > 0 && day < 6), ''];
- },
-
- /* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition.
- @param date Date - the date to get the week for
- @return number - the number of the week within the year that contains this date */
- iso8601Week: function(date) {
- var checkDate = new Date(date.getFullYear(), date.getMonth(), date.getDate());
- var firstMon = new Date(checkDate.getFullYear(), 1 - 1, 4); // First week always contains 4 Jan
- var firstDay = firstMon.getDay() || 7; // Day of week: Mon = 1, ..., Sun = 7
- firstMon.setDate(firstMon.getDate() + 1 - firstDay); // Preceding Monday
- if (firstDay < 4 && checkDate < firstMon) { // Adjust first three days in year if necessary
- checkDate.setDate(checkDate.getDate() - 3); // Generate for previous year
- return $.datepicker.iso8601Week(checkDate);
- } else if (checkDate > new Date(checkDate.getFullYear(), 12 - 1, 28)) { // Check last three days in year
- firstDay = new Date(checkDate.getFullYear() + 1, 1 - 1, 4).getDay() || 7;
- if (firstDay > 4 && (checkDate.getDay() || 7) < firstDay - 3) { // Adjust if necessary
- checkDate.setDate(checkDate.getDate() + 3); // Generate for next year
- return $.datepicker.iso8601Week(checkDate);
- }
- }
- return Math.floor(((checkDate - firstMon) / 86400000) / 7) + 1; // Weeks to given date
- },
-
- /* Provide status text for a particular date.
- @param date the date to get the status for
- @param inst the current datepicker instance
- @return the status display text for this date */
- dateStatus: function(date, inst) {
- return $.datepicker.formatDate($.datepicker._get(inst, 'dateStatus'),
- date, $.datepicker._getFormatConfig(inst));
- },
-
- /* Parse a string value into a date object.
- See formatDate below for the possible formats.
-
- @param format string - the expected format of the date
- @param value string - the date in the above format
- @param settings Object - attributes include:
- shortYearCutoff number - the cutoff year for determining the century (optional)
- dayNamesShort string[7] - abbreviated names of the days from Sunday (optional)
- dayNames string[7] - names of the days from Sunday (optional)
- monthNamesShort string[12] - abbreviated names of the months (optional)
- monthNames string[12] - names of the months (optional)
- @return Date - the extracted date value or null if value is blank */
- parseDate: function (format, value, settings) {
- if (format == null || value == null)
- throw 'Invalid arguments';
- value = (typeof value == 'object' ? value.toString() : value + '');
- if (value == '')
- return null;
- var shortYearCutoff = (settings ? settings.shortYearCutoff : null) || this._defaults.shortYearCutoff;
- var dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort;
- var dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames;
- var monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort;
- var monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames;
- var year = -1;
- var month = -1;
- var day = -1;
- var literal = false;
- // Check whether a format character is doubled
- var lookAhead = function(match) {
- var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
- if (matches)
- iFormat++;
- return matches;
- };
- // Extract a number from the string value
- var getNumber = function(match) {
- lookAhead(match);
- var origSize = (match == '@' ? 14 : (match == 'y' ? 4 : 2));
- var size = origSize;
- var num = 0;
- while (size > 0 && iValue < value.length &&
- value.charAt(iValue) >= '0' && value.charAt(iValue) <= '9') {
- num = num * 10 + (value.charAt(iValue++) - 0);
- size--;
- }
- if (size == origSize)
- throw 'Missing number at position ' + iValue;
- return num;
- };
- // Extract a name from the string value and convert to an index
- var getName = function(match, shortNames, longNames) {
- var names = (lookAhead(match) ? longNames : shortNames);
- var size = 0;
- for (var j = 0; j < names.length; j++)
- size = Math.max(size, names[j].length);
- var name = '';
- var iInit = iValue;
- while (size > 0 && iValue < value.length) {
- name += value.charAt(iValue++);
- for (var i = 0; i < names.length; i++)
- if (name == names[i])
- return i + 1;
- size--;
- }
- throw 'Unknown name at position ' + iInit;
- };
- // Confirm that a literal character matches the string value
- var checkLiteral = function() {
- if (value.charAt(iValue) != format.charAt(iFormat))
- throw 'Unexpected literal at position ' + iValue;
- iValue++;
- };
- var iValue = 0;
- for (var iFormat = 0; iFormat < format.length; iFormat++) {
- if (literal)
- if (format.charAt(iFormat) == "'" && !lookAhead("'"))
- literal = false;
- else
- checkLiteral();
- else
- switch (format.charAt(iFormat)) {
- case 'd':
- day = getNumber('d');
- break;
- case 'D':
- getName('D', dayNamesShort, dayNames);
- break;
- case 'm':
- month = getNumber('m');
- break;
- case 'M':
- month = getName('M', monthNamesShort, monthNames);
- break;
- case 'y':
- year = getNumber('y');
- break;
- case '@':
- var date = new Date(getNumber('@'));
- year = date.getFullYear();
- month = date.getMonth() + 1;
- day = date.getDate();
- break;
- case "'":
- if (lookAhead("'"))
- checkLiteral();
- else
- literal = true;
- break;
- default:
- checkLiteral();
- }
- }
- if (year < 100)
- year += new Date().getFullYear() - new Date().getFullYear() % 100 +
- (year <= shortYearCutoff ? 0 : -100);
- var date = this._daylightSavingAdjust(new Date(year, month - 1, day));
- if (date.getFullYear() != year || date.getMonth() + 1 != month || date.getDate() != day)
- throw 'Invalid date'; // E.g. 31/02/*
- return date;
- },
-
- /* Standard date formats. */
- ATOM: 'yy-mm-dd', // RFC 3339 (ISO 8601)
- COOKIE: 'D, dd M yy',
- ISO_8601: 'yy-mm-dd',
- RFC_822: 'D, d M y',
- RFC_850: 'DD, dd-M-y',
- RFC_1036: 'D, d M y',
- RFC_1123: 'D, d M yy',
- RFC_2822: 'D, d M yy',
- RSS: 'D, d M y', // RFC 822
- TIMESTAMP: '@',
- W3C: 'yy-mm-dd', // ISO 8601
-
- /* Format a date object into a string value.
- The format can be combinations of the following:
- d - day of month (no leading zero)
- dd - day of month (two digit)
- D - day name short
- DD - day name long
- m - month of year (no leading zero)
- mm - month of year (two digit)
- M - month name short
- MM - month name long
- y - year (two digit)
- yy - year (four digit)
- @ - Unix timestamp (ms since 01/01/1970)
- '...' - literal text
- '' - single quote
-
- @param format string - the desired format of the date
- @param date Date - the date value to format
- @param settings Object - attributes include:
- dayNamesShort string[7] - abbreviated names of the days from Sunday (optional)
- dayNames string[7] - names of the days from Sunday (optional)
- monthNamesShort string[12] - abbreviated names of the months (optional)
- monthNames string[12] - names of the months (optional)
- @return string - the date in the above format */
- formatDate: function (format, date, settings) {
- if (!date)
- return '';
- var dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort;
- var dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames;
- var monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort;
- var monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames;
- // Check whether a format character is doubled
- var lookAhead = function(match) {
- var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
- if (matches)
- iFormat++;
- return matches;
- };
- // Format a number, with leading zero if necessary
- var formatNumber = function(match, value) {
- return (lookAhead(match) && value < 10 ? '0' : '') + value;
- };
- // Format a name, short or long as requested
- var formatName = function(match, value, shortNames, longNames) {
- return (lookAhead(match) ? longNames[value] : shortNames[value]);
- };
- var output = '';
- var literal = false;
- if (date)
- for (var iFormat = 0; iFormat < format.length; iFormat++) {
- if (literal)
- if (format.charAt(iFormat) == "'" && !lookAhead("'"))
- literal = false;
- else
- output += format.charAt(iFormat);
- else
- switch (format.charAt(iFormat)) {
- case 'd':
- output += formatNumber('d', date.getDate());
- break;
- case 'D':
- output += formatName('D', date.getDay(), dayNamesShort, dayNames);
- break;
- case 'm':
- output += formatNumber('m', date.getMonth() + 1);
- break;
- case 'M':
- output += formatName('M', date.getMonth(), monthNamesShort, monthNames);
- break;
- case 'y':
- output += (lookAhead('y') ? date.getFullYear() :
- (date.getYear() % 100 < 10 ? '0' : '') + date.getYear() % 100);
- break;
- case '@':
- output += date.getTime();
- break;
- case "'":
- if (lookAhead("'"))
- output += "'";
- else
- literal = true;
- break;
- default:
- output += format.charAt(iFormat);
- }
- }
- return output;
- },
-
- /* Extract all possible characters from the date format. */
- _possibleChars: function (format) {
- var chars = '';
- var literal = false;
- for (var iFormat = 0; iFormat < format.length; iFormat++)
- if (literal)
- if (format.charAt(iFormat) == "'" && !lookAhead("'"))
- literal = false;
- else
- chars += format.charAt(iFormat);
- else
- switch (format.charAt(iFormat)) {
- case 'd': case 'm': case 'y': case '@':
- chars += '0123456789';
- break;
- case 'D': case 'M':
- return null; // Accept anything
- case "'":
- if (lookAhead("'"))
- chars += "'";
- else
- literal = true;
- break;
- default:
- chars += format.charAt(iFormat);
- }
- return chars;
- },
-
- /* Get a setting value, defaulting if necessary. */
- _get: function(inst, name) {
- return inst.settings[name] !== undefined ?
- inst.settings[name] : this._defaults[name];
- },
-
- /* Parse existing date and initialise date picker. */
- _setDateFromField: function(inst) {
- var dateFormat = this._get(inst, 'dateFormat');
- var dates = inst.input ? inst.input.val().split(this._get(inst, 'rangeSeparator')) : null;
- inst.endDay = inst.endMonth = inst.endYear = null;
- var date = defaultDate = this._getDefaultDate(inst);
- if (dates.length > 0) {
- var settings = this._getFormatConfig(inst);
- if (dates.length > 1) {
- date = this.parseDate(dateFormat, dates[1], settings) || defaultDate;
- inst.endDay = date.getDate();
- inst.endMonth = date.getMonth();
- inst.endYear = date.getFullYear();
- }
- try {
- date = this.parseDate(dateFormat, dates[0], settings) || defaultDate;
- } catch (e) {
- this.log(e);
- date = defaultDate;
- }
- }
- inst.selectedDay = date.getDate();
- inst.drawMonth = inst.selectedMonth = date.getMonth();
- inst.drawYear = inst.selectedYear = date.getFullYear();
- inst.currentDay = (dates[0] ? date.getDate() : 0);
- inst.currentMonth = (dates[0] ? date.getMonth() : 0);
- inst.currentYear = (dates[0] ? date.getFullYear() : 0);
- this._adjustInstDate(inst);
- },
-
- /* Retrieve the default date shown on opening. */
- _getDefaultDate: function(inst) {
- var date = this._determineDate(this._get(inst, 'defaultDate'), new Date());
- var minDate = this._getMinMaxDate(inst, 'min', true);
- var maxDate = this._getMinMaxDate(inst, 'max');
- date = (minDate && date < minDate ? minDate : date);
- date = (maxDate && date > maxDate ? maxDate : date);
- return date;
- },
-
- /* A date may be specified as an exact value or a relative one. */
- _determineDate: function(date, defaultDate) {
- var offsetNumeric = function(offset) {
- var date = new Date();
- date.setDate(date.getDate() + offset);
- return date;
- };
- var offsetString = function(offset, getDaysInMonth) {
- var date = new Date();
- var year = date.getFullYear();
- var month = date.getMonth();
- var day = date.getDate();
- var pattern = /([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;
- var matches = pattern.exec(offset);
- while (matches) {
- switch (matches[2] || 'd') {
- case 'd' : case 'D' :
- day += (matches[1] - 0); break;
- case 'w' : case 'W' :
- day += (matches[1] * 7); break;
- case 'm' : case 'M' :
- month += (matches[1] - 0);
- day = Math.min(day, getDaysInMonth(year, month));
- break;
- case 'y': case 'Y' :
- year += (matches[1] - 0);
- day = Math.min(day, getDaysInMonth(year, month));
- break;
- }
- matches = pattern.exec(offset);
- }
- return new Date(year, month, day);
- };
- date = (date == null ? defaultDate :
- (typeof date == 'string' ? offsetString(date, this._getDaysInMonth) :
- (typeof date == 'number' ? (isNaN(date) ? defaultDate : offsetNumeric(date)) : date)));
- date = (date && date.toString() == 'Invalid Date' ? defaultDate : date);
- if (date) {
- date.setHours(0);
- date.setMinutes(0);
- date.setSeconds(0);
- date.setMilliseconds(0);
- }
- return this._daylightSavingAdjust(date);
- },
-
- /* Handle switch to/from daylight saving.
- Hours may be non-zero on daylight saving cut-over:
- > 12 when midnight changeover, but then cannot generate
- midnight datetime, so jump to 1AM, otherwise reset.
- @param date (Date) the date to check
- @return (Date) the corrected date */
- _daylightSavingAdjust: function(date) {
- if (!date) return null;
- date.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0);
- return date;
- },
-
- /* Set the date(s) directly. */
- _setDate: function(inst, date, endDate) {
- var clear = !(date);
- date = this._determineDate(date, new Date());
- inst.selectedDay = inst.currentDay = date.getDate();
- inst.drawMonth = inst.selectedMonth = inst.currentMonth = date.getMonth();
- inst.drawYear = inst.selectedYear = inst.currentYear = date.getFullYear();
- if (this._get(inst, 'rangeSelect')) {
- if (endDate) {
- endDate = this._determineDate(endDate, null);
- inst.endDay = endDate.getDate();
- inst.endMonth = endDate.getMonth();
- inst.endYear = endDate.getFullYear();
- } else {
- inst.endDay = inst.currentDay;
- inst.endMonth = inst.currentMonth;
- inst.endYear = inst.currentYear;
- }
- }
- this._adjustInstDate(inst);
- if (inst.input)
- inst.input.val(clear ? '' : this._formatDate(inst) +
- (!this._get(inst, 'rangeSelect') ? '' : this._get(inst, 'rangeSeparator') +
- this._formatDate(inst, inst.endDay, inst.endMonth, inst.endYear)));
- },
-
- /* Retrieve the date(s) directly. */
- _getDate: function(inst) {
- var startDate = (!inst.currentYear || (inst.input && inst.input.val() == '') ? null :
- this._daylightSavingAdjust(new Date(
- inst.currentYear, inst.currentMonth, inst.currentDay)));
- if (this._get(inst, 'rangeSelect')) {
- return [inst.rangeStart || startDate,
- (!inst.endYear ? inst.rangeStart || startDate :
- this._daylightSavingAdjust(new Date(inst.endYear, inst.endMonth, inst.endDay)))];
- } else
- return startDate;
- },
-
- /* Generate the HTML for the current state of the date picker. */
- _generateDatepicker: function(inst) {
- var today = new Date();
- today = this._daylightSavingAdjust(
- new Date(today.getFullYear(), today.getMonth(), today.getDate())); // clear time
- var showStatus = this._get(inst, 'showStatus');
- var isRTL = this._get(inst, 'isRTL');
- // build the date picker HTML
- var clear = (this._get(inst, 'mandatory') ? '' :
- '<div class="ui-datepicker-clear"><a onclick="jQuery.datepicker._clearDate(\'#' + inst.id + '\');"' +
- (showStatus ? this._addStatus(inst, this._get(inst, 'clearStatus') || '&#xa0;') : '') + '>' +
- this._get(inst, 'clearText') + '</a></div>');
- var controls = '<div class="ui-datepicker-control">' + (isRTL ? '' : clear) +
- '<div class="ui-datepicker-close"><a onclick="jQuery.datepicker._hideDatepicker();"' +
- (showStatus ? this._addStatus(inst, this._get(inst, 'closeStatus') || '&#xa0;') : '') + '>' +
- this._get(inst, 'closeText') + '</a></div>' + (isRTL ? clear : '') + '</div>';
- var prompt = this._get(inst, 'prompt');
- var closeAtTop = this._get(inst, 'closeAtTop');
- var hideIfNoPrevNext = this._get(inst, 'hideIfNoPrevNext');
- var navigationAsDateFormat = this._get(inst, 'navigationAsDateFormat');
- var numMonths = this._getNumberOfMonths(inst);
- var stepMonths = this._get(inst, 'stepMonths');
- var isMultiMonth = (numMonths[0] != 1 || numMonths[1] != 1);
- var currentDate = this._daylightSavingAdjust((!inst.currentDay ? new Date(9999, 9, 9) :
- new Date(inst.currentYear, inst.currentMonth, inst.currentDay)));
- var minDate = this._getMinMaxDate(inst, 'min', true);
- var maxDate = this._getMinMaxDate(inst, 'max');
- var drawMonth = inst.drawMonth;
- var drawYear = inst.drawYear;
- if (maxDate) {
- var maxDraw = this._daylightSavingAdjust(new Date(maxDate.getFullYear(),
- maxDate.getMonth() - numMonths[1] + 1, maxDate.getDate()));
- maxDraw = (minDate && maxDraw < minDate ? minDate : maxDraw);
- while (this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1)) > maxDraw) {
- drawMonth--;
- if (drawMonth < 0) {
- drawMonth = 11;
- drawYear--;
- }
- }
- }
- // controls and links
- var prevText = this._get(inst, 'prevText');
- prevText = (!navigationAsDateFormat ? prevText : this.formatDate(prevText,
- this._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths, 1)),
- this._getFormatConfig(inst)));
- var prev = '<div class="ui-datepicker-prev">' + (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ?
- '<a onclick="jQuery.datepicker._adjustDate(\'#' + inst.id + '\', -' + stepMonths + ', \'M\');"' +
- (showStatus ? this._addStatus(inst, this._get(inst, 'prevStatus') || '&#xa0;') : '') + '>' + prevText + '</a>' :
- (hideIfNoPrevNext ? '' : '<label>' + prevText + '</label>')) + '</div>';
- var nextText = this._get(inst, 'nextText');
- nextText = (!navigationAsDateFormat ? nextText : this.formatDate(nextText,
- this._daylightSavingAdjust(new Date(drawYear, drawMonth + stepMonths, 1)),
- this._getFormatConfig(inst)));
- var next = '<div class="ui-datepicker-next">' + (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ?
- '<a onclick="jQuery.datepicker._adjustDate(\'#' + inst.id + '\', +' + stepMonths + ', \'M\');"' +
- (showStatus ? this._addStatus(inst, this._get(inst, 'nextStatus') || '&#xa0;') : '') + '>' + nextText + '</a>' :
- (hideIfNoPrevNext ? '' : '<label>' + nextText + '</label>')) + '</div>';
- var currentText = this._get(inst, 'currentText');
- currentText = (!navigationAsDateFormat ? currentText: this.formatDate(
- currentText, today, this._getFormatConfig(inst)));
- var html = (prompt ? '<div class="' + this._promptClass + '">' + prompt + '</div>' : '') +
- (closeAtTop && !inst.inline ? controls : '') +
- '<div class="ui-datepicker-links">' + (isRTL ? next : prev) +
- (this._isInRange(inst, (this._get(inst, 'gotoCurrent') && inst.currentDay ?
- currentDate : today)) ? '<div class="ui-datepicker-current">' +
- '<a onclick="jQuery.datepicker._gotoToday(\'#' + inst.id + '\');"' +
- (showStatus ? this._addStatus(inst, this._get(inst, 'currentStatus') || '&#xa0;') : '') + '>' +
- currentText + '</a></div>' : '') + (isRTL ? prev : next) + '</div>';
- var firstDay = this._get(inst, 'firstDay');
- var changeFirstDay = this._get(inst, 'changeFirstDay');
- var dayNames = this._get(inst, 'dayNames');
- var dayNamesShort = this._get(inst, 'dayNamesShort');
- var dayNamesMin = this._get(inst, 'dayNamesMin');
- var monthNames = this._get(inst, 'monthNames');
- var beforeShowDay = this._get(inst, 'beforeShowDay');
- var highlightWeek = this._get(inst, 'highlightWeek');
- var showOtherMonths = this._get(inst, 'showOtherMonths');
- var showWeeks = this._get(inst, 'showWeeks');
- var calculateWeek = this._get(inst, 'calculateWeek') || this.iso8601Week;
- var status = (showStatus ? this._get(inst, 'dayStatus') || '&#xa0;' : '');
- var dateStatus = this._get(inst, 'statusForDate') || this.dateStatus;
- var endDate = inst.endDay ? this._daylightSavingAdjust(
- new Date(inst.endYear, inst.endMonth, inst.endDay)) : currentDate;
- for (var row = 0; row < numMonths[0]; row++)
- for (var col = 0; col < numMonths[1]; col++) {
- var selectedDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, inst.selectedDay));
- html += '<div class="ui-datepicker-one-month' + (col == 0 ? ' ui-datepicker-new-row' : '') + '">' +
- this._generateMonthYearHeader(inst, drawMonth, drawYear, minDate, maxDate,
- selectedDate, row > 0 || col > 0, showStatus, monthNames) + // draw month headers
- '<table class="ui-datepicker" cellpadding="0" cellspacing="0"><thead>' +
- '<tr class="ui-datepicker-title-row">' +
- (showWeeks ? '<td>' + this._get(inst, 'weekHeader') + '</td>' : '');
- for (var dow = 0; dow < 7; dow++) { // days of the week
- var day = (dow + firstDay) % 7;
- var dayStatus = (status.indexOf('DD') > -1 ? status.replace(/DD/, dayNames[day]) :
- status.replace(/D/, dayNamesShort[day]));
- html += '<td' + ((dow + firstDay + 6) % 7 >= 5 ? ' class="ui-datepicker-week-end-cell"' : '') + '>' +
- (!changeFirstDay ? '<span' :
- '<a onclick="jQuery.datepicker._changeFirstDay(\'#' + inst.id + '\', ' + day + ');"') +
- (showStatus ? this._addStatus(inst, dayStatus) : '') + ' title="' + dayNames[day] + '">' +
- dayNamesMin[day] + (changeFirstDay ? '</a>' : '</span>') + '</td>';
- }
- html += '</tr></thead><tbody>';
- var daysInMonth = this._getDaysInMonth(drawYear, drawMonth);
- if (drawYear == inst.selectedYear && drawMonth == inst.selectedMonth)
- inst.selectedDay = Math.min(inst.selectedDay, daysInMonth);
- var leadDays = (this._getFirstDayOfMonth(drawYear, drawMonth) - firstDay + 7) % 7;
- var numRows = (isMultiMonth ? 6 : Math.ceil((leadDays + daysInMonth) / 7)); // calculate the number of rows to generate
- var printDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays));
- for (var dRow = 0; dRow < numRows; dRow++) { // create date picker rows
- html += '<tr class="ui-datepicker-days-row">' +
- (showWeeks ? '<td class="ui-datepicker-week-col">' + calculateWeek(printDate) + '</td>' : '');
- for (var dow = 0; dow < 7; dow++) { // create date picker days
- var daySettings = (beforeShowDay ?
- beforeShowDay.apply((inst.input ? inst.input[0] : null), [printDate]) : [true, '']);
- var otherMonth = (printDate.getMonth() != drawMonth);
- var unselectable = otherMonth || !daySettings[0] ||
- (minDate && printDate < minDate) || (maxDate && printDate > maxDate);
- html += '<td class="ui-datepicker-days-cell' +
- ((dow + firstDay + 6) % 7 >= 5 ? ' ui-datepicker-week-end-cell' : '') + // highlight weekends
- (otherMonth ? ' ui-datepicker-otherMonth' : '') + // highlight days from other months
- (printDate.getTime() == selectedDate.getTime() && drawMonth == inst.selectedMonth ?
- ' ui-datepicker-days-cell-over' : '') + // highlight selected day
- (unselectable ? ' ' + this._unselectableClass : '') + // highlight unselectable days
- (otherMonth && !showOtherMonths ? '' : ' ' + daySettings[1] + // highlight custom dates
- (printDate.getTime() >= currentDate.getTime() && printDate.getTime() <= endDate.getTime() ? // in current range
- ' ' + this._currentClass : '') + // highlight selected day
- (printDate.getTime() == today.getTime() ? ' ui-datepicker-today' : '')) + '"' + // highlight today (if different)
- ((!otherMonth || showOtherMonths) && daySettings[2] ? ' title="' + daySettings[2] + '"' : '') + // cell title
- (unselectable ? (highlightWeek ? ' onmouseover="jQuery(this).parent().addClass(\'ui-datepicker-week-over\');"' + // highlight selection week
- ' onmouseout="jQuery(this).parent().removeClass(\'ui-datepicker-week-over\');"' : '') : // unhighlight selection week
- ' onmouseover="jQuery(this).addClass(\'ui-datepicker-days-cell-over\')' + // highlight selection
- (highlightWeek ? '.parent().addClass(\'ui-datepicker-week-over\')' : '') + ';' + // highlight selection week
- (!showStatus || (otherMonth && !showOtherMonths) ? '' : 'jQuery(\'#ui-datepicker-status-' +
- inst.id + '\').html(\'' + (dateStatus.apply((inst.input ? inst.input[0] : null),
- [printDate, inst]) || '&#xa0;') +'\');') + '"' +
- ' onmouseout="jQuery(this).removeClass(\'ui-datepicker-days-cell-over\')' + // unhighlight selection
- (highlightWeek ? '.parent().removeClass(\'ui-datepicker-week-over\')' : '') + ';' + // unhighlight selection week
- (!showStatus || (otherMonth && !showOtherMonths) ? '' : 'jQuery(\'#ui-datepicker-status-' +
- inst.id + '\').html(\'&#xa0;\');') + '" onclick="jQuery.datepicker._selectDay(\'#' +
- inst.id + '\',' + drawMonth + ',' + drawYear + ', this);"') + '>' + // actions
- (otherMonth ? (showOtherMonths ? printDate.getDate() : '&#xa0;') : // display for other months
- (unselectable ? printDate.getDate() : '<a>' + printDate.getDate() + '</a>')) + '</td>'; // display for this month
- printDate.setDate(printDate.getDate() + 1);
- printDate = this._daylightSavingAdjust(printDate);
- }
- html += '</tr>';
- }
- drawMonth++;
- if (drawMonth > 11) {
- drawMonth = 0;
- drawYear++;
- }
- html += '</tbody></table></div>';
- }
- html += (showStatus ? '<div style="clear: both;"></div><div id="ui-datepicker-status-' + inst.id +
- '" class="ui-datepicker-status">' + (this._get(inst, 'initStatus') || '&#xa0;') + '</div>' : '') +
- (!closeAtTop && !inst.inline ? controls : '') +
- '<div style="clear: both;"></div>' +
- ($.browser.msie && parseInt($.browser.version) < 7 && !inst.inline ?
- '<iframe src="javascript:false;" class="ui-datepicker-cover"></iframe>' : '');
- return html;
- },
-
- /* Generate the month and year header. */
- _generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate,
- selectedDate, secondary, showStatus, monthNames) {
- minDate = (inst.rangeStart && minDate && selectedDate < minDate ? selectedDate : minDate);
- var html = '<div class="ui-datepicker-header">';
- // month selection
- if (secondary || !this._get(inst, 'changeMonth'))
- html += monthNames[drawMonth] + '&#xa0;';
- else {
- var inMinYear = (minDate && minDate.getFullYear() == drawYear);
- var inMaxYear = (maxDate && maxDate.getFullYear() == drawYear);
- html += '<select class="ui-datepicker-new-month" ' +
- 'onchange="jQuery.datepicker._selectMonthYear(\'#' + inst.id + '\', this, \'M\');" ' +
- 'onclick="jQuery.datepicker._clickMonthYear(\'#' + inst.id + '\');"' +
- (showStatus ? this._addStatus(inst, this._get(inst, 'monthStatus') || '&#xa0;') : '') + '>';
- for (var month = 0; month < 12; month++) {
- if ((!inMinYear || month >= minDate.getMonth()) &&
- (!inMaxYear || month <= maxDate.getMonth()))
- html += '<option value="' + month + '"' +
- (month == drawMonth ? ' selected="selected"' : '') +
- '>' + monthNames[month] + '</option>';
- }
- html += '</select>';
- }
- // year selection
- if (secondary || !this._get(inst, 'changeYear'))
- html += drawYear;
- else {
- // determine range of years to display
- var years = this._get(inst, 'yearRange').split(':');
- var year = 0;
- var endYear = 0;
- if (years.length != 2) {
- year = drawYear - 10;
- endYear = drawYear + 10;
- } else if (years[0].charAt(0) == '+' || years[0].charAt(0) == '-') {
- year = endYear = new Date().getFullYear();
- year += parseInt(years[0], 10);
- endYear += parseInt(years[1], 10);
- } else {
- year = parseInt(years[0], 10);
- endYear = parseInt(years[1], 10);
- }
- year = (minDate ? Math.max(year, minDate.getFullYear()) : year);
- endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear);
- html += '<select class="ui-datepicker-new-year" ' +
- 'onchange="jQuery.datepicker._selectMonthYear(\'#' + inst.id + '\', this, \'Y\');" ' +
- 'onclick="jQuery.datepicker._clickMonthYear(\'#' + inst.id + '\');"' +
- (showStatus ? this._addStatus(inst, this._get(inst, 'yearStatus') || '&#xa0;') : '') + '>';
- for (; year <= endYear; year++) {
- html += '<option value="' + year + '"' +
- (year == drawYear ? ' selected="selected"' : '') +
- '>' + year + '</option>';
- }
- html += '</select>';
- }
- html += '</div>'; // Close datepicker_header
- return html;
- },
-
- /* Provide code to set and clear the status panel. */
- _addStatus: function(inst, text) {
- return ' onmouseover="jQuery(\'#ui-datepicker-status-' + inst.id + '\').html(\'' + text + '\');" ' +
- 'onmouseout="jQuery(\'#ui-datepicker-status-' + inst.id + '\').html(\'&#xa0;\');"';
- },
-
- /* Adjust one of the date sub-fields. */
- _adjustInstDate: function(inst, offset, period) {
- var year = inst.drawYear + (period == 'Y' ? offset : 0);
- var month = inst.drawMonth + (period == 'M' ? offset : 0);
- var day = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) +
- (period == 'D' ? offset : 0);
- var date = this._daylightSavingAdjust(new Date(year, month, day));
- // ensure it is within the bounds set
- var minDate = this._getMinMaxDate(inst, 'min', true);
- var maxDate = this._getMinMaxDate(inst, 'max');
- date = (minDate && date < minDate ? minDate : date);
- date = (maxDate && date > maxDate ? maxDate : date);
- inst.selectedDay = date.getDate();
- inst.drawMonth = inst.selectedMonth = date.getMonth();
- inst.drawYear = inst.selectedYear = date.getFullYear();
- if (period == 'M' || period == 'Y')
- this._notifyChange(inst);
- },
-
- /* Notify change of month/year. */
- _notifyChange: function(inst) {
- var onChange = this._get(inst, 'onChangeMonthYear');
- if (onChange)
- onChange.apply((inst.input ? inst.input[0] : null),
- [new Date(inst.selectedYear, inst.selectedMonth, 1), inst]);
- },
-
- /* Determine the number of months to show. */
- _getNumberOfMonths: function(inst) {
- var numMonths = this._get(inst, 'numberOfMonths');
- return (numMonths == null ? [1, 1] : (typeof numMonths == 'number' ? [1, numMonths] : numMonths));
- },
-
- /* Determine the current maximum date - ensure no time components are set - may be overridden for a range. */
- _getMinMaxDate: function(inst, minMax, checkRange) {
- var date = this._determineDate(this._get(inst, minMax + 'Date'), null);
- return (!checkRange || !inst.rangeStart ? date :
- (!date || inst.rangeStart > date ? inst.rangeStart : date));
- },
-
- /* Find the number of days in a given month. */
- _getDaysInMonth: function(year, month) {
- return 32 - new Date(year, month, 32).getDate();
- },
-
- /* Find the day of the week of the first of a month. */
- _getFirstDayOfMonth: function(year, month) {
- return new Date(year, month, 1).getDay();
- },
-
- /* Determines if we should allow a "next/prev" month display change. */
- _canAdjustMonth: function(inst, offset, curYear, curMonth) {
- var numMonths = this._getNumberOfMonths(inst);
- var date = this._daylightSavingAdjust(new Date(
- curYear, curMonth + (offset < 0 ? offset : numMonths[1]), 1));
- if (offset < 0)
- date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth()));
- return this._isInRange(inst, date);
- },
-
- /* Is the given date in the accepted range? */
- _isInRange: function(inst, date) {
- // during range selection, use minimum of selected date and range start
- var newMinDate = (!inst.rangeStart ? null : this._daylightSavingAdjust(
- new Date(inst.selectedYear, inst.selectedMonth, inst.selectedDay)));
- newMinDate = (newMinDate && inst.rangeStart < newMinDate ? inst.rangeStart : newMinDate);
- var minDate = newMinDate || this._getMinMaxDate(inst, 'min');
- var maxDate = this._getMinMaxDate(inst, 'max');
- return ((!minDate || date >= minDate) && (!maxDate || date <= maxDate));
- },
-
- /* Provide the configuration settings for formatting/parsing. */
- _getFormatConfig: function(inst) {
- var shortYearCutoff = this._get(inst, 'shortYearCutoff');
- shortYearCutoff = (typeof shortYearCutoff != 'string' ? shortYearCutoff :
- new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10));
- return {shortYearCutoff: shortYearCutoff,
- dayNamesShort: this._get(inst, 'dayNamesShort'), dayNames: this._get(inst, 'dayNames'),
- monthNamesShort: this._get(inst, 'monthNamesShort'), monthNames: this._get(inst, 'monthNames')};
- },
-
- /* Format the given date for display. */
- _formatDate: function(inst, day, month, year) {
- if (!day) {
- inst.currentDay = inst.selectedDay;
- inst.currentMonth = inst.selectedMonth;
- inst.currentYear = inst.selectedYear;
- }
- var date = (day ? (typeof day == 'object' ? day :
- this._daylightSavingAdjust(new Date(year, month, day))) :
- this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay)));
- return this.formatDate(this._get(inst, 'dateFormat'), date, this._getFormatConfig(inst));
- }
-});
-
-/* jQuery extend now ignores nulls! */
-function extendRemove(target, props) {
- $.extend(target, props);
- for (var name in props)
- if (props[name] == null || props[name] == undefined)
- target[name] = props[name];
- return target;
-};
-
-/* Determine whether an object is an array. */
-function isArray(a) {
- return (a && (($.browser.safari && typeof a == 'object' && a.length) ||
- (a.constructor && a.constructor.toString().match(/\Array\(\)/))));
-};
-
-/* Invoke the datepicker functionality.
- @param options string - a command, optionally followed by additional parameters or
- Object - settings for attaching new datepicker functionality
- @return jQuery object */
-$.fn.datepicker = function(options){
- var otherArgs = Array.prototype.slice.call(arguments, 1);
- if (typeof options == 'string' && (options == 'isDisabled' || options == 'getDate'))
- return $.datepicker['_' + options + 'Datepicker'].
- apply($.datepicker, [this[0]].concat(otherArgs));
- return this.each(function() {
- typeof options == 'string' ?
- $.datepicker['_' + options + 'Datepicker'].
- apply($.datepicker, [this].concat(otherArgs)) :
- $.datepicker._attachDatepicker(this, options);
- });
-};
-
-$.datepicker = new Datepicker(); // singleton instance
-
-/* Initialise the date picker. */
-$(document).ready(function() {
- $(document.body).append($.datepicker.dpDiv).
- mousedown($.datepicker._checkExternalClick);
-});
-
-})(jQuery);
-/*
- * jQuery UI Dialog
+(function(a){a.effects.puff=function(b){return this.queue(function(){var f=a(this);var c=a.extend(true,{},b.options);var h=a.effects.setMode(f,b.options.mode||"hide");var g=parseInt(b.options.percent,10)||150;c.fade=true;var e={height:f.height(),width:f.width()};var d=g/100;f.from=(h=="hide")?e:{height:e.height*d,width:e.width*d};c.from=f.from;c.percent=(h=="hide")?g:100;c.mode=h;f.effect("scale",c,b.duration,b.callback);f.dequeue()})};a.effects.scale=function(b){return this.queue(function(){var g=a(this);var d=a.extend(true,{},b.options);var j=a.effects.setMode(g,b.options.mode||"effect");var h=parseInt(b.options.percent,10)||(parseInt(b.options.percent,10)==0?0:(j=="hide"?0:100));var i=b.options.direction||"both";var c=b.options.origin;if(j!="effect"){d.origin=c||["middle","center"];d.restore=true}var f={height:g.height(),width:g.width()};g.from=b.options.from||(j=="show"?{height:0,width:0}:f);var e={y:i!="horizontal"?(h/100):1,x:i!="vertical"?(h/100):1};g.to={height:f.height*e.y,width:f.width*e.x};if(b.options.fade){if(j=="show"){g.from.opacity=0;g.to.opacity=1}if(j=="hide"){g.from.opacity=1;g.to.opacity=0}}d.from=g.from;d.to=g.to;d.mode=j;g.effect("size",d,b.duration,b.callback);g.dequeue()})};a.effects.size=function(b){return this.queue(function(){var c=a(this),n=["position","top","left","width","height","overflow","opacity"];var m=["position","top","left","overflow","opacity"];var j=["width","height","overflow"];var p=["fontSize"];var k=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"];var f=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"];var g=a.effects.setMode(c,b.options.mode||"effect");var i=b.options.restore||false;var e=b.options.scale||"both";var o=b.options.origin;var d={height:c.height(),width:c.width()};c.from=b.options.from||d;c.to=b.options.to||d;if(o){var h=a.effects.getBaseline(o,d);c.from.top=(d.height-c.from.height)*h.y;c.from.left=(d.width-c.from.width)*h.x;c.to.top=(d.height-c.to.height)*h.y;c.to.left=(d.width-c.to.width)*h.x}var l={from:{y:c.from.height/d.height,x:c.from.width/d.width},to:{y:c.to.height/d.height,x:c.to.width/d.width}};if(e=="box"||e=="both"){if(l.from.y!=l.to.y){n=n.concat(k);c.from=a.effects.setTransition(c,k,l.from.y,c.from);c.to=a.effects.setTransition(c,k,l.to.y,c.to)}if(l.from.x!=l.to.x){n=n.concat(f);c.from=a.effects.setTransition(c,f,l.from.x,c.from);c.to=a.effects.setTransition(c,f,l.to.x,c.to)}}if(e=="content"||e=="both"){if(l.from.y!=l.to.y){n=n.concat(p);c.from=a.effects.setTransition(c,p,l.from.y,c.from);c.to=a.effects.setTransition(c,p,l.to.y,c.to)}}a.effects.save(c,i?n:m);c.show();a.effects.createWrapper(c);c.css("overflow","hidden").css(c.from);if(e=="content"||e=="both"){k=k.concat(["marginTop","marginBottom"]).concat(p);f=f.concat(["marginLeft","marginRight"]);j=n.concat(k).concat(f);c.find("*[width]").each(function(){child=a(this);if(i){a.effects.save(child,j)}var q={height:child.height(),width:child.width()};child.from={height:q.height*l.from.y,width:q.width*l.from.x};child.to={height:q.height*l.to.y,width:q.width*l.to.x};if(l.from.y!=l.to.y){child.from=a.effects.setTransition(child,k,l.from.y,child.from);child.to=a.effects.setTransition(child,k,l.to.y,child.to)}if(l.from.x!=l.to.x){child.from=a.effects.setTransition(child,f,l.from.x,child.from);child.to=a.effects.setTransition(child,f,l.to.x,child.to)}child.css(child.from);child.animate(child.to,b.duration,b.options.easing,function(){if(i){a.effects.restore(child,j)}})})}c.animate(c.to,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(g=="hide"){c.hide()}a.effects.restore(c,i?n:m);a.effects.removeWrapper(c);if(b.callback){b.callback.apply(this,arguments)}c.dequeue()}})})}})(jQuery);;/*
+ * jQuery UI Effects Shake 1.7.2
*
- * Copyright (c) 2008 Richard D. Worth (rdworth.org)
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://docs.jquery.com/UI/Dialog
+ *
+ * http://docs.jquery.com/UI/Effects/Shake
*
* Depends:
- * ui.core.js
- * ui.draggable.js
- * ui.resizable.js
+ * effects.core.js
*/
-(function($) {
-
-var setDataSwitch = {
- dragStart: "start.draggable",
- drag: "drag.draggable",
- dragStop: "stop.draggable",
- maxHeight: "maxHeight.resizable",
- minHeight: "minHeight.resizable",
- maxWidth: "maxWidth.resizable",
- minWidth: "minWidth.resizable",
- resizeStart: "start.resizable",
- resize: "drag.resizable",
- resizeStop: "stop.resizable"
-};
-
-$.widget("ui.dialog", {
- init: function() {
- var self = this,
- options = this.options,
- resizeHandles = typeof options.resizable == 'string'
- ? options.resizable
- : 'n,e,s,w,se,sw,ne,nw',
-
- uiDialogContent = this.element
- .addClass('ui-dialog-content')
- .wrap('<div/>')
- .wrap('<div/>'),
-
- uiDialogContainer = (this.uiDialogContainer = uiDialogContent.parent()
- .addClass('ui-dialog-container')
- .css({position: 'relative', width: '100%', height: '100%'})),
-
- title = options.title || uiDialogContent.attr('title') || '',
- uiDialogTitlebar = (this.uiDialogTitlebar =
- $('<div class="ui-dialog-titlebar"/>'))
- .append('<span class="ui-dialog-title">' + title + '</span>')
- .append('<a href="#" class="ui-dialog-titlebar-close"><span>X</span></a>')
- .prependTo(uiDialogContainer),
-
- uiDialog = (this.uiDialog = uiDialogContainer.parent())
- .appendTo(document.body)
- .hide()
- .addClass('ui-dialog')
- .addClass(options.dialogClass)
- // add content classes to dialog
- // to inherit theme at top level of element
- .addClass(uiDialogContent.attr('className'))
- .removeClass('ui-dialog-content')
- .css({
- position: 'absolute',
- width: options.width,
- height: options.height,
- overflow: 'hidden',
- zIndex: options.zIndex
- })
- // setting tabIndex makes the div focusable
- // setting outline to 0 prevents a border on focus in Mozilla
- .attr('tabIndex', -1).css('outline', 0).keydown(function(ev) {
- if (options.closeOnEscape) {
- var ESC = 27;
- (ev.keyCode && ev.keyCode == ESC && self.close());
- }
- })
- .mousedown(function() {
- self.moveToTop();
- }),
-
- uiDialogButtonPane = (this.uiDialogButtonPane = $('<div/>'))
- .addClass('ui-dialog-buttonpane').css({ position: 'absolute', bottom: 0 })
- .appendTo(uiDialog);
-
- this.uiDialogTitlebarClose = $('.ui-dialog-titlebar-close', uiDialogTitlebar)
- .hover(
- function() {
- $(this).addClass('ui-dialog-titlebar-close-hover');
- },
- function() {
- $(this).removeClass('ui-dialog-titlebar-close-hover');
- }
- )
- .mousedown(function(ev) {
- ev.stopPropagation();
- })
- .click(function() {
- self.close();
- return false;
- });
-
- this.uiDialogTitlebar.find("*").add(this.uiDialogTitlebar).each(function() {
- $.ui.disableSelection(this);
- });
-
- if ($.fn.draggable) {
- uiDialog.draggable({
- cancel: '.ui-dialog-content',
- helper: options.dragHelper,
- handle: '.ui-dialog-titlebar',
- start: function(e, ui) {
- self.moveToTop();
- (options.dragStart && options.dragStart.apply(self.element[0], arguments));
- },
- drag: function(e, ui) {
- (options.drag && options.drag.apply(self.element[0], arguments));
- },
- stop: function(e, ui) {
- (options.dragStop && options.dragStop.apply(self.element[0], arguments));
- $.ui.dialog.overlay.resize();
- }
- });
- (options.draggable || uiDialog.draggable('disable'));
- }
-
- if ($.fn.resizable) {
- uiDialog.resizable({
- cancel: '.ui-dialog-content',
- helper: options.resizeHelper,
- maxWidth: options.maxWidth,
- maxHeight: options.maxHeight,
- minWidth: options.minWidth,
- minHeight: options.minHeight,
- start: function() {
- (options.resizeStart && options.resizeStart.apply(self.element[0], arguments));
- },
- resize: function(e, ui) {
- (options.autoResize && self.size.apply(self));
- (options.resize && options.resize.apply(self.element[0], arguments));
- },
- handles: resizeHandles,
- stop: function(e, ui) {
- (options.autoResize && self.size.apply(self));
- (options.resizeStop && options.resizeStop.apply(self.element[0], arguments));
- $.ui.dialog.overlay.resize();
- }
- });
- (options.resizable || uiDialog.resizable('disable'));
- }
-
- this.createButtons(options.buttons);
- this.isOpen = false;
-
- (options.bgiframe && $.fn.bgiframe && uiDialog.bgiframe());
- (options.autoOpen && this.open());
- },
-
- setData: function(key, value){
- (setDataSwitch[key] && this.uiDialog.data(setDataSwitch[key], value));
- switch (key) {
- case "buttons":
- this.createButtons(value);
- break;
- case "draggable":
- this.uiDialog.draggable(value ? 'enable' : 'disable');
- break;
- case "height":
- this.uiDialog.height(value);
- break;
- case "position":
- this.position(value);
- break;
- case "resizable":
- (typeof value == 'string' && this.uiDialog.data('handles.resizable', value));
- this.uiDialog.resizable(value ? 'enable' : 'disable');
- break;
- case "title":
- $(".ui-dialog-title", this.uiDialogTitlebar).text(value);
- break;
- case "width":
- this.uiDialog.width(value);
- break;
- }
-
- $.widget.prototype.setData.apply(this, arguments);
- },
-
- position: function(pos) {
- var wnd = $(window), doc = $(document),
- pTop = doc.scrollTop(), pLeft = doc.scrollLeft(),
- minTop = pTop;
-
- if ($.inArray(pos, ['center','top','right','bottom','left']) >= 0) {
- pos = [
- pos == 'right' || pos == 'left' ? pos : 'center',
- pos == 'top' || pos == 'bottom' ? pos : 'middle'
- ];
- }
- if (pos.constructor != Array) {
- pos = ['center', 'middle'];
- }
- if (pos[0].constructor == Number) {
- pLeft += pos[0];
- } else {
- switch (pos[0]) {
- case 'left':
- pLeft += 0;
- break;
- case 'right':
- pLeft += wnd.width() - this.uiDialog.width();
- break;
- default:
- case 'center':
- pLeft += (wnd.width() - this.uiDialog.width()) / 2;
- }
- }
- if (pos[1].constructor == Number) {
- pTop += pos[1];
- } else {
- switch (pos[1]) {
- case 'top':
- pTop += 0;
- break;
- case 'bottom':
- pTop += wnd.height() - this.uiDialog.height();
- break;
- default:
- case 'middle':
- pTop += (wnd.height() - this.uiDialog.height()) / 2;
- }
- }
-
- // prevent the dialog from being too high (make sure the titlebar
- // is accessible)
- pTop = Math.max(pTop, minTop);
- this.uiDialog.css({top: pTop, left: pLeft});
- },
-
- size: function() {
- var container = this.uiDialogContainer,
- titlebar = this.uiDialogTitlebar,
- content = this.element,
- tbMargin = parseInt(content.css('margin-top'),10) + parseInt(content.css('margin-bottom'),10),
- lrMargin = parseInt(content.css('margin-left'),10) + parseInt(content.css('margin-right'),10);
- content.height(container.height() - titlebar.outerHeight() - tbMargin);
- content.width(container.width() - lrMargin);
- },
-
- open: function() {
- if (this.isOpen) { return; }
-
- this.overlay = this.options.modal ? new $.ui.dialog.overlay(this) : null;
- (this.uiDialog.next().length > 0) && this.uiDialog.appendTo('body');
- this.position(this.options.position);
- this.uiDialog.show(this.options.show);
- this.options.autoResize && this.size();
- this.moveToTop(true);
-
- // CALLBACK: open
- var openEV = null;
- var openUI = {
- options: this.options
- };
- this.uiDialogTitlebarClose.focus();
- this.element.triggerHandler("dialogopen", [openEV, openUI], this.options.open);
-
- this.isOpen = true;
- },
-
- // the force parameter allows us to move modal dialogs to their correct
- // position on open
- moveToTop: function(force) {
- if ((this.options.modal && !force)
- || (!this.options.stack && !this.options.modal)) { return this.element.triggerHandler("dialogfocus", [null, { options: this.options }], this.options.focus); }
-
- var maxZ = this.options.zIndex, options = this.options;
- $('.ui-dialog:visible').each(function() {
- maxZ = Math.max(maxZ, parseInt($(this).css('z-index'), 10) || options.zIndex);
- });
- (this.overlay && this.overlay.$el.css('z-index', ++maxZ));
- this.uiDialog.css('z-index', ++maxZ);
-
- this.element.triggerHandler("dialogfocus", [null, { options: this.options }], this.options.focus);
- },
-
- close: function() {
- (this.overlay && this.overlay.destroy());
- this.uiDialog.hide(this.options.hide);
-
- // CALLBACK: close
- var closeEV = null;
- var closeUI = {
- options: this.options
- };
- this.element.triggerHandler("dialogclose", [closeEV, closeUI], this.options.close);
- $.ui.dialog.overlay.resize();
-
- this.isOpen = false;
- },
-
- destroy: function() {
- (this.overlay && this.overlay.destroy());
- this.uiDialog.hide();
- this.element
- .unbind('.dialog')
- .removeData('dialog')
- .removeClass('ui-dialog-content')
- .hide().appendTo('body');
- this.uiDialog.remove();
- },
-
- createButtons: function(buttons) {
- var self = this,
- hasButtons = false,
- uiDialogButtonPane = this.uiDialogButtonPane;
-
- // remove any existing buttons
- uiDialogButtonPane.empty().hide();
-
- $.each(buttons, function() { return !(hasButtons = true); });
- if (hasButtons) {
- uiDialogButtonPane.show();
- $.each(buttons, function(name, fn) {
- $('<button/>')
- .text(name)
- .click(function() { fn.apply(self.element[0], arguments); })
- .appendTo(uiDialogButtonPane);
- });
- }
- }
-});
-
-$.extend($.ui.dialog, {
- defaults: {
- autoOpen: true,
- autoResize: true,
- bgiframe: false,
- buttons: {},
- closeOnEscape: true,
- draggable: true,
- height: 200,
- minHeight: 100,
- minWidth: 150,
- modal: false,
- overlay: {},
- position: 'center',
- resizable: true,
- stack: true,
- width: 300,
- zIndex: 1000
- },
-
- overlay: function(dialog) {
- this.$el = $.ui.dialog.overlay.create(dialog);
- }
-});
-
-$.extend($.ui.dialog.overlay, {
- instances: [],
- events: $.map('focus,mousedown,mouseup,keydown,keypress,click'.split(','),
- function(e) { return e + '.dialog-overlay'; }).join(' '),
- create: function(dialog) {
- if (this.instances.length === 0) {
- // prevent use of anchors and inputs
- // we use a setTimeout in case the overlay is created from an
- // event that we're going to be cancelling (see #2804)
- setTimeout(function() {
- $('a, :input').bind($.ui.dialog.overlay.events, function() {
- // allow use of the element if inside a dialog and
- // - there are no modal dialogs
- // - there are modal dialogs, but we are in front of the topmost modal
- var allow = false;
- var $dialog = $(this).parents('.ui-dialog');
- if ($dialog.length) {
- var $overlays = $('.ui-dialog-overlay');
- if ($overlays.length) {
- var maxZ = parseInt($overlays.css('z-index'), 10);
- $overlays.each(function() {
- maxZ = Math.max(maxZ, parseInt($(this).css('z-index'), 10));
- });
- allow = parseInt($dialog.css('z-index'), 10) > maxZ;
- } else {
- allow = true;
- }
- }
- return allow;
- });
- }, 1);
-
- // allow closing by pressing the escape key
- $(document).bind('keydown.dialog-overlay', function(e) {
- var ESC = 27;
- (e.keyCode && e.keyCode == ESC && dialog.close());
- });
-
- // handle window resize
- $(window).bind('resize.dialog-overlay', $.ui.dialog.overlay.resize);
- }
-
- var $el = $('<div/>').appendTo(document.body)
- .addClass('ui-dialog-overlay').css($.extend({
- borderWidth: 0, margin: 0, padding: 0,
- position: 'absolute', top: 0, left: 0,
- width: this.width(),
- height: this.height()
- }, dialog.options.overlay));
-
- (dialog.options.bgiframe && $.fn.bgiframe && $el.bgiframe());
-
- this.instances.push($el);
- return $el;
- },
-
- destroy: function($el) {
- this.instances.splice($.inArray(this.instances, $el), 1);
-
- if (this.instances.length === 0) {
- $('a, :input').add([document, window]).unbind('.dialog-overlay');
- }
-
- $el.remove();
- },
-
- height: function() {
- if ($.browser.msie && $.browser.version < 7) {
- var scrollHeight = Math.max(
- document.documentElement.scrollHeight,
- document.body.scrollHeight
- );
- var offsetHeight = Math.max(
- document.documentElement.offsetHeight,
- document.body.offsetHeight
- );
-
- if (scrollHeight < offsetHeight) {
- return $(window).height() + 'px';
- } else {
- return scrollHeight + 'px';
- }
- } else {
- return $(document).height() + 'px';
- }
- },
-
- width: function() {
- if ($.browser.msie && $.browser.version < 7) {
- var scrollWidth = Math.max(
- document.documentElement.scrollWidth,
- document.body.scrollWidth
- );
- var offsetWidth = Math.max(
- document.documentElement.offsetWidth,
- document.body.offsetWidth
- );
-
- if (scrollWidth < offsetWidth) {
- return $(window).width() + 'px';
- } else {
- return scrollWidth + 'px';
- }
- } else {
- return $(document).width() + 'px';
- }
- },
-
- resize: function() {
- /* If the dialog is draggable and the user drags it past the
- * right edge of the window, the document becomes wider so we
- * need to stretch the overlay. If the user then drags the
- * dialog back to the left, the document will become narrower,
- * so we need to shrink the overlay to the appropriate size.
- * This is handled by shrinking the overlay before setting it
- * to the full document size.
- */
- var $overlays = $([]);
- $.each($.ui.dialog.overlay.instances, function() {
- $overlays = $overlays.add(this);
- });
-
- $overlays.css({
- width: 0,
- height: 0
- }).css({
- width: $.ui.dialog.overlay.width(),
- height: $.ui.dialog.overlay.height()
- });
- }
-});
-
-$.extend($.ui.dialog.overlay.prototype, {
- destroy: function() {
- $.ui.dialog.overlay.destroy(this.$el);
- }
-});
-
-})(jQuery);
-/*
- * jQuery UI Slider
+(function(a){a.effects.shake=function(b){return this.queue(function(){var e=a(this),l=["position","top","left"];var k=a.effects.setMode(e,b.options.mode||"effect");var n=b.options.direction||"left";var c=b.options.distance||20;var d=b.options.times||3;var g=b.duration||b.options.duration||140;a.effects.save(e,l);e.show();a.effects.createWrapper(e);var f=(n=="up"||n=="down")?"top":"left";var p=(n=="up"||n=="left")?"pos":"neg";var h={},o={},m={};h[f]=(p=="pos"?"-=":"+=")+c;o[f]=(p=="pos"?"+=":"-=")+c*2;m[f]=(p=="pos"?"-=":"+=")+c*2;e.animate(h,g,b.options.easing);for(var j=1;j<d;j++){e.animate(o,g,b.options.easing).animate(m,g,b.options.easing)}e.animate(o,g,b.options.easing).animate(h,g/2,b.options.easing,function(){a.effects.restore(e,l);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(this,arguments)}});e.queue("fx",function(){e.dequeue()});e.dequeue()})}})(jQuery);;/*
+ * jQuery UI Effects Slide 1.7.2
*
- * Copyright (c) 2008 Paul Bakaus
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://docs.jquery.com/UI/Slider
+ *
+ * http://docs.jquery.com/UI/Effects/Slide
*
* Depends:
- * ui.core.js
+ * effects.core.js
*/
-(function($) {
-
-$.fn.unwrap = $.fn.unwrap || function(expr) {
- return this.each(function(){
- $(this).parents(expr).eq(0).after(this).remove();
- });
-};
-
-$.widget("ui.slider", {
- plugins: {},
- ui: function(e) {
- return {
- options: this.options,
- handle: this.currentHandle,
- value: this.options.axis != "both" || !this.options.axis ? Math.round(this.value(null,this.options.axis == "vertical" ? "y" : "x")) : {
- x: Math.round(this.value(null,"x")),
- y: Math.round(this.value(null,"y"))
- },
- range: this.getRange()
- };
- },
- propagate: function(n,e) {
- $.ui.plugin.call(this, n, [e, this.ui()]);
- this.element.triggerHandler(n == "slide" ? n : "slide"+n, [e, this.ui()], this.options[n]);
- },
- destroy: function() {
-
- this.element
- .removeClass("ui-slider ui-slider-disabled")
- .removeData("slider")
- .unbind(".slider");
-
- if(this.handle && this.handle.length) {
- this.handle
- .unwrap("a");
- this.handle.each(function() {
- $(this).data("mouse").mouseDestroy();
- });
- }
-
- this.generated && this.generated.remove();
-
- },
- setData: function(key, value) {
- $.widget.prototype.setData.apply(this, arguments);
- if (/min|max|steps/.test(key)) {
- this.initBoundaries();
- }
-
- if(key == "range") {
- value ? this.handle.length == 2 && this.createRange() : this.removeRange();
- }
-
- },
-
- init: function() {
-
- var self = this;
- this.element.addClass("ui-slider");
- this.initBoundaries();
-
- // Initialize mouse and key events for interaction
- this.handle = $(this.options.handle, this.element);
- if (!this.handle.length) {
- self.handle = self.generated = $(self.options.handles || [0]).map(function() {
- var handle = $("<div/>").addClass("ui-slider-handle").appendTo(self.element);
- if (this.id)
- handle.attr("id", this.id);
- return handle[0];
- });
- }
-
-
- var handleclass = function(el) {
- this.element = $(el);
- this.element.data("mouse", this);
- this.options = self.options;
-
- this.element.bind("mousedown", function() {
- if(self.currentHandle) this.blur(self.currentHandle);
- self.focus(this,1);
- });
-
- this.mouseInit();
- };
-
- $.extend(handleclass.prototype, $.ui.mouse, {
- mouseStart: function(e) { return self.start.call(self, e, this.element[0]); },
- mouseStop: function(e) { return self.stop.call(self, e, this.element[0]); },
- mouseDrag: function(e) { return self.drag.call(self, e, this.element[0]); },
- mouseCapture: function() { return true; },
- trigger: function(e) { this.mouseDown(e); }
- });
-
-
- $(this.handle)
- .each(function() {
- new handleclass(this);
- })
- .wrap('<a href="javascript:void(0)" style="outline:none;border:none;"></a>')
- .parent()
- .bind('focus', function(e) { self.focus(this.firstChild); })
- .bind('blur', function(e) { self.blur(this.firstChild); })
- .bind('keydown', function(e) { if(!self.options.noKeyboard) self.keydown(e.keyCode, this.firstChild); })
- ;
-
- // Bind the click to the slider itself
- this.element.bind('mousedown.slider', function(e) {
- self.click.apply(self, [e]);
- self.currentHandle.data("mouse").trigger(e);
- self.firstValue = self.firstValue + 1; //This is for always triggering the change event
- });
-
- // Move the first handle to the startValue
- $.each(this.options.handles || [], function(index, handle) {
- self.moveTo(handle.start, index, true);
- });
- if (!isNaN(this.options.startValue))
- this.moveTo(this.options.startValue, 0, true);
-
- this.previousHandle = $(this.handle[0]); //set the previous handle to the first to allow clicking before selecting the handle
- if(this.handle.length == 2 && this.options.range) this.createRange();
- },
- initBoundaries: function() {
-
- var element = this.element[0], o = this.options;
- this.actualSize = { width: this.element.outerWidth() , height: this.element.outerHeight() };
-
- $.extend(o, {
- axis: o.axis || (element.offsetWidth < element.offsetHeight ? 'vertical' : 'horizontal'),
- max: !isNaN(parseInt(o.max,10)) ? { x: parseInt(o.max, 10), y: parseInt(o.max, 10) } : ({ x: o.max && o.max.x || 100, y: o.max && o.max.y || 100 }),
- min: !isNaN(parseInt(o.min,10)) ? { x: parseInt(o.min, 10), y: parseInt(o.min, 10) } : ({ x: o.min && o.min.x || 0, y: o.min && o.min.y || 0 })
- });
- //Prepare the real maxValue
- o.realMax = {
- x: o.max.x - o.min.x,
- y: o.max.y - o.min.y
- };
- //Calculate stepping based on steps
- o.stepping = {
- x: o.stepping && o.stepping.x || parseInt(o.stepping, 10) || (o.steps ? o.realMax.x/(o.steps.x || parseInt(o.steps, 10) || o.realMax.x) : 0),
- y: o.stepping && o.stepping.y || parseInt(o.stepping, 10) || (o.steps ? o.realMax.y/(o.steps.y || parseInt(o.steps, 10) || o.realMax.y) : 0)
- };
- },
-
-
- keydown: function(keyCode, handle) {
- if(/(37|38|39|40)/.test(keyCode)) {
- this.moveTo({
- x: /(37|39)/.test(keyCode) ? (keyCode == 37 ? '-' : '+') + '=' + this.oneStep("x") : 0,
- y: /(38|40)/.test(keyCode) ? (keyCode == 38 ? '-' : '+') + '=' + this.oneStep("y") : 0
- }, handle);
- }
- },
- focus: function(handle,hard) {
- this.currentHandle = $(handle).addClass('ui-slider-handle-active');
- if (hard)
- this.currentHandle.parent()[0].focus();
- },
- blur: function(handle) {
- $(handle).removeClass('ui-slider-handle-active');
- if(this.currentHandle && this.currentHandle[0] == handle) { this.previousHandle = this.currentHandle; this.currentHandle = null; };
- },
- click: function(e) {
- // This method is only used if:
- // - The user didn't click a handle
- // - The Slider is not disabled
- // - There is a current, or previous selected handle (otherwise we wouldn't know which one to move)
-
- var pointer = [e.pageX,e.pageY];
-
- var clickedHandle = false;
- this.handle.each(function() {
- if(this == e.target)
- clickedHandle = true;
- });
- if (clickedHandle || this.options.disabled || !(this.currentHandle || this.previousHandle))
- return;
-
- // If a previous handle was focussed, focus it again
- if (!this.currentHandle && this.previousHandle)
- this.focus(this.previousHandle, true);
-
- // propagate only for distance > 0, otherwise propagation is done my drag
- this.offset = this.element.offset();
-
- this.moveTo({
- y: this.convertValue(e.pageY - this.offset.top - this.currentHandle[0].offsetHeight/2, "y"),
- x: this.convertValue(e.pageX - this.offset.left - this.currentHandle[0].offsetWidth/2, "x")
- }, null, !this.options.distance);
- },
-
-
-
- createRange: function() {
- if(this.rangeElement) return;
- this.rangeElement = $('<div></div>')
- .addClass('ui-slider-range')
- .css({ position: 'absolute' })
- .appendTo(this.element);
- this.updateRange();
- },
- removeRange: function() {
- this.rangeElement.remove();
- this.rangeElement = null;
- },
- updateRange: function() {
- var prop = this.options.axis == "vertical" ? "top" : "left";
- var size = this.options.axis == "vertical" ? "height" : "width";
- this.rangeElement.css(prop, (parseInt($(this.handle[0]).css(prop),10) || 0) + this.handleSize(0, this.options.axis == "vertical" ? "y" : "x")/2);
- this.rangeElement.css(size, (parseInt($(this.handle[1]).css(prop),10) || 0) - (parseInt($(this.handle[0]).css(prop),10) || 0));
- },
- getRange: function() {
- return this.rangeElement ? this.convertValue(parseInt(this.rangeElement.css(this.options.axis == "vertical" ? "height" : "width"),10), this.options.axis == "vertical" ? "y" : "x") : null;
- },
-
- handleIndex: function() {
- return this.handle.index(this.currentHandle[0]);
- },
- value: function(handle, axis) {
- if(this.handle.length == 1) this.currentHandle = this.handle;
- if(!axis) axis = this.options.axis == "vertical" ? "y" : "x";
-
- var curHandle = $(handle != undefined && handle !== null ? this.handle[handle] || handle : this.currentHandle);
-
- if(curHandle.data("mouse").sliderValue) {
- return parseInt(curHandle.data("mouse").sliderValue[axis],10);
- } else {
- return parseInt(((parseInt(curHandle.css(axis == "x" ? "left" : "top"),10) / (this.actualSize[axis == "x" ? "width" : "height"] - this.handleSize(handle,axis))) * this.options.realMax[axis]) + this.options.min[axis],10);
- }
-
- },
- convertValue: function(value,axis) {
- return this.options.min[axis] + (value / (this.actualSize[axis == "x" ? "width" : "height"] - this.handleSize(null,axis))) * this.options.realMax[axis];
- },
-
- translateValue: function(value,axis) {
- return ((value - this.options.min[axis]) / this.options.realMax[axis]) * (this.actualSize[axis == "x" ? "width" : "height"] - this.handleSize(null,axis));
- },
- translateRange: function(value,axis) {
- if (this.rangeElement) {
- if (this.currentHandle[0] == this.handle[0] && value >= this.translateValue(this.value(1),axis))
- value = this.translateValue(this.value(1,axis) - this.oneStep(axis), axis);
- if (this.currentHandle[0] == this.handle[1] && value <= this.translateValue(this.value(0),axis))
- value = this.translateValue(this.value(0,axis) + this.oneStep(axis), axis);
- }
- if (this.options.handles) {
- var handle = this.options.handles[this.handleIndex()];
- if (value < this.translateValue(handle.min,axis)) {
- value = this.translateValue(handle.min,axis);
- } else if (value > this.translateValue(handle.max,axis)) {
- value = this.translateValue(handle.max,axis);
- }
- }
- return value;
- },
- translateLimits: function(value,axis) {
- if (value >= this.actualSize[axis == "x" ? "width" : "height"] - this.handleSize(null,axis))
- value = this.actualSize[axis == "x" ? "width" : "height"] - this.handleSize(null,axis);
- if (value <= 0)
- value = 0;
- return value;
- },
- handleSize: function(handle,axis) {
- return $(handle != undefined && handle !== null ? this.handle[handle] : this.currentHandle)[0]["offset"+(axis == "x" ? "Width" : "Height")];
- },
- oneStep: function(axis) {
- return this.options.stepping[axis] || 1;
- },
-
-
- start: function(e, handle) {
-
- var o = this.options;
- if(o.disabled) return false;
-
- // Prepare the outer size
- this.actualSize = { width: this.element.outerWidth() , height: this.element.outerHeight() };
-
- // This is a especially ugly fix for strange blur events happening on mousemove events
- if (!this.currentHandle)
- this.focus(this.previousHandle, true);
-
- this.offset = this.element.offset();
-
- this.handleOffset = this.currentHandle.offset();
- this.clickOffset = { top: e.pageY - this.handleOffset.top, left: e.pageX - this.handleOffset.left };
-
- this.firstValue = this.value();
-
- this.propagate('start', e);
- this.drag(e, handle);
- return true;
-
- },
- stop: function(e) {
- this.propagate('stop', e);
- if (this.firstValue != this.value())
- this.propagate('change', e);
- // This is a especially ugly fix for strange blur events happening on mousemove events
- this.focus(this.currentHandle, true);
- return false;
- },
- drag: function(e, handle) {
-
- var o = this.options;
- var position = { top: e.pageY - this.offset.top - this.clickOffset.top, left: e.pageX - this.offset.left - this.clickOffset.left};
- if(!this.currentHandle) this.focus(this.previousHandle, true); //This is a especially ugly fix for strange blur events happening on mousemove events
-
- position.left = this.translateLimits(position.left, "x");
- position.top = this.translateLimits(position.top, "y");
-
- if (o.stepping.x) {
- var value = this.convertValue(position.left, "x");
- value = Math.round(value / o.stepping.x) * o.stepping.x;
- position.left = this.translateValue(value, "x");
- }
- if (o.stepping.y) {
- var value = this.convertValue(position.top, "y");
- value = Math.round(value / o.stepping.y) * o.stepping.y;
- position.top = this.translateValue(value, "y");
- }
-
- position.left = this.translateRange(position.left, "x");
- position.top = this.translateRange(position.top, "y");
-
- if(o.axis != "vertical") this.currentHandle.css({ left: position.left });
- if(o.axis != "horizontal") this.currentHandle.css({ top: position.top });
-
- //Store the slider's value
- this.currentHandle.data("mouse").sliderValue = {
- x: Math.round(this.convertValue(position.left, "x")) || 0,
- y: Math.round(this.convertValue(position.top, "y")) || 0
- };
-
- if (this.rangeElement)
- this.updateRange();
- this.propagate('slide', e);
- return false;
- },
-
- moveTo: function(value, handle, noPropagation) {
-
- var o = this.options;
-
- // Prepare the outer size
- this.actualSize = { width: this.element.outerWidth() , height: this.element.outerHeight() };
-
- //If no handle has been passed, no current handle is available and we have multiple handles, return false
- if (handle == undefined && !this.currentHandle && this.handle.length != 1)
- return false;
-
- //If only one handle is available, use it
- if (handle == undefined && !this.currentHandle)
- handle = 0;
-
- if (handle != undefined)
- this.currentHandle = this.previousHandle = $(this.handle[handle] || handle);
-
-
- if(value.x !== undefined && value.y !== undefined) {
- var x = value.x, y = value.y;
- } else {
- var x = value, y = value;
- }
-
- if(x !== undefined && x.constructor != Number) {
- var me = /^\-\=/.test(x), pe = /^\+\=/.test(x);
- if(me || pe) {
- x = this.value(null, "x") + parseInt(x.replace(me ? '=' : '+=', ''), 10);
- } else {
- x = isNaN(parseInt(x, 10)) ? undefined : parseInt(x, 10);
- }
- }
-
- if(y !== undefined && y.constructor != Number) {
- var me = /^\-\=/.test(y), pe = /^\+\=/.test(y);
- if(me || pe) {
- y = this.value(null, "y") + parseInt(y.replace(me ? '=' : '+=', ''), 10);
- } else {
- y = isNaN(parseInt(y, 10)) ? undefined : parseInt(y, 10);
- }
- }
-
- if(o.axis != "vertical" && x !== undefined) {
- if(o.stepping.x) x = Math.round(x / o.stepping.x) * o.stepping.x;
- x = this.translateValue(x, "x");
- x = this.translateLimits(x, "x");
- x = this.translateRange(x, "x");
-
- o.animate ? this.currentHandle.stop().animate({ left: x }, (Math.abs(parseInt(this.currentHandle.css("left")) - x)) * (!isNaN(parseInt(o.animate)) ? o.animate : 5)) : this.currentHandle.css({ left: x });
- }
-
- if(o.axis != "horizontal" && y !== undefined) {
- if(o.stepping.y) y = Math.round(y / o.stepping.y) * o.stepping.y;
- y = this.translateValue(y, "y");
- y = this.translateLimits(y, "y");
- y = this.translateRange(y, "y");
- o.animate ? this.currentHandle.stop().animate({ top: y }, (Math.abs(parseInt(this.currentHandle.css("top")) - y)) * (!isNaN(parseInt(o.animate)) ? o.animate : 5)) : this.currentHandle.css({ top: y });
- }
-
- if (this.rangeElement)
- this.updateRange();
-
- //Store the slider's value
- this.currentHandle.data("mouse").sliderValue = {
- x: Math.round(this.convertValue(x, "x")) || 0,
- y: Math.round(this.convertValue(y, "y")) || 0
- };
-
- if (!noPropagation) {
- this.propagate('start', null);
- this.propagate('stop', null);
- this.propagate('change', null);
- this.propagate("slide", null);
- }
- }
-});
-
-$.ui.slider.getter = "value";
-
-$.ui.slider.defaults = {
- handle: ".ui-slider-handle",
- distance: 1,
- animate: false
-};
-
-})(jQuery);
-/*
- * jQuery UI Tabs
+(function(a){a.effects.slide=function(b){return this.queue(function(){var e=a(this),d=["position","top","left"];var i=a.effects.setMode(e,b.options.mode||"show");var h=b.options.direction||"left";a.effects.save(e,d);e.show();a.effects.createWrapper(e).css({overflow:"hidden"});var f=(h=="up"||h=="down")?"top":"left";var c=(h=="up"||h=="left")?"pos":"neg";var j=b.options.distance||(f=="top"?e.outerHeight({margin:true}):e.outerWidth({margin:true}));if(i=="show"){e.css(f,c=="pos"?-j:j)}var g={};g[f]=(i=="show"?(c=="pos"?"+=":"-="):(c=="pos"?"-=":"+="))+j;e.animate(g,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(i=="hide"){e.hide()}a.effects.restore(e,d);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(this,arguments)}e.dequeue()}})})}})(jQuery);;/*
+ * jQuery UI Effects Transfer 1.7.2
*
- * Copyright (c) 2007, 2008 Klaus Hartl (stilbuero.de)
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
- * http://docs.jquery.com/UI/Tabs
+ * http://docs.jquery.com/UI/Effects/Transfer
*
* Depends:
- * ui.core.js
- */
-(function($) {
-
-$.widget("ui.tabs", {
- init: function() {
- this.options.event += '.tabs'; // namespace event
-
- // create tabs
- this.tabify(true);
- },
- setData: function(key, value) {
- if ((/^selected/).test(key))
- this.select(value);
- else {
- this.options[key] = value;
- this.tabify();
- }
- },
- length: function() {
- return this.$tabs.length;
- },
- tabId: function(a) {
- return a.title && a.title.replace(/\s/g, '_').replace(/[^A-Za-z0-9\-_:\.]/g, '')
- || this.options.idPrefix + $.data(a);
- },
- ui: function(tab, panel) {
- return {
- options: this.options,
- tab: tab,
- panel: panel,
- index: this.$tabs.index(tab)
- };
- },
- tabify: function(init) {
-
- this.$lis = $('li:has(a[href])', this.element);
- this.$tabs = this.$lis.map(function() { return $('a', this)[0]; });
- this.$panels = $([]);
-
- var self = this, o = this.options;
-
- this.$tabs.each(function(i, a) {
- // inline tab
- if (a.hash && a.hash.replace('#', '')) // Safari 2 reports '#' for an empty hash
- self.$panels = self.$panels.add(a.hash);
- // remote tab
- else if ($(a).attr('href') != '#') { // prevent loading the page itself if href is just "#"
- $.data(a, 'href.tabs', a.href); // required for restore on destroy
- $.data(a, 'load.tabs', a.href); // mutable
- var id = self.tabId(a);
- a.href = '#' + id;
- var $panel = $('#' + id);
- if (!$panel.length) {
- $panel = $(o.panelTemplate).attr('id', id).addClass(o.panelClass)
- .insertAfter( self.$panels[i - 1] || self.element );
- $panel.data('destroy.tabs', true);
- }
- self.$panels = self.$panels.add( $panel );
- }
- // invalid tab href
- else
- o.disabled.push(i + 1);
- });
-
- if (init) {
-
- // attach necessary classes for styling if not present
- this.element.addClass(o.navClass);
- this.$panels.each(function() {
- var $this = $(this);
- $this.addClass(o.panelClass);
- });
-
- // Selected tab
- // use "selected" option or try to retrieve:
- // 1. from fragment identifier in url
- // 2. from cookie
- // 3. from selected class attribute on <li>
- if (o.selected === undefined) {
- if (location.hash) {
- this.$tabs.each(function(i, a) {
- if (a.hash == location.hash) {
- o.selected = i;
- // prevent page scroll to fragment
- if ($.browser.msie || $.browser.opera) { // && !o.remote
- var $toShow = $(location.hash), toShowId = $toShow.attr('id');
- $toShow.attr('id', '');
- setTimeout(function() {
- $toShow.attr('id', toShowId); // restore id
- }, 500);
- }
- scrollTo(0, 0);
- return false; // break
- }
- });
- }
- else if (o.cookie) {
- var index = parseInt($.cookie('ui-tabs' + $.data(self.element)),10);
- if (index && self.$tabs[index])
- o.selected = index;
- }
- else if (self.$lis.filter('.' + o.selectedClass).length)
- o.selected = self.$lis.index( self.$lis.filter('.' + o.selectedClass)[0] );
- }
- o.selected = o.selected === null || o.selected !== undefined ? o.selected : 0; // first tab selected by default
-
- // Take disabling tabs via class attribute from HTML
- // into account and update option properly.
- // A selected tab cannot become disabled.
- o.disabled = $.unique(o.disabled.concat(
- $.map(this.$lis.filter('.' + o.disabledClass),
- function(n, i) { return self.$lis.index(n); } )
- )).sort();
- if ($.inArray(o.selected, o.disabled) != -1)
- o.disabled.splice($.inArray(o.selected, o.disabled), 1);
-
- // highlight selected tab
- this.$panels.addClass(o.hideClass);
- this.$lis.removeClass(o.selectedClass);
- if (o.selected !== null) {
- this.$panels.eq(o.selected).show().removeClass(o.hideClass); // use show and remove class to show in any case no matter how it has been hidden before
- this.$lis.eq(o.selected).addClass(o.selectedClass);
-
- // seems to be expected behavior that the show callback is fired
- var onShow = function() {
- $(self.element).triggerHandler('tabsshow',
- [self.fakeEvent('tabsshow'), self.ui(self.$tabs[o.selected], self.$panels[o.selected])], o.show);
- };
-
- // load if remote tab
- if ($.data(this.$tabs[o.selected], 'load.tabs'))
- this.load(o.selected, onShow);
- // just trigger show event
- else
- onShow();
-
- }
-
- // clean up to avoid memory leaks in certain versions of IE 6
- $(window).bind('unload', function() {
- self.$tabs.unbind('.tabs');
- self.$lis = self.$tabs = self.$panels = null;
- });
-
- }
-
- // disable tabs
- for (var i = 0, li; li = this.$lis[i]; i++)
- $(li)[$.inArray(i, o.disabled) != -1 && !$(li).hasClass(o.selectedClass) ? 'addClass' : 'removeClass'](o.disabledClass);
-
- // reset cache if switching from cached to not cached
- if (o.cache === false)
- this.$tabs.removeData('cache.tabs');
-
- // set up animations
- var hideFx, showFx, baseFx = { 'min-width': 0, duration: 1 }, baseDuration = 'normal';
- if (o.fx && o.fx.constructor == Array)
- hideFx = o.fx[0] || baseFx, showFx = o.fx[1] || baseFx;
- else
- hideFx = showFx = o.fx || baseFx;
-
- // reset some styles to maintain print style sheets etc.
- var resetCSS = { display: '', overflow: '', height: '' };
- if (!$.browser.msie) // not in IE to prevent ClearType font issue
- resetCSS.opacity = '';
-
- // Hide a tab, animation prevents browser scrolling to fragment,
- // $show is optional.
- function hideTab(clicked, $hide, $show) {
- $hide.animate(hideFx, hideFx.duration || baseDuration, function() { //
- $hide.addClass(o.hideClass).css(resetCSS); // maintain flexible height and accessibility in print etc.
- if ($.browser.msie && hideFx.opacity)
- $hide[0].style.filter = '';
- if ($show)
- showTab(clicked, $show, $hide);
- });
- }
-
- // Show a tab, animation prevents browser scrolling to fragment,
- // $hide is optional.
- function showTab(clicked, $show, $hide) {
- if (showFx === baseFx)
- $show.css('display', 'block'); // prevent occasionally occuring flicker in Firefox cause by gap between showing and hiding the tab panels
- $show.animate(showFx, showFx.duration || baseDuration, function() {
- $show.removeClass(o.hideClass).css(resetCSS); // maintain flexible height and accessibility in print etc.
- if ($.browser.msie && showFx.opacity)
- $show[0].style.filter = '';
-
- // callback
- $(self.element).triggerHandler('tabsshow',
- [self.fakeEvent('tabsshow'), self.ui(clicked, $show[0])], o.show);
-
- });
- }
-
- // switch a tab
- function switchTab(clicked, $li, $hide, $show) {
- /*if (o.bookmarkable && trueClick) { // add to history only if true click occured, not a triggered click
- $.ajaxHistory.update(clicked.hash);
- }*/
- $li.addClass(o.selectedClass)
- .siblings().removeClass(o.selectedClass);
- hideTab(clicked, $hide, $show);
- }
-
- // attach tab event handler, unbind to avoid duplicates from former tabifying...
- this.$tabs.unbind('.tabs').bind(o.event, function() {
-
- //var trueClick = e.clientX; // add to history only if true click occured, not a triggered click
- var $li = $(this).parents('li:eq(0)'),
- $hide = self.$panels.filter(':visible'),
- $show = $(this.hash);
-
- // If tab is already selected and not unselectable or tab disabled or
- // or is already loading or click callback returns false stop here.
- // Check if click handler returns false last so that it is not executed
- // for a disabled or loading tab!
- if (($li.hasClass(o.selectedClass) && !o.unselect)
- || $li.hasClass(o.disabledClass)
- || $(this).hasClass(o.loadingClass)
- || $(self.element).triggerHandler('tabsselect', [self.fakeEvent('tabsselect'), self.ui(this, $show[0])], o.select) === false
- ) {
- this.blur();
- return false;
- }
-
- self.options.selected = self.$tabs.index(this);
-
- // if tab may be closed
- if (o.unselect) {
- if ($li.hasClass(o.selectedClass)) {
- self.options.selected = null;
- $li.removeClass(o.selectedClass);
- self.$panels.stop();
- hideTab(this, $hide);
- this.blur();
- return false;
- } else if (!$hide.length) {
- self.$panels.stop();
- var a = this;
- self.load(self.$tabs.index(this), function() {
- $li.addClass(o.selectedClass).addClass(o.unselectClass);
- showTab(a, $show);
- });
- this.blur();
- return false;
- }
- }
-
- if (o.cookie)
- $.cookie('ui-tabs' + $.data(self.element), self.options.selected, o.cookie);
-
- // stop possibly running animations
- self.$panels.stop();
-
- // show new tab
- if ($show.length) {
-
- // prevent scrollbar scrolling to 0 and than back in IE7, happens only if bookmarking/history is enabled
- /*if ($.browser.msie && o.bookmarkable) {
- var showId = this.hash.replace('#', '');
- $show.attr('id', '');
- setTimeout(function() {
- $show.attr('id', showId); // restore id
- }, 0);
- }*/
-
- var a = this;
- self.load(self.$tabs.index(this), $hide.length ?
- function() {
- switchTab(a, $li, $hide, $show);
- } :
- function() {
- $li.addClass(o.selectedClass);
- showTab(a, $show);
- }
- );
-
- // Set scrollbar to saved position - need to use timeout with 0 to prevent browser scroll to target of hash
- /*var scrollX = window.pageXOffset || document.documentElement && document.documentElement.scrollLeft || document.body.scrollLeft || 0;
- var scrollY = window.pageYOffset || document.documentElement && document.documentElement.scrollTop || document.body.scrollTop || 0;
- setTimeout(function() {
- scrollTo(scrollX, scrollY);
- }, 0);*/
-
- } else
- throw 'jQuery UI Tabs: Mismatching fragment identifier.';
-
- // Prevent IE from keeping other link focussed when using the back button
- // and remove dotted border from clicked link. This is controlled in modern
- // browsers via CSS, also blur removes focus from address bar in Firefox
- // which can become a usability and annoying problem with tabsRotate.
- if ($.browser.msie)
- this.blur();
-
- //return o.bookmarkable && !!trueClick; // convert trueClick == undefined to Boolean required in IE
- return false;
-
- });
-
- // disable click if event is configured to something else
- if (!(/^click/).test(o.event))
- this.$tabs.bind('click.tabs', function() { return false; });
-
- },
- add: function(url, label, index) {
- if (index == undefined)
- index = this.$tabs.length; // append by default
-
- var o = this.options;
- var $li = $(o.tabTemplate.replace(/#\{href\}/g, url).replace(/#\{label\}/g, label));
- $li.data('destroy.tabs', true);
-
- var id = url.indexOf('#') == 0 ? url.replace('#', '') : this.tabId( $('a:first-child', $li)[0] );
-
- // try to find an existing element before creating a new one
- var $panel = $('#' + id);
- if (!$panel.length) {
- $panel = $(o.panelTemplate).attr('id', id)
- .addClass(o.hideClass)
- .data('destroy.tabs', true);
- }
- $panel.addClass(o.panelClass);
- if (index >= this.$lis.length) {
- $li.appendTo(this.element);
- $panel.appendTo(this.element[0].parentNode);
- } else {
- $li.insertBefore(this.$lis[index]);
- $panel.insertBefore(this.$panels[index]);
- }
-
- o.disabled = $.map(o.disabled,
- function(n, i) { return n >= index ? ++n : n });
-
- this.tabify();
-
- if (this.$tabs.length == 1) {
- $li.addClass(o.selectedClass);
- $panel.removeClass(o.hideClass);
- var href = $.data(this.$tabs[0], 'load.tabs');
- if (href)
- this.load(index, href);
- }
-
- // callback
- this.element.triggerHandler('tabsadd',
- [this.fakeEvent('tabsadd'), this.ui(this.$tabs[index], this.$panels[index])], o.add
- );
- },
- remove: function(index) {
- var o = this.options, $li = this.$lis.eq(index).remove(),
- $panel = this.$panels.eq(index).remove();
-
- // If selected tab was removed focus tab to the right or
- // in case the last tab was removed the tab to the left.
- if ($li.hasClass(o.selectedClass) && this.$tabs.length > 1)
- this.select(index + (index + 1 < this.$tabs.length ? 1 : -1));
-
- o.disabled = $.map($.grep(o.disabled, function(n, i) { return n != index; }),
- function(n, i) { return n >= index ? --n : n });
-
- this.tabify();
-
- // callback
- this.element.triggerHandler('tabsremove',
- [this.fakeEvent('tabsremove'), this.ui($li.find('a')[0], $panel[0])], o.remove
- );
- },
- enable: function(index) {
- var o = this.options;
- if ($.inArray(index, o.disabled) == -1)
- return;
-
- var $li = this.$lis.eq(index).removeClass(o.disabledClass);
- if ($.browser.safari) { // fix disappearing tab (that used opacity indicating disabling) after enabling in Safari 2...
- $li.css('display', 'inline-block');
- setTimeout(function() {
- $li.css('display', 'block');
- }, 0);
- }
-
- o.disabled = $.grep(o.disabled, function(n, i) { return n != index; });
-
- // callback
- this.element.triggerHandler('tabsenable',
- [this.fakeEvent('tabsenable'), this.ui(this.$tabs[index], this.$panels[index])], o.enable
- );
-
- },
- disable: function(index) {
- var self = this, o = this.options;
- if (index != o.selected) { // cannot disable already selected tab
- this.$lis.eq(index).addClass(o.disabledClass);
-
- o.disabled.push(index);
- o.disabled.sort();
-
- // callback
- this.element.triggerHandler('tabsdisable',
- [this.fakeEvent('tabsdisable'), this.ui(this.$tabs[index], this.$panels[index])], o.disable
- );
- }
- },
- select: function(index) {
- if (typeof index == 'string')
- index = this.$tabs.index( this.$tabs.filter('[href$=' + index + ']')[0] );
- this.$tabs.eq(index).trigger(this.options.event);
- },
- load: function(index, callback) { // callback is for internal usage only
-
- var self = this, o = this.options, $a = this.$tabs.eq(index), a = $a[0],
- bypassCache = callback == undefined || callback === false, url = $a.data('load.tabs');
-
- callback = callback || function() {};
-
- // no remote or from cache - just finish with callback
- if (!url || !bypassCache && $.data(a, 'cache.tabs')) {
- callback();
- return;
- }
-
- // load remote from here on
-
- var inner = function(parent) {
- var $parent = $(parent), $inner = $parent.find('*:last');
- return $inner.length && $inner.is(':not(img)') && $inner || $parent;
- };
- var cleanup = function() {
- self.$tabs.filter('.' + o.loadingClass).removeClass(o.loadingClass)
- .each(function() {
- if (o.spinner)
- inner(this).parent().html(inner(this).data('label.tabs'));
- });
- self.xhr = null;
- };
-
- if (o.spinner) {
- var label = inner(a).html();
- inner(a).wrapInner('<em></em>')
- .find('em').data('label.tabs', label).html(o.spinner);
- }
-
- var ajaxOptions = $.extend({}, o.ajaxOptions, {
- url: url,
- success: function(r, s) {
- $(a.hash).html(r);
- cleanup();
-
- if (o.cache)
- $.data(a, 'cache.tabs', true); // if loaded once do not load them again
-
- // callbacks
- $(self.element).triggerHandler('tabsload',
- [self.fakeEvent('tabsload'), self.ui(self.$tabs[index], self.$panels[index])], o.load
- );
- o.ajaxOptions.success && o.ajaxOptions.success(r, s);
-
- // This callback is required because the switch has to take
- // place after loading has completed. Call last in order to
- // fire load before show callback...
- callback();
- }
- });
- if (this.xhr) {
- // terminate pending requests from other tabs and restore tab label
- this.xhr.abort();
- cleanup();
- }
- $a.addClass(o.loadingClass);
- setTimeout(function() { // timeout is again required in IE, "wait" for id being restored
- self.xhr = $.ajax(ajaxOptions);
- }, 0);
-
- },
- url: function(index, url) {
- this.$tabs.eq(index).removeData('cache.tabs').data('load.tabs', url);
- },
- destroy: function() {
- var o = this.options;
- this.element.unbind('.tabs')
- .removeClass(o.navClass).removeData('tabs');
- this.$tabs.each(function() {
- var href = $.data(this, 'href.tabs');
- if (href)
- this.href = href;
- var $this = $(this).unbind('.tabs');
- $.each(['href', 'load', 'cache'], function(i, prefix) {
- $this.removeData(prefix + '.tabs');
- });
- });
- this.$lis.add(this.$panels).each(function() {
- if ($.data(this, 'destroy.tabs'))
- $(this).remove();
- else
- $(this).removeClass([o.selectedClass, o.unselectClass,
- o.disabledClass, o.panelClass, o.hideClass].join(' '));
- });
- },
- fakeEvent: function(type) {
- return $.event.fix({
- type: type,
- target: this.element[0]
- });
- }
-});
-
-$.ui.tabs.defaults = {
- // basic setup
- unselect: false,
- event: 'click',
- disabled: [],
- cookie: null, // e.g. { expires: 7, path: '/', domain: 'jquery.com', secure: true }
- // TODO history: false,
-
- // Ajax
- spinner: 'Loading&#8230;',
- cache: false,
- idPrefix: 'ui-tabs-',
- ajaxOptions: {},
-
- // animations
- fx: null, // e.g. { height: 'toggle', opacity: 'toggle', duration: 200 }
-
- // templates
- tabTemplate: '<li><a href="#{href}"><span>#{label}</span></a></li>',
- panelTemplate: '<div></div>',
-
- // CSS classes
- navClass: 'ui-tabs-nav',
- selectedClass: 'ui-tabs-selected',
- unselectClass: 'ui-tabs-unselect',
- disabledClass: 'ui-tabs-disabled',
- panelClass: 'ui-tabs-panel',
- hideClass: 'ui-tabs-hide',
- loadingClass: 'ui-tabs-loading'
-};
-
-$.ui.tabs.getter = "length";
-
-/*
- * Tabs Extensions
- */
-
-/*
- * Rotate
+ * effects.core.js
*/
-$.extend($.ui.tabs.prototype, {
- rotation: null,
- rotate: function(ms, continuing) {
-
- continuing = continuing || false;
-
- var self = this, t = this.options.selected;
-
- function start() {
- self.rotation = setInterval(function() {
- t = ++t < self.$tabs.length ? t : 0;
- self.select(t);
- }, ms);
- }
-
- function stop(e) {
- if (!e || e.clientX) { // only in case of a true click
- clearInterval(self.rotation);
- }
- }
-
- // start interval
- if (ms) {
- start();
- if (!continuing)
- this.$tabs.bind(this.options.event, stop);
- else
- this.$tabs.bind(this.options.event, function() {
- stop();
- t = self.options.selected;
- start();
- });
- }
- // stop interval
- else {
- stop();
- this.$tabs.unbind(this.options.event, stop);
- }
- }
-});
-
-})(jQuery);
+(function(a){a.effects.transfer=function(b){return this.queue(function(){var f=a(this),h=a(b.options.to),e=h.offset(),g={top:e.top,left:e.left,height:h.innerHeight(),width:h.innerWidth()},d=f.offset(),c=a('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(b.options.className).css({top:d.top,left:d.left,height:f.innerHeight(),width:f.innerWidth(),position:"absolute"}).animate(g,b.duration,b.options.easing,function(){c.remove();(b.callback&&b.callback.apply(f[0],arguments));f.dequeue()})})}})(jQuery);; \ No newline at end of file
diff --git a/template-common/lib/ui/minified/effects.blind.min.js b/template-common/lib/ui/minified/effects.blind.min.js
index 4a1a7d352..42694154e 100644
--- a/template-common/lib/ui/minified/effects.blind.min.js
+++ b/template-common/lib/ui/minified/effects.blind.min.js
@@ -1 +1 @@
-(function(A){A.effects.blind=function(B){return this.queue(function(){var D=A(this),C=["position","top","left"];var H=A.effects.setMode(D,B.options.mode||"hide");var G=B.options.direction||"vertical";A.effects.save(D,C);D.show();var J=A.effects.createWrapper(D).css({overflow:"hidden"});var E=(G=="vertical")?"height":"width";var I=(G=="vertical")?J.height():J.width();if(H=="show"){J.css(E,0)}var F={};F[E]=H=="show"?I:0;J.animate(F,B.duration,B.options.easing,function(){if(H=="hide"){D.hide()}A.effects.restore(D,C);A.effects.removeWrapper(D);if(B.callback){B.callback.apply(D[0],arguments)}D.dequeue()})})}})(jQuery) \ No newline at end of file
+(function($){$.effects.blind=function(o){return this.queue(function(){var el=$(this),props=["position","top","left"];var mode=$.effects.setMode(el,o.options.mode||"hide");var direction=o.options.direction||"vertical";$.effects.save(el,props);el.show();var wrapper=$.effects.createWrapper(el).css({overflow:"hidden"});var ref=(direction=="vertical")?"height":"width";var distance=(direction=="vertical")?wrapper.height():wrapper.width();if(mode=="show"){wrapper.css(ref,0)}var animation={};animation[ref]=mode=="show"?distance:0;wrapper.animate(animation,o.duration,o.options.easing,function(){if(mode=="hide"){el.hide()}$.effects.restore(el,props);$.effects.removeWrapper(el);if(o.callback){o.callback.apply(el[0],arguments)}el.dequeue()})})}})(jQuery); \ No newline at end of file
diff --git a/template-common/lib/ui/minified/effects.bounce.min.js b/template-common/lib/ui/minified/effects.bounce.min.js
index e6e8ac5e2..083aefff2 100644
--- a/template-common/lib/ui/minified/effects.bounce.min.js
+++ b/template-common/lib/ui/minified/effects.bounce.min.js
@@ -1 +1 @@
-(function(A){A.effects.bounce=function(B){return this.queue(function(){var E=A(this),K=["position","top","left"];var J=A.effects.setMode(E,B.options.mode||"effect");var M=B.options.direction||"up";var C=B.options.distance||20;var D=B.options.times||5;var G=B.duration||250;if(/show|hide/.test(J)){K.push("opacity")}A.effects.save(E,K);E.show();A.effects.createWrapper(E);var F=(M=="up"||M=="down")?"top":"left";var O=(M=="up"||M=="left")?"pos":"neg";var C=B.options.distance||(F=="top"?E.outerHeight({margin:true})/3:E.outerWidth({margin:true})/3);if(J=="show"){E.css("opacity",0).css(F,O=="pos"?-C:C)}if(J=="hide"){C=C/(D*2)}if(J!="hide"){D--}if(J=="show"){var H={opacity:1};H[F]=(O=="pos"?"+=":"-=")+C;E.animate(H,G/2,B.options.easing);C=C/2;D--}for(var I=0;I<D;I++){var N={},L={};N[F]=(O=="pos"?"-=":"+=")+C;L[F]=(O=="pos"?"+=":"-=")+C;E.animate(N,G/2,B.options.easing).animate(L,G/2,B.options.easing);C=(J=="hide")?C*2:C/2}if(J=="hide"){var H={opacity:0};H[F]=(O=="pos"?"-=":"+=")+C;E.animate(H,G/2,B.options.easing,function(){E.hide();A.effects.restore(E,K);A.effects.removeWrapper(E);if(B.callback){B.callback.apply(this,arguments)}})}else{var N={},L={};N[F]=(O=="pos"?"-=":"+=")+C;L[F]=(O=="pos"?"+=":"-=")+C;E.animate(N,G/2,B.options.easing).animate(L,G/2,B.options.easing,function(){A.effects.restore(E,K);A.effects.removeWrapper(E);if(B.callback){B.callback.apply(this,arguments)}})}E.queue("fx",function(){E.dequeue()});E.dequeue()})}})(jQuery) \ No newline at end of file
+(function($){$.effects.bounce=function(o){return this.queue(function(){var el=$(this),props=["position","top","left"];var mode=$.effects.setMode(el,o.options.mode||"effect");var direction=o.options.direction||"up";var distance=o.options.distance||20;var times=o.options.times||5;var speed=o.duration||250;if(/show|hide/.test(mode)){props.push("opacity")}$.effects.save(el,props);el.show();$.effects.createWrapper(el);var ref=(direction=="up"||direction=="down")?"top":"left";var motion=(direction=="up"||direction=="left")?"pos":"neg";var distance=o.options.distance||(ref=="top"?el.outerHeight({margin:true})/3:el.outerWidth({margin:true})/3);if(mode=="show"){el.css("opacity",0).css(ref,motion=="pos"?-distance:distance)}if(mode=="hide"){distance=distance/(times*2)}if(mode!="hide"){times--}if(mode=="show"){var animation={opacity:1};animation[ref]=(motion=="pos"?"+=":"-=")+distance;el.animate(animation,speed/2,o.options.easing);distance=distance/2;times--}for(var i=0;i<times;i++){var animation1={},animation2={};animation1[ref]=(motion=="pos"?"-=":"+=")+distance;animation2[ref]=(motion=="pos"?"+=":"-=")+distance;el.animate(animation1,speed/2,o.options.easing).animate(animation2,speed/2,o.options.easing);distance=(mode=="hide")?distance*2:distance/2}if(mode=="hide"){var animation={opacity:0};animation[ref]=(motion=="pos"?"-=":"+=")+distance;el.animate(animation,speed/2,o.options.easing,function(){el.hide();$.effects.restore(el,props);$.effects.removeWrapper(el);if(o.callback){o.callback.apply(this,arguments)}})}else{var animation1={},animation2={};animation1[ref]=(motion=="pos"?"-=":"+=")+distance;animation2[ref]=(motion=="pos"?"+=":"-=")+distance;el.animate(animation1,speed/2,o.options.easing).animate(animation2,speed/2,o.options.easing,function(){$.effects.restore(el,props);$.effects.removeWrapper(el);if(o.callback){o.callback.apply(this,arguments)}})}el.queue("fx",function(){el.dequeue()});el.dequeue()})}})(jQuery); \ No newline at end of file
diff --git a/template-common/lib/ui/minified/effects.clip.min.js b/template-common/lib/ui/minified/effects.clip.min.js
index e5aced327..3ee699912 100644
--- a/template-common/lib/ui/minified/effects.clip.min.js
+++ b/template-common/lib/ui/minified/effects.clip.min.js
@@ -1 +1 @@
-(function(A){A.effects.clip=function(B){return this.queue(function(){var F=A(this),J=["position","top","left","height","width"];var I=A.effects.setMode(F,B.options.mode||"hide");var K=B.options.direction||"vertical";A.effects.save(F,J);F.show();var C=A.effects.createWrapper(F).css({overflow:"hidden"});var E=F[0].tagName=="IMG"?C:F;var G={size:(K=="vertical")?"height":"width",position:(K=="vertical")?"top":"left"};var D=(K=="vertical")?E.height():E.width();if(I=="show"){E.css(G.size,0);E.css(G.position,D/2)}var H={};H[G.size]=I=="show"?D:0;H[G.position]=I=="show"?0:D/2;E.animate(H,{queue:false,duration:B.duration,easing:B.options.easing,complete:function(){if(I=="hide"){F.hide()}A.effects.restore(F,J);A.effects.removeWrapper(F);if(B.callback){B.callback.apply(F[0],arguments)}F.dequeue()}})})}})(jQuery) \ No newline at end of file
+(function($){$.effects.clip=function(o){return this.queue(function(){var el=$(this),props=["position","top","left","height","width"];var mode=$.effects.setMode(el,o.options.mode||"hide");var direction=o.options.direction||"vertical";$.effects.save(el,props);el.show();var wrapper=$.effects.createWrapper(el).css({overflow:"hidden"});var animate=el[0].tagName=="IMG"?wrapper:el;var ref={size:(direction=="vertical")?"height":"width",position:(direction=="vertical")?"top":"left"};var distance=(direction=="vertical")?animate.height():animate.width();if(mode=="show"){animate.css(ref.size,0);animate.css(ref.position,distance/2)}var animation={};animation[ref.size]=mode=="show"?distance:0;animation[ref.position]=mode=="show"?0:distance/2;animate.animate(animation,{queue:false,duration:o.duration,easing:o.options.easing,complete:function(){if(mode=="hide"){el.hide()}$.effects.restore(el,props);$.effects.removeWrapper(el);if(o.callback){o.callback.apply(el[0],arguments)}el.dequeue()}})})}})(jQuery); \ No newline at end of file
diff --git a/template-common/lib/ui/minified/effects.core.min.js b/template-common/lib/ui/minified/effects.core.min.js
new file mode 100644
index 000000000..4b6203057
--- /dev/null
+++ b/template-common/lib/ui/minified/effects.core.min.js
@@ -0,0 +1 @@
+jQuery.effects||(function($){$.effects={version:"1.7.2",save:function(element,set){for(var i=0;i<set.length;i++){if(set[i]!==null){element.data("ec.storage."+set[i],element[0].style[set[i]])}}},restore:function(element,set){for(var i=0;i<set.length;i++){if(set[i]!==null){element.css(set[i],element.data("ec.storage."+set[i]))}}},setMode:function(el,mode){if(mode=="toggle"){mode=el.is(":hidden")?"show":"hide"}return mode},getBaseline:function(origin,original){var y,x;switch(origin[0]){case"top":y=0;break;case"middle":y=0.5;break;case"bottom":y=1;break;default:y=origin[0]/original.height}switch(origin[1]){case"left":x=0;break;case"center":x=0.5;break;case"right":x=1;break;default:x=origin[1]/original.width}return{x:x,y:y}},createWrapper:function(element){if(element.parent().is(".ui-effects-wrapper")){return element.parent()}var props={width:element.outerWidth(true),height:element.outerHeight(true),"float":element.css("float")};element.wrap('<div class="ui-effects-wrapper" style="font-size:100%;background:transparent;border:none;margin:0;padding:0"></div>');var wrapper=element.parent();if(element.css("position")=="static"){wrapper.css({position:"relative"});element.css({position:"relative"})}else{var top=element.css("top");if(isNaN(parseInt(top,10))){top="auto"}var left=element.css("left");if(isNaN(parseInt(left,10))){left="auto"}wrapper.css({position:element.css("position"),top:top,left:left,zIndex:element.css("z-index")}).show();element.css({position:"relative",top:0,left:0})}wrapper.css(props);return wrapper},removeWrapper:function(element){if(element.parent().is(".ui-effects-wrapper")){return element.parent().replaceWith(element)}return element},setTransition:function(element,list,factor,value){value=value||{};$.each(list,function(i,x){unit=element.cssUnit(x);if(unit[0]>0){value[x]=unit[0]*factor+unit[1]}});return value},animateClass:function(value,duration,easing,callback){var cb=(typeof easing=="function"?easing:(callback?callback:null));var ea=(typeof easing=="string"?easing:null);return this.each(function(){var offset={};var that=$(this);var oldStyleAttr=that.attr("style")||"";if(typeof oldStyleAttr=="object"){oldStyleAttr=oldStyleAttr.cssText}if(value.toggle){that.hasClass(value.toggle)?value.remove=value.toggle:value.add=value.toggle}var oldStyle=$.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(value.add){that.addClass(value.add)}if(value.remove){that.removeClass(value.remove)}var newStyle=$.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(value.add){that.removeClass(value.add)}if(value.remove){that.addClass(value.remove)}for(var n in newStyle){if(typeof newStyle[n]!="function"&&newStyle[n]&&n.indexOf("Moz")==-1&&n.indexOf("length")==-1&&newStyle[n]!=oldStyle[n]&&(n.match(/color/i)||(!n.match(/color/i)&&!isNaN(parseInt(newStyle[n],10))))&&(oldStyle.position!="static"||(oldStyle.position=="static"&&!n.match(/left|top|bottom|right/)))){offset[n]=newStyle[n]}}that.animate(offset,duration,ea,function(){if(typeof $(this).attr("style")=="object"){$(this).attr("style")["cssText"]="";$(this).attr("style")["cssText"]=oldStyleAttr}else{$(this).attr("style",oldStyleAttr)}if(value.add){$(this).addClass(value.add)}if(value.remove){$(this).removeClass(value.remove)}if(cb){cb.apply(this,arguments)}})})}};function _normalizeArguments(a,m){var o=a[1]&&a[1].constructor==Object?a[1]:{};if(m){o.mode=m}var speed=a[1]&&a[1].constructor!=Object?a[1]:(o.duration?o.duration:a[2]);speed=$.fx.off?0:typeof speed==="number"?speed:$.fx.speeds[speed]||$.fx.speeds._default;var callback=o.callback||($.isFunction(a[1])&&a[1])||($.isFunction(a[2])&&a[2])||($.isFunction(a[3])&&a[3]);return[a[0],o,speed,callback]}$.fn.extend({_show:$.fn.show,_hide:$.fn.hide,__toggle:$.fn.toggle,_addClass:$.fn.addClass,_removeClass:$.fn.removeClass,_toggleClass:$.fn.toggleClass,effect:function(fx,options,speed,callback){return $.effects[fx]?$.effects[fx].call(this,{method:fx,options:options||{},duration:speed,callback:callback}):null},show:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))){return this._show.apply(this,arguments)}else{return this.effect.apply(this,_normalizeArguments(arguments,"show"))}},hide:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))){return this._hide.apply(this,arguments)}else{return this.effect.apply(this,_normalizeArguments(arguments,"hide"))}},toggle:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))||($.isFunction(arguments[0])||typeof arguments[0]=="boolean")){return this.__toggle.apply(this,arguments)}else{return this.effect.apply(this,_normalizeArguments(arguments,"toggle"))}},addClass:function(classNames,speed,easing,callback){return speed?$.effects.animateClass.apply(this,[{add:classNames},speed,easing,callback]):this._addClass(classNames)},removeClass:function(classNames,speed,easing,callback){return speed?$.effects.animateClass.apply(this,[{remove:classNames},speed,easing,callback]):this._removeClass(classNames)},toggleClass:function(classNames,speed,easing,callback){return((typeof speed!=="boolean")&&speed)?$.effects.animateClass.apply(this,[{toggle:classNames},speed,easing,callback]):this._toggleClass(classNames,speed)},morph:function(remove,add,speed,easing,callback){return $.effects.animateClass.apply(this,[{add:add,remove:remove},speed,easing,callback])},switchClass:function(){return this.morph.apply(this,arguments)},cssUnit:function(key){var style=this.css(key),val=[];$.each(["em","px","%","pt"],function(i,unit){if(style.indexOf(unit)>0){val=[parseFloat(style),unit]}});return val}});$.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(i,attr){$.fx.step[attr]=function(fx){if(fx.state==0){fx.start=getColor(fx.elem,attr);fx.end=getRGB(fx.end)}fx.elem.style[attr]="rgb("+[Math.max(Math.min(parseInt((fx.pos*(fx.end[0]-fx.start[0]))+fx.start[0],10),255),0),Math.max(Math.min(parseInt((fx.pos*(fx.end[1]-fx.start[1]))+fx.start[1],10),255),0),Math.max(Math.min(parseInt((fx.pos*(fx.end[2]-fx.start[2]))+fx.start[2],10),255),0)].join(",")+")"}});function getRGB(color){var result;if(color&&color.constructor==Array&&color.length==3){return color}if(result=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color)){return[parseInt(result[1],10),parseInt(result[2],10),parseInt(result[3],10)]}if(result=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color)){return[parseFloat(result[1])*2.55,parseFloat(result[2])*2.55,parseFloat(result[3])*2.55]}if(result=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color)){return[parseInt(result[1],16),parseInt(result[2],16),parseInt(result[3],16)]}if(result=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color)){return[parseInt(result[1]+result[1],16),parseInt(result[2]+result[2],16),parseInt(result[3]+result[3],16)]}if(result=/rgba\(0, 0, 0, 0\)/.exec(color)){return colors.transparent}return colors[$.trim(color).toLowerCase()]}function getColor(elem,attr){var color;do{color=$.curCSS(elem,attr);if(color!=""&&color!="transparent"||$.nodeName(elem,"body")){break}attr="backgroundColor"}while(elem=elem.parentNode);return getRGB(color)}var colors={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]};$.easing.jswing=$.easing.swing;$.extend($.easing,{def:"easeOutQuad",swing:function(x,t,b,c,d){return $.easing[$.easing.def](x,t,b,c,d)},easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b},easeOutQuad:function(x,t,b,c,d){return -c*(t/=d)*(t-2)+b},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1){return c/2*t*t+b}return -c/2*((--t)*(t-2)-1)+b},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1){return c/2*t*t*t+b}return c/2*((t-=2)*t*t+2)+b},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b},easeOutQuart:function(x,t,b,c,d){return -c*((t=t/d-1)*t*t*t-1)+b},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1){return c/2*t*t*t*t+b}return -c/2*((t-=2)*t*t*t-2)+b},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1){return c/2*t*t*t*t*t+b}return c/2*((t-=2)*t*t*t*t+2)+b},easeInSine:function(x,t,b,c,d){return -c*Math.cos(t/d*(Math.PI/2))+c+b},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b},easeInOutSine:function(x,t,b,c,d){return -c/2*(Math.cos(Math.PI*t/d)-1)+b},easeInExpo:function(x,t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b},easeOutExpo:function(x,t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b},easeInOutExpo:function(x,t,b,c,d){if(t==0){return b}if(t==d){return b+c}if((t/=d/2)<1){return c/2*Math.pow(2,10*(t-1))+b}return c/2*(-Math.pow(2,-10*--t)+2)+b},easeInCirc:function(x,t,b,c,d){return -c*(Math.sqrt(1-(t/=d)*t)-1)+b},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1){return -c/2*(Math.sqrt(1-t*t)-1)+b}return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0){return b}if((t/=d)==1){return b+c}if(!p){p=d*0.3}if(a<Math.abs(c)){a=c;var s=p/4}else{var s=p/(2*Math.PI)*Math.asin(c/a)}return -(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b},easeOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0){return b}if((t/=d)==1){return b+c}if(!p){p=d*0.3}if(a<Math.abs(c)){a=c;var s=p/4}else{var s=p/(2*Math.PI)*Math.asin(c/a)}return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b},easeInOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0){return b}if((t/=d/2)==2){return b+c}if(!p){p=d*(0.3*1.5)}if(a<Math.abs(c)){a=c;var s=p/4}else{var s=p/(2*Math.PI)*Math.asin(c/a)}if(t<1){return -0.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b}return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*0.5+c+b},easeInBack:function(x,t,b,c,d,s){if(s==undefined){s=1.70158}return c*(t/=d)*t*((s+1)*t-s)+b},easeOutBack:function(x,t,b,c,d,s){if(s==undefined){s=1.70158}return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},easeInOutBack:function(x,t,b,c,d,s){if(s==undefined){s=1.70158}if((t/=d/2)<1){return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b}return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b},easeInBounce:function(x,t,b,c,d){return c-$.easing.easeOutBounce(x,d-t,0,c,d)+b},easeOutBounce:function(x,t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b}else{if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+0.75)+b}else{if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+0.9375)+b}else{return c*(7.5625*(t-=(2.625/2.75))*t+0.984375)+b}}}},easeInOutBounce:function(x,t,b,c,d){if(t<d/2){return $.easing.easeInBounce(x,t*2,0,c,d)*0.5+b}return $.easing.easeOutBounce(x,t*2-d,0,c,d)*0.5+c*0.5+b}})})(jQuery); \ No newline at end of file
diff --git a/template-common/lib/ui/minified/effects.drop.min.js b/template-common/lib/ui/minified/effects.drop.min.js
index a00c79c1e..ba3544ee4 100644
--- a/template-common/lib/ui/minified/effects.drop.min.js
+++ b/template-common/lib/ui/minified/effects.drop.min.js
@@ -1 +1 @@
-(function(A){A.effects.drop=function(B){return this.queue(function(){var E=A(this),D=["position","top","left","opacity"];var I=A.effects.setMode(E,B.options.mode||"hide");var H=B.options.direction||"left";A.effects.save(E,D);E.show();A.effects.createWrapper(E);var F=(H=="up"||H=="down")?"top":"left";var C=(H=="up"||H=="left")?"pos":"neg";var J=B.options.distance||(F=="top"?E.outerHeight({margin:true})/2:E.outerWidth({margin:true})/2);if(I=="show"){E.css("opacity",0).css(F,C=="pos"?-J:J)}var G={opacity:I=="show"?1:0};G[F]=(I=="show"?(C=="pos"?"+=":"-="):(C=="pos"?"-=":"+="))+J;E.animate(G,{queue:false,duration:B.duration,easing:B.options.easing,complete:function(){if(I=="hide"){E.hide()}A.effects.restore(E,D);A.effects.removeWrapper(E);if(B.callback){B.callback.apply(this,arguments)}E.dequeue()}})})}})(jQuery) \ No newline at end of file
+(function($){$.effects.drop=function(o){return this.queue(function(){var el=$(this),props=["position","top","left","opacity"];var mode=$.effects.setMode(el,o.options.mode||"hide");var direction=o.options.direction||"left";$.effects.save(el,props);el.show();$.effects.createWrapper(el);var ref=(direction=="up"||direction=="down")?"top":"left";var motion=(direction=="up"||direction=="left")?"pos":"neg";var distance=o.options.distance||(ref=="top"?el.outerHeight({margin:true})/2:el.outerWidth({margin:true})/2);if(mode=="show"){el.css("opacity",0).css(ref,motion=="pos"?-distance:distance)}var animation={opacity:mode=="show"?1:0};animation[ref]=(mode=="show"?(motion=="pos"?"+=":"-="):(motion=="pos"?"-=":"+="))+distance;el.animate(animation,{queue:false,duration:o.duration,easing:o.options.easing,complete:function(){if(mode=="hide"){el.hide()}$.effects.restore(el,props);$.effects.removeWrapper(el);if(o.callback){o.callback.apply(this,arguments)}el.dequeue()}})})}})(jQuery); \ No newline at end of file
diff --git a/template-common/lib/ui/minified/effects.explode.min.js b/template-common/lib/ui/minified/effects.explode.min.js
index 3cbf3be12..89e6f528e 100644
--- a/template-common/lib/ui/minified/effects.explode.min.js
+++ b/template-common/lib/ui/minified/effects.explode.min.js
@@ -1 +1 @@
-(function(A){A.effects.explode=function(B){return this.queue(function(){var I=B.options.pieces?Math.round(Math.sqrt(B.options.pieces)):3;var E=B.options.pieces?Math.round(Math.sqrt(B.options.pieces)):3;B.options.mode=B.options.mode=="toggle"?(A(this).is(":visible")?"hide":"show"):B.options.mode;var H=A(this).show().css("visibility","hidden");var J=H.offset();J.top-=parseInt(H.css("marginTop"))||0;J.left-=parseInt(H.css("marginLeft"))||0;var G=H.outerWidth(true);var C=H.outerHeight(true);for(var F=0;F<I;F++){for(var D=0;D<E;D++){H.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-D*(G/E),top:-F*(C/I)}).parent().addClass("effects-explode").css({position:"absolute",overflow:"hidden",width:G/E,height:C/I,left:J.left+D*(G/E)+(B.options.mode=="show"?(D-Math.floor(E/2))*(G/E):0),top:J.top+F*(C/I)+(B.options.mode=="show"?(F-Math.floor(I/2))*(C/I):0),opacity:B.options.mode=="show"?0:1}).animate({left:J.left+D*(G/E)+(B.options.mode=="show"?0:(D-Math.floor(E/2))*(G/E)),top:J.top+F*(C/I)+(B.options.mode=="show"?0:(F-Math.floor(I/2))*(C/I)),opacity:B.options.mode=="show"?1:0},B.duration||500)}}setTimeout(function(){B.options.mode=="show"?H.css({visibility:"visible"}):H.css({visibility:"visible"}).hide();if(B.callback){B.callback.apply(H[0])}H.dequeue();A(".effects-explode").remove()},B.duration||500)})}})(jQuery) \ No newline at end of file
+(function($){$.effects.explode=function(o){return this.queue(function(){var rows=o.options.pieces?Math.round(Math.sqrt(o.options.pieces)):3;var cells=o.options.pieces?Math.round(Math.sqrt(o.options.pieces)):3;o.options.mode=o.options.mode=="toggle"?($(this).is(":visible")?"hide":"show"):o.options.mode;var el=$(this).show().css("visibility","hidden");var offset=el.offset();offset.top-=parseInt(el.css("marginTop"),10)||0;offset.left-=parseInt(el.css("marginLeft"),10)||0;var width=el.outerWidth(true);var height=el.outerHeight(true);for(var i=0;i<rows;i++){for(var j=0;j<cells;j++){el.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-j*(width/cells),top:-i*(height/rows)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:width/cells,height:height/rows,left:offset.left+j*(width/cells)+(o.options.mode=="show"?(j-Math.floor(cells/2))*(width/cells):0),top:offset.top+i*(height/rows)+(o.options.mode=="show"?(i-Math.floor(rows/2))*(height/rows):0),opacity:o.options.mode=="show"?0:1}).animate({left:offset.left+j*(width/cells)+(o.options.mode=="show"?0:(j-Math.floor(cells/2))*(width/cells)),top:offset.top+i*(height/rows)+(o.options.mode=="show"?0:(i-Math.floor(rows/2))*(height/rows)),opacity:o.options.mode=="show"?1:0},o.duration||500)}}setTimeout(function(){o.options.mode=="show"?el.css({visibility:"visible"}):el.css({visibility:"visible"}).hide();if(o.callback){o.callback.apply(el[0])}el.dequeue();$("div.ui-effects-explode").remove()},o.duration||500)})}})(jQuery); \ No newline at end of file
diff --git a/template-common/lib/ui/minified/effects.fold.min.js b/template-common/lib/ui/minified/effects.fold.min.js
index 17c678d63..bbe9846e8 100644
--- a/template-common/lib/ui/minified/effects.fold.min.js
+++ b/template-common/lib/ui/minified/effects.fold.min.js
@@ -1 +1 @@
-(function(A){A.effects.fold=function(B){return this.queue(function(){var E=A(this),J=["position","top","left"];var G=A.effects.setMode(E,B.options.mode||"hide");var N=B.options.size||15;var M=!(!B.options.horizFirst);A.effects.save(E,J);E.show();var D=A.effects.createWrapper(E).css({overflow:"hidden"});var H=((G=="show")!=M);var F=H?["width","height"]:["height","width"];var C=H?[D.width(),D.height()]:[D.height(),D.width()];var I=/([0-9]+)%/.exec(N);if(I){N=parseInt(I[1])/100*C[G=="hide"?0:1]}if(G=="show"){D.css(M?{height:0,width:N}:{height:N,width:0})}var L={},K={};L[F[0]]=G=="show"?C[0]:N;K[F[1]]=G=="show"?C[1]:0;D.animate(L,B.duration/2,B.options.easing).animate(K,B.duration/2,B.options.easing,function(){if(G=="hide"){E.hide()}A.effects.restore(E,J);A.effects.removeWrapper(E);if(B.callback){B.callback.apply(E[0],arguments)}E.dequeue()})})}})(jQuery) \ No newline at end of file
+(function($){$.effects.fold=function(o){return this.queue(function(){var el=$(this),props=["position","top","left"];var mode=$.effects.setMode(el,o.options.mode||"hide");var size=o.options.size||15;var horizFirst=!(!o.options.horizFirst);var duration=o.duration?o.duration/2:$.fx.speeds._default/2;$.effects.save(el,props);el.show();var wrapper=$.effects.createWrapper(el).css({overflow:"hidden"});var widthFirst=((mode=="show")!=horizFirst);var ref=widthFirst?["width","height"]:["height","width"];var distance=widthFirst?[wrapper.width(),wrapper.height()]:[wrapper.height(),wrapper.width()];var percent=/([0-9]+)%/.exec(size);if(percent){size=parseInt(percent[1],10)/100*distance[mode=="hide"?0:1]}if(mode=="show"){wrapper.css(horizFirst?{height:0,width:size}:{height:size,width:0})}var animation1={},animation2={};animation1[ref[0]]=mode=="show"?distance[0]:size;animation2[ref[1]]=mode=="show"?distance[1]:0;wrapper.animate(animation1,duration,o.options.easing).animate(animation2,duration,o.options.easing,function(){if(mode=="hide"){el.hide()}$.effects.restore(el,props);$.effects.removeWrapper(el);if(o.callback){o.callback.apply(el[0],arguments)}el.dequeue()})})}})(jQuery); \ No newline at end of file
diff --git a/template-common/lib/ui/minified/effects.highlight.min.js b/template-common/lib/ui/minified/effects.highlight.min.js
index d33041802..bc20b6eea 100644
--- a/template-common/lib/ui/minified/effects.highlight.min.js
+++ b/template-common/lib/ui/minified/effects.highlight.min.js
@@ -1 +1 @@
-(function(A){A.effects.highlight=function(B){return this.queue(function(){var E=A(this),D=["backgroundImage","backgroundColor","opacity"];var H=A.effects.setMode(E,B.options.mode||"show");var C=B.options.color||"#ffff99";var G=E.css("backgroundColor");A.effects.save(E,D);E.show();E.css({backgroundImage:"none",backgroundColor:C});var F={backgroundColor:G};if(H=="hide"){F["opacity"]=0}E.animate(F,{queue:false,duration:B.duration,easing:B.options.easing,complete:function(){if(H=="hide"){E.hide()}A.effects.restore(E,D);if(H=="show"&&jQuery.browser.msie){this.style.removeAttribute("filter")}if(B.callback){B.callback.apply(this,arguments)}E.dequeue()}})})}})(jQuery) \ No newline at end of file
+(function($){$.effects.highlight=function(o){return this.queue(function(){var el=$(this),props=["backgroundImage","backgroundColor","opacity"];var mode=$.effects.setMode(el,o.options.mode||"show");var color=o.options.color||"#ffff99";var oldColor=el.css("backgroundColor");$.effects.save(el,props);el.show();el.css({backgroundImage:"none",backgroundColor:color});var animation={backgroundColor:oldColor};if(mode=="hide"){animation.opacity=0}el.animate(animation,{queue:false,duration:o.duration,easing:o.options.easing,complete:function(){if(mode=="hide"){el.hide()}$.effects.restore(el,props);if(mode=="show"&&$.browser.msie){this.style.removeAttribute("filter")}if(o.callback){o.callback.apply(this,arguments)}el.dequeue()}})})}})(jQuery); \ No newline at end of file
diff --git a/template-common/lib/ui/minified/effects.pulsate.min.js b/template-common/lib/ui/minified/effects.pulsate.min.js
index 8e29ced18..e1e49b0fa 100644
--- a/template-common/lib/ui/minified/effects.pulsate.min.js
+++ b/template-common/lib/ui/minified/effects.pulsate.min.js
@@ -1 +1 @@
-(function(A){A.effects.pulsate=function(B){return this.queue(function(){var D=A(this);var F=A.effects.setMode(D,B.options.mode||"show");var E=B.options.times||5;if(F=="hide"){E--}if(D.is(":hidden")){D.css("opacity",0);D.show();D.animate({opacity:1},B.duration/2,B.options.easing);E=E-2}for(var C=0;C<E;C++){D.animate({opacity:0},B.duration/2,B.options.easing).animate({opacity:1},B.duration/2,B.options.easing)}if(F=="hide"){D.animate({opacity:0},B.duration/2,B.options.easing,function(){D.hide();if(B.callback){B.callback.apply(this,arguments)}})}else{D.animate({opacity:0},B.duration/2,B.options.easing).animate({opacity:1},B.duration/2,B.options.easing,function(){if(B.callback){B.callback.apply(this,arguments)}})}D.queue("fx",function(){D.dequeue()});D.dequeue()})}})(jQuery) \ No newline at end of file
+(function($){$.effects.pulsate=function(o){return this.queue(function(){var el=$(this);var mode=$.effects.setMode(el,o.options.mode||"show");var times=o.options.times||5;var duration=o.duration?o.duration/2:$.fx.speeds._default/2;if(mode=="hide"){times--}if(el.is(":hidden")){el.css("opacity",0);el.show();el.animate({opacity:1},duration,o.options.easing);times=times-2}for(var i=0;i<times;i++){el.animate({opacity:0},duration,o.options.easing).animate({opacity:1},duration,o.options.easing)}if(mode=="hide"){el.animate({opacity:0},duration,o.options.easing,function(){el.hide();if(o.callback){o.callback.apply(this,arguments)}})}else{el.animate({opacity:0},duration,o.options.easing).animate({opacity:1},duration,o.options.easing,function(){if(o.callback){o.callback.apply(this,arguments)}})}el.queue("fx",function(){el.dequeue()});el.dequeue()})}})(jQuery); \ No newline at end of file
diff --git a/template-common/lib/ui/minified/effects.scale.min.js b/template-common/lib/ui/minified/effects.scale.min.js
index e7e5014e4..5b6a336eb 100644
--- a/template-common/lib/ui/minified/effects.scale.min.js
+++ b/template-common/lib/ui/minified/effects.scale.min.js
@@ -1 +1 @@
-(function(A){A.effects.puff=function(B){return this.queue(function(){var F=A(this);var C=A.extend(true,{},B.options);var H=A.effects.setMode(F,B.options.mode||"hide");var G=parseInt(B.options.percent)||150;C.fade=true;var E={height:F.height(),width:F.width()};var D=G/100;F.from=(H=="hide")?E:{height:E.height*D,width:E.width*D};C.from=F.from;C.percent=(H=="hide")?G:100;C.mode=H;F.effect("scale",C,B.duration,B.callback);F.dequeue()})};A.effects.scale=function(B){return this.queue(function(){var G=A(this);var D=A.extend(true,{},B.options);var J=A.effects.setMode(G,B.options.mode||"effect");var H=parseInt(B.options.percent)||(parseInt(B.options.percent)==0?0:(J=="hide"?0:100));var I=B.options.direction||"both";var C=B.options.origin;if(J!="effect"){D.origin=C||["middle","center"];D.restore=true}var F={height:G.height(),width:G.width()};G.from=B.options.from||(J=="show"?{height:0,width:0}:F);var E={y:I!="horizontal"?(H/100):1,x:I!="vertical"?(H/100):1};G.to={height:F.height*E.y,width:F.width*E.x};if(B.options.fade){if(J=="show"){G.from.opacity=0;G.to.opacity=1}if(J=="hide"){G.from.opacity=1;G.to.opacity=0}}D.from=G.from;D.to=G.to;D.mode=J;G.effect("size",D,B.duration,B.callback);G.dequeue()})};A.effects.size=function(B){return this.queue(function(){var C=A(this),N=["position","top","left","width","height","overflow","opacity"];var M=["position","top","left","overflow","opacity"];var J=["width","height","overflow"];var P=["fontSize"];var K=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"];var F=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"];var G=A.effects.setMode(C,B.options.mode||"effect");var I=B.options.restore||false;var E=B.options.scale||"both";var O=B.options.origin;var D={height:C.height(),width:C.width()};C.from=B.options.from||D;C.to=B.options.to||D;if(O){var H=A.effects.getBaseline(O,D);C.from.top=(D.height-C.from.height)*H.y;C.from.left=(D.width-C.from.width)*H.x;C.to.top=(D.height-C.to.height)*H.y;C.to.left=(D.width-C.to.width)*H.x}var L={from:{y:C.from.height/D.height,x:C.from.width/D.width},to:{y:C.to.height/D.height,x:C.to.width/D.width}};if(E=="box"||E=="both"){if(L.from.y!=L.to.y){N=N.concat(K);C.from=A.effects.setTransition(C,K,L.from.y,C.from);C.to=A.effects.setTransition(C,K,L.to.y,C.to)}if(L.from.x!=L.to.x){N=N.concat(F);C.from=A.effects.setTransition(C,F,L.from.x,C.from);C.to=A.effects.setTransition(C,F,L.to.x,C.to)}}if(E=="content"||E=="both"){if(L.from.y!=L.to.y){N=N.concat(P);C.from=A.effects.setTransition(C,P,L.from.y,C.from);C.to=A.effects.setTransition(C,P,L.to.y,C.to)}}A.effects.save(C,I?N:M);C.show();A.effects.createWrapper(C);C.css("overflow","hidden").css(C.from);if(E=="content"||E=="both"){K=K.concat(["marginTop","marginBottom"]).concat(P);F=F.concat(["marginLeft","marginRight"]);J=N.concat(K).concat(F);C.find("*[width]").each(function(){child=A(this);if(I){A.effects.save(child,J)}var Q={height:child.height(),width:child.width()};child.from={height:Q.height*L.from.y,width:Q.width*L.from.x};child.to={height:Q.height*L.to.y,width:Q.width*L.to.x};if(L.from.y!=L.to.y){child.from=A.effects.setTransition(child,K,L.from.y,child.from);child.to=A.effects.setTransition(child,K,L.to.y,child.to)}if(L.from.x!=L.to.x){child.from=A.effects.setTransition(child,F,L.from.x,child.from);child.to=A.effects.setTransition(child,F,L.to.x,child.to)}child.css(child.from);child.animate(child.to,B.duration,B.options.easing,function(){if(I){A.effects.restore(child,J)}})})}C.animate(C.to,{queue:false,duration:B.duration,easing:B.options.easing,complete:function(){if(G=="hide"){C.hide()}A.effects.restore(C,I?N:M);A.effects.removeWrapper(C);if(B.callback){B.callback.apply(this,arguments)}C.dequeue()}})})}})(jQuery) \ No newline at end of file
+(function($){$.effects.puff=function(o){return this.queue(function(){var el=$(this);var options=$.extend(true,{},o.options);var mode=$.effects.setMode(el,o.options.mode||"hide");var percent=parseInt(o.options.percent,10)||150;options.fade=true;var original={height:el.height(),width:el.width()};var factor=percent/100;el.from=(mode=="hide")?original:{height:original.height*factor,width:original.width*factor};options.from=el.from;options.percent=(mode=="hide")?percent:100;options.mode=mode;el.effect("scale",options,o.duration,o.callback);el.dequeue()})};$.effects.scale=function(o){return this.queue(function(){var el=$(this);var options=$.extend(true,{},o.options);var mode=$.effects.setMode(el,o.options.mode||"effect");var percent=parseInt(o.options.percent,10)||(parseInt(o.options.percent,10)==0?0:(mode=="hide"?0:100));var direction=o.options.direction||"both";var origin=o.options.origin;if(mode!="effect"){options.origin=origin||["middle","center"];options.restore=true}var original={height:el.height(),width:el.width()};el.from=o.options.from||(mode=="show"?{height:0,width:0}:original);var factor={y:direction!="horizontal"?(percent/100):1,x:direction!="vertical"?(percent/100):1};el.to={height:original.height*factor.y,width:original.width*factor.x};if(o.options.fade){if(mode=="show"){el.from.opacity=0;el.to.opacity=1}if(mode=="hide"){el.from.opacity=1;el.to.opacity=0}}options.from=el.from;options.to=el.to;options.mode=mode;el.effect("size",options,o.duration,o.callback);el.dequeue()})};$.effects.size=function(o){return this.queue(function(){var el=$(this),props=["position","top","left","width","height","overflow","opacity"];var props1=["position","top","left","overflow","opacity"];var props2=["width","height","overflow"];var cProps=["fontSize"];var vProps=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"];var hProps=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"];var mode=$.effects.setMode(el,o.options.mode||"effect");var restore=o.options.restore||false;var scale=o.options.scale||"both";var origin=o.options.origin;var original={height:el.height(),width:el.width()};el.from=o.options.from||original;el.to=o.options.to||original;if(origin){var baseline=$.effects.getBaseline(origin,original);el.from.top=(original.height-el.from.height)*baseline.y;el.from.left=(original.width-el.from.width)*baseline.x;el.to.top=(original.height-el.to.height)*baseline.y;el.to.left=(original.width-el.to.width)*baseline.x}var factor={from:{y:el.from.height/original.height,x:el.from.width/original.width},to:{y:el.to.height/original.height,x:el.to.width/original.width}};if(scale=="box"||scale=="both"){if(factor.from.y!=factor.to.y){props=props.concat(vProps);el.from=$.effects.setTransition(el,vProps,factor.from.y,el.from);el.to=$.effects.setTransition(el,vProps,factor.to.y,el.to)}if(factor.from.x!=factor.to.x){props=props.concat(hProps);el.from=$.effects.setTransition(el,hProps,factor.from.x,el.from);el.to=$.effects.setTransition(el,hProps,factor.to.x,el.to)}}if(scale=="content"||scale=="both"){if(factor.from.y!=factor.to.y){props=props.concat(cProps);el.from=$.effects.setTransition(el,cProps,factor.from.y,el.from);el.to=$.effects.setTransition(el,cProps,factor.to.y,el.to)}}$.effects.save(el,restore?props:props1);el.show();$.effects.createWrapper(el);el.css("overflow","hidden").css(el.from);if(scale=="content"||scale=="both"){vProps=vProps.concat(["marginTop","marginBottom"]).concat(cProps);hProps=hProps.concat(["marginLeft","marginRight"]);props2=props.concat(vProps).concat(hProps);el.find("*[width]").each(function(){child=$(this);if(restore){$.effects.save(child,props2)}var c_original={height:child.height(),width:child.width()};child.from={height:c_original.height*factor.from.y,width:c_original.width*factor.from.x};child.to={height:c_original.height*factor.to.y,width:c_original.width*factor.to.x};if(factor.from.y!=factor.to.y){child.from=$.effects.setTransition(child,vProps,factor.from.y,child.from);child.to=$.effects.setTransition(child,vProps,factor.to.y,child.to)}if(factor.from.x!=factor.to.x){child.from=$.effects.setTransition(child,hProps,factor.from.x,child.from);child.to=$.effects.setTransition(child,hProps,factor.to.x,child.to)}child.css(child.from);child.animate(child.to,o.duration,o.options.easing,function(){if(restore){$.effects.restore(child,props2)}})})}el.animate(el.to,{queue:false,duration:o.duration,easing:o.options.easing,complete:function(){if(mode=="hide"){el.hide()}$.effects.restore(el,restore?props:props1);$.effects.removeWrapper(el);if(o.callback){o.callback.apply(this,arguments)}el.dequeue()}})})}})(jQuery); \ No newline at end of file
diff --git a/template-common/lib/ui/minified/effects.shake.min.js b/template-common/lib/ui/minified/effects.shake.min.js
index 48d320c17..fd035edc9 100644
--- a/template-common/lib/ui/minified/effects.shake.min.js
+++ b/template-common/lib/ui/minified/effects.shake.min.js
@@ -1 +1 @@
-(function(A){A.effects.shake=function(B){return this.queue(function(){var E=A(this),K=["position","top","left"];var J=A.effects.setMode(E,B.options.mode||"effect");var M=B.options.direction||"left";var C=B.options.distance||20;var D=B.options.times||3;var G=B.duration||B.options.duration||140;A.effects.save(E,K);E.show();A.effects.createWrapper(E);var F=(M=="up"||M=="down")?"top":"left";var O=(M=="up"||M=="left")?"pos":"neg";var H={},N={},L={};H[F]=(O=="pos"?"-=":"+=")+C;N[F]=(O=="pos"?"+=":"-=")+C*2;L[F]=(O=="pos"?"-=":"+=")+C*2;E.animate(H,G,B.options.easing);for(var I=1;I<D;I++){E.animate(N,G,B.options.easing).animate(L,G,B.options.easing)}E.animate(N,G,B.options.easing).animate(H,G/2,B.options.easing,function(){A.effects.restore(E,K);A.effects.removeWrapper(E);if(B.callback){B.callback.apply(this,arguments)}});E.queue("fx",function(){E.dequeue()});E.dequeue()})}})(jQuery) \ No newline at end of file
+(function($){$.effects.shake=function(o){return this.queue(function(){var el=$(this),props=["position","top","left"];var mode=$.effects.setMode(el,o.options.mode||"effect");var direction=o.options.direction||"left";var distance=o.options.distance||20;var times=o.options.times||3;var speed=o.duration||o.options.duration||140;$.effects.save(el,props);el.show();$.effects.createWrapper(el);var ref=(direction=="up"||direction=="down")?"top":"left";var motion=(direction=="up"||direction=="left")?"pos":"neg";var animation={},animation1={},animation2={};animation[ref]=(motion=="pos"?"-=":"+=")+distance;animation1[ref]=(motion=="pos"?"+=":"-=")+distance*2;animation2[ref]=(motion=="pos"?"-=":"+=")+distance*2;el.animate(animation,speed,o.options.easing);for(var i=1;i<times;i++){el.animate(animation1,speed,o.options.easing).animate(animation2,speed,o.options.easing)}el.animate(animation1,speed,o.options.easing).animate(animation,speed/2,o.options.easing,function(){$.effects.restore(el,props);$.effects.removeWrapper(el);if(o.callback){o.callback.apply(this,arguments)}});el.queue("fx",function(){el.dequeue()});el.dequeue()})}})(jQuery); \ No newline at end of file
diff --git a/template-common/lib/ui/minified/effects.slide.min.js b/template-common/lib/ui/minified/effects.slide.min.js
index 5cd6d99d6..db1b24edc 100644
--- a/template-common/lib/ui/minified/effects.slide.min.js
+++ b/template-common/lib/ui/minified/effects.slide.min.js
@@ -1 +1 @@
-(function(A){A.effects.slide=function(B){return this.queue(function(){var E=A(this),D=["position","top","left"];var I=A.effects.setMode(E,B.options.mode||"show");var H=B.options.direction||"left";A.effects.save(E,D);E.show();A.effects.createWrapper(E).css({overflow:"hidden"});var F=(H=="up"||H=="down")?"top":"left";var C=(H=="up"||H=="left")?"pos":"neg";var J=B.options.distance||(F=="top"?E.outerHeight({margin:true}):E.outerWidth({margin:true}));if(I=="show"){E.css(F,C=="pos"?-J:J)}var G={};G[F]=(I=="show"?(C=="pos"?"+=":"-="):(C=="pos"?"-=":"+="))+J;E.animate(G,{queue:false,duration:B.duration,easing:B.options.easing,complete:function(){if(I=="hide"){E.hide()}A.effects.restore(E,D);A.effects.removeWrapper(E);if(B.callback){B.callback.apply(this,arguments)}E.dequeue()}})})}})(jQuery) \ No newline at end of file
+(function($){$.effects.slide=function(o){return this.queue(function(){var el=$(this),props=["position","top","left"];var mode=$.effects.setMode(el,o.options.mode||"show");var direction=o.options.direction||"left";$.effects.save(el,props);el.show();$.effects.createWrapper(el).css({overflow:"hidden"});var ref=(direction=="up"||direction=="down")?"top":"left";var motion=(direction=="up"||direction=="left")?"pos":"neg";var distance=o.options.distance||(ref=="top"?el.outerHeight({margin:true}):el.outerWidth({margin:true}));if(mode=="show"){el.css(ref,motion=="pos"?-distance:distance)}var animation={};animation[ref]=(mode=="show"?(motion=="pos"?"+=":"-="):(motion=="pos"?"-=":"+="))+distance;el.animate(animation,{queue:false,duration:o.duration,easing:o.options.easing,complete:function(){if(mode=="hide"){el.hide()}$.effects.restore(el,props);$.effects.removeWrapper(el);if(o.callback){o.callback.apply(this,arguments)}el.dequeue()}})})}})(jQuery); \ No newline at end of file
diff --git a/template-common/lib/ui/minified/effects.transfer.min.js b/template-common/lib/ui/minified/effects.transfer.min.js
index a735abb8d..64096cb67 100644
--- a/template-common/lib/ui/minified/effects.transfer.min.js
+++ b/template-common/lib/ui/minified/effects.transfer.min.js
@@ -1 +1 @@
-(function(A){A.effects.transfer=function(B){return this.queue(function(){var E=A(this);var G=A.effects.setMode(E,B.options.mode||"effect");var F=A(B.options.to);var C=E.offset();var D=A('<div class="ui-effects-transfer"></div>').appendTo(document.body);if(B.options.className){D.addClass(B.options.className)}D.addClass(B.options.className);D.css({top:C.top,left:C.left,height:E.outerHeight()-parseInt(D.css("borderTopWidth"))-parseInt(D.css("borderBottomWidth")),width:E.outerWidth()-parseInt(D.css("borderLeftWidth"))-parseInt(D.css("borderRightWidth")),position:"absolute"});C=F.offset();animation={top:C.top,left:C.left,height:F.outerHeight()-parseInt(D.css("borderTopWidth"))-parseInt(D.css("borderBottomWidth")),width:F.outerWidth()-parseInt(D.css("borderLeftWidth"))-parseInt(D.css("borderRightWidth"))};D.animate(animation,B.duration,B.options.easing,function(){D.remove();if(B.callback){B.callback.apply(E[0],arguments)}E.dequeue()})})}})(jQuery) \ No newline at end of file
+(function($){$.effects.transfer=function(o){return this.queue(function(){var elem=$(this),target=$(o.options.to),endPosition=target.offset(),animation={top:endPosition.top,left:endPosition.left,height:target.innerHeight(),width:target.innerWidth()},startPosition=elem.offset(),transfer=$('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(o.options.className).css({top:startPosition.top,left:startPosition.left,height:elem.innerHeight(),width:elem.innerWidth(),position:"absolute"}).animate(animation,o.duration,o.options.easing,function(){transfer.remove();(o.callback&&o.callback.apply(elem[0],arguments));elem.dequeue()})})}})(jQuery); \ No newline at end of file
diff --git a/template-common/lib/ui/minified/ui.accordion.min.js b/template-common/lib/ui/minified/ui.accordion.min.js
index 3cf8389e6..e656881d3 100644
--- a/template-common/lib/ui/minified/ui.accordion.min.js
+++ b/template-common/lib/ui/minified/ui.accordion.min.js
@@ -1 +1 @@
-(function(E){E.widget("ui.accordion",{init:function(){var G=this.options;if(G.navigation){var J=this.element.find("a").filter(G.navigationFilter);if(J.length){if(J.filter(G.header).length){G.active=J}else{G.active=J.parent().parent().prev();J.addClass("current")}}}G.headers=this.element.find(G.header);G.active=C(G.headers,G.active);if(E.browser.msie){this.element.find("a").css("zoom","1")}if(!this.element.hasClass("ui-accordion")){this.element.addClass("ui-accordion");E("<span class='ui-accordion-left'/>").insertBefore(G.headers);E("<span class='ui-accordion-right'/>").appendTo(G.headers);G.headers.addClass("ui-accordion-header").attr("tabindex","0")}var I;if(G.fillSpace){I=this.element.parent().height();G.headers.each(function(){I-=E(this).outerHeight()});var H=0;G.headers.next().each(function(){H=Math.max(H,E(this).innerHeight()-E(this).height())}).height(I-H)}else{if(G.autoHeight){I=0;G.headers.next().each(function(){I=Math.max(I,E(this).outerHeight())}).height(I)}}G.headers.not(G.active||"").next().hide();G.active.parent().andSelf().addClass(G.selectedClass);if(G.event){this.element.bind((G.event)+".accordion",F)}},activate:function(G){F.call(this.element[0],{target:C(this.options.headers,G)[0]})},destroy:function(){this.options.headers.next().css("display","");if(this.options.fillSpace||this.options.autoHeight){this.options.headers.next().css("height","")}E.removeData(this.element[0],"accordion");this.element.removeClass("ui-accordion").unbind(".accordion")}});function B(H,G){return function(){return H.apply(G,arguments)}}function D(I){if(!E.data(this,"accordion")){return }var G=E.data(this,"accordion");var H=G.options;H.running=I?0:--H.running;if(H.running){return }if(H.clearStyle){H.toShow.add(H.toHide).css({height:"",overflow:""})}E(this).triggerHandler("accordionchange",[E.event.fix({type:"accordionchange",target:G.element[0]}),H.data],H.change)}function A(G,K,L,J,M){var I=E.data(this,"accordion").options;I.toShow=G;I.toHide=K;I.data=L;var H=B(D,this);I.running=K.size()===0?G.size():K.size();if(I.animated){if(!I.alwaysOpen&&J){E.ui.accordion.animations[I.animated]({toShow:jQuery([]),toHide:K,complete:H,down:M,autoHeight:I.autoHeight})}else{E.ui.accordion.animations[I.animated]({toShow:G,toHide:K,complete:H,down:M,autoHeight:I.autoHeight})}}else{if(!I.alwaysOpen&&J){G.toggle()}else{K.hide();G.show()}H(true)}}function F(L){var J=E.data(this,"accordion").options;if(J.disabled){return false}if(!L.target&&!J.alwaysOpen){J.active.parent().andSelf().toggleClass(J.selectedClass);var I=J.active.next(),M={options:J,newHeader:jQuery([]),oldHeader:J.active,newContent:jQuery([]),oldContent:I},G=(J.active=E([]));A.call(this,G,I,M);return false}var K=E(L.target);K=E(K.parents(J.header)[0]||K);var H=K[0]==J.active[0];if(J.running||(J.alwaysOpen&&H)){return false}if(!K.is(J.header)){return }J.active.parent().andSelf().toggleClass(J.selectedClass);if(!H){K.parent().andSelf().addClass(J.selectedClass)}var G=K.next(),I=J.active.next(),M={options:J,newHeader:K,oldHeader:J.active,newContent:G,oldContent:I},N=J.headers.index(J.active[0])>J.headers.index(K[0]);J.active=H?E([]):K;A.call(this,G,I,M,H,N);return false}function C(H,G){return G!=undefined?typeof G=="number"?H.filter(":eq("+G+")"):H.not(H.not(G)):G===false?E([]):H.filter(":eq(0)")}E.extend(E.ui.accordion,{defaults:{selectedClass:"selected",alwaysOpen:true,animated:"slide",event:"click",header:"a",autoHeight:true,running:0,navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase()}},animations:{slide:function(G,I){G=E.extend({easing:"swing",duration:300},G,I);if(!G.toHide.size()){G.toShow.animate({height:"show"},G);return }var H=G.toHide.height(),J=G.toShow.height(),K=J/H;G.toShow.css({height:0,overflow:"hidden"}).show();G.toHide.filter(":hidden").each(G.complete).end().filter(":visible").animate({height:"hide"},{step:function(L){var M=(H-L)*K;if(E.browser.msie||E.browser.opera){M=Math.ceil(M)}G.toShow.height(M)},duration:G.duration,easing:G.easing,complete:function(){if(!G.autoHeight){G.toShow.css("height","auto")}G.complete()}})},bounceslide:function(G){this.slide(G,{easing:G.down?"bounceout":"swing",duration:G.down?1000:200})},easeslide:function(G){this.slide(G,{easing:"easeinout",duration:700})}}});E.fn.activate=function(G){return this.accordion("activate",G)}})(jQuery) \ No newline at end of file
+(function($){$.widget("ui.accordion",{_init:function(){var o=this.options,self=this;this.running=0;if(o.collapsible==$.ui.accordion.defaults.collapsible&&o.alwaysOpen!=$.ui.accordion.defaults.alwaysOpen){o.collapsible=!o.alwaysOpen}if(o.navigation){var current=this.element.find("a").filter(o.navigationFilter);if(current.length){if(current.filter(o.header).length){this.active=current}else{this.active=current.parent().parent().prev();current.addClass("ui-accordion-content-active")}}}this.element.addClass("ui-accordion ui-widget ui-helper-reset");if(this.element[0].nodeName=="UL"){this.element.children("li").addClass("ui-accordion-li-fix")}this.headers=this.element.find(o.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){$(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){$(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){$(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){$(this).removeClass("ui-state-focus")});this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");this.active=this._findActive(this.active||o.active).toggleClass("ui-state-default").toggleClass("ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");this.active.next().addClass("ui-accordion-content-active");$("<span/>").addClass("ui-icon "+o.icons.header).prependTo(this.headers);this.active.find(".ui-icon").toggleClass(o.icons.header).toggleClass(o.icons.headerSelected);if($.browser.msie){this.element.find("a").css("zoom","1")}this.resize();this.element.attr("role","tablist");this.headers.attr("role","tab").bind("keydown",function(event){return self._keydown(event)}).next().attr("role","tabpanel");this.headers.not(this.active||"").attr("aria-expanded","false").attr("tabIndex","-1").next().hide();if(!this.active.length){this.headers.eq(0).attr("tabIndex","0")}else{this.active.attr("aria-expanded","true").attr("tabIndex","0")}if(!$.browser.safari){this.headers.find("a").attr("tabIndex","-1")}if(o.event){this.headers.bind((o.event)+".accordion",function(event){return self._clickHandler.call(self,event,this)})}},destroy:function(){var o=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role").unbind(".accordion").removeData("accordion");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabindex");this.headers.find("a").removeAttr("tabindex");this.headers.children(".ui-icon").remove();var contents=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active");if(o.autoHeight||o.fillHeight){contents.css("height","")}},_setData:function(key,value){if(key=="alwaysOpen"){key="collapsible";value=!value}$.widget.prototype._setData.apply(this,arguments)},_keydown:function(event){var o=this.options,keyCode=$.ui.keyCode;if(o.disabled||event.altKey||event.ctrlKey){return }var length=this.headers.length;var currentIndex=this.headers.index(event.target);var toFocus=false;switch(event.keyCode){case keyCode.RIGHT:case keyCode.DOWN:toFocus=this.headers[(currentIndex+1)%length];break;case keyCode.LEFT:case keyCode.UP:toFocus=this.headers[(currentIndex-1+length)%length];break;case keyCode.SPACE:case keyCode.ENTER:return this._clickHandler({target:event.target},event.target)}if(toFocus){$(event.target).attr("tabIndex","-1");$(toFocus).attr("tabIndex","0");toFocus.focus();return false}return true},resize:function(){var o=this.options,maxHeight;if(o.fillSpace){if($.browser.msie){var defOverflow=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}maxHeight=this.element.parent().height();if($.browser.msie){this.element.parent().css("overflow",defOverflow)}this.headers.each(function(){maxHeight-=$(this).outerHeight()});var maxPadding=0;this.headers.next().each(function(){maxPadding=Math.max(maxPadding,$(this).innerHeight()-$(this).height())}).height(Math.max(0,maxHeight-maxPadding)).css("overflow","auto")}else{if(o.autoHeight){maxHeight=0;this.headers.next().each(function(){maxHeight=Math.max(maxHeight,$(this).outerHeight())}).height(maxHeight)}}},activate:function(index){var active=this._findActive(index)[0];this._clickHandler({target:active},active)},_findActive:function(selector){return selector?typeof selector=="number"?this.headers.filter(":eq("+selector+")"):this.headers.not(this.headers.not(selector)):selector===false?$([]):this.headers.filter(":eq(0)")},_clickHandler:function(event,target){var o=this.options;if(o.disabled){return false}if(!event.target&&o.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(o.icons.headerSelected).addClass(o.icons.header);this.active.next().addClass("ui-accordion-content-active");var toHide=this.active.next(),data={options:o,newHeader:$([]),oldHeader:o.active,newContent:$([]),oldContent:toHide},toShow=(this.active=$([]));this._toggle(toShow,toHide,data);return false}var clicked=$(event.currentTarget||target);var clickedIsActive=clicked[0]==this.active[0];if(this.running||(!o.collapsible&&clickedIsActive)){return false}this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(o.icons.headerSelected).addClass(o.icons.header);this.active.next().addClass("ui-accordion-content-active");if(!clickedIsActive){clicked.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").find(".ui-icon").removeClass(o.icons.header).addClass(o.icons.headerSelected);clicked.next().addClass("ui-accordion-content-active")}var toShow=clicked.next(),toHide=this.active.next(),data={options:o,newHeader:clickedIsActive&&o.collapsible?$([]):clicked,oldHeader:this.active,newContent:clickedIsActive&&o.collapsible?$([]):toShow.find("> *"),oldContent:toHide.find("> *")},down=this.headers.index(this.active[0])>this.headers.index(clicked[0]);this.active=clickedIsActive?$([]):clicked;this._toggle(toShow,toHide,data,clickedIsActive,down);return false},_toggle:function(toShow,toHide,data,clickedIsActive,down){var o=this.options,self=this;this.toShow=toShow;this.toHide=toHide;this.data=data;var complete=function(){if(!self){return }return self._completed.apply(self,arguments)};this._trigger("changestart",null,this.data);this.running=toHide.size()===0?toShow.size():toHide.size();if(o.animated){var animOptions={};if(o.collapsible&&clickedIsActive){animOptions={toShow:$([]),toHide:toHide,complete:complete,down:down,autoHeight:o.autoHeight||o.fillSpace}}else{animOptions={toShow:toShow,toHide:toHide,complete:complete,down:down,autoHeight:o.autoHeight||o.fillSpace}}if(!o.proxied){o.proxied=o.animated}if(!o.proxiedDuration){o.proxiedDuration=o.duration}o.animated=$.isFunction(o.proxied)?o.proxied(animOptions):o.proxied;o.duration=$.isFunction(o.proxiedDuration)?o.proxiedDuration(animOptions):o.proxiedDuration;var animations=$.ui.accordion.animations,duration=o.duration,easing=o.animated;if(!animations[easing]){animations[easing]=function(options){this.slide(options,{easing:easing,duration:duration||700})}}animations[easing](animOptions)}else{if(o.collapsible&&clickedIsActive){toShow.toggle()}else{toHide.hide();toShow.show()}complete(true)}toHide.prev().attr("aria-expanded","false").attr("tabIndex","-1").blur();toShow.prev().attr("aria-expanded","true").attr("tabIndex","0").focus()},_completed:function(cancel){var o=this.options;this.running=cancel?0:--this.running;if(this.running){return }if(o.clearStyle){this.toShow.add(this.toHide).css({height:"",overflow:""})}this._trigger("change",null,this.data)}});$.extend($.ui.accordion,{version:"1.7.2",defaults:{active:null,alwaysOpen:true,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase()}},animations:{slide:function(options,additions){options=$.extend({easing:"swing",duration:300},options,additions);if(!options.toHide.size()){options.toShow.animate({height:"show"},options);return }if(!options.toShow.size()){options.toHide.animate({height:"hide"},options);return }var overflow=options.toShow.css("overflow"),percentDone,showProps={},hideProps={},fxAttrs=["height","paddingTop","paddingBottom"],originalWidth;var s=options.toShow;originalWidth=s[0].style.width;s.width(parseInt(s.parent().width(),10)-parseInt(s.css("paddingLeft"),10)-parseInt(s.css("paddingRight"),10)-(parseInt(s.css("borderLeftWidth"),10)||0)-(parseInt(s.css("borderRightWidth"),10)||0));$.each(fxAttrs,function(i,prop){hideProps[prop]="hide";var parts=(""+$.css(options.toShow[0],prop)).match(/^([\d+-.]+)(.*)$/);showProps[prop]={value:parts[1],unit:parts[2]||"px"}});options.toShow.css({height:0,overflow:"hidden"}).show();options.toHide.filter(":hidden").each(options.complete).end().filter(":visible").animate(hideProps,{step:function(now,settings){if(settings.prop=="height"){percentDone=(settings.now-settings.start)/(settings.end-settings.start)}options.toShow[0].style[settings.prop]=(percentDone*showProps[settings.prop].value)+showProps[settings.prop].unit},duration:options.duration,easing:options.easing,complete:function(){if(!options.autoHeight){options.toShow.css("height","")}options.toShow.css("width",originalWidth);options.toShow.css({overflow:overflow});options.complete()}})},bounceslide:function(options){this.slide(options,{easing:options.down?"easeOutBounce":"swing",duration:options.down?1000:200})},easeslide:function(options){this.slide(options,{easing:"easeinout",duration:700})}}})})(jQuery); \ No newline at end of file
diff --git a/template-common/lib/ui/minified/ui.core.min.js b/template-common/lib/ui/minified/ui.core.min.js
new file mode 100644
index 000000000..633465af5
--- /dev/null
+++ b/template-common/lib/ui/minified/ui.core.min.js
@@ -0,0 +1 @@
+jQuery.ui||(function($){var _remove=$.fn.remove,isFF2=$.browser.mozilla&&(parseFloat($.browser.version)<1.9);$.ui={version:"1.7.2",plugin:{add:function(module,option,set){var proto=$.ui[module].prototype;for(var i in set){proto.plugins[i]=proto.plugins[i]||[];proto.plugins[i].push([option,set[i]])}},call:function(instance,name,args){var set=instance.plugins[name];if(!set||!instance.element[0].parentNode){return }for(var i=0;i<set.length;i++){if(instance.options[set[i][0]]){set[i][1].apply(instance.element,args)}}}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(el,a){if($(el).css("overflow")=="hidden"){return false}var scroll=(a&&a=="left")?"scrollLeft":"scrollTop",has=false;if(el[scroll]>0){return true}el[scroll]=1;has=(el[scroll]>0);el[scroll]=0;return has},isOverAxis:function(x,reference,size){return(x>reference)&&(x<(reference+size))},isOver:function(y,x,top,left,height,width){return $.ui.isOverAxis(y,top,height)&&$.ui.isOverAxis(x,left,width)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(isFF2){var attr=$.attr,removeAttr=$.fn.removeAttr,ariaNS="http://www.w3.org/2005/07/aaa",ariaState=/^aria-/,ariaRole=/^wairole:/;$.attr=function(elem,name,value){var set=value!==undefined;return(name=="role"?(set?attr.call(this,elem,name,"wairole:"+value):(attr.apply(this,arguments)||"").replace(ariaRole,"")):(ariaState.test(name)?(set?elem.setAttributeNS(ariaNS,name.replace(ariaState,"aaa:"),value):attr.call(this,elem,name.replace(ariaState,"aaa:"))):attr.apply(this,arguments)))};$.fn.removeAttr=function(name){return(ariaState.test(name)?this.each(function(){this.removeAttributeNS(ariaNS,name.replace(ariaState,""))}):removeAttr.call(this,name))}}$.fn.extend({remove:function(){$("*",this).add(this).each(function(){$(this).triggerHandler("remove")});return _remove.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var scrollParent;if(($.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){scrollParent=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test($.curCSS(this,"position",1))&&(/(auto|scroll)/).test($.curCSS(this,"overflow",1)+$.curCSS(this,"overflow-y",1)+$.curCSS(this,"overflow-x",1))}).eq(0)}else{scrollParent=this.parents().filter(function(){return(/(auto|scroll)/).test($.curCSS(this,"overflow",1)+$.curCSS(this,"overflow-y",1)+$.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!scrollParent.length?$(document):scrollParent}});$.extend($.expr[":"],{data:function(elem,i,match){return !!$.data(elem,match[3])},focusable:function(element){var nodeName=element.nodeName.toLowerCase(),tabIndex=$.attr(element,"tabindex");return(/input|select|textarea|button|object/.test(nodeName)?!element.disabled:"a"==nodeName||"area"==nodeName?element.href||!isNaN(tabIndex):!isNaN(tabIndex))&&!$(element)["area"==nodeName?"parents":"closest"](":hidden").length},tabbable:function(element){var tabIndex=$.attr(element,"tabindex");return(isNaN(tabIndex)||tabIndex>=0)&&$(element).is(":focusable")}});function getter(namespace,plugin,method,args){function getMethods(type){var methods=$[namespace][plugin][type]||[];return(typeof methods=="string"?methods.split(/,?\s+/):methods)}var methods=getMethods("getter");if(args.length==1&&typeof args[0]=="string"){methods=methods.concat(getMethods("getterSetter"))}return($.inArray(method,methods)!=-1)}$.widget=function(name,prototype){var namespace=name.split(".")[0];name=name.split(".")[1];$.fn[name]=function(options){var isMethodCall=(typeof options=="string"),args=Array.prototype.slice.call(arguments,1);if(isMethodCall&&options.substring(0,1)=="_"){return this}if(isMethodCall&&getter(namespace,name,options,args)){var instance=$.data(this[0],name);return(instance?instance[options].apply(instance,args):undefined)}return this.each(function(){var instance=$.data(this,name);(!instance&&!isMethodCall&&$.data(this,name,new $[namespace][name](this,options))._init());(instance&&isMethodCall&&$.isFunction(instance[options])&&instance[options].apply(instance,args))})};$[namespace]=$[namespace]||{};$[namespace][name]=function(element,options){var self=this;this.namespace=namespace;this.widgetName=name;this.widgetEventPrefix=$[namespace][name].eventPrefix||name;this.widgetBaseClass=namespace+"-"+name;this.options=$.extend({},$.widget.defaults,$[namespace][name].defaults,$.metadata&&$.metadata.get(element)[name],options);this.element=$(element).bind("setData."+name,function(event,key,value){if(event.target==element){return self._setData(key,value)}}).bind("getData."+name,function(event,key){if(event.target==element){return self._getData(key)}}).bind("remove",function(){return self.destroy()})};$[namespace][name].prototype=$.extend({},$.widget.prototype,prototype);$[namespace][name].getterSetter="option"};$.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")},option:function(key,value){var options=key,self=this;if(typeof key=="string"){if(value===undefined){return this._getData(key)}options={};options[key]=value}$.each(options,function(key,value){self._setData(key,value)})},_getData:function(key){return this.options[key]},_setData:function(key,value){this.options[key]=value;if(key=="disabled"){this.element[value?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",value)}},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(type,event,data){var callback=this.options[type],eventName=(type==this.widgetEventPrefix?type:this.widgetEventPrefix+type);event=$.Event(event);event.type=eventName;if(event.originalEvent){for(var i=$.event.props.length,prop;i;){prop=$.event.props[--i];event[prop]=event.originalEvent[prop]}}this.element.trigger(event,data);return !($.isFunction(callback)&&callback.call(this.element[0],event,data)===false||event.isDefaultPrevented())}};$.widget.defaults={disabled:false};$.ui.mouse={_mouseInit:function(){var self=this;this.element.bind("mousedown."+this.widgetName,function(event){return self._mouseDown(event)}).bind("click."+this.widgetName,function(event){if(self._preventClickEvent){self._preventClickEvent=false;event.stopImmediatePropagation();return false}});if($.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);($.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},_mouseDown:function(event){event.originalEvent=event.originalEvent||{};if(event.originalEvent.mouseHandled){return }(this._mouseStarted&&this._mouseUp(event));this._mouseDownEvent=event;var self=this,btnIsLeft=(event.which==1),elIsCancel=(typeof this.options.cancel=="string"?$(event.target).parents().add(event.target).filter(this.options.cancel).length:false);if(!btnIsLeft||elIsCancel||!this._mouseCapture(event)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){self.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){this._mouseStarted=(this._mouseStart(event)!==false);if(!this._mouseStarted){event.preventDefault();return true}}this._mouseMoveDelegate=function(event){return self._mouseMove(event)};this._mouseUpDelegate=function(event){return self._mouseUp(event)};$(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);($.browser.safari||event.preventDefault());event.originalEvent.mouseHandled=true;return true},_mouseMove:function(event){if($.browser.msie&&!event.button){return this._mouseUp(event)}if(this._mouseStarted){this._mouseDrag(event);return event.preventDefault()}if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,event)!==false);(this._mouseStarted?this._mouseDrag(event):this._mouseUp(event))}return !this._mouseStarted},_mouseUp:function(event){$(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(event.target==this._mouseDownEvent.target);this._mouseStop(event)}return false},_mouseDistanceMet:function(event){return(Math.max(Math.abs(this._mouseDownEvent.pageX-event.pageX),Math.abs(this._mouseDownEvent.pageY-event.pageY))>=this.options.distance)},_mouseDelayMet:function(event){return this.mouseDelayMet},_mouseStart:function(event){},_mouseDrag:function(event){},_mouseStop:function(event){},_mouseCapture:function(event){return true}};$.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery); \ No newline at end of file
diff --git a/template-common/lib/ui/minified/ui.datepicker.min.js b/template-common/lib/ui/minified/ui.datepicker.min.js
index 3238d5291..ea2c13daf 100644
--- a/template-common/lib/ui/minified/ui.datepicker.min.js
+++ b/template-common/lib/ui/minified/ui.datepicker.min.js
@@ -1 +1 @@
-(function($){var PROP_NAME="datepicker";function Datepicker(){this.debug=false;this._curInst=null;this._disabledInputs=[];this._datepickerShowing=false;this._inDialog=false;this._mainDivId="ui-datepicker-div";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._promptClass="ui-datepicker-prompt";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this.regional=[];this.regional[""]={clearText:"Clear",clearStatus:"Erase the current date",closeText:"Close",closeStatus:"Close without change",prevText:"&#x3c;Prev",prevStatus:"Show the previous month",nextText:"Next&#x3e;",nextStatus:"Show the next month",currentText:"Today",currentStatus:"Show the current month",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],monthStatus:"Show a different month",yearStatus:"Show a different year",weekHeader:"Wk",weekStatus:"Week of the year",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],dayStatus:"Set DD as first week day",dateStatus:"Select DD, M d",dateFormat:"mm/dd/yy",firstDay:0,initStatus:"Select a date",isRTL:false};this._defaults={showOn:"focus",showAnim:"show",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,closeAtTop:true,mandatory:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:true,changeYear:true,yearRange:"-10:+10",changeFirstDay:true,highlightWeek:false,showOtherMonths:false,showWeeks:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",showStatus:false,statusForDate:this.dateStatus,minDate:null,maxDate:null,duration:"normal",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,stepMonths:1,rangeSelect:false,rangeSeparator:" - ",altField:"",altFormat:""};$.extend(this._defaults,this.regional[""]);this.dpDiv=$('<div id="'+this._mainDivId+'" style="display: none;"></div>')}$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",log:function(){if(this.debug){console.log.apply("",arguments)}},setDefaults:function(settings){extendRemove(this._defaults,settings||{});return this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase();var inline=(nodeName=="div"||nodeName=="span");if(!target.id){target.id="dp"+new Date().getTime()}var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{});if(nodeName=="input"){this._connectDatepicker(target,inst)}else{if(inline){this._inlineDatepicker(target,inst)}}},_newInst:function(target,inline){return{id:target[0].id,input:target,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:inline,dpDiv:(!inline?this.dpDiv:$('<div class="ui-datepicker-inline"></div>'))}},_connectDatepicker:function(target,inst){var input=$(target);if(input.hasClass(this.markerClassName)){return }var appendText=this._get(inst,"appendText");var isRTL=this._get(inst,"isRTL");if(appendText){input[isRTL?"before":"after"]('<span class="'+this._appendClass+'">'+appendText+"</span>")}var showOn=this._get(inst,"showOn");if(showOn=="focus"||showOn=="both"){input.focus(this._showDatepicker)}if(showOn=="button"||showOn=="both"){var buttonText=this._get(inst,"buttonText");var buttonImage=this._get(inst,"buttonImage");var trigger=$(this._get(inst,"buttonImageOnly")?$("<img/>").addClass(this._triggerClass).attr({src:buttonImage,alt:buttonText,title:buttonText}):$('<button type="button"></button>').addClass(this._triggerClass).html(buttonImage==""?buttonText:$("<img/>").attr({src:buttonImage,alt:buttonText,title:buttonText})));input[isRTL?"before":"after"](trigger);trigger.click(function(){if($.datepicker._datepickerShowing&&$.datepicker._lastInput==target){$.datepicker._hideDatepicker()}else{$.datepicker._showDatepicker(target)}return false})}input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst)},_inlineDatepicker:function(target,inst){var input=$(target);if(input.hasClass(this.markerClassName)){return }input.addClass(this.markerClassName).append(inst.dpDiv).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst);this._setDate(inst,this._getDefaultDate(inst));this._updateDatepicker(inst)},_dialogDatepicker:function(input,dateText,onSelect,settings,pos){var inst=this._dialogInst;if(!inst){var id="dp"+new Date().getTime();this._dialogInput=$('<input type="text" id="'+id+'" size="1" style="position: absolute; top: -100px;"/>');this._dialogInput.keydown(this._doKeyDown);$("body").append(this._dialogInput);inst=this._dialogInst=this._newInst(this._dialogInput,false);inst.settings={};$.data(this._dialogInput[0],PROP_NAME,inst)}extendRemove(inst.settings,settings||{});this._dialogInput.val(dateText);this._pos=(pos?(pos.length?pos:[pos.pageX,pos.pageY]):null);if(!this._pos){var browserWidth=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var browserHeight=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[(browserWidth/2)-100+scrollX,(browserHeight/2)-150+scrollY]}this._dialogInput.css("left",this._pos[0]+"px").css("top",this._pos[1]+"px");inst.settings.onSelect=onSelect;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if($.blockUI){$.blockUI(this.dpDiv)}$.data(this._dialogInput[0],PROP_NAME,inst);return this},_destroyDatepicker:function(target){var nodeName=target.nodeName.toLowerCase();var $target=$(target);$.removeData(target,PROP_NAME);if(nodeName=="input"){$target.siblings("."+this._appendClass).remove().end().siblings("."+this._triggerClass).remove().end().removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress)}else{if(nodeName=="div"||nodeName=="span"){$target.removeClass(this.markerClassName).empty()}}},_enableDatepicker:function(target){target.disabled=false;$(target).siblings("button."+this._triggerClass).each(function(){this.disabled=false}).end().siblings("img."+this._triggerClass).css({opacity:"1.0",cursor:""});this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)})},_disableDatepicker:function(target){target.disabled=true;$(target).siblings("button."+this._triggerClass).each(function(){this.disabled=true}).end().siblings("img."+this._triggerClass).css({opacity:"0.5",cursor:"default"});this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)});this._disabledInputs[this._disabledInputs.length]=target},_isDisabledDatepicker:function(target){if(!target){return false}for(var i=0;i<this._disabledInputs.length;i++){if(this._disabledInputs[i]==target){return true}}return false},_changeDatepicker:function(target,name,value){var settings=name||{};if(typeof name=="string"){settings={};settings[name]=value}if(inst=$.data(target,PROP_NAME)){extendRemove(inst.settings,settings);this._updateDatepicker(inst)}},_setDateDatepicker:function(target,date,endDate){var inst=$.data(target,PROP_NAME);if(inst){this._setDate(inst,date,endDate);this._updateDatepicker(inst)}},_getDateDatepicker:function(target){var inst=$.data(target,PROP_NAME);if(inst){this._setDateFromField(inst)}return(inst?this._getDate(inst):null)},_doKeyDown:function(e){var inst=$.data(e.target,PROP_NAME);var handled=true;if($.datepicker._datepickerShowing){switch(e.keyCode){case 9:$.datepicker._hideDatepicker(null,"");break;case 13:$.datepicker._selectDay(e.target,inst.selectedMonth,inst.selectedYear,$("td.ui-datepicker-days-cell-over",inst.dpDiv)[0]);return false;break;case 27:$.datepicker._hideDatepicker(null,$.datepicker._get(inst,"duration"));break;case 33:$.datepicker._adjustDate(e.target,(e.ctrlKey?-1:-$.datepicker._get(inst,"stepMonths")),(e.ctrlKey?"Y":"M"));break;case 34:$.datepicker._adjustDate(e.target,(e.ctrlKey?+1:+$.datepicker._get(inst,"stepMonths")),(e.ctrlKey?"Y":"M"));break;case 35:if(e.ctrlKey){$.datepicker._clearDate(e.target)}break;case 36:if(e.ctrlKey){$.datepicker._gotoToday(e.target)}break;case 37:if(e.ctrlKey){$.datepicker._adjustDate(e.target,-1,"D")}break;case 38:if(e.ctrlKey){$.datepicker._adjustDate(e.target,-7,"D")}break;case 39:if(e.ctrlKey){$.datepicker._adjustDate(e.target,+1,"D")}break;case 40:if(e.ctrlKey){$.datepicker._adjustDate(e.target,+7,"D")}break;default:handled=false}}else{if(e.keyCode==36&&e.ctrlKey){$.datepicker._showDatepicker(this)}else{handled=false}}if(handled){e.preventDefault();e.stopPropagation()}},_doKeyPress:function(e){var inst=$.data(e.target,PROP_NAME);var chars=$.datepicker._possibleChars($.datepicker._get(inst,"dateFormat"));var chr=String.fromCharCode(e.charCode==undefined?e.keyCode:e.charCode);return e.ctrlKey||(chr<" "||!chars||chars.indexOf(chr)>-1)},_showDatepicker:function(input){input=input.target||input;if(input.nodeName.toLowerCase()!="input"){input=$("input",input.parentNode)[0]}if($.datepicker._isDisabledDatepicker(input)||$.datepicker._lastInput==input){return }var inst=$.data(input,PROP_NAME);var beforeShow=$.datepicker._get(inst,"beforeShow");extendRemove(inst.settings,(beforeShow?beforeShow.apply(input,[input,inst]):{}));$.datepicker._hideDatepicker(null,"");$.datepicker._lastInput=input;$.datepicker._setDateFromField(inst);if($.datepicker._inDialog){input.value=""}if(!$.datepicker._pos){$.datepicker._pos=$.datepicker._findPos(input);$.datepicker._pos[1]+=input.offsetHeight}var isFixed=false;$(input).parents().each(function(){isFixed|=$(this).css("position")=="fixed";return !isFixed});if(isFixed&&$.browser.opera){$.datepicker._pos[0]-=document.documentElement.scrollLeft;$.datepicker._pos[1]-=document.documentElement.scrollTop}var offset={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null;inst.rangeStart=null;inst.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});$.datepicker._updateDatepicker(inst);inst.dpDiv.width($.datepicker._getNumberOfMonths(inst)[1]*$(".ui-datepicker",inst.dpDiv[0])[0].offsetWidth);offset=$.datepicker._checkOffset(inst,offset,isFixed);inst.dpDiv.css({position:($.datepicker._inDialog&&$.blockUI?"static":(isFixed?"fixed":"absolute")),display:"none",left:offset.left+"px",top:offset.top+"px"});if(!inst.inline){var showAnim=$.datepicker._get(inst,"showAnim")||"show";var duration=$.datepicker._get(inst,"duration");var postProcess=function(){$.datepicker._datepickerShowing=true;if($.browser.msie&&parseInt($.browser.version)<7){$("iframe.ui-datepicker-cover").css({width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4})}};if($.effects&&$.effects[showAnim]){inst.dpDiv.show(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[showAnim](duration,postProcess)}if(duration==""){postProcess()}if(inst.input[0].type!="hidden"){inst.input[0].focus()}$.datepicker._curInst=inst}},_updateDatepicker:function(inst){var dims={width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4};inst.dpDiv.empty().append(this._generateDatepicker(inst)).find("iframe.ui-datepicker-cover").css({width:dims.width,height:dims.height});var numMonths=this._getNumberOfMonths(inst);inst.dpDiv[(numMonths[0]!=1||numMonths[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");inst.dpDiv[(this._get(inst,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");if(inst.input&&inst.input[0].type!="hidden"){$(inst.input[0]).focus()}},_checkOffset:function(inst,offset,isFixed){var pos=inst.input?this._findPos(inst.input[0]):null;var browserWidth=window.innerWidth||document.documentElement.clientWidth;var browserHeight=window.innerHeight||document.documentElement.clientHeight;var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;if(this._get(inst,"isRTL")||(offset.left+inst.dpDiv.width()-scrollX)>browserWidth){offset.left=Math.max((isFixed?0:scrollX),pos[0]+(inst.input?inst.input.width():0)-(isFixed?scrollX:0)-inst.dpDiv.width()-(isFixed&&$.browser.opera?document.documentElement.scrollLeft:0))}else{offset.left-=(isFixed?scrollX:0)}if((offset.top+inst.dpDiv.height()-scrollY)>browserHeight){offset.top=Math.max((isFixed?0:scrollY),pos[1]-(isFixed?scrollY:0)-(this._inDialog?0:inst.dpDiv.height())-(isFixed&&$.browser.opera?document.documentElement.scrollTop:0))}else{offset.top-=(isFixed?scrollY:0)}return offset},_findPos:function(obj){while(obj&&(obj.type=="hidden"||obj.nodeType!=1)){obj=obj.nextSibling}var position=$(obj).offset();return[position.left,position.top]},_hideDatepicker:function(input,duration){var inst=this._curInst;if(!inst){return }var rangeSelect=this._get(inst,"rangeSelect");if(rangeSelect&&this._stayOpen){this._selectDate("#"+inst.id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear))}this._stayOpen=false;if(this._datepickerShowing){duration=(duration!=null?duration:this._get(inst,"duration"));var showAnim=this._get(inst,"showAnim");var postProcess=function(){$.datepicker._tidyDialog(inst)};if(duration!=""&&$.effects&&$.effects[showAnim]){inst.dpDiv.hide(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[(duration==""?"hide":(showAnim=="slideDown"?"slideUp":(showAnim=="fadeIn"?"fadeOut":"hide")))](duration,postProcess)}if(duration==""){this._tidyDialog(inst)}var onClose=this._get(inst,"onClose");if(onClose){onClose.apply((inst.input?inst.input[0]:null),[this._getDate(inst),inst])}this._datepickerShowing=false;this._lastInput=null;inst.settings.prompt=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if($.blockUI){$.unblockUI();$("body").append(this.dpDiv)}}this._inDialog=false}this._curInst=null},_tidyDialog:function(inst){inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker");$("."+this._promptClass,inst.dpDiv).remove()},_checkExternalClick:function(event){if(!$.datepicker._curInst){return }var $target=$(event.target);if(($target.parents("#"+$.datepicker._mainDivId).length==0)&&!$target.hasClass($.datepicker.markerClassName)&&!$target.hasClass($.datepicker._triggerClass)&&$.datepicker._datepickerShowing&&!($.datepicker._inDialog&&$.blockUI)){$.datepicker._hideDatepicker(null,"")}},_adjustDate:function(id,offset,period){var target=$(id);var inst=$.data(target[0],PROP_NAME);this._adjustInstDate(inst,offset,period);this._updateDatepicker(inst)},_gotoToday:function(id){var target=$(id);var inst=$.data(target[0],PROP_NAME);if(this._get(inst,"gotoCurrent")&&inst.currentDay){inst.selectedDay=inst.currentDay;inst.drawMonth=inst.selectedMonth=inst.currentMonth;inst.drawYear=inst.selectedYear=inst.currentYear}else{var date=new Date();inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear()}this._adjustDate(target);this._notifyChange(inst)},_selectMonthYear:function(id,select,period){var target=$(id);var inst=$.data(target[0],PROP_NAME);inst._selectingMonthYear=false;inst[period=="M"?"drawMonth":"drawYear"]=select.options[select.selectedIndex].value-0;this._adjustDate(target);this._notifyChange(inst)},_clickMonthYear:function(id){var target=$(id);var inst=$.data(target[0],PROP_NAME);if(inst.input&&inst._selectingMonthYear&&!$.browser.msie){inst.input[0].focus()}inst._selectingMonthYear=!inst._selectingMonthYear},_changeFirstDay:function(id,day){var target=$(id);var inst=$.data(target[0],PROP_NAME);inst.settings.firstDay=day;this._updateDatepicker(inst)},_selectDay:function(id,month,year,td){if($(td).hasClass(this._unselectableClass)){return }var target=$(id);var inst=$.data(target[0],PROP_NAME);var rangeSelect=this._get(inst,"rangeSelect");if(rangeSelect){this._stayOpen=!this._stayOpen;if(this._stayOpen){$(".ui-datepicker td").removeClass(this._currentClass);$(td).addClass(this._currentClass)}}inst.selectedDay=inst.currentDay=$("a",td).html();inst.selectedMonth=inst.currentMonth=month;inst.selectedYear=inst.currentYear=year;if(this._stayOpen){inst.endDay=inst.endMonth=inst.endYear=null}else{if(rangeSelect){inst.endDay=inst.currentDay;inst.endMonth=inst.currentMonth;inst.endYear=inst.currentYear}}this._selectDate(id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear));if(this._stayOpen){inst.rangeStart=this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay));this._updateDatepicker(inst)}else{if(rangeSelect){inst.selectedDay=inst.currentDay=inst.rangeStart.getDate();inst.selectedMonth=inst.currentMonth=inst.rangeStart.getMonth();inst.selectedYear=inst.currentYear=inst.rangeStart.getFullYear();inst.rangeStart=null;if(inst.inline){this._updateDatepicker(inst)}}}},_clearDate:function(id){var target=$(id);var inst=$.data(target[0],PROP_NAME);if(this._get(inst,"mandatory")){return }this._stayOpen=false;inst.endDay=inst.endMonth=inst.endYear=inst.rangeStart=null;this._selectDate(target,"")},_selectDate:function(id,dateStr){var target=$(id);var inst=$.data(target[0],PROP_NAME);dateStr=(dateStr!=null?dateStr:this._formatDate(inst));if(this._get(inst,"rangeSelect")&&dateStr){dateStr=(inst.rangeStart?this._formatDate(inst,inst.rangeStart):dateStr)+this._get(inst,"rangeSeparator")+dateStr}if(inst.input){inst.input.val(dateStr)}this._updateAlternate(inst);var onSelect=this._get(inst,"onSelect");if(onSelect){onSelect.apply((inst.input?inst.input[0]:null),[dateStr,inst])}else{if(inst.input){inst.input.trigger("change")}}if(inst.inline){this._updateDatepicker(inst)}else{if(!this._stayOpen){this._hideDatepicker(null,this._get(inst,"duration"));this._lastInput=inst.input[0];if(typeof (inst.input[0])!="object"){inst.input[0].focus()}this._lastInput=null}}},_updateAlternate:function(inst){var altField=this._get(inst,"altField");if(altField){var altFormat=this._get(inst,"altFormat");var date=this._getDate(inst);dateStr=(isArray(date)?(!date[0]&&!date[1]?"":this.formatDate(altFormat,date[0],this._getFormatConfig(inst))+this._get(inst,"rangeSeparator")+this.formatDate(altFormat,date[1]||date[0],this._getFormatConfig(inst))):this.formatDate(altFormat,date,this._getFormatConfig(inst)));$(altField).each(function(){$(this).val(dateStr)})}},noWeekends:function(date){var day=date.getDay();return[(day>0&&day<6),""]},iso8601Week:function(date){var checkDate=new Date(date.getFullYear(),date.getMonth(),date.getDate());var firstMon=new Date(checkDate.getFullYear(),1-1,4);var firstDay=firstMon.getDay()||7;firstMon.setDate(firstMon.getDate()+1-firstDay);if(firstDay<4&&checkDate<firstMon){checkDate.setDate(checkDate.getDate()-3);return $.datepicker.iso8601Week(checkDate)}else{if(checkDate>new Date(checkDate.getFullYear(),12-1,28)){firstDay=new Date(checkDate.getFullYear()+1,1-1,4).getDay()||7;if(firstDay>4&&(checkDate.getDay()||7)<firstDay-3){checkDate.setDate(checkDate.getDate()+3);return $.datepicker.iso8601Week(checkDate)}}}return Math.floor(((checkDate-firstMon)/86400000)/7)+1},dateStatus:function(date,inst){return $.datepicker.formatDate($.datepicker._get(inst,"dateStatus"),date,$.datepicker._getFormatConfig(inst))},parseDate:function(format,value,settings){if(format==null||value==null){throw"Invalid arguments"}value=(typeof value=="object"?value.toString():value+"");if(value==""){return null}var shortYearCutoff=(settings?settings.shortYearCutoff:null)||this._defaults.shortYearCutoff;var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var year=-1;var month=-1;var day=-1;var literal=false;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};var getNumber=function(match){lookAhead(match);var origSize=(match=="@"?14:(match=="y"?4:2));var size=origSize;var num=0;while(size>0&&iValue<value.length&&value.charAt(iValue)>="0"&&value.charAt(iValue)<="9"){num=num*10+(value.charAt(iValue++)-0);size--}if(size==origSize){throw"Missing number at position "+iValue}return num};var getName=function(match,shortNames,longNames){var names=(lookAhead(match)?longNames:shortNames);var size=0;for(var j=0;j<names.length;j++){size=Math.max(size,names[j].length)}var name="";var iInit=iValue;while(size>0&&iValue<value.length){name+=value.charAt(iValue++);for(var i=0;i<names.length;i++){if(name==names[i]){return i+1}}size--}throw"Unknown name at position "+iInit};var checkLiteral=function(){if(value.charAt(iValue)!=format.charAt(iFormat)){throw"Unexpected literal at position "+iValue}iValue++};var iValue=0;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{checkLiteral()}}else{switch(format.charAt(iFormat)){case"d":day=getNumber("d");break;case"D":getName("D",dayNamesShort,dayNames);break;case"m":month=getNumber("m");break;case"M":month=getName("M",monthNamesShort,monthNames);break;case"y":year=getNumber("y");break;case"@":var date=new Date(getNumber("@"));year=date.getFullYear();month=date.getMonth()+1;day=date.getDate();break;case"'":if(lookAhead("'")){checkLiteral()}else{literal=true}break;default:checkLiteral()}}}if(year<100){year+=new Date().getFullYear()-new Date().getFullYear()%100+(year<=shortYearCutoff?0:-100)}var date=this._daylightSavingAdjust(new Date(year,month-1,day));if(date.getFullYear()!=year||date.getMonth()+1!=month||date.getDate()!=day){throw"Invalid date"}return date},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TIMESTAMP:"@",W3C:"yy-mm-dd",formatDate:function(format,date,settings){if(!date){return""}var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};var formatNumber=function(match,value){return(lookAhead(match)&&value<10?"0":"")+value};var formatName=function(match,value,shortNames,longNames){return(lookAhead(match)?longNames[value]:shortNames[value])};var output="";var literal=false;if(date){for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{output+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d":output+=formatNumber("d",date.getDate());break;case"D":output+=formatName("D",date.getDay(),dayNamesShort,dayNames);break;case"m":output+=formatNumber("m",date.getMonth()+1);break;case"M":output+=formatName("M",date.getMonth(),monthNamesShort,monthNames);break;case"y":output+=(lookAhead("y")?date.getFullYear():(date.getYear()%100<10?"0":"")+date.getYear()%100);break;case"@":output+=date.getTime();break;case"'":if(lookAhead("'")){output+="'"}else{literal=true}break;default:output+=format.charAt(iFormat)}}}}return output},_possibleChars:function(format){var chars="";var literal=false;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{chars+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d":case"m":case"y":case"@":chars+="0123456789";break;case"D":case"M":return null;case"'":if(lookAhead("'")){chars+="'"}else{literal=true}break;default:chars+=format.charAt(iFormat)}}}return chars},_get:function(inst,name){return inst.settings[name]!==undefined?inst.settings[name]:this._defaults[name]},_setDateFromField:function(inst){var dateFormat=this._get(inst,"dateFormat");var dates=inst.input?inst.input.val().split(this._get(inst,"rangeSeparator")):null;inst.endDay=inst.endMonth=inst.endYear=null;var date=defaultDate=this._getDefaultDate(inst);if(dates.length>0){var settings=this._getFormatConfig(inst);if(dates.length>1){date=this.parseDate(dateFormat,dates[1],settings)||defaultDate;inst.endDay=date.getDate();inst.endMonth=date.getMonth();inst.endYear=date.getFullYear()}try{date=this.parseDate(dateFormat,dates[0],settings)||defaultDate}catch(e){this.log(e);date=defaultDate}}inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();inst.currentDay=(dates[0]?date.getDate():0);inst.currentMonth=(dates[0]?date.getMonth():0);inst.currentYear=(dates[0]?date.getFullYear():0);this._adjustInstDate(inst)},_getDefaultDate:function(inst){var date=this._determineDate(this._get(inst,"defaultDate"),new Date());var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);return date},_determineDate:function(date,defaultDate){var offsetNumeric=function(offset){var date=new Date();date.setDate(date.getDate()+offset);return date};var offsetString=function(offset,getDaysInMonth){var date=new Date();var year=date.getFullYear();var month=date.getMonth();var day=date.getDate();var pattern=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;var matches=pattern.exec(offset);while(matches){switch(matches[2]||"d"){case"d":case"D":day+=(matches[1]-0);break;case"w":case"W":day+=(matches[1]*7);break;case"m":case"M":month+=(matches[1]-0);day=Math.min(day,getDaysInMonth(year,month));break;case"y":case"Y":year+=(matches[1]-0);day=Math.min(day,getDaysInMonth(year,month));break}matches=pattern.exec(offset)}return new Date(year,month,day)};date=(date==null?defaultDate:(typeof date=="string"?offsetString(date,this._getDaysInMonth):(typeof date=="number"?(isNaN(date)?defaultDate:offsetNumeric(date)):date)));date=(date&&date.toString()=="Invalid Date"?defaultDate:date);if(date){date.setHours(0);date.setMinutes(0);date.setSeconds(0);date.setMilliseconds(0)}return this._daylightSavingAdjust(date)},_daylightSavingAdjust:function(date){if(!date){return null}date.setHours(date.getHours()>12?date.getHours()+2:0);return date},_setDate:function(inst,date,endDate){var clear=!(date);date=this._determineDate(date,new Date());inst.selectedDay=inst.currentDay=date.getDate();inst.drawMonth=inst.selectedMonth=inst.currentMonth=date.getMonth();inst.drawYear=inst.selectedYear=inst.currentYear=date.getFullYear();if(this._get(inst,"rangeSelect")){if(endDate){endDate=this._determineDate(endDate,null);inst.endDay=endDate.getDate();inst.endMonth=endDate.getMonth();inst.endYear=endDate.getFullYear()}else{inst.endDay=inst.currentDay;inst.endMonth=inst.currentMonth;inst.endYear=inst.currentYear}}this._adjustInstDate(inst);if(inst.input){inst.input.val(clear?"":this._formatDate(inst)+(!this._get(inst,"rangeSelect")?"":this._get(inst,"rangeSeparator")+this._formatDate(inst,inst.endDay,inst.endMonth,inst.endYear)))}},_getDate:function(inst){var startDate=(!inst.currentYear||(inst.input&&inst.input.val()=="")?null:this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));if(this._get(inst,"rangeSelect")){return[inst.rangeStart||startDate,(!inst.endYear?inst.rangeStart||startDate:this._daylightSavingAdjust(new Date(inst.endYear,inst.endMonth,inst.endDay)))]}else{return startDate}},_generateDatepicker:function(inst){var today=new Date();today=this._daylightSavingAdjust(new Date(today.getFullYear(),today.getMonth(),today.getDate()));var showStatus=this._get(inst,"showStatus");var isRTL=this._get(inst,"isRTL");var clear=(this._get(inst,"mandatory")?"":'<div class="ui-datepicker-clear"><a onclick="jQuery.datepicker._clearDate(\'#'+inst.id+"');\""+(showStatus?this._addStatus(inst,this._get(inst,"clearStatus")||"&#xa0;"):"")+">"+this._get(inst,"clearText")+"</a></div>");var controls='<div class="ui-datepicker-control">'+(isRTL?"":clear)+'<div class="ui-datepicker-close"><a onclick="jQuery.datepicker._hideDatepicker();"'+(showStatus?this._addStatus(inst,this._get(inst,"closeStatus")||"&#xa0;"):"")+">"+this._get(inst,"closeText")+"</a></div>"+(isRTL?clear:"")+"</div>";var prompt=this._get(inst,"prompt");var closeAtTop=this._get(inst,"closeAtTop");var hideIfNoPrevNext=this._get(inst,"hideIfNoPrevNext");var navigationAsDateFormat=this._get(inst,"navigationAsDateFormat");var numMonths=this._getNumberOfMonths(inst);var stepMonths=this._get(inst,"stepMonths");var isMultiMonth=(numMonths[0]!=1||numMonths[1]!=1);var currentDate=this._daylightSavingAdjust((!inst.currentDay?new Date(9999,9,9):new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");var drawMonth=inst.drawMonth;var drawYear=inst.drawYear;if(maxDate){var maxDraw=this._daylightSavingAdjust(new Date(maxDate.getFullYear(),maxDate.getMonth()-numMonths[1]+1,maxDate.getDate()));maxDraw=(minDate&&maxDraw<minDate?minDate:maxDraw);while(this._daylightSavingAdjust(new Date(drawYear,drawMonth,1))>maxDraw){drawMonth--;if(drawMonth<0){drawMonth=11;drawYear--}}}var prevText=this._get(inst,"prevText");prevText=(!navigationAsDateFormat?prevText:this.formatDate(prevText,this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepMonths,1)),this._getFormatConfig(inst)));var prev='<div class="ui-datepicker-prev">'+(this._canAdjustMonth(inst,-1,drawYear,drawMonth)?"<a onclick=\"jQuery.datepicker._adjustDate('#"+inst.id+"', -"+stepMonths+", 'M');\""+(showStatus?this._addStatus(inst,this._get(inst,"prevStatus")||"&#xa0;"):"")+">"+prevText+"</a>":(hideIfNoPrevNext?"":"<label>"+prevText+"</label>"))+"</div>";var nextText=this._get(inst,"nextText");nextText=(!navigationAsDateFormat?nextText:this.formatDate(nextText,this._daylightSavingAdjust(new Date(drawYear,drawMonth+stepMonths,1)),this._getFormatConfig(inst)));var next='<div class="ui-datepicker-next">'+(this._canAdjustMonth(inst,+1,drawYear,drawMonth)?"<a onclick=\"jQuery.datepicker._adjustDate('#"+inst.id+"', +"+stepMonths+", 'M');\""+(showStatus?this._addStatus(inst,this._get(inst,"nextStatus")||"&#xa0;"):"")+">"+nextText+"</a>":(hideIfNoPrevNext?"":"<label>"+nextText+"</label>"))+"</div>";var currentText=this._get(inst,"currentText");currentText=(!navigationAsDateFormat?currentText:this.formatDate(currentText,today,this._getFormatConfig(inst)));var html=(prompt?'<div class="'+this._promptClass+'">'+prompt+"</div>":"")+(closeAtTop&&!inst.inline?controls:"")+'<div class="ui-datepicker-links">'+(isRTL?next:prev)+(this._isInRange(inst,(this._get(inst,"gotoCurrent")&&inst.currentDay?currentDate:today))?'<div class="ui-datepicker-current"><a onclick="jQuery.datepicker._gotoToday(\'#'+inst.id+"');\""+(showStatus?this._addStatus(inst,this._get(inst,"currentStatus")||"&#xa0;"):"")+">"+currentText+"</a></div>":"")+(isRTL?prev:next)+"</div>";var firstDay=this._get(inst,"firstDay");var changeFirstDay=this._get(inst,"changeFirstDay");var dayNames=this._get(inst,"dayNames");var dayNamesShort=this._get(inst,"dayNamesShort");var dayNamesMin=this._get(inst,"dayNamesMin");var monthNames=this._get(inst,"monthNames");var beforeShowDay=this._get(inst,"beforeShowDay");var highlightWeek=this._get(inst,"highlightWeek");var showOtherMonths=this._get(inst,"showOtherMonths");var showWeeks=this._get(inst,"showWeeks");var calculateWeek=this._get(inst,"calculateWeek")||this.iso8601Week;var status=(showStatus?this._get(inst,"dayStatus")||"&#xa0;":"");var dateStatus=this._get(inst,"statusForDate")||this.dateStatus;var endDate=inst.endDay?this._daylightSavingAdjust(new Date(inst.endYear,inst.endMonth,inst.endDay)):currentDate;for(var row=0;row<numMonths[0];row++){for(var col=0;col<numMonths[1];col++){var selectedDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,inst.selectedDay));html+='<div class="ui-datepicker-one-month'+(col==0?" ui-datepicker-new-row":"")+'">'+this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,row>0||col>0,showStatus,monthNames)+'<table class="ui-datepicker" cellpadding="0" cellspacing="0"><thead><tr class="ui-datepicker-title-row">'+(showWeeks?"<td>"+this._get(inst,"weekHeader")+"</td>":"");for(var dow=0;dow<7;dow++){var day=(dow+firstDay)%7;var dayStatus=(status.indexOf("DD")>-1?status.replace(/DD/,dayNames[day]):status.replace(/D/,dayNamesShort[day]));html+="<td"+((dow+firstDay+6)%7>=5?' class="ui-datepicker-week-end-cell"':"")+">"+(!changeFirstDay?"<span":"<a onclick=\"jQuery.datepicker._changeFirstDay('#"+inst.id+"', "+day+');"')+(showStatus?this._addStatus(inst,dayStatus):"")+' title="'+dayNames[day]+'">'+dayNamesMin[day]+(changeFirstDay?"</a>":"</span>")+"</td>"}html+="</tr></thead><tbody>";var daysInMonth=this._getDaysInMonth(drawYear,drawMonth);if(drawYear==inst.selectedYear&&drawMonth==inst.selectedMonth){inst.selectedDay=Math.min(inst.selectedDay,daysInMonth)}var leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;var numRows=(isMultiMonth?6:Math.ceil((leadDays+daysInMonth)/7));var printDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,1-leadDays));for(var dRow=0;dRow<numRows;dRow++){html+='<tr class="ui-datepicker-days-row">'+(showWeeks?'<td class="ui-datepicker-week-col">'+calculateWeek(printDate)+"</td>":"");for(var dow=0;dow<7;dow++){var daySettings=(beforeShowDay?beforeShowDay.apply((inst.input?inst.input[0]:null),[printDate]):[true,""]);var otherMonth=(printDate.getMonth()!=drawMonth);var unselectable=otherMonth||!daySettings[0]||(minDate&&printDate<minDate)||(maxDate&&printDate>maxDate);html+='<td class="ui-datepicker-days-cell'+((dow+firstDay+6)%7>=5?" ui-datepicker-week-end-cell":"")+(otherMonth?" ui-datepicker-otherMonth":"")+(printDate.getTime()==selectedDate.getTime()&&drawMonth==inst.selectedMonth?" ui-datepicker-days-cell-over":"")+(unselectable?" "+this._unselectableClass:"")+(otherMonth&&!showOtherMonths?"":" "+daySettings[1]+(printDate.getTime()>=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" "+this._currentClass:"")+(printDate.getTime()==today.getTime()?" ui-datepicker-today":""))+'"'+((!otherMonth||showOtherMonths)&&daySettings[2]?' title="'+daySettings[2]+'"':"")+(unselectable?(highlightWeek?" onmouseover=\"jQuery(this).parent().addClass('ui-datepicker-week-over');\" onmouseout=\"jQuery(this).parent().removeClass('ui-datepicker-week-over');\"":""):" onmouseover=\"jQuery(this).addClass('ui-datepicker-days-cell-over')"+(highlightWeek?".parent().addClass('ui-datepicker-week-over')":"")+";"+(!showStatus||(otherMonth&&!showOtherMonths)?"":"jQuery('#ui-datepicker-status-"+inst.id+"').html('"+(dateStatus.apply((inst.input?inst.input[0]:null),[printDate,inst])||"&#xa0;")+"');")+"\" onmouseout=\"jQuery(this).removeClass('ui-datepicker-days-cell-over')"+(highlightWeek?".parent().removeClass('ui-datepicker-week-over')":"")+";"+(!showStatus||(otherMonth&&!showOtherMonths)?"":"jQuery('#ui-datepicker-status-"+inst.id+"').html('&#xa0;');")+'" onclick="jQuery.datepicker._selectDay(\'#'+inst.id+"',"+drawMonth+","+drawYear+', this);"')+">"+(otherMonth?(showOtherMonths?printDate.getDate():"&#xa0;"):(unselectable?printDate.getDate():"<a>"+printDate.getDate()+"</a>"))+"</td>";printDate.setDate(printDate.getDate()+1);printDate=this._daylightSavingAdjust(printDate)}html+="</tr>"}drawMonth++;if(drawMonth>11){drawMonth=0;drawYear++}html+="</tbody></table></div>"}}html+=(showStatus?'<div style="clear: both;"></div><div id="ui-datepicker-status-'+inst.id+'" class="ui-datepicker-status">'+(this._get(inst,"initStatus")||"&#xa0;")+"</div>":"")+(!closeAtTop&&!inst.inline?controls:"")+'<div style="clear: both;"></div>'+($.browser.msie&&parseInt($.browser.version)<7&&!inst.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover"></iframe>':"");return html},_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,secondary,showStatus,monthNames){minDate=(inst.rangeStart&&minDate&&selectedDate<minDate?selectedDate:minDate);var html='<div class="ui-datepicker-header">';if(secondary||!this._get(inst,"changeMonth")){html+=monthNames[drawMonth]+"&#xa0;"}else{var inMinYear=(minDate&&minDate.getFullYear()==drawYear);var inMaxYear=(maxDate&&maxDate.getFullYear()==drawYear);html+='<select class="ui-datepicker-new-month" onchange="jQuery.datepicker._selectMonthYear(\'#'+inst.id+"', this, 'M');\" onclick=\"jQuery.datepicker._clickMonthYear('#"+inst.id+"');\""+(showStatus?this._addStatus(inst,this._get(inst,"monthStatus")||"&#xa0;"):"")+">";for(var month=0;month<12;month++){if((!inMinYear||month>=minDate.getMonth())&&(!inMaxYear||month<=maxDate.getMonth())){html+='<option value="'+month+'"'+(month==drawMonth?' selected="selected"':"")+">"+monthNames[month]+"</option>"}}html+="</select>"}if(secondary||!this._get(inst,"changeYear")){html+=drawYear}else{var years=this._get(inst,"yearRange").split(":");var year=0;var endYear=0;if(years.length!=2){year=drawYear-10;endYear=drawYear+10}else{if(years[0].charAt(0)=="+"||years[0].charAt(0)=="-"){year=endYear=new Date().getFullYear();year+=parseInt(years[0],10);endYear+=parseInt(years[1],10)}else{year=parseInt(years[0],10);endYear=parseInt(years[1],10)}}year=(minDate?Math.max(year,minDate.getFullYear()):year);endYear=(maxDate?Math.min(endYear,maxDate.getFullYear()):endYear);html+='<select class="ui-datepicker-new-year" onchange="jQuery.datepicker._selectMonthYear(\'#'+inst.id+"', this, 'Y');\" onclick=\"jQuery.datepicker._clickMonthYear('#"+inst.id+"');\""+(showStatus?this._addStatus(inst,this._get(inst,"yearStatus")||"&#xa0;"):"")+">";for(;year<=endYear;year++){html+='<option value="'+year+'"'+(year==drawYear?' selected="selected"':"")+">"+year+"</option>"}html+="</select>"}html+="</div>";return html},_addStatus:function(inst,text){return" onmouseover=\"jQuery('#ui-datepicker-status-"+inst.id+"').html('"+text+"');\" onmouseout=\"jQuery('#ui-datepicker-status-"+inst.id+"').html('&#xa0;');\""},_adjustInstDate:function(inst,offset,period){var year=inst.drawYear+(period=="Y"?offset:0);var month=inst.drawMonth+(period=="M"?offset:0);var day=Math.min(inst.selectedDay,this._getDaysInMonth(year,month))+(period=="D"?offset:0);var date=this._daylightSavingAdjust(new Date(year,month,day));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();if(period=="M"||period=="Y"){this._notifyChange(inst)}},_notifyChange:function(inst){var onChange=this._get(inst,"onChangeMonthYear");if(onChange){onChange.apply((inst.input?inst.input[0]:null),[new Date(inst.selectedYear,inst.selectedMonth,1),inst])}},_getNumberOfMonths:function(inst){var numMonths=this._get(inst,"numberOfMonths");return(numMonths==null?[1,1]:(typeof numMonths=="number"?[1,numMonths]:numMonths))},_getMinMaxDate:function(inst,minMax,checkRange){var date=this._determineDate(this._get(inst,minMax+"Date"),null);return(!checkRange||!inst.rangeStart?date:(!date||inst.rangeStart>date?inst.rangeStart:date))},_getDaysInMonth:function(year,month){return 32-new Date(year,month,32).getDate()},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay()},_canAdjustMonth:function(inst,offset,curYear,curMonth){var numMonths=this._getNumberOfMonths(inst);var date=this._daylightSavingAdjust(new Date(curYear,curMonth+(offset<0?offset:numMonths[1]),1));if(offset<0){date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()))}return this._isInRange(inst,date)},_isInRange:function(inst,date){var newMinDate=(!inst.rangeStart?null:this._daylightSavingAdjust(new Date(inst.selectedYear,inst.selectedMonth,inst.selectedDay)));newMinDate=(newMinDate&&inst.rangeStart<newMinDate?inst.rangeStart:newMinDate);var minDate=newMinDate||this._getMinMaxDate(inst,"min");var maxDate=this._getMinMaxDate(inst,"max");return((!minDate||date>=minDate)&&(!maxDate||date<=maxDate))},_getFormatConfig:function(inst){var shortYearCutoff=this._get(inst,"shortYearCutoff");shortYearCutoff=(typeof shortYearCutoff!="string"?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));return{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get(inst,"dayNamesShort"),dayNames:this._get(inst,"dayNames"),monthNamesShort:this._get(inst,"monthNamesShort"),monthNames:this._get(inst,"monthNames")}},_formatDate:function(inst,day,month,year){if(!day){inst.currentDay=inst.selectedDay;inst.currentMonth=inst.selectedMonth;inst.currentYear=inst.selectedYear}var date=(day?(typeof day=="object"?day:this._daylightSavingAdjust(new Date(year,month,day))):this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return this.formatDate(this._get(inst,"dateFormat"),date,this._getFormatConfig(inst))}});function extendRemove(target,props){$.extend(target,props);for(var name in props){if(props[name]==null||props[name]==undefined){target[name]=props[name]}}return target}function isArray(a){return(a&&(($.browser.safari&&typeof a=="object"&&a.length)||(a.constructor&&a.constructor.toString().match(/\Array\(\)/))))}$.fn.datepicker=function(options){var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options=="string"&&(options=="isDisabled"||options=="getDate")){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}return this.each(function(){typeof options=="string"?$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options)})};$.datepicker=new Datepicker();$(document).ready(function(){$(document.body).append($.datepicker.dpDiv).mousedown($.datepicker._checkExternalClick)})})(jQuery) \ No newline at end of file
+(function($){$.extend($.ui,{datepicker:{version:"1.7.2"}});var PROP_NAME="datepicker";function Datepicker(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._datepickerShowing=false;this._inDialog=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass="ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],dateFormat:"mm/dd/yy",firstDay:0,isRTL:false};this._defaults={showOn:"focus",showAnim:"show",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,showMonthAfterYear:false,yearRange:"-10:+10",showOtherMonths:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"normal",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false};$.extend(this._defaults,this.regional[""]);this.dpDiv=$('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible"></div>')}$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",log:function(){if(this.debug){console.log.apply("",arguments)}},setDefaults:function(settings){extendRemove(this._defaults,settings||{});return this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase();var inline=(nodeName=="div"||nodeName=="span");if(!target.id){target.id="dp"+(++this.uuid)}var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{});if(nodeName=="input"){this._connectDatepicker(target,inst)}else{if(inline){this._inlineDatepicker(target,inst)}}},_newInst:function(target,inline){var id=target[0].id.replace(/([:\[\]\.])/g,"\\\\$1");return{id:id,input:target,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:inline,dpDiv:(!inline?this.dpDiv:$('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}},_connectDatepicker:function(target,inst){var input=$(target);inst.append=$([]);inst.trigger=$([]);if(input.hasClass(this.markerClassName)){return }var appendText=this._get(inst,"appendText");var isRTL=this._get(inst,"isRTL");if(appendText){inst.append=$('<span class="'+this._appendClass+'">'+appendText+"</span>");input[isRTL?"before":"after"](inst.append)}var showOn=this._get(inst,"showOn");if(showOn=="focus"||showOn=="both"){input.focus(this._showDatepicker)}if(showOn=="button"||showOn=="both"){var buttonText=this._get(inst,"buttonText");var buttonImage=this._get(inst,"buttonImage");inst.trigger=$(this._get(inst,"buttonImageOnly")?$("<img/>").addClass(this._triggerClass).attr({src:buttonImage,alt:buttonText,title:buttonText}):$('<button type="button"></button>').addClass(this._triggerClass).html(buttonImage==""?buttonText:$("<img/>").attr({src:buttonImage,alt:buttonText,title:buttonText})));input[isRTL?"before":"after"](inst.trigger);inst.trigger.click(function(){if($.datepicker._datepickerShowing&&$.datepicker._lastInput==target){$.datepicker._hideDatepicker()}else{$.datepicker._showDatepicker(target)}return false})}input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst)},_inlineDatepicker:function(target,inst){var divSpan=$(target);if(divSpan.hasClass(this.markerClassName)){return }divSpan.addClass(this.markerClassName).append(inst.dpDiv).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst);this._setDate(inst,this._getDefaultDate(inst));this._updateDatepicker(inst);this._updateAlternate(inst)},_dialogDatepicker:function(input,dateText,onSelect,settings,pos){var inst=this._dialogInst;if(!inst){var id="dp"+(++this.uuid);this._dialogInput=$('<input type="text" id="'+id+'" size="1" style="position: absolute; top: -100px;"/>');this._dialogInput.keydown(this._doKeyDown);$("body").append(this._dialogInput);inst=this._dialogInst=this._newInst(this._dialogInput,false);inst.settings={};$.data(this._dialogInput[0],PROP_NAME,inst)}extendRemove(inst.settings,settings||{});this._dialogInput.val(dateText);this._pos=(pos?(pos.length?pos:[pos.pageX,pos.pageY]):null);if(!this._pos){var browserWidth=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var browserHeight=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[(browserWidth/2)-100+scrollX,(browserHeight/2)-150+scrollY]}this._dialogInput.css("left",this._pos[0]+"px").css("top",this._pos[1]+"px");inst.settings.onSelect=onSelect;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if($.blockUI){$.blockUI(this.dpDiv)}$.data(this._dialogInput[0],PROP_NAME,inst);return this},_destroyDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return }var nodeName=target.nodeName.toLowerCase();$.removeData(target,PROP_NAME);if(nodeName=="input"){inst.append.remove();inst.trigger.remove();$target.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress)}else{if(nodeName=="div"||nodeName=="span"){$target.removeClass(this.markerClassName).empty()}}},_enableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return }var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=false;inst.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().removeClass("ui-state-disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)})},_disableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return }var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=true;inst.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().addClass("ui-state-disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)});this._disabledInputs[this._disabledInputs.length]=target},_isDisabledDatepicker:function(target){if(!target){return false}for(var i=0;i<this._disabledInputs.length;i++){if(this._disabledInputs[i]==target){return true}}return false},_getInst:function(target){try{return $.data(target,PROP_NAME)}catch(err){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(target,name,value){var inst=this._getInst(target);if(arguments.length==2&&typeof name=="string"){return(name=="defaults"?$.extend({},$.datepicker._defaults):(inst?(name=="all"?$.extend({},inst.settings):this._get(inst,name)):null))}var settings=name||{};if(typeof name=="string"){settings={};settings[name]=value}if(inst){if(this._curInst==inst){this._hideDatepicker(null)}var date=this._getDateDatepicker(target);extendRemove(inst.settings,settings);this._setDateDatepicker(target,date);this._updateDatepicker(inst)}},_changeDatepicker:function(target,name,value){this._optionDatepicker(target,name,value)},_refreshDatepicker:function(target){var inst=this._getInst(target);if(inst){this._updateDatepicker(inst)}},_setDateDatepicker:function(target,date,endDate){var inst=this._getInst(target);if(inst){this._setDate(inst,date,endDate);this._updateDatepicker(inst);this._updateAlternate(inst)}},_getDateDatepicker:function(target){var inst=this._getInst(target);if(inst&&!inst.inline){this._setDateFromField(inst)}return(inst?this._getDate(inst):null)},_doKeyDown:function(event){var inst=$.datepicker._getInst(event.target);var handled=true;var isRTL=inst.dpDiv.is(".ui-datepicker-rtl");inst._keyEvent=true;if($.datepicker._datepickerShowing){switch(event.keyCode){case 9:$.datepicker._hideDatepicker(null,"");break;case 13:var sel=$("td."+$.datepicker._dayOverClass+", td."+$.datepicker._currentClass,inst.dpDiv);if(sel[0]){$.datepicker._selectDay(event.target,inst.selectedMonth,inst.selectedYear,sel[0])}else{$.datepicker._hideDatepicker(null,$.datepicker._get(inst,"duration"))}return false;break;case 27:$.datepicker._hideDatepicker(null,$.datepicker._get(inst,"duration"));break;case 33:$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths")),"M");break;case 34:$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths")),"M");break;case 35:if(event.ctrlKey||event.metaKey){$.datepicker._clearDate(event.target)}handled=event.ctrlKey||event.metaKey;break;case 36:if(event.ctrlKey||event.metaKey){$.datepicker._gotoToday(event.target)}handled=event.ctrlKey||event.metaKey;break;case 37:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,(isRTL?+1:-1),"D")}handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths")),"M")}break;case 38:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,-7,"D")}handled=event.ctrlKey||event.metaKey;break;case 39:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,(isRTL?-1:+1),"D")}handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths")),"M")}break;case 40:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,+7,"D")}handled=event.ctrlKey||event.metaKey;break;default:handled=false}}else{if(event.keyCode==36&&event.ctrlKey){$.datepicker._showDatepicker(this)}else{handled=false}}if(handled){event.preventDefault();event.stopPropagation()}},_doKeyPress:function(event){var inst=$.datepicker._getInst(event.target);if($.datepicker._get(inst,"constrainInput")){var chars=$.datepicker._possibleChars($.datepicker._get(inst,"dateFormat"));var chr=String.fromCharCode(event.charCode==undefined?event.keyCode:event.charCode);return event.ctrlKey||(chr<" "||!chars||chars.indexOf(chr)>-1)}},_showDatepicker:function(input){input=input.target||input;if(input.nodeName.toLowerCase()!="input"){input=$("input",input.parentNode)[0]}if($.datepicker._isDisabledDatepicker(input)||$.datepicker._lastInput==input){return }var inst=$.datepicker._getInst(input);var beforeShow=$.datepicker._get(inst,"beforeShow");extendRemove(inst.settings,(beforeShow?beforeShow.apply(input,[input,inst]):{}));$.datepicker._hideDatepicker(null,"");$.datepicker._lastInput=input;$.datepicker._setDateFromField(inst);if($.datepicker._inDialog){input.value=""}if(!$.datepicker._pos){$.datepicker._pos=$.datepicker._findPos(input);$.datepicker._pos[1]+=input.offsetHeight}var isFixed=false;$(input).parents().each(function(){isFixed|=$(this).css("position")=="fixed";return !isFixed});if(isFixed&&$.browser.opera){$.datepicker._pos[0]-=document.documentElement.scrollLeft;$.datepicker._pos[1]-=document.documentElement.scrollTop}var offset={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null;inst.rangeStart=null;inst.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});$.datepicker._updateDatepicker(inst);offset=$.datepicker._checkOffset(inst,offset,isFixed);inst.dpDiv.css({position:($.datepicker._inDialog&&$.blockUI?"static":(isFixed?"fixed":"absolute")),display:"none",left:offset.left+"px",top:offset.top+"px"});if(!inst.inline){var showAnim=$.datepicker._get(inst,"showAnim")||"show";var duration=$.datepicker._get(inst,"duration");var postProcess=function(){$.datepicker._datepickerShowing=true;if($.browser.msie&&parseInt($.browser.version,10)<7){$("iframe.ui-datepicker-cover").css({width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4})}};if($.effects&&$.effects[showAnim]){inst.dpDiv.show(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[showAnim](duration,postProcess)}if(duration==""){postProcess()}if(inst.input[0].type!="hidden"){inst.input[0].focus()}$.datepicker._curInst=inst}},_updateDatepicker:function(inst){var dims={width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4};var self=this;inst.dpDiv.empty().append(this._generateHTML(inst)).find("iframe.ui-datepicker-cover").css({width:dims.width,height:dims.height}).end().find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout",function(){$(this).removeClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).removeClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).removeClass("ui-datepicker-next-hover")}}).bind("mouseover",function(){if(!self._isDisabledDatepicker(inst.inline?inst.dpDiv.parent()[0]:inst.input[0])){$(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");$(this).addClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).addClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).addClass("ui-datepicker-next-hover")}}}).end().find("."+this._dayOverClass+" a").trigger("mouseover").end();var numMonths=this._getNumberOfMonths(inst);var cols=numMonths[1];var width=17;if(cols>1){inst.dpDiv.addClass("ui-datepicker-multi-"+cols).css("width",(width*cols)+"em")}else{inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("")}inst.dpDiv[(numMonths[0]!=1||numMonths[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");inst.dpDiv[(this._get(inst,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");if(inst.input&&inst.input[0].type!="hidden"&&inst==$.datepicker._curInst){$(inst.input[0]).focus()}},_checkOffset:function(inst,offset,isFixed){var dpWidth=inst.dpDiv.outerWidth();var dpHeight=inst.dpDiv.outerHeight();var inputWidth=inst.input?inst.input.outerWidth():0;var inputHeight=inst.input?inst.input.outerHeight():0;var viewWidth=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)+$(document).scrollLeft();var viewHeight=(window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)+$(document).scrollTop();offset.left-=(this._get(inst,"isRTL")?(dpWidth-inputWidth):0);offset.left-=(isFixed&&offset.left==inst.input.offset().left)?$(document).scrollLeft():0;offset.top-=(isFixed&&offset.top==(inst.input.offset().top+inputHeight))?$(document).scrollTop():0;offset.left-=(offset.left+dpWidth>viewWidth&&viewWidth>dpWidth)?Math.abs(offset.left+dpWidth-viewWidth):0;offset.top-=(offset.top+dpHeight>viewHeight&&viewHeight>dpHeight)?Math.abs(offset.top+dpHeight+inputHeight*2-viewHeight):0;return offset},_findPos:function(obj){while(obj&&(obj.type=="hidden"||obj.nodeType!=1)){obj=obj.nextSibling}var position=$(obj).offset();return[position.left,position.top]},_hideDatepicker:function(input,duration){var inst=this._curInst;if(!inst||(input&&inst!=$.data(input,PROP_NAME))){return }if(inst.stayOpen){this._selectDate("#"+inst.id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear))}inst.stayOpen=false;if(this._datepickerShowing){duration=(duration!=null?duration:this._get(inst,"duration"));var showAnim=this._get(inst,"showAnim");var postProcess=function(){$.datepicker._tidyDialog(inst)};if(duration!=""&&$.effects&&$.effects[showAnim]){inst.dpDiv.hide(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[(duration==""?"hide":(showAnim=="slideDown"?"slideUp":(showAnim=="fadeIn"?"fadeOut":"hide")))](duration,postProcess)}if(duration==""){this._tidyDialog(inst)}var onClose=this._get(inst,"onClose");if(onClose){onClose.apply((inst.input?inst.input[0]:null),[(inst.input?inst.input.val():""),inst])}this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if($.blockUI){$.unblockUI();$("body").append(this.dpDiv)}}this._inDialog=false}this._curInst=null},_tidyDialog:function(inst){inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(event){if(!$.datepicker._curInst){return }var $target=$(event.target);if(($target.parents("#"+$.datepicker._mainDivId).length==0)&&!$target.hasClass($.datepicker.markerClassName)&&!$target.hasClass($.datepicker._triggerClass)&&$.datepicker._datepickerShowing&&!($.datepicker._inDialog&&$.blockUI)){$.datepicker._hideDatepicker(null,"")}},_adjustDate:function(id,offset,period){var target=$(id);var inst=this._getInst(target[0]);if(this._isDisabledDatepicker(target[0])){return }this._adjustInstDate(inst,offset+(period=="M"?this._get(inst,"showCurrentAtPos"):0),period);this._updateDatepicker(inst)},_gotoToday:function(id){var target=$(id);var inst=this._getInst(target[0]);if(this._get(inst,"gotoCurrent")&&inst.currentDay){inst.selectedDay=inst.currentDay;inst.drawMonth=inst.selectedMonth=inst.currentMonth;inst.drawYear=inst.selectedYear=inst.currentYear}else{var date=new Date();inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear()}this._notifyChange(inst);this._adjustDate(target)},_selectMonthYear:function(id,select,period){var target=$(id);var inst=this._getInst(target[0]);inst._selectingMonthYear=false;inst["selected"+(period=="M"?"Month":"Year")]=inst["draw"+(period=="M"?"Month":"Year")]=parseInt(select.options[select.selectedIndex].value,10);this._notifyChange(inst);this._adjustDate(target)},_clickMonthYear:function(id){var target=$(id);var inst=this._getInst(target[0]);if(inst.input&&inst._selectingMonthYear&&!$.browser.msie){inst.input[0].focus()}inst._selectingMonthYear=!inst._selectingMonthYear},_selectDay:function(id,month,year,td){var target=$(id);if($(td).hasClass(this._unselectableClass)||this._isDisabledDatepicker(target[0])){return }var inst=this._getInst(target[0]);inst.selectedDay=inst.currentDay=$("a",td).html();inst.selectedMonth=inst.currentMonth=month;inst.selectedYear=inst.currentYear=year;if(inst.stayOpen){inst.endDay=inst.endMonth=inst.endYear=null}this._selectDate(id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear));if(inst.stayOpen){inst.rangeStart=this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay));this._updateDatepicker(inst)}},_clearDate:function(id){var target=$(id);var inst=this._getInst(target[0]);inst.stayOpen=false;inst.endDay=inst.endMonth=inst.endYear=inst.rangeStart=null;this._selectDate(target,"")},_selectDate:function(id,dateStr){var target=$(id);var inst=this._getInst(target[0]);dateStr=(dateStr!=null?dateStr:this._formatDate(inst));if(inst.input){inst.input.val(dateStr)}this._updateAlternate(inst);var onSelect=this._get(inst,"onSelect");if(onSelect){onSelect.apply((inst.input?inst.input[0]:null),[dateStr,inst])}else{if(inst.input){inst.input.trigger("change")}}if(inst.inline){this._updateDatepicker(inst)}else{if(!inst.stayOpen){this._hideDatepicker(null,this._get(inst,"duration"));this._lastInput=inst.input[0];if(typeof (inst.input[0])!="object"){inst.input[0].focus()}this._lastInput=null}}},_updateAlternate:function(inst){var altField=this._get(inst,"altField");if(altField){var altFormat=this._get(inst,"altFormat")||this._get(inst,"dateFormat");var date=this._getDate(inst);dateStr=this.formatDate(altFormat,date,this._getFormatConfig(inst));$(altField).each(function(){$(this).val(dateStr)})}},noWeekends:function(date){var day=date.getDay();return[(day>0&&day<6),""]},iso8601Week:function(date){var checkDate=new Date(date.getFullYear(),date.getMonth(),date.getDate());var firstMon=new Date(checkDate.getFullYear(),1-1,4);var firstDay=firstMon.getDay()||7;firstMon.setDate(firstMon.getDate()+1-firstDay);if(firstDay<4&&checkDate<firstMon){checkDate.setDate(checkDate.getDate()-3);return $.datepicker.iso8601Week(checkDate)}else{if(checkDate>new Date(checkDate.getFullYear(),12-1,28)){firstDay=new Date(checkDate.getFullYear()+1,1-1,4).getDay()||7;if(firstDay>4&&(checkDate.getDay()||7)<firstDay-3){return 1}}}return Math.floor(((checkDate-firstMon)/86400000)/7)+1},parseDate:function(format,value,settings){if(format==null||value==null){throw"Invalid arguments"}value=(typeof value=="object"?value.toString():value+"");if(value==""){return null}var shortYearCutoff=(settings?settings.shortYearCutoff:null)||this._defaults.shortYearCutoff;var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var year=-1;var month=-1;var day=-1;var doy=-1;var literal=false;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};var getNumber=function(match){lookAhead(match);var origSize=(match=="@"?14:(match=="y"?4:(match=="o"?3:2)));var size=origSize;var num=0;while(size>0&&iValue<value.length&&value.charAt(iValue)>="0"&&value.charAt(iValue)<="9"){num=num*10+parseInt(value.charAt(iValue++),10);size--}if(size==origSize){throw"Missing number at position "+iValue}return num};var getName=function(match,shortNames,longNames){var names=(lookAhead(match)?longNames:shortNames);var size=0;for(var j=0;j<names.length;j++){size=Math.max(size,names[j].length)}var name="";var iInit=iValue;while(size>0&&iValue<value.length){name+=value.charAt(iValue++);for(var i=0;i<names.length;i++){if(name==names[i]){return i+1}}size--}throw"Unknown name at position "+iInit};var checkLiteral=function(){if(value.charAt(iValue)!=format.charAt(iFormat)){throw"Unexpected literal at position "+iValue}iValue++};var iValue=0;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{checkLiteral()}}else{switch(format.charAt(iFormat)){case"d":day=getNumber("d");break;case"D":getName("D",dayNamesShort,dayNames);break;case"o":doy=getNumber("o");break;case"m":month=getNumber("m");break;case"M":month=getName("M",monthNamesShort,monthNames);break;case"y":year=getNumber("y");break;case"@":var date=new Date(getNumber("@"));year=date.getFullYear();month=date.getMonth()+1;day=date.getDate();break;case"'":if(lookAhead("'")){checkLiteral()}else{literal=true}break;default:checkLiteral()}}}if(year==-1){year=new Date().getFullYear()}else{if(year<100){year+=new Date().getFullYear()-new Date().getFullYear()%100+(year<=shortYearCutoff?0:-100)}}if(doy>-1){month=1;day=doy;do{var dim=this._getDaysInMonth(year,month-1);if(day<=dim){break}month++;day-=dim}while(true)}var date=this._daylightSavingAdjust(new Date(year,month-1,day));if(date.getFullYear()!=year||date.getMonth()+1!=month||date.getDate()!=day){throw"Invalid date"}return date},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TIMESTAMP:"@",W3C:"yy-mm-dd",formatDate:function(format,date,settings){if(!date){return""}var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};var formatNumber=function(match,value,len){var num=""+value;if(lookAhead(match)){while(num.length<len){num="0"+num}}return num};var formatName=function(match,value,shortNames,longNames){return(lookAhead(match)?longNames[value]:shortNames[value])};var output="";var literal=false;if(date){for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{output+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d":output+=formatNumber("d",date.getDate(),2);break;case"D":output+=formatName("D",date.getDay(),dayNamesShort,dayNames);break;case"o":var doy=date.getDate();for(var m=date.getMonth()-1;m>=0;m--){doy+=this._getDaysInMonth(date.getFullYear(),m)}output+=formatNumber("o",doy,3);break;case"m":output+=formatNumber("m",date.getMonth()+1,2);break;case"M":output+=formatName("M",date.getMonth(),monthNamesShort,monthNames);break;case"y":output+=(lookAhead("y")?date.getFullYear():(date.getYear()%100<10?"0":"")+date.getYear()%100);break;case"@":output+=date.getTime();break;case"'":if(lookAhead("'")){output+="'"}else{literal=true}break;default:output+=format.charAt(iFormat)}}}}return output},_possibleChars:function(format){var chars="";var literal=false;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{chars+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d":case"m":case"y":case"@":chars+="0123456789";break;case"D":case"M":return null;case"'":if(lookAhead("'")){chars+="'"}else{literal=true}break;default:chars+=format.charAt(iFormat)}}}return chars},_get:function(inst,name){return inst.settings[name]!==undefined?inst.settings[name]:this._defaults[name]},_setDateFromField:function(inst){var dateFormat=this._get(inst,"dateFormat");var dates=inst.input?inst.input.val():null;inst.endDay=inst.endMonth=inst.endYear=null;var date=defaultDate=this._getDefaultDate(inst);var settings=this._getFormatConfig(inst);try{date=this.parseDate(dateFormat,dates,settings)||defaultDate}catch(event){this.log(event);date=defaultDate}inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();inst.currentDay=(dates?date.getDate():0);inst.currentMonth=(dates?date.getMonth():0);inst.currentYear=(dates?date.getFullYear():0);this._adjustInstDate(inst)},_getDefaultDate:function(inst){var date=this._determineDate(this._get(inst,"defaultDate"),new Date());var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);return date},_determineDate:function(date,defaultDate){var offsetNumeric=function(offset){var date=new Date();date.setDate(date.getDate()+offset);return date};var offsetString=function(offset,getDaysInMonth){var date=new Date();var year=date.getFullYear();var month=date.getMonth();var day=date.getDate();var pattern=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;var matches=pattern.exec(offset);while(matches){switch(matches[2]||"d"){case"d":case"D":day+=parseInt(matches[1],10);break;case"w":case"W":day+=parseInt(matches[1],10)*7;break;case"m":case"M":month+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break;case"y":case"Y":year+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break}matches=pattern.exec(offset)}return new Date(year,month,day)};date=(date==null?defaultDate:(typeof date=="string"?offsetString(date,this._getDaysInMonth):(typeof date=="number"?(isNaN(date)?defaultDate:offsetNumeric(date)):date)));date=(date&&date.toString()=="Invalid Date"?defaultDate:date);if(date){date.setHours(0);date.setMinutes(0);date.setSeconds(0);date.setMilliseconds(0)}return this._daylightSavingAdjust(date)},_daylightSavingAdjust:function(date){if(!date){return null}date.setHours(date.getHours()>12?date.getHours()+2:0);return date},_setDate:function(inst,date,endDate){var clear=!(date);var origMonth=inst.selectedMonth;var origYear=inst.selectedYear;date=this._determineDate(date,new Date());inst.selectedDay=inst.currentDay=date.getDate();inst.drawMonth=inst.selectedMonth=inst.currentMonth=date.getMonth();inst.drawYear=inst.selectedYear=inst.currentYear=date.getFullYear();if(origMonth!=inst.selectedMonth||origYear!=inst.selectedYear){this._notifyChange(inst)}this._adjustInstDate(inst);if(inst.input){inst.input.val(clear?"":this._formatDate(inst))}},_getDate:function(inst){var startDate=(!inst.currentYear||(inst.input&&inst.input.val()=="")?null:this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return startDate},_generateHTML:function(inst){var today=new Date();today=this._daylightSavingAdjust(new Date(today.getFullYear(),today.getMonth(),today.getDate()));var isRTL=this._get(inst,"isRTL");var showButtonPanel=this._get(inst,"showButtonPanel");var hideIfNoPrevNext=this._get(inst,"hideIfNoPrevNext");var navigationAsDateFormat=this._get(inst,"navigationAsDateFormat");var numMonths=this._getNumberOfMonths(inst);var showCurrentAtPos=this._get(inst,"showCurrentAtPos");var stepMonths=this._get(inst,"stepMonths");var stepBigMonths=this._get(inst,"stepBigMonths");var isMultiMonth=(numMonths[0]!=1||numMonths[1]!=1);var currentDate=this._daylightSavingAdjust((!inst.currentDay?new Date(9999,9,9):new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");var drawMonth=inst.drawMonth-showCurrentAtPos;var drawYear=inst.drawYear;if(drawMonth<0){drawMonth+=12;drawYear--}if(maxDate){var maxDraw=this._daylightSavingAdjust(new Date(maxDate.getFullYear(),maxDate.getMonth()-numMonths[1]+1,maxDate.getDate()));maxDraw=(minDate&&maxDraw<minDate?minDate:maxDraw);while(this._daylightSavingAdjust(new Date(drawYear,drawMonth,1))>maxDraw){drawMonth--;if(drawMonth<0){drawMonth=11;drawYear--}}}inst.drawMonth=drawMonth;inst.drawYear=drawYear;var prevText=this._get(inst,"prevText");prevText=(!navigationAsDateFormat?prevText:this.formatDate(prevText,this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepMonths,1)),this._getFormatConfig(inst)));var prev=(this._canAdjustMonth(inst,-1,drawYear,drawMonth)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery.datepicker._adjustDate(\'#'+inst.id+"', -"+stepMonths+", 'M');\" title=\""+prevText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"e":"w")+'">'+prevText+"</span></a>":(hideIfNoPrevNext?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+prevText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"e":"w")+'">'+prevText+"</span></a>"));var nextText=this._get(inst,"nextText");nextText=(!navigationAsDateFormat?nextText:this.formatDate(nextText,this._daylightSavingAdjust(new Date(drawYear,drawMonth+stepMonths,1)),this._getFormatConfig(inst)));var next=(this._canAdjustMonth(inst,+1,drawYear,drawMonth)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery.datepicker._adjustDate(\'#'+inst.id+"', +"+stepMonths+", 'M');\" title=\""+nextText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"w":"e")+'">'+nextText+"</span></a>":(hideIfNoPrevNext?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+nextText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"w":"e")+'">'+nextText+"</span></a>"));var currentText=this._get(inst,"currentText");var gotoDate=(this._get(inst,"gotoCurrent")&&inst.currentDay?currentDate:today);currentText=(!navigationAsDateFormat?currentText:this.formatDate(currentText,gotoDate,this._getFormatConfig(inst)));var controls=(!inst.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery.datepicker._hideDatepicker();">'+this._get(inst,"closeText")+"</button>":"");var buttonPanel=(showButtonPanel)?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(isRTL?controls:"")+(this._isInRange(inst,gotoDate)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery.datepicker._gotoToday(\'#'+inst.id+"');\">"+currentText+"</button>":"")+(isRTL?"":controls)+"</div>":"";var firstDay=parseInt(this._get(inst,"firstDay"),10);firstDay=(isNaN(firstDay)?0:firstDay);var dayNames=this._get(inst,"dayNames");var dayNamesShort=this._get(inst,"dayNamesShort");var dayNamesMin=this._get(inst,"dayNamesMin");var monthNames=this._get(inst,"monthNames");var monthNamesShort=this._get(inst,"monthNamesShort");var beforeShowDay=this._get(inst,"beforeShowDay");var showOtherMonths=this._get(inst,"showOtherMonths");var calculateWeek=this._get(inst,"calculateWeek")||this.iso8601Week;var endDate=inst.endDay?this._daylightSavingAdjust(new Date(inst.endYear,inst.endMonth,inst.endDay)):currentDate;var defaultDate=this._getDefaultDate(inst);var html="";for(var row=0;row<numMonths[0];row++){var group="";for(var col=0;col<numMonths[1];col++){var selectedDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,inst.selectedDay));var cornerClass=" ui-corner-all";var calender="";if(isMultiMonth){calender+='<div class="ui-datepicker-group ui-datepicker-group-';switch(col){case 0:calender+="first";cornerClass=" ui-corner-"+(isRTL?"right":"left");break;case numMonths[1]-1:calender+="last";cornerClass=" ui-corner-"+(isRTL?"left":"right");break;default:calender+="middle";cornerClass="";break}calender+='">'}calender+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+cornerClass+'">'+(/all|left/.test(cornerClass)&&row==0?(isRTL?next:prev):"")+(/all|right/.test(cornerClass)&&row==0?(isRTL?prev:next):"")+this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,row>0||col>0,monthNames,monthNamesShort)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var thead="";for(var dow=0;dow<7;dow++){var day=(dow+firstDay)%7;thead+="<th"+((dow+firstDay+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+dayNames[day]+'">'+dayNamesMin[day]+"</span></th>"}calender+=thead+"</tr></thead><tbody>";var daysInMonth=this._getDaysInMonth(drawYear,drawMonth);if(drawYear==inst.selectedYear&&drawMonth==inst.selectedMonth){inst.selectedDay=Math.min(inst.selectedDay,daysInMonth)}var leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;var numRows=(isMultiMonth?6:Math.ceil((leadDays+daysInMonth)/7));var printDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,1-leadDays));for(var dRow=0;dRow<numRows;dRow++){calender+="<tr>";var tbody="";for(var dow=0;dow<7;dow++){var daySettings=(beforeShowDay?beforeShowDay.apply((inst.input?inst.input[0]:null),[printDate]):[true,""]);var otherMonth=(printDate.getMonth()!=drawMonth);var unselectable=otherMonth||!daySettings[0]||(minDate&&printDate<minDate)||(maxDate&&printDate>maxDate);tbody+='<td class="'+((dow+firstDay+6)%7>=5?" ui-datepicker-week-end":"")+(otherMonth?" ui-datepicker-other-month":"")+((printDate.getTime()==selectedDate.getTime()&&drawMonth==inst.selectedMonth&&inst._keyEvent)||(defaultDate.getTime()==printDate.getTime()&&defaultDate.getTime()==selectedDate.getTime())?" "+this._dayOverClass:"")+(unselectable?" "+this._unselectableClass+" ui-state-disabled":"")+(otherMonth&&!showOtherMonths?"":" "+daySettings[1]+(printDate.getTime()>=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" "+this._currentClass:"")+(printDate.getTime()==today.getTime()?" ui-datepicker-today":""))+'"'+((!otherMonth||showOtherMonths)&&daySettings[2]?' title="'+daySettings[2]+'"':"")+(unselectable?"":" onclick=\"DP_jQuery.datepicker._selectDay('#"+inst.id+"',"+drawMonth+","+drawYear+', this);return false;"')+">"+(otherMonth?(showOtherMonths?printDate.getDate():"&#xa0;"):(unselectable?'<span class="ui-state-default">'+printDate.getDate()+"</span>":'<a class="ui-state-default'+(printDate.getTime()==today.getTime()?" ui-state-highlight":"")+(printDate.getTime()>=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" ui-state-active":"")+'" href="#">'+printDate.getDate()+"</a>"))+"</td>";printDate.setDate(printDate.getDate()+1);printDate=this._daylightSavingAdjust(printDate)}calender+=tbody+"</tr>"}drawMonth++;if(drawMonth>11){drawMonth=0;drawYear++}calender+="</tbody></table>"+(isMultiMonth?"</div>"+((numMonths[0]>0&&col==numMonths[1]-1)?'<div class="ui-datepicker-row-break"></div>':""):"");group+=calender}html+=group}html+=buttonPanel+($.browser.msie&&parseInt($.browser.version,10)<7&&!inst.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':"");inst._keyEvent=false;return html},_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,secondary,monthNames,monthNamesShort){minDate=(inst.rangeStart&&minDate&&selectedDate<minDate?selectedDate:minDate);var changeMonth=this._get(inst,"changeMonth");var changeYear=this._get(inst,"changeYear");var showMonthAfterYear=this._get(inst,"showMonthAfterYear");var html='<div class="ui-datepicker-title">';var monthHtml="";if(secondary||!changeMonth){monthHtml+='<span class="ui-datepicker-month">'+monthNames[drawMonth]+"</span> "}else{var inMinYear=(minDate&&minDate.getFullYear()==drawYear);var inMaxYear=(maxDate&&maxDate.getFullYear()==drawYear);monthHtml+='<select class="ui-datepicker-month" onchange="DP_jQuery.datepicker._selectMonthYear(\'#'+inst.id+"', this, 'M');\" onclick=\"DP_jQuery.datepicker._clickMonthYear('#"+inst.id+"');\">";for(var month=0;month<12;month++){if((!inMinYear||month>=minDate.getMonth())&&(!inMaxYear||month<=maxDate.getMonth())){monthHtml+='<option value="'+month+'"'+(month==drawMonth?' selected="selected"':"")+">"+monthNamesShort[month]+"</option>"}}monthHtml+="</select>"}if(!showMonthAfterYear){html+=monthHtml+((secondary||changeMonth||changeYear)&&(!(changeMonth&&changeYear))?"&#xa0;":"")}if(secondary||!changeYear){html+='<span class="ui-datepicker-year">'+drawYear+"</span>"}else{var years=this._get(inst,"yearRange").split(":");var year=0;var endYear=0;if(years.length!=2){year=drawYear-10;endYear=drawYear+10}else{if(years[0].charAt(0)=="+"||years[0].charAt(0)=="-"){year=drawYear+parseInt(years[0],10);endYear=drawYear+parseInt(years[1],10)}else{year=parseInt(years[0],10);endYear=parseInt(years[1],10)}}year=(minDate?Math.max(year,minDate.getFullYear()):year);endYear=(maxDate?Math.min(endYear,maxDate.getFullYear()):endYear);html+='<select class="ui-datepicker-year" onchange="DP_jQuery.datepicker._selectMonthYear(\'#'+inst.id+"', this, 'Y');\" onclick=\"DP_jQuery.datepicker._clickMonthYear('#"+inst.id+"');\">";for(;year<=endYear;year++){html+='<option value="'+year+'"'+(year==drawYear?' selected="selected"':"")+">"+year+"</option>"}html+="</select>"}if(showMonthAfterYear){html+=(secondary||changeMonth||changeYear?"&#xa0;":"")+monthHtml}html+="</div>";return html},_adjustInstDate:function(inst,offset,period){var year=inst.drawYear+(period=="Y"?offset:0);var month=inst.drawMonth+(period=="M"?offset:0);var day=Math.min(inst.selectedDay,this._getDaysInMonth(year,month))+(period=="D"?offset:0);var date=this._daylightSavingAdjust(new Date(year,month,day));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();if(period=="M"||period=="Y"){this._notifyChange(inst)}},_notifyChange:function(inst){var onChange=this._get(inst,"onChangeMonthYear");if(onChange){onChange.apply((inst.input?inst.input[0]:null),[inst.selectedYear,inst.selectedMonth+1,inst])}},_getNumberOfMonths:function(inst){var numMonths=this._get(inst,"numberOfMonths");return(numMonths==null?[1,1]:(typeof numMonths=="number"?[1,numMonths]:numMonths))},_getMinMaxDate:function(inst,minMax,checkRange){var date=this._determineDate(this._get(inst,minMax+"Date"),null);return(!checkRange||!inst.rangeStart?date:(!date||inst.rangeStart>date?inst.rangeStart:date))},_getDaysInMonth:function(year,month){return 32-new Date(year,month,32).getDate()},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay()},_canAdjustMonth:function(inst,offset,curYear,curMonth){var numMonths=this._getNumberOfMonths(inst);var date=this._daylightSavingAdjust(new Date(curYear,curMonth+(offset<0?offset:numMonths[1]),1));if(offset<0){date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()))}return this._isInRange(inst,date)},_isInRange:function(inst,date){var newMinDate=(!inst.rangeStart?null:this._daylightSavingAdjust(new Date(inst.selectedYear,inst.selectedMonth,inst.selectedDay)));newMinDate=(newMinDate&&inst.rangeStart<newMinDate?inst.rangeStart:newMinDate);var minDate=newMinDate||this._getMinMaxDate(inst,"min");var maxDate=this._getMinMaxDate(inst,"max");return((!minDate||date>=minDate)&&(!maxDate||date<=maxDate))},_getFormatConfig:function(inst){var shortYearCutoff=this._get(inst,"shortYearCutoff");shortYearCutoff=(typeof shortYearCutoff!="string"?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));return{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get(inst,"dayNamesShort"),dayNames:this._get(inst,"dayNames"),monthNamesShort:this._get(inst,"monthNamesShort"),monthNames:this._get(inst,"monthNames")}},_formatDate:function(inst,day,month,year){if(!day){inst.currentDay=inst.selectedDay;inst.currentMonth=inst.selectedMonth;inst.currentYear=inst.selectedYear}var date=(day?(typeof day=="object"?day:this._daylightSavingAdjust(new Date(year,month,day))):this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return this.formatDate(this._get(inst,"dateFormat"),date,this._getFormatConfig(inst))}});function extendRemove(target,props){$.extend(target,props);for(var name in props){if(props[name]==null||props[name]==undefined){target[name]=props[name]}}return target}function isArray(a){return(a&&(($.browser.safari&&typeof a=="object"&&a.length)||(a.constructor&&a.constructor.toString().match(/\Array\(\)/))))}$.fn.datepicker=function(options){if(!$.datepicker.initialized){$(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv);$.datepicker.initialized=true}var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options=="string"&&(options=="isDisabled"||options=="getDate")){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}if(options=="option"&&arguments.length==2&&typeof arguments[1]=="string"){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}return this.each(function(){typeof options=="string"?$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options)})};$.datepicker=new Datepicker();$.datepicker.initialized=false;$.datepicker.uuid=new Date().getTime();$.datepicker.version="1.7.2";window.DP_jQuery=$})(jQuery); \ No newline at end of file
diff --git a/template-common/lib/ui/minified/ui.dialog.min.js b/template-common/lib/ui/minified/ui.dialog.min.js
index 35742f170..dac92ce8b 100644
--- a/template-common/lib/ui/minified/ui.dialog.min.js
+++ b/template-common/lib/ui/minified/ui.dialog.min.js
@@ -1 +1 @@
-(function(B){var A={dragStart:"start.draggable",drag:"drag.draggable",dragStop:"stop.draggable",maxHeight:"maxHeight.resizable",minHeight:"minHeight.resizable",maxWidth:"maxWidth.resizable",minWidth:"minWidth.resizable",resizeStart:"start.resizable",resize:"drag.resizable",resizeStop:"stop.resizable"};B.widget("ui.dialog",{init:function(){var J=this,K=this.options,D=typeof K.resizable=="string"?K.resizable:"n,e,s,w,se,sw,ne,nw",E=this.element.addClass("ui-dialog-content").wrap("<div/>").wrap("<div/>"),G=(this.uiDialogContainer=E.parent().addClass("ui-dialog-container").css({position:"relative",width:"100%",height:"100%"})),H=K.title||E.attr("title")||"",C=(this.uiDialogTitlebar=B('<div class="ui-dialog-titlebar"/>')).append('<span class="ui-dialog-title">'+H+"</span>").append('<a href="#" class="ui-dialog-titlebar-close"><span>X</span></a>').prependTo(G),I=(this.uiDialog=G.parent()).appendTo(document.body).hide().addClass("ui-dialog").addClass(K.dialogClass).addClass(E.attr("className")).removeClass("ui-dialog-content").css({position:"absolute",width:K.width,height:K.height,overflow:"hidden",zIndex:K.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(L){if(K.closeOnEscape){var M=27;(L.keyCode&&L.keyCode==M&&J.close())}}).mousedown(function(){J.moveToTop()}),F=(this.uiDialogButtonPane=B("<div/>")).addClass("ui-dialog-buttonpane").css({position:"absolute",bottom:0}).appendTo(I);this.uiDialogTitlebarClose=B(".ui-dialog-titlebar-close",C).hover(function(){B(this).addClass("ui-dialog-titlebar-close-hover")},function(){B(this).removeClass("ui-dialog-titlebar-close-hover")}).mousedown(function(L){L.stopPropagation()}).click(function(){J.close();return false});this.uiDialogTitlebar.find("*").add(this.uiDialogTitlebar).each(function(){B.ui.disableSelection(this)});if(B.fn.draggable){I.draggable({cancel:".ui-dialog-content",helper:K.dragHelper,handle:".ui-dialog-titlebar",start:function(M,L){J.moveToTop();(K.dragStart&&K.dragStart.apply(J.element[0],arguments))},drag:function(M,L){(K.drag&&K.drag.apply(J.element[0],arguments))},stop:function(M,L){(K.dragStop&&K.dragStop.apply(J.element[0],arguments));B.ui.dialog.overlay.resize()}});(K.draggable||I.draggable("disable"))}if(B.fn.resizable){I.resizable({cancel:".ui-dialog-content",helper:K.resizeHelper,maxWidth:K.maxWidth,maxHeight:K.maxHeight,minWidth:K.minWidth,minHeight:K.minHeight,start:function(){(K.resizeStart&&K.resizeStart.apply(J.element[0],arguments))},resize:function(M,L){(K.autoResize&&J.size.apply(J));(K.resize&&K.resize.apply(J.element[0],arguments))},handles:D,stop:function(M,L){(K.autoResize&&J.size.apply(J));(K.resizeStop&&K.resizeStop.apply(J.element[0],arguments));B.ui.dialog.overlay.resize()}});(K.resizable||I.resizable("disable"))}this.createButtons(K.buttons);this.isOpen=false;(K.bgiframe&&B.fn.bgiframe&&I.bgiframe());(K.autoOpen&&this.open())},setData:function(C,D){(A[C]&&this.uiDialog.data(A[C],D));switch(C){case"buttons":this.createButtons(D);break;case"draggable":this.uiDialog.draggable(D?"enable":"disable");break;case"height":this.uiDialog.height(D);break;case"position":this.position(D);break;case"resizable":(typeof D=="string"&&this.uiDialog.data("handles.resizable",D));this.uiDialog.resizable(D?"enable":"disable");break;case"title":B(".ui-dialog-title",this.uiDialogTitlebar).text(D);break;case"width":this.uiDialog.width(D);break}B.widget.prototype.setData.apply(this,arguments)},position:function(H){var D=B(window),E=B(document),F=E.scrollTop(),C=E.scrollLeft(),G=F;if(B.inArray(H,["center","top","right","bottom","left"])>=0){H=[H=="right"||H=="left"?H:"center",H=="top"||H=="bottom"?H:"middle"]}if(H.constructor!=Array){H=["center","middle"]}if(H[0].constructor==Number){C+=H[0]}else{switch(H[0]){case"left":C+=0;break;case"right":C+=D.width()-this.uiDialog.width();break;default:case"center":C+=(D.width()-this.uiDialog.width())/2}}if(H[1].constructor==Number){F+=H[1]}else{switch(H[1]){case"top":F+=0;break;case"bottom":F+=D.height()-this.uiDialog.height();break;default:case"middle":F+=(D.height()-this.uiDialog.height())/2}}F=Math.max(F,G);this.uiDialog.css({top:F,left:C})},size:function(){var D=this.uiDialogContainer,G=this.uiDialogTitlebar,E=this.element,F=parseInt(E.css("margin-top"),10)+parseInt(E.css("margin-bottom"),10),C=parseInt(E.css("margin-left"),10)+parseInt(E.css("margin-right"),10);E.height(D.height()-G.outerHeight()-F);E.width(D.width()-C)},open:function(){if(this.isOpen){return }this.overlay=this.options.modal?new B.ui.dialog.overlay(this):null;(this.uiDialog.next().length>0)&&this.uiDialog.appendTo("body");this.position(this.options.position);this.uiDialog.show(this.options.show);this.options.autoResize&&this.size();this.moveToTop(true);var C=null;var D={options:this.options};this.uiDialogTitlebarClose.focus();this.element.triggerHandler("dialogopen",[C,D],this.options.open);this.isOpen=true},moveToTop:function(E){if((this.options.modal&&!E)||(!this.options.stack&&!this.options.modal)){return this.element.triggerHandler("dialogfocus",[null,{options:this.options}],this.options.focus)}var D=this.options.zIndex,C=this.options;B(".ui-dialog:visible").each(function(){D=Math.max(D,parseInt(B(this).css("z-index"),10)||C.zIndex)});(this.overlay&&this.overlay.$el.css("z-index",++D));this.uiDialog.css("z-index",++D);this.element.triggerHandler("dialogfocus",[null,{options:this.options}],this.options.focus)},close:function(){(this.overlay&&this.overlay.destroy());this.uiDialog.hide(this.options.hide);var D=null;var C={options:this.options};this.element.triggerHandler("dialogclose",[D,C],this.options.close);B.ui.dialog.overlay.resize();this.isOpen=false},destroy:function(){(this.overlay&&this.overlay.destroy());this.uiDialog.hide();this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content").hide().appendTo("body");this.uiDialog.remove()},createButtons:function(F){var E=this,C=false,D=this.uiDialogButtonPane;D.empty().hide();B.each(F,function(){return !(C=true)});if(C){D.show();B.each(F,function(G,H){B("<button/>").text(G).click(function(){H.apply(E.element[0],arguments)}).appendTo(D)})}}});B.extend(B.ui.dialog,{defaults:{autoOpen:true,autoResize:true,bgiframe:false,buttons:{},closeOnEscape:true,draggable:true,height:200,minHeight:100,minWidth:150,modal:false,overlay:{},position:"center",resizable:true,stack:true,width:300,zIndex:1000},overlay:function(C){this.$el=B.ui.dialog.overlay.create(C)}});B.extend(B.ui.dialog.overlay,{instances:[],events:B.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(C){return C+".dialog-overlay"}).join(" "),create:function(D){if(this.instances.length===0){setTimeout(function(){B("a, :input").bind(B.ui.dialog.overlay.events,function(){var F=false;var H=B(this).parents(".ui-dialog");if(H.length){var E=B(".ui-dialog-overlay");if(E.length){var G=parseInt(E.css("z-index"),10);E.each(function(){G=Math.max(G,parseInt(B(this).css("z-index"),10))});F=parseInt(H.css("z-index"),10)>G}else{F=true}}return F})},1);B(document).bind("keydown.dialog-overlay",function(E){var F=27;(E.keyCode&&E.keyCode==F&&D.close())});B(window).bind("resize.dialog-overlay",B.ui.dialog.overlay.resize)}var C=B("<div/>").appendTo(document.body).addClass("ui-dialog-overlay").css(B.extend({borderWidth:0,margin:0,padding:0,position:"absolute",top:0,left:0,width:this.width(),height:this.height()},D.options.overlay));(D.options.bgiframe&&B.fn.bgiframe&&C.bgiframe());this.instances.push(C);return C},destroy:function(C){this.instances.splice(B.inArray(this.instances,C),1);if(this.instances.length===0){B("a, :input").add([document,window]).unbind(".dialog-overlay")}C.remove()},height:function(){if(B.browser.msie&&B.browser.version<7){var D=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);var C=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(D<C){return B(window).height()+"px"}else{return D+"px"}}else{return B(document).height()+"px"}},width:function(){if(B.browser.msie&&B.browser.version<7){var C=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);var D=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);if(C<D){return B(window).width()+"px"}else{return C+"px"}}else{return B(document).width()+"px"}},resize:function(){var C=B([]);B.each(B.ui.dialog.overlay.instances,function(){C=C.add(this)});C.css({width:0,height:0}).css({width:B.ui.dialog.overlay.width(),height:B.ui.dialog.overlay.height()})}});B.extend(B.ui.dialog.overlay.prototype,{destroy:function(){B.ui.dialog.overlay.destroy(this.$el)}})})(jQuery) \ No newline at end of file
+(function($){var setDataSwitch={dragStart:"start.draggable",drag:"drag.draggable",dragStop:"stop.draggable",maxHeight:"maxHeight.resizable",minHeight:"minHeight.resizable",maxWidth:"maxWidth.resizable",minWidth:"minWidth.resizable",resizeStart:"start.resizable",resize:"drag.resizable",resizeStop:"stop.resizable"},uiDialogClasses="ui-dialog ui-widget ui-widget-content ui-corner-all ";$.widget("ui.dialog",{_init:function(){this.originalTitle=this.element.attr("title");var self=this,options=this.options,title=options.title||this.originalTitle||"&nbsp;",titleId=$.ui.dialog.getTitleId(this.element),uiDialog=(this.uiDialog=$("<div/>")).appendTo(document.body).hide().addClass(uiDialogClasses+options.dialogClass).css({position:"absolute",overflow:"hidden",zIndex:options.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(event){(options.closeOnEscape&&event.keyCode&&event.keyCode==$.ui.keyCode.ESCAPE&&self.close(event))}).attr({role:"dialog","aria-labelledby":titleId}).mousedown(function(event){self.moveToTop(false,event)}),uiDialogContent=this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(uiDialog),uiDialogTitlebar=(this.uiDialogTitlebar=$("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(uiDialog),uiDialogTitlebarClose=$('<a href="#"/>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){uiDialogTitlebarClose.addClass("ui-state-hover")},function(){uiDialogTitlebarClose.removeClass("ui-state-hover")}).focus(function(){uiDialogTitlebarClose.addClass("ui-state-focus")}).blur(function(){uiDialogTitlebarClose.removeClass("ui-state-focus")}).mousedown(function(ev){ev.stopPropagation()}).click(function(event){self.close(event);return false}).appendTo(uiDialogTitlebar),uiDialogTitlebarCloseText=(this.uiDialogTitlebarCloseText=$("<span/>")).addClass("ui-icon ui-icon-closethick").text(options.closeText).appendTo(uiDialogTitlebarClose),uiDialogTitle=$("<span/>").addClass("ui-dialog-title").attr("id",titleId).html(title).prependTo(uiDialogTitlebar);uiDialogTitlebar.find("*").add(uiDialogTitlebar).disableSelection();(options.draggable&&$.fn.draggable&&this._makeDraggable());(options.resizable&&$.fn.resizable&&this._makeResizable());this._createButtons(options.buttons);this._isOpen=false;(options.bgiframe&&$.fn.bgiframe&&uiDialog.bgiframe());(options.autoOpen&&this.open())},destroy:function(){(this.overlay&&this.overlay.destroy());this.uiDialog.hide();this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");this.uiDialog.remove();(this.originalTitle&&this.element.attr("title",this.originalTitle))},close:function(event){var self=this;if(false===self._trigger("beforeclose",event)){return }(self.overlay&&self.overlay.destroy());self.uiDialog.unbind("keypress.ui-dialog");(self.options.hide?self.uiDialog.hide(self.options.hide,function(){self._trigger("close",event)}):self.uiDialog.hide()&&self._trigger("close",event));$.ui.dialog.overlay.resize();self._isOpen=false;if(self.options.modal){var maxZ=0;$(".ui-dialog").each(function(){if(this!=self.uiDialog[0]){maxZ=Math.max(maxZ,$(this).css("z-index"))}});$.ui.dialog.maxZ=maxZ}},isOpen:function(){return this._isOpen},moveToTop:function(force,event){if((this.options.modal&&!force)||(!this.options.stack&&!this.options.modal)){return this._trigger("focus",event)}if(this.options.zIndex>$.ui.dialog.maxZ){$.ui.dialog.maxZ=this.options.zIndex}(this.overlay&&this.overlay.$el.css("z-index",$.ui.dialog.overlay.maxZ=++$.ui.dialog.maxZ));var saveScroll={scrollTop:this.element.attr("scrollTop"),scrollLeft:this.element.attr("scrollLeft")};this.uiDialog.css("z-index",++$.ui.dialog.maxZ);this.element.attr(saveScroll);this._trigger("focus",event)},open:function(){if(this._isOpen){return }var options=this.options,uiDialog=this.uiDialog;this.overlay=options.modal?new $.ui.dialog.overlay(this):null;(uiDialog.next().length&&uiDialog.appendTo("body"));this._size();this._position(options.position);uiDialog.show(options.show);this.moveToTop(true);(options.modal&&uiDialog.bind("keypress.ui-dialog",function(event){if(event.keyCode!=$.ui.keyCode.TAB){return }var tabbables=$(":tabbable",this),first=tabbables.filter(":first")[0],last=tabbables.filter(":last")[0];if(event.target==last&&!event.shiftKey){setTimeout(function(){first.focus()},1)}else{if(event.target==first&&event.shiftKey){setTimeout(function(){last.focus()},1)}}}));$([]).add(uiDialog.find(".ui-dialog-content :tabbable:first")).add(uiDialog.find(".ui-dialog-buttonpane :tabbable:first")).add(uiDialog).filter(":first").focus();this._trigger("open");this._isOpen=true},_createButtons:function(buttons){var self=this,hasButtons=false,uiDialogButtonPane=$("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");this.uiDialog.find(".ui-dialog-buttonpane").remove();(typeof buttons=="object"&&buttons!==null&&$.each(buttons,function(){return !(hasButtons=true)}));if(hasButtons){$.each(buttons,function(name,fn){$('<button type="button"></button>').addClass("ui-state-default ui-corner-all").text(name).click(function(){fn.apply(self.element[0],arguments)}).hover(function(){$(this).addClass("ui-state-hover")},function(){$(this).removeClass("ui-state-hover")}).focus(function(){$(this).addClass("ui-state-focus")}).blur(function(){$(this).removeClass("ui-state-focus")}).appendTo(uiDialogButtonPane)});uiDialogButtonPane.appendTo(this.uiDialog)}},_makeDraggable:function(){var self=this,options=this.options,heightBeforeDrag;this.uiDialog.draggable({cancel:".ui-dialog-content",handle:".ui-dialog-titlebar",containment:"document",start:function(){heightBeforeDrag=options.height;$(this).height($(this).height()).addClass("ui-dialog-dragging");(options.dragStart&&options.dragStart.apply(self.element[0],arguments))},drag:function(){(options.drag&&options.drag.apply(self.element[0],arguments))},stop:function(){$(this).removeClass("ui-dialog-dragging").height(heightBeforeDrag);(options.dragStop&&options.dragStop.apply(self.element[0],arguments));$.ui.dialog.overlay.resize()}})},_makeResizable:function(handles){handles=(handles===undefined?this.options.resizable:handles);var self=this,options=this.options,resizeHandles=typeof handles=="string"?handles:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",alsoResize:this.element,maxWidth:options.maxWidth,maxHeight:options.maxHeight,minWidth:options.minWidth,minHeight:options.minHeight,start:function(){$(this).addClass("ui-dialog-resizing");(options.resizeStart&&options.resizeStart.apply(self.element[0],arguments))},resize:function(){(options.resize&&options.resize.apply(self.element[0],arguments))},handles:resizeHandles,stop:function(){$(this).removeClass("ui-dialog-resizing");options.height=$(this).height();options.width=$(this).width();(options.resizeStop&&options.resizeStop.apply(self.element[0],arguments));$.ui.dialog.overlay.resize()}}).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_position:function(pos){var wnd=$(window),doc=$(document),pTop=doc.scrollTop(),pLeft=doc.scrollLeft(),minTop=pTop;if($.inArray(pos,["center","top","right","bottom","left"])>=0){pos=[pos=="right"||pos=="left"?pos:"center",pos=="top"||pos=="bottom"?pos:"middle"]}if(pos.constructor!=Array){pos=["center","middle"]}if(pos[0].constructor==Number){pLeft+=pos[0]}else{switch(pos[0]){case"left":pLeft+=0;break;case"right":pLeft+=wnd.width()-this.uiDialog.outerWidth();break;default:case"center":pLeft+=(wnd.width()-this.uiDialog.outerWidth())/2}}if(pos[1].constructor==Number){pTop+=pos[1]}else{switch(pos[1]){case"top":pTop+=0;break;case"bottom":pTop+=wnd.height()-this.uiDialog.outerHeight();break;default:case"middle":pTop+=(wnd.height()-this.uiDialog.outerHeight())/2}}pTop=Math.max(pTop,minTop);this.uiDialog.css({top:pTop,left:pLeft})},_setData:function(key,value){(setDataSwitch[key]&&this.uiDialog.data(setDataSwitch[key],value));switch(key){case"buttons":this._createButtons(value);break;case"closeText":this.uiDialogTitlebarCloseText.text(value);break;case"dialogClass":this.uiDialog.removeClass(this.options.dialogClass).addClass(uiDialogClasses+value);break;case"draggable":(value?this._makeDraggable():this.uiDialog.draggable("destroy"));break;case"height":this.uiDialog.height(value);break;case"position":this._position(value);break;case"resizable":var uiDialog=this.uiDialog,isResizable=this.uiDialog.is(":data(resizable)");(isResizable&&!value&&uiDialog.resizable("destroy"));(isResizable&&typeof value=="string"&&uiDialog.resizable("option","handles",value));(isResizable||this._makeResizable(value));break;case"title":$(".ui-dialog-title",this.uiDialogTitlebar).html(value||"&nbsp;");break;case"width":this.uiDialog.width(value);break}$.widget.prototype._setData.apply(this,arguments)},_size:function(){var options=this.options;this.element.css({height:0,minHeight:0,width:"auto"});var nonContentHeight=this.uiDialog.css({height:"auto",width:options.width}).height();this.element.css({minHeight:Math.max(options.minHeight-nonContentHeight,0),height:options.height=="auto"?"auto":Math.max(options.height-nonContentHeight,0)})}});$.extend($.ui.dialog,{version:"1.7.2",defaults:{autoOpen:true,bgiframe:false,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:"center",resizable:true,show:null,stack:true,title:"",width:300,zIndex:1000},getter:"isOpen",uuid:0,maxZ:0,getTitleId:function($el){return"ui-dialog-title-"+($el.attr("id")||++this.uuid)},overlay:function(dialog){this.$el=$.ui.dialog.overlay.create(dialog)}});$.extend($.ui.dialog.overlay,{instances:[],maxZ:0,events:$.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(event){return event+".dialog-overlay"}).join(" "),create:function(dialog){if(this.instances.length===0){setTimeout(function(){if($.ui.dialog.overlay.instances.length){$(document).bind($.ui.dialog.overlay.events,function(event){var dialogZ=$(event.target).parents(".ui-dialog").css("zIndex")||0;return(dialogZ>$.ui.dialog.overlay.maxZ)})}},1);$(document).bind("keydown.dialog-overlay",function(event){(dialog.options.closeOnEscape&&event.keyCode&&event.keyCode==$.ui.keyCode.ESCAPE&&dialog.close(event))});$(window).bind("resize.dialog-overlay",$.ui.dialog.overlay.resize)}var $el=$("<div></div>").appendTo(document.body).addClass("ui-widget-overlay").css({width:this.width(),height:this.height()});(dialog.options.bgiframe&&$.fn.bgiframe&&$el.bgiframe());this.instances.push($el);return $el},destroy:function($el){this.instances.splice($.inArray(this.instances,$el),1);if(this.instances.length===0){$([document,window]).unbind(".dialog-overlay")}$el.remove();var maxZ=0;$.each(this.instances,function(){maxZ=Math.max(maxZ,this.css("z-index"))});this.maxZ=maxZ},height:function(){if($.browser.msie&&$.browser.version<7){var scrollHeight=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);var offsetHeight=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(scrollHeight<offsetHeight){return $(window).height()+"px"}else{return scrollHeight+"px"}}else{return $(document).height()+"px"}},width:function(){if($.browser.msie&&$.browser.version<7){var scrollWidth=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);var offsetWidth=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);if(scrollWidth<offsetWidth){return $(window).width()+"px"}else{return scrollWidth+"px"}}else{return $(document).width()+"px"}},resize:function(){var $overlays=$([]);$.each($.ui.dialog.overlay.instances,function(){$overlays=$overlays.add(this)});$overlays.css({width:0,height:0}).css({width:$.ui.dialog.overlay.width(),height:$.ui.dialog.overlay.height()})}});$.extend($.ui.dialog.overlay.prototype,{destroy:function(){$.ui.dialog.overlay.destroy(this.$el)}})})(jQuery); \ No newline at end of file
diff --git a/template-common/lib/ui/minified/ui.draggable.min.js b/template-common/lib/ui/minified/ui.draggable.min.js
index 4ab915564..9f43db60b 100644
--- a/template-common/lib/ui/minified/ui.draggable.min.js
+++ b/template-common/lib/ui/minified/ui.draggable.min.js
@@ -1 +1 @@
-(function(A){A.widget("ui.draggable",A.extend({},A.ui.mouse,{init:function(){var B=this.options;if(B.helper=="original"&&!(/(relative|absolute|fixed)/).test(this.element.css("position"))){this.element.css("position","relative")}this.element.addClass("ui-draggable");(B.disabled&&this.element.addClass("ui-draggable-disabled"));this.mouseInit()},mouseStart:function(F){var H=this.options;if(this.helper||H.disabled||A(F.target).is(".ui-resizable-handle")){return false}var C=!this.options.handle||!A(this.options.handle,this.element).length?true:false;A(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==F.target){C=true}});if(!C){return false}if(A.ui.ddmanager){A.ui.ddmanager.current=this}this.helper=A.isFunction(H.helper)?A(H.helper.apply(this.element[0],[F])):(H.helper=="clone"?this.element.clone():this.element);if(!this.helper.parents("body").length){this.helper.appendTo((H.appendTo=="parent"?this.element[0].parentNode:H.appendTo))}if(this.helper[0]!=this.element[0]&&!(/(fixed|absolute)/).test(this.helper.css("position"))){this.helper.css("position","absolute")}this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)};this.cssPosition=this.helper.css("position");this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.offset.click={left:F.pageX-this.offset.left,top:F.pageY-this.offset.top};this.offsetParent=this.helper.offsetParent();var B=this.offsetParent.offset();if(this.offsetParent[0]==document.body&&A.browser.mozilla){B={top:0,left:0}}this.offset.parent={top:B.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:B.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)};var E=this.element.position();this.offset.relative=this.cssPosition=="relative"?{top:E.top-(parseInt(this.helper.css("top"),10)||0)+this.offsetParent[0].scrollTop,left:E.left-(parseInt(this.helper.css("left"),10)||0)+this.offsetParent[0].scrollLeft}:{top:0,left:0};this.originalPosition=this.generatePosition(F);this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};if(H.cursorAt){if(H.cursorAt.left!=undefined){this.offset.click.left=H.cursorAt.left+this.margins.left}if(H.cursorAt.right!=undefined){this.offset.click.left=this.helperProportions.width-H.cursorAt.right+this.margins.left}if(H.cursorAt.top!=undefined){this.offset.click.top=H.cursorAt.top+this.margins.top}if(H.cursorAt.bottom!=undefined){this.offset.click.top=this.helperProportions.height-H.cursorAt.bottom+this.margins.top}}if(H.containment){if(H.containment=="parent"){H.containment=this.helper[0].parentNode}if(H.containment=="document"||H.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,A(H.containment=="document"?document:window).width()-this.offset.relative.left-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.element.css("marginRight"),10)||0),(A(H.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.offset.relative.top-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.element.css("marginBottom"),10)||0)]}if(!(/^(document|window|parent)$/).test(H.containment)){var D=A(H.containment)[0];var G=A(H.containment).offset();this.containment=[G.left+(parseInt(A(D).css("borderLeftWidth"),10)||0)-this.offset.relative.left-this.offset.parent.left,G.top+(parseInt(A(D).css("borderTopWidth"),10)||0)-this.offset.relative.top-this.offset.parent.top,G.left+Math.max(D.scrollWidth,D.offsetWidth)-(parseInt(A(D).css("borderLeftWidth"),10)||0)-this.offset.relative.left-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.element.css("marginRight"),10)||0),G.top+Math.max(D.scrollHeight,D.offsetHeight)-(parseInt(A(D).css("borderTopWidth"),10)||0)-this.offset.relative.top-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.element.css("marginBottom"),10)||0)]}}this.propagate("start",F);this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};if(A.ui.ddmanager&&!H.dropBehaviour){A.ui.ddmanager.prepareOffsets(this,F)}this.helper.addClass("ui-draggable-dragging");this.mouseDrag(F);return true},convertPositionTo:function(C,D){if(!D){D=this.position}var B=C=="absolute"?1:-1;return{top:(D.top+this.offset.relative.top*B+this.offset.parent.top*B-(this.cssPosition=="fixed"||(this.cssPosition=="absolute"&&this.offsetParent[0]==document.body)?0:this.offsetParent[0].scrollTop)*B+(this.cssPosition=="fixed"?A(document).scrollTop():0)*B+this.margins.top*B),left:(D.left+this.offset.relative.left*B+this.offset.parent.left*B-(this.cssPosition=="fixed"||(this.cssPosition=="absolute"&&this.offsetParent[0]==document.body)?0:this.offsetParent[0].scrollLeft)*B+(this.cssPosition=="fixed"?A(document).scrollLeft():0)*B+this.margins.left*B)}},generatePosition:function(E){var F=this.options;var B={top:(E.pageY-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssPosition=="fixed"||(this.cssPosition=="absolute"&&this.offsetParent[0]==document.body)?0:this.offsetParent[0].scrollTop)-(this.cssPosition=="fixed"?A(document).scrollTop():0)),left:(E.pageX-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(this.cssPosition=="fixed"||(this.cssPosition=="absolute"&&this.offsetParent[0]==document.body)?0:this.offsetParent[0].scrollLeft)-(this.cssPosition=="fixed"?A(document).scrollLeft():0))};if(!this.originalPosition){return B}if(this.containment){if(B.left<this.containment[0]){B.left=this.containment[0]}if(B.top<this.containment[1]){B.top=this.containment[1]}if(B.left>this.containment[2]){B.left=this.containment[2]}if(B.top>this.containment[3]){B.top=this.containment[3]}}if(F.grid){var D=this.originalPosition.top+Math.round((B.top-this.originalPosition.top)/F.grid[1])*F.grid[1];B.top=this.containment?(!(D<this.containment[1]||D>this.containment[3])?D:(!(D<this.containment[1])?D-F.grid[1]:D+F.grid[1])):D;var C=this.originalPosition.left+Math.round((B.left-this.originalPosition.left)/F.grid[0])*F.grid[0];B.left=this.containment?(!(C<this.containment[0]||C>this.containment[2])?C:(!(C<this.containment[0])?C-F.grid[0]:C+F.grid[0])):C}return B},mouseDrag:function(B){this.position=this.generatePosition(B);this.positionAbs=this.convertPositionTo("absolute");this.position=this.propagate("drag",B)||this.position;if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}if(A.ui.ddmanager){A.ui.ddmanager.drag(this,B)}return false},mouseStop:function(C){var D=false;if(A.ui.ddmanager&&!this.options.dropBehaviour){var D=A.ui.ddmanager.drop(this,C)}if((this.options.revert=="invalid"&&!D)||(this.options.revert=="valid"&&D)||this.options.revert===true){var B=this;A(this.helper).animate(this.originalPosition,parseInt(this.options.revert,10)||500,function(){B.propagate("stop",C);B.clear()})}else{this.propagate("stop",C);this.clear()}return false},clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.options.helper!="original"&&!this.cancelHelperRemoval){this.helper.remove()}this.helper=null;this.cancelHelperRemoval=false},plugins:{},uiHash:function(B){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,options:this.options}},propagate:function(C,B){A.ui.plugin.call(this,C,[B,this.uiHash()]);if(C=="drag"){this.positionAbs=this.convertPositionTo("absolute")}return this.element.triggerHandler(C=="drag"?C:"drag"+C,[B,this.uiHash()],this.options[C])},destroy:function(){if(!this.element.data("draggable")){return }this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable");this.mouseDestroy()}}));A.extend(A.ui.draggable,{defaults:{appendTo:"parent",axis:false,cancel:":input",delay:0,distance:1,helper:"original"}});A.ui.plugin.add("draggable","cursor",{start:function(D,C){var B=A("body");if(B.css("cursor")){C.options._cursor=B.css("cursor")}B.css("cursor",C.options.cursor)},stop:function(C,B){if(B.options._cursor){A("body").css("cursor",B.options._cursor)}}});A.ui.plugin.add("draggable","zIndex",{start:function(D,C){var B=A(C.helper);if(B.css("zIndex")){C.options._zIndex=B.css("zIndex")}B.css("zIndex",C.options.zIndex)},stop:function(C,B){if(B.options._zIndex){A(B.helper).css("zIndex",B.options._zIndex)}}});A.ui.plugin.add("draggable","opacity",{start:function(D,C){var B=A(C.helper);if(B.css("opacity")){C.options._opacity=B.css("opacity")}B.css("opacity",C.options.opacity)},stop:function(C,B){if(B.options._opacity){A(B.helper).css("opacity",B.options._opacity)}}});A.ui.plugin.add("draggable","iframeFix",{start:function(C,B){A(B.options.iframeFix===true?"iframe":B.options.iframeFix).each(function(){A('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(A(this).offset()).appendTo("body")})},stop:function(C,B){A("div.DragDropIframeFix").each(function(){this.parentNode.removeChild(this)})}});A.ui.plugin.add("draggable","scroll",{start:function(D,C){var E=C.options;var B=A(this).data("draggable");E.scrollSensitivity=E.scrollSensitivity||20;E.scrollSpeed=E.scrollSpeed||20;B.overflowY=function(F){do{if(/auto|scroll/.test(F.css("overflow"))||(/auto|scroll/).test(F.css("overflow-y"))){return F}F=F.parent()}while(F[0].parentNode);return A(document)}(this);B.overflowX=function(F){do{if(/auto|scroll/.test(F.css("overflow"))||(/auto|scroll/).test(F.css("overflow-x"))){return F}F=F.parent()}while(F[0].parentNode);return A(document)}(this);if(B.overflowY[0]!=document&&B.overflowY[0].tagName!="HTML"){B.overflowYOffset=B.overflowY.offset()}if(B.overflowX[0]!=document&&B.overflowX[0].tagName!="HTML"){B.overflowXOffset=B.overflowX.offset()}},drag:function(D,C){var E=C.options;var B=A(this).data("draggable");if(B.overflowY[0]!=document&&B.overflowY[0].tagName!="HTML"){if((B.overflowYOffset.top+B.overflowY[0].offsetHeight)-D.pageY<E.scrollSensitivity){B.overflowY[0].scrollTop=B.overflowY[0].scrollTop+E.scrollSpeed}if(D.pageY-B.overflowYOffset.top<E.scrollSensitivity){B.overflowY[0].scrollTop=B.overflowY[0].scrollTop-E.scrollSpeed}}else{if(D.pageY-A(document).scrollTop()<E.scrollSensitivity){A(document).scrollTop(A(document).scrollTop()-E.scrollSpeed)}if(A(window).height()-(D.pageY-A(document).scrollTop())<E.scrollSensitivity){A(document).scrollTop(A(document).scrollTop()+E.scrollSpeed)}}if(B.overflowX[0]!=document&&B.overflowX[0].tagName!="HTML"){if((B.overflowXOffset.left+B.overflowX[0].offsetWidth)-D.pageX<E.scrollSensitivity){B.overflowX[0].scrollLeft=B.overflowX[0].scrollLeft+E.scrollSpeed}if(D.pageX-B.overflowXOffset.left<E.scrollSensitivity){B.overflowX[0].scrollLeft=B.overflowX[0].scrollLeft-E.scrollSpeed}}else{if(D.pageX-A(document).scrollLeft()<E.scrollSensitivity){A(document).scrollLeft(A(document).scrollLeft()-E.scrollSpeed)}if(A(window).width()-(D.pageX-A(document).scrollLeft())<E.scrollSensitivity){A(document).scrollLeft(A(document).scrollLeft()+E.scrollSpeed)}}}});A.ui.plugin.add("draggable","snap",{start:function(D,C){var B=A(this).data("draggable");B.snapElements=[];A(C.options.snap===true?".ui-draggable":C.options.snap).each(function(){var F=A(this);var E=F.offset();if(this!=B.element[0]){B.snapElements.push({item:this,width:F.outerWidth(),height:F.outerHeight(),top:E.top,left:E.left})}})},drag:function(J,N){var I=A(this).data("draggable");var L=N.options.snapTolerance||20;var D=N.absolutePosition.left,C=D+I.helperProportions.width,P=N.absolutePosition.top,O=P+I.helperProportions.height;for(var H=I.snapElements.length-1;H>=0;H--){var E=I.snapElements[H].left,B=E+I.snapElements[H].width,R=I.snapElements[H].top,M=R+I.snapElements[H].height;if(!((E-L<D&&D<B+L&&R-L<P&&P<M+L)||(E-L<D&&D<B+L&&R-L<O&&O<M+L)||(E-L<C&&C<B+L&&R-L<P&&P<M+L)||(E-L<C&&C<B+L&&R-L<O&&O<M+L))){continue}if(N.options.snapMode!="inner"){var K=Math.abs(R-O)<=20;var Q=Math.abs(M-P)<=20;var G=Math.abs(E-C)<=20;var F=Math.abs(B-D)<=20;if(K){N.position.top=I.convertPositionTo("relative",{top:R-I.helperProportions.height,left:0}).top}if(Q){N.position.top=I.convertPositionTo("relative",{top:M,left:0}).top}if(G){N.position.left=I.convertPositionTo("relative",{top:0,left:E-I.helperProportions.width}).left}if(F){N.position.left=I.convertPositionTo("relative",{top:0,left:B}).left}}if(N.options.snapMode!="outer"){var K=Math.abs(R-P)<=20;var Q=Math.abs(M-O)<=20;var G=Math.abs(E-D)<=20;var F=Math.abs(B-C)<=20;if(K){N.position.top=I.convertPositionTo("relative",{top:R,left:0}).top}if(Q){N.position.top=I.convertPositionTo("relative",{top:M-I.helperProportions.height,left:0}).top}if(G){N.position.left=I.convertPositionTo("relative",{top:0,left:E}).left}if(F){N.position.left=I.convertPositionTo("relative",{top:0,left:B-I.helperProportions.width}).left}}}}});A.ui.plugin.add("draggable","connectToSortable",{start:function(D,C){var B=A(this).data("draggable");B.sortables=[];A(C.options.connectToSortable).each(function(){if(A.data(this,"sortable")){var E=A.data(this,"sortable");B.sortables.push({instance:E,shouldRevert:E.options.revert});E.refreshItems();E.propagate("activate",D,B)}})},stop:function(D,C){var B=A(this).data("draggable");A.each(B.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;B.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance.mouseStop(D);this.instance.element.triggerHandler("sortreceive",[D,A.extend(this.instance.ui(),{sender:B.element})],this.instance.options["receive"]);this.instance.options.helper=this.instance.options._helper}else{this.instance.propagate("deactivate",D,B)}})},drag:function(F,E){var D=A(this).data("draggable"),B=this;var C=function(K){var H=K.left,J=H+K.width,I=K.top,G=I+K.height;return(H<(this.positionAbs.left+this.offset.click.left)&&(this.positionAbs.left+this.offset.click.left)<J&&I<(this.positionAbs.top+this.offset.click.top)&&(this.positionAbs.top+this.offset.click.top)<G)};A.each(D.sortables,function(G){if(C.call(D,this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=A(B).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return E.helper[0]};F.target=this.instance.currentItem[0];this.instance.mouseCapture(F,true);this.instance.mouseStart(F,true,true);this.instance.offset.click.top=D.offset.click.top;this.instance.offset.click.left=D.offset.click.left;this.instance.offset.parent.left-=D.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=D.offset.parent.top-this.instance.offset.parent.top;D.propagate("toSortable",F)}if(this.instance.currentItem){this.instance.mouseDrag(F)}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance.mouseStop(F,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove()}D.propagate("fromSortable",F)}}})}});A.ui.plugin.add("draggable","stack",{start:function(D,B){var C=A.makeArray(A(B.options.stack.group)).sort(function(F,E){return(parseInt(A(F).css("zIndex"),10)||B.options.stack.min)-(parseInt(A(E).css("zIndex"),10)||B.options.stack.min)});A(C).each(function(E){this.style.zIndex=B.options.stack.min+E});this[0].style.zIndex=B.options.stack.min+C.length}})})(jQuery) \ No newline at end of file
+(function($){$.widget("ui.draggable",$.extend({},$.ui.mouse,{_init:function(){if(this.options.helper=="original"&&!(/^(?:r|a|f)/).test(this.element.css("position"))){this.element[0].style.position="relative"}(this.options.addClasses&&this.element.addClass("ui-draggable"));(this.options.disabled&&this.element.addClass("ui-draggable-disabled"));this._mouseInit()},destroy:function(){if(!this.element.data("draggable")){return }this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy()},_mouseCapture:function(event){var o=this.options;if(this.helper||o.disabled||$(event.target).is(".ui-resizable-handle")){return false}this.handle=this._getHandle(event);if(!this.handle){return false}return true},_mouseStart:function(event){var o=this.options;this.helper=this._createHelper(event);this._cacheHelperProportions();if($.ui.ddmanager){$.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};$.extend(this.offset,{click:{left:event.pageX-this.offset.left,top:event.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(event);this.originalPageX=event.pageX;this.originalPageY=event.pageY;if(o.cursorAt){this._adjustOffsetFromHelper(o.cursorAt)}if(o.containment){this._setContainment()}this._trigger("start",event);this._cacheHelperProportions();if($.ui.ddmanager&&!o.dropBehaviour){$.ui.ddmanager.prepareOffsets(this,event)}this.helper.addClass("ui-draggable-dragging");this._mouseDrag(event,true);return true},_mouseDrag:function(event,noPropagation){this.position=this._generatePosition(event);this.positionAbs=this._convertPositionTo("absolute");if(!noPropagation){var ui=this._uiHash();this._trigger("drag",event,ui);this.position=ui.position}if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}if($.ui.ddmanager){$.ui.ddmanager.drag(this,event)}return false},_mouseStop:function(event){var dropped=false;if($.ui.ddmanager&&!this.options.dropBehaviour){dropped=$.ui.ddmanager.drop(this,event)}if(this.dropped){dropped=this.dropped;this.dropped=false}if((this.options.revert=="invalid"&&!dropped)||(this.options.revert=="valid"&&dropped)||this.options.revert===true||($.isFunction(this.options.revert)&&this.options.revert.call(this.element,dropped))){var self=this;$(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){self._trigger("stop",event);self._clear()})}else{this._trigger("stop",event);this._clear()}return false},_getHandle:function(event){var handle=!this.options.handle||!$(this.options.handle,this.element).length?true:false;$(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==event.target){handle=true}});return handle},_createHelper:function(event){var o=this.options;var helper=$.isFunction(o.helper)?$(o.helper.apply(this.element[0],[event])):(o.helper=="clone"?this.element.clone():this.element);if(!helper.parents("body").length){helper.appendTo((o.appendTo=="parent"?this.element[0].parentNode:o.appendTo))}if(helper[0]!=this.element[0]&&!(/(fixed|absolute)/).test(helper.css("position"))){helper.css("position","absolute")}return helper},_adjustOffsetFromHelper:function(obj){if(obj.left!=undefined){this.offset.click.left=obj.left+this.margins.left}if(obj.right!=undefined){this.offset.click.left=this.helperProportions.width-obj.right+this.margins.left}if(obj.top!=undefined){this.offset.click.top=obj.top+this.margins.top}if(obj.bottom!=undefined){this.offset.click.top=this.helperProportions.height-obj.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var po=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0])){po.left+=this.scrollParent.scrollLeft();po.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&$.browser.msie)){po={top:0,left:0}}return{top:po.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:po.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var p=this.element.position();return{top:p.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:p.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var o=this.options;if(o.containment=="parent"){o.containment=this.helper[0].parentNode}if(o.containment=="document"||o.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,$(o.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,($(o.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(o.containment)&&o.containment.constructor!=Array){var ce=$(o.containment)[0];if(!ce){return }var co=$(o.containment).offset();var over=($(ce).css("overflow")!="hidden");this.containment=[co.left+(parseInt($(ce).css("borderLeftWidth"),10)||0)+(parseInt($(ce).css("paddingLeft"),10)||0)-this.margins.left,co.top+(parseInt($(ce).css("borderTopWidth"),10)||0)+(parseInt($(ce).css("paddingTop"),10)||0)-this.margins.top,co.left+(over?Math.max(ce.scrollWidth,ce.offsetWidth):ce.offsetWidth)-(parseInt($(ce).css("borderLeftWidth"),10)||0)-(parseInt($(ce).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,co.top+(over?Math.max(ce.scrollHeight,ce.offsetHeight):ce.offsetHeight)-(parseInt($(ce).css("borderTopWidth"),10)||0)-(parseInt($(ce).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}else{if(o.containment.constructor==Array){this.containment=o.containment}}},_convertPositionTo:function(d,pos){if(!pos){pos=this.position}var mod=d=="absolute"?1:-1;var o=this.options,scroll=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,scrollIsRootNode=(/(html|body)/i).test(scroll[0].tagName);return{top:(pos.top+this.offset.relative.top*mod+this.offset.parent.top*mod-($.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(scrollIsRootNode?0:scroll.scrollTop()))*mod)),left:(pos.left+this.offset.relative.left*mod+this.offset.parent.left*mod-($.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft())*mod))}},_generatePosition:function(event){var o=this.options,scroll=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,scrollIsRootNode=(/(html|body)/i).test(scroll[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var pageX=event.pageX;var pageY=event.pageY;if(this.originalPosition){if(this.containment){if(event.pageX-this.offset.click.left<this.containment[0]){pageX=this.containment[0]+this.offset.click.left}if(event.pageY-this.offset.click.top<this.containment[1]){pageY=this.containment[1]+this.offset.click.top}if(event.pageX-this.offset.click.left>this.containment[2]){pageX=this.containment[2]+this.offset.click.left}if(event.pageY-this.offset.click.top>this.containment[3]){pageY=this.containment[3]+this.offset.click.top}}if(o.grid){var top=this.originalPageY+Math.round((pageY-this.originalPageY)/o.grid[1])*o.grid[1];pageY=this.containment?(!(top-this.offset.click.top<this.containment[1]||top-this.offset.click.top>this.containment[3])?top:(!(top-this.offset.click.top<this.containment[1])?top-o.grid[1]:top+o.grid[1])):top;var left=this.originalPageX+Math.round((pageX-this.originalPageX)/o.grid[0])*o.grid[0];pageX=this.containment?(!(left-this.offset.click.left<this.containment[0]||left-this.offset.click.left>this.containment[2])?left:(!(left-this.offset.click.left<this.containment[0])?left-o.grid[0]:left+o.grid[0])):left}}return{top:(pageY-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+($.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(scrollIsRootNode?0:scroll.scrollTop())))),left:(pageX-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+($.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft())))}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval){this.helper.remove()}this.helper=null;this.cancelHelperRemoval=false},_trigger:function(type,event,ui){ui=ui||this._uiHash();$.ui.plugin.call(this,type,[event,ui]);if(type=="drag"){this.positionAbs=this._convertPositionTo("absolute")}return $.widget.prototype._trigger.call(this,type,event,ui)},plugins:{},_uiHash:function(event){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,offset:this.positionAbs}}}));$.extend($.ui.draggable,{version:"1.7.2",eventPrefix:"drag",defaults:{addClasses:true,appendTo:"parent",axis:false,cancel:":input,option",connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,delay:0,distance:1,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false}});$.ui.plugin.add("draggable","connectToSortable",{start:function(event,ui){var inst=$(this).data("draggable"),o=inst.options,uiSortable=$.extend({},ui,{item:inst.element});inst.sortables=[];$(o.connectToSortable).each(function(){var sortable=$.data(this,"sortable");if(sortable&&!sortable.options.disabled){inst.sortables.push({instance:sortable,shouldRevert:sortable.options.revert});sortable._refreshItems();sortable._trigger("activate",event,uiSortable)}})},stop:function(event,ui){var inst=$(this).data("draggable"),uiSortable=$.extend({},ui,{item:inst.element});$.each(inst.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;inst.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance._mouseStop(event);this.instance.options.helper=this.instance.options._helper;if(inst.options.helper=="original"){this.instance.currentItem.css({top:"auto",left:"auto"})}}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",event,uiSortable)}})},drag:function(event,ui){var inst=$(this).data("draggable"),self=this;var checkPos=function(o){var dyClick=this.offset.click.top,dxClick=this.offset.click.left;var helperTop=this.positionAbs.top,helperLeft=this.positionAbs.left;var itemHeight=o.height,itemWidth=o.width;var itemTop=o.top,itemLeft=o.left;return $.ui.isOver(helperTop+dyClick,helperLeft+dxClick,itemTop,itemLeft,itemHeight,itemWidth)};$.each(inst.sortables,function(i){this.instance.positionAbs=inst.positionAbs;this.instance.helperProportions=inst.helperProportions;this.instance.offset.click=inst.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=$(self).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return ui.helper[0]};event.target=this.instance.currentItem[0];this.instance._mouseCapture(event,true);this.instance._mouseStart(event,true,true);this.instance.offset.click.top=inst.offset.click.top;this.instance.offset.click.left=inst.offset.click.left;this.instance.offset.parent.left-=inst.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=inst.offset.parent.top-this.instance.offset.parent.top;inst._trigger("toSortable",event);inst.dropped=this.instance.element;inst.currentItem=inst.element;this.instance.fromOutside=inst}if(this.instance.currentItem){this.instance._mouseDrag(event)}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",event,this.instance._uiHash(this.instance));this.instance._mouseStop(event,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove()}inst._trigger("fromSortable",event);inst.dropped=false}}})}});$.ui.plugin.add("draggable","cursor",{start:function(event,ui){var t=$("body"),o=$(this).data("draggable").options;if(t.css("cursor")){o._cursor=t.css("cursor")}t.css("cursor",o.cursor)},stop:function(event,ui){var o=$(this).data("draggable").options;if(o._cursor){$("body").css("cursor",o._cursor)}}});$.ui.plugin.add("draggable","iframeFix",{start:function(event,ui){var o=$(this).data("draggable").options;$(o.iframeFix===true?"iframe":o.iframeFix).each(function(){$('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css($(this).offset()).appendTo("body")})},stop:function(event,ui){$("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});$.ui.plugin.add("draggable","opacity",{start:function(event,ui){var t=$(ui.helper),o=$(this).data("draggable").options;if(t.css("opacity")){o._opacity=t.css("opacity")}t.css("opacity",o.opacity)},stop:function(event,ui){var o=$(this).data("draggable").options;if(o._opacity){$(ui.helper).css("opacity",o._opacity)}}});$.ui.plugin.add("draggable","scroll",{start:function(event,ui){var i=$(this).data("draggable");if(i.scrollParent[0]!=document&&i.scrollParent[0].tagName!="HTML"){i.overflowOffset=i.scrollParent.offset()}},drag:function(event,ui){var i=$(this).data("draggable"),o=i.options,scrolled=false;if(i.scrollParent[0]!=document&&i.scrollParent[0].tagName!="HTML"){if(!o.axis||o.axis!="x"){if((i.overflowOffset.top+i.scrollParent[0].offsetHeight)-event.pageY<o.scrollSensitivity){i.scrollParent[0].scrollTop=scrolled=i.scrollParent[0].scrollTop+o.scrollSpeed}else{if(event.pageY-i.overflowOffset.top<o.scrollSensitivity){i.scrollParent[0].scrollTop=scrolled=i.scrollParent[0].scrollTop-o.scrollSpeed}}}if(!o.axis||o.axis!="y"){if((i.overflowOffset.left+i.scrollParent[0].offsetWidth)-event.pageX<o.scrollSensitivity){i.scrollParent[0].scrollLeft=scrolled=i.scrollParent[0].scrollLeft+o.scrollSpeed}else{if(event.pageX-i.overflowOffset.left<o.scrollSensitivity){i.scrollParent[0].scrollLeft=scrolled=i.scrollParent[0].scrollLeft-o.scrollSpeed}}}}else{if(!o.axis||o.axis!="x"){if(event.pageY-$(document).scrollTop()<o.scrollSensitivity){scrolled=$(document).scrollTop($(document).scrollTop()-o.scrollSpeed)}else{if($(window).height()-(event.pageY-$(document).scrollTop())<o.scrollSensitivity){scrolled=$(document).scrollTop($(document).scrollTop()+o.scrollSpeed)}}}if(!o.axis||o.axis!="y"){if(event.pageX-$(document).scrollLeft()<o.scrollSensitivity){scrolled=$(document).scrollLeft($(document).scrollLeft()-o.scrollSpeed)}else{if($(window).width()-(event.pageX-$(document).scrollLeft())<o.scrollSensitivity){scrolled=$(document).scrollLeft($(document).scrollLeft()+o.scrollSpeed)}}}}if(scrolled!==false&&$.ui.ddmanager&&!o.dropBehaviour){$.ui.ddmanager.prepareOffsets(i,event)}}});$.ui.plugin.add("draggable","snap",{start:function(event,ui){var i=$(this).data("draggable"),o=i.options;i.snapElements=[];$(o.snap.constructor!=String?(o.snap.items||":data(draggable)"):o.snap).each(function(){var $t=$(this);var $o=$t.offset();if(this!=i.element[0]){i.snapElements.push({item:this,width:$t.outerWidth(),height:$t.outerHeight(),top:$o.top,left:$o.left})}})},drag:function(event,ui){var inst=$(this).data("draggable"),o=inst.options;var d=o.snapTolerance;var x1=ui.offset.left,x2=x1+inst.helperProportions.width,y1=ui.offset.top,y2=y1+inst.helperProportions.height;for(var i=inst.snapElements.length-1;i>=0;i--){var l=inst.snapElements[i].left,r=l+inst.snapElements[i].width,t=inst.snapElements[i].top,b=t+inst.snapElements[i].height;if(!((l-d<x1&&x1<r+d&&t-d<y1&&y1<b+d)||(l-d<x1&&x1<r+d&&t-d<y2&&y2<b+d)||(l-d<x2&&x2<r+d&&t-d<y1&&y1<b+d)||(l-d<x2&&x2<r+d&&t-d<y2&&y2<b+d))){if(inst.snapElements[i].snapping){(inst.options.snap.release&&inst.options.snap.release.call(inst.element,event,$.extend(inst._uiHash(),{snapItem:inst.snapElements[i].item})))}inst.snapElements[i].snapping=false;continue}if(o.snapMode!="inner"){var ts=Math.abs(t-y2)<=d;var bs=Math.abs(b-y1)<=d;var ls=Math.abs(l-x2)<=d;var rs=Math.abs(r-x1)<=d;if(ts){ui.position.top=inst._convertPositionTo("relative",{top:t-inst.helperProportions.height,left:0}).top-inst.margins.top}if(bs){ui.position.top=inst._convertPositionTo("relative",{top:b,left:0}).top-inst.margins.top}if(ls){ui.position.left=inst._convertPositionTo("relative",{top:0,left:l-inst.helperProportions.width}).left-inst.margins.left}if(rs){ui.position.left=inst._convertPositionTo("relative",{top:0,left:r}).left-inst.margins.left}}var first=(ts||bs||ls||rs);if(o.snapMode!="outer"){var ts=Math.abs(t-y1)<=d;var bs=Math.abs(b-y2)<=d;var ls=Math.abs(l-x1)<=d;var rs=Math.abs(r-x2)<=d;if(ts){ui.position.top=inst._convertPositionTo("relative",{top:t,left:0}).top-inst.margins.top}if(bs){ui.position.top=inst._convertPositionTo("relative",{top:b-inst.helperProportions.height,left:0}).top-inst.margins.top}if(ls){ui.position.left=inst._convertPositionTo("relative",{top:0,left:l}).left-inst.margins.left}if(rs){ui.position.left=inst._convertPositionTo("relative",{top:0,left:r-inst.helperProportions.width}).left-inst.margins.left}}if(!inst.snapElements[i].snapping&&(ts||bs||ls||rs||first)){(inst.options.snap.snap&&inst.options.snap.snap.call(inst.element,event,$.extend(inst._uiHash(),{snapItem:inst.snapElements[i].item})))}inst.snapElements[i].snapping=(ts||bs||ls||rs||first)}}});$.ui.plugin.add("draggable","stack",{start:function(event,ui){var o=$(this).data("draggable").options;var group=$.makeArray($(o.stack.group)).sort(function(a,b){return(parseInt($(a).css("zIndex"),10)||o.stack.min)-(parseInt($(b).css("zIndex"),10)||o.stack.min)});$(group).each(function(i){this.style.zIndex=o.stack.min+i});this[0].style.zIndex=o.stack.min+group.length}});$.ui.plugin.add("draggable","zIndex",{start:function(event,ui){var t=$(ui.helper),o=$(this).data("draggable").options;if(t.css("zIndex")){o._zIndex=t.css("zIndex")}t.css("zIndex",o.zIndex)},stop:function(event,ui){var o=$(this).data("draggable").options;if(o._zIndex){$(ui.helper).css("zIndex",o._zIndex)}}})})(jQuery); \ No newline at end of file
diff --git a/template-common/lib/ui/minified/ui.droppable.min.js b/template-common/lib/ui/minified/ui.droppable.min.js
index 651d142b9..bd984b121 100644
--- a/template-common/lib/ui/minified/ui.droppable.min.js
+++ b/template-common/lib/ui/minified/ui.droppable.min.js
@@ -1 +1 @@
-(function(A){A.widget("ui.droppable",{init:function(){this.element.addClass("ui-droppable");this.isover=0;this.isout=1;var C=this.options,B=C.accept;C=A.extend(C,{accept:C.accept&&C.accept.constructor==Function?C.accept:function(D){return A(D).is(B)}});this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};A.ui.ddmanager.droppables.push(this)},plugins:{},ui:function(B){return{draggable:(B.currentItem||B.element),helper:B.helper,position:B.position,absolutePosition:B.positionAbs,options:this.options,element:this.element}},destroy:function(){var B=A.ui.ddmanager.droppables;for(var C=0;C<B.length;C++){if(B[C]==this){B.splice(C,1)}}this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable")},over:function(C){var B=A.ui.ddmanager.current;if(!B||(B.currentItem||B.element)[0]==this.element[0]){return }if(this.options.accept.call(this.element,(B.currentItem||B.element))){A.ui.plugin.call(this,"over",[C,this.ui(B)]);this.element.triggerHandler("dropover",[C,this.ui(B)],this.options.over)}},out:function(C){var B=A.ui.ddmanager.current;if(!B||(B.currentItem||B.element)[0]==this.element[0]){return }if(this.options.accept.call(this.element,(B.currentItem||B.element))){A.ui.plugin.call(this,"out",[C,this.ui(B)]);this.element.triggerHandler("dropout",[C,this.ui(B)],this.options.out)}},drop:function(D,C){var B=C||A.ui.ddmanager.current;if(!B||(B.currentItem||B.element)[0]==this.element[0]){return false}var E=false;this.element.find(".ui-droppable").not(".ui-draggable-dragging").each(function(){var F=A.data(this,"droppable");if(F.options.greedy&&A.ui.intersect(B,A.extend(F,{offset:F.element.offset()}),F.options.tolerance)){E=true;return false}});if(E){return false}if(this.options.accept.call(this.element,(B.currentItem||B.element))){A.ui.plugin.call(this,"drop",[D,this.ui(B)]);this.element.triggerHandler("drop",[D,this.ui(B)],this.options.drop);return true}return false},activate:function(C){var B=A.ui.ddmanager.current;A.ui.plugin.call(this,"activate",[C,this.ui(B)]);if(B){this.element.triggerHandler("dropactivate",[C,this.ui(B)],this.options.activate)}},deactivate:function(C){var B=A.ui.ddmanager.current;A.ui.plugin.call(this,"deactivate",[C,this.ui(B)]);if(B){this.element.triggerHandler("dropdeactivate",[C,this.ui(B)],this.options.deactivate)}}});A.extend(A.ui.droppable,{defaults:{disabled:false,tolerance:"intersect"}});A.ui.intersect=function(L,F,J){if(!F.offset){return false}var D=(L.positionAbs||L.position.absolute).left,C=D+L.helperProportions.width,I=(L.positionAbs||L.position.absolute).top,H=I+L.helperProportions.height;var E=F.offset.left,B=E+F.proportions.width,K=F.offset.top,G=K+F.proportions.height;switch(J){case"fit":return(E<D&&C<B&&K<I&&H<G);break;case"intersect":return(E<D+(L.helperProportions.width/2)&&C-(L.helperProportions.width/2)<B&&K<I+(L.helperProportions.height/2)&&H-(L.helperProportions.height/2)<G);break;case"pointer":return(E<((L.positionAbs||L.position.absolute).left+(L.clickOffset||L.offset.click).left)&&((L.positionAbs||L.position.absolute).left+(L.clickOffset||L.offset.click).left)<B&&K<((L.positionAbs||L.position.absolute).top+(L.clickOffset||L.offset.click).top)&&((L.positionAbs||L.position.absolute).top+(L.clickOffset||L.offset.click).top)<G);break;case"touch":return((I>=K&&I<=G)||(H>=K&&H<=G)||(I<K&&H>G))&&((D>=E&&D<=B)||(C>=E&&C<=B)||(D<E&&C>B));break;default:return false;break}};A.ui.ddmanager={current:null,droppables:[],prepareOffsets:function(D,F){var B=A.ui.ddmanager.droppables;var E=F?F.type:null;for(var C=0;C<B.length;C++){if(B[C].options.disabled||(D&&!B[C].options.accept.call(B[C].element,(D.currentItem||D.element)))){continue}B[C].visible=B[C].element.css("display")!="none";if(!B[C].visible){continue}B[C].offset=B[C].element.offset();B[C].proportions={width:B[C].element[0].offsetWidth,height:B[C].element[0].offsetHeight};if(E=="dragstart"||E=="sortactivate"){B[C].activate.call(B[C],F)}}},drop:function(B,C){var D=false;A.each(A.ui.ddmanager.droppables,function(){if(!this.options){return }if(!this.options.disabled&&this.visible&&A.ui.intersect(B,this,this.options.tolerance)){D=this.drop.call(this,C)}if(!this.options.disabled&&this.visible&&this.options.accept.call(this.element,(B.currentItem||B.element))){this.isout=1;this.isover=0;this.deactivate.call(this,C)}});return D},drag:function(B,C){if(B.options.refreshPositions){A.ui.ddmanager.prepareOffsets(B,C)}A.each(A.ui.ddmanager.droppables,function(){if(this.options.disabled||this.greedyChild||!this.visible){return }var E=A.ui.intersect(B,this,this.options.tolerance);var G=!E&&this.isover==1?"isout":(E&&this.isover==0?"isover":null);if(!G){return }var F;if(this.options.greedy){var D=this.element.parents(".ui-droppable:eq(0)");if(D.length){F=A.data(D[0],"droppable");F.greedyChild=(G=="isover"?1:0)}}if(F&&G=="isover"){F["isover"]=0;F["isout"]=1;F.out.call(F,C)}this[G]=1;this[G=="isout"?"isover":"isout"]=0;this[G=="isover"?"over":"out"].call(this,C);if(F&&G=="isout"){F["isout"]=0;F["isover"]=1;F.over.call(F,C)}})}};A.ui.plugin.add("droppable","activeClass",{activate:function(C,B){A(this).addClass(B.options.activeClass)},deactivate:function(C,B){A(this).removeClass(B.options.activeClass)},drop:function(C,B){A(this).removeClass(B.options.activeClass)}});A.ui.plugin.add("droppable","hoverClass",{over:function(C,B){A(this).addClass(B.options.hoverClass)},out:function(C,B){A(this).removeClass(B.options.hoverClass)},drop:function(C,B){A(this).removeClass(B.options.hoverClass)}})})(jQuery) \ No newline at end of file
+(function($){$.widget("ui.droppable",{_init:function(){var o=this.options,accept=o.accept;this.isover=0;this.isout=1;this.options.accept=this.options.accept&&$.isFunction(this.options.accept)?this.options.accept:function(d){return d.is(accept)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};$.ui.ddmanager.droppables[this.options.scope]=$.ui.ddmanager.droppables[this.options.scope]||[];$.ui.ddmanager.droppables[this.options.scope].push(this);(this.options.addClasses&&this.element.addClass("ui-droppable"))},destroy:function(){var drop=$.ui.ddmanager.droppables[this.options.scope];for(var i=0;i<drop.length;i++){if(drop[i]==this){drop.splice(i,1)}}this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable")},_setData:function(key,value){if(key=="accept"){this.options.accept=value&&$.isFunction(value)?value:function(d){return d.is(value)}}else{$.widget.prototype._setData.apply(this,arguments)}},_activate:function(event){var draggable=$.ui.ddmanager.current;if(this.options.activeClass){this.element.addClass(this.options.activeClass)}(draggable&&this._trigger("activate",event,this.ui(draggable)))},_deactivate:function(event){var draggable=$.ui.ddmanager.current;if(this.options.activeClass){this.element.removeClass(this.options.activeClass)}(draggable&&this._trigger("deactivate",event,this.ui(draggable)))},_over:function(event){var draggable=$.ui.ddmanager.current;if(!draggable||(draggable.currentItem||draggable.element)[0]==this.element[0]){return }if(this.options.accept.call(this.element[0],(draggable.currentItem||draggable.element))){if(this.options.hoverClass){this.element.addClass(this.options.hoverClass)}this._trigger("over",event,this.ui(draggable))}},_out:function(event){var draggable=$.ui.ddmanager.current;if(!draggable||(draggable.currentItem||draggable.element)[0]==this.element[0]){return }if(this.options.accept.call(this.element[0],(draggable.currentItem||draggable.element))){if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}this._trigger("out",event,this.ui(draggable))}},_drop:function(event,custom){var draggable=custom||$.ui.ddmanager.current;if(!draggable||(draggable.currentItem||draggable.element)[0]==this.element[0]){return false}var childrenIntersection=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var inst=$.data(this,"droppable");if(inst.options.greedy&&$.ui.intersect(draggable,$.extend(inst,{offset:inst.element.offset()}),inst.options.tolerance)){childrenIntersection=true;return false}});if(childrenIntersection){return false}if(this.options.accept.call(this.element[0],(draggable.currentItem||draggable.element))){if(this.options.activeClass){this.element.removeClass(this.options.activeClass)}if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}this._trigger("drop",event,this.ui(draggable));return this.element}return false},ui:function(c){return{draggable:(c.currentItem||c.element),helper:c.helper,position:c.position,absolutePosition:c.positionAbs,offset:c.positionAbs}}});$.extend($.ui.droppable,{version:"1.7.2",eventPrefix:"drop",defaults:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"}});$.ui.intersect=function(draggable,droppable,toleranceMode){if(!droppable.offset){return false}var x1=(draggable.positionAbs||draggable.position.absolute).left,x2=x1+draggable.helperProportions.width,y1=(draggable.positionAbs||draggable.position.absolute).top,y2=y1+draggable.helperProportions.height;var l=droppable.offset.left,r=l+droppable.proportions.width,t=droppable.offset.top,b=t+droppable.proportions.height;switch(toleranceMode){case"fit":return(l<x1&&x2<r&&t<y1&&y2<b);break;case"intersect":return(l<x1+(draggable.helperProportions.width/2)&&x2-(draggable.helperProportions.width/2)<r&&t<y1+(draggable.helperProportions.height/2)&&y2-(draggable.helperProportions.height/2)<b);break;case"pointer":var draggableLeft=((draggable.positionAbs||draggable.position.absolute).left+(draggable.clickOffset||draggable.offset.click).left),draggableTop=((draggable.positionAbs||draggable.position.absolute).top+(draggable.clickOffset||draggable.offset.click).top),isOver=$.ui.isOver(draggableTop,draggableLeft,t,l,droppable.proportions.height,droppable.proportions.width);return isOver;break;case"touch":return((y1>=t&&y1<=b)||(y2>=t&&y2<=b)||(y1<t&&y2>b))&&((x1>=l&&x1<=r)||(x2>=l&&x2<=r)||(x1<l&&x2>r));break;default:return false;break}};$.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,event){var m=$.ui.ddmanager.droppables[t.options.scope];var type=event?event.type:null;var list=(t.currentItem||t.element).find(":data(droppable)").andSelf();droppablesLoop:for(var i=0;i<m.length;i++){if(m[i].options.disabled||(t&&!m[i].options.accept.call(m[i].element[0],(t.currentItem||t.element)))){continue}for(var j=0;j<list.length;j++){if(list[j]==m[i].element[0]){m[i].proportions.height=0;continue droppablesLoop}}m[i].visible=m[i].element.css("display")!="none";if(!m[i].visible){continue}m[i].offset=m[i].element.offset();m[i].proportions={width:m[i].element[0].offsetWidth,height:m[i].element[0].offsetHeight};if(type=="mousedown"){m[i]._activate.call(m[i],event)}}},drop:function(draggable,event){var dropped=false;$.each($.ui.ddmanager.droppables[draggable.options.scope],function(){if(!this.options){return }if(!this.options.disabled&&this.visible&&$.ui.intersect(draggable,this,this.options.tolerance)){dropped=this._drop.call(this,event)}if(!this.options.disabled&&this.visible&&this.options.accept.call(this.element[0],(draggable.currentItem||draggable.element))){this.isout=1;this.isover=0;this._deactivate.call(this,event)}});return dropped},drag:function(draggable,event){if(draggable.options.refreshPositions){$.ui.ddmanager.prepareOffsets(draggable,event)}$.each($.ui.ddmanager.droppables[draggable.options.scope],function(){if(this.options.disabled||this.greedyChild||!this.visible){return }var intersects=$.ui.intersect(draggable,this,this.options.tolerance);var c=!intersects&&this.isover==1?"isout":(intersects&&this.isover==0?"isover":null);if(!c){return }var parentInstance;if(this.options.greedy){var parent=this.element.parents(":data(droppable):eq(0)");if(parent.length){parentInstance=$.data(parent[0],"droppable");parentInstance.greedyChild=(c=="isover"?1:0)}}if(parentInstance&&c=="isover"){parentInstance.isover=0;parentInstance.isout=1;parentInstance._out.call(parentInstance,event)}this[c]=1;this[c=="isout"?"isover":"isout"]=0;this[c=="isover"?"_over":"_out"].call(this,event);if(parentInstance&&c=="isout"){parentInstance.isout=0;parentInstance.isover=1;parentInstance._over.call(parentInstance,event)}})}}})(jQuery); \ No newline at end of file
diff --git a/template-common/lib/ui/minified/ui.resizable.min.js b/template-common/lib/ui/minified/ui.resizable.min.js
index 423328ee3..ee688bcf0 100644
--- a/template-common/lib/ui/minified/ui.resizable.min.js
+++ b/template-common/lib/ui/minified/ui.resizable.min.js
@@ -1 +1 @@
-(function(A){A.widget("ui.resizable",A.extend({},A.ui.mouse,{init:function(){var M=this,N=this.options;var Q=this.element.css("position");this.originalElement=this.element;this.element.addClass("ui-resizable").css({position:/static/.test(Q)?"relative":Q});A.extend(N,{_aspectRatio:!!(N.aspectRatio),helper:N.helper||N.ghost||N.animate?N.helper||"proxy":null,knobHandles:N.knobHandles===true?"ui-resizable-knob-handle":N.knobHandles});var H="1px solid #DEDEDE";N.defaultTheme={"ui-resizable":{display:"block"},"ui-resizable-handle":{position:"absolute",background:"#F2F2F2",fontSize:"0.1px"},"ui-resizable-n":{cursor:"n-resize",height:"4px",left:"0px",right:"0px",borderTop:H},"ui-resizable-s":{cursor:"s-resize",height:"4px",left:"0px",right:"0px",borderBottom:H},"ui-resizable-e":{cursor:"e-resize",width:"4px",top:"0px",bottom:"0px",borderRight:H},"ui-resizable-w":{cursor:"w-resize",width:"4px",top:"0px",bottom:"0px",borderLeft:H},"ui-resizable-se":{cursor:"se-resize",width:"4px",height:"4px",borderRight:H,borderBottom:H},"ui-resizable-sw":{cursor:"sw-resize",width:"4px",height:"4px",borderBottom:H,borderLeft:H},"ui-resizable-ne":{cursor:"ne-resize",width:"4px",height:"4px",borderRight:H,borderTop:H},"ui-resizable-nw":{cursor:"nw-resize",width:"4px",height:"4px",borderLeft:H,borderTop:H}};N.knobTheme={"ui-resizable-handle":{background:"#F2F2F2",border:"1px solid #808080",height:"8px",width:"8px"},"ui-resizable-n":{cursor:"n-resize",top:"0px",left:"45%"},"ui-resizable-s":{cursor:"s-resize",bottom:"0px",left:"45%"},"ui-resizable-e":{cursor:"e-resize",right:"0px",top:"45%"},"ui-resizable-w":{cursor:"w-resize",left:"0px",top:"45%"},"ui-resizable-se":{cursor:"se-resize",right:"0px",bottom:"0px"},"ui-resizable-sw":{cursor:"sw-resize",left:"0px",bottom:"0px"},"ui-resizable-nw":{cursor:"nw-resize",left:"0px",top:"0px"},"ui-resizable-ne":{cursor:"ne-resize",right:"0px",top:"0px"}};N._nodeName=this.element[0].nodeName;if(N._nodeName.match(/canvas|textarea|input|select|button|img/i)){var B=this.element;if(/relative/.test(B.css("position"))&&A.browser.opera){B.css({position:"relative",top:"auto",left:"auto"})}B.wrap(A('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:B.css("position"),width:B.outerWidth(),height:B.outerHeight(),top:B.css("top"),left:B.css("left")}));var J=this.element;this.element=this.element.parent();this.element.data("resizable",this);this.element.css({marginLeft:J.css("marginLeft"),marginTop:J.css("marginTop"),marginRight:J.css("marginRight"),marginBottom:J.css("marginBottom")});J.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});if(A.browser.safari&&N.preventDefault){J.css("resize","none")}N.proportionallyResize=J.css({position:"static",zoom:1,display:"block"});this.element.css({margin:J.css("margin")});this._proportionallyResize()}if(!N.handles){N.handles=!A(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}}if(N.handles.constructor==String){N.zIndex=N.zIndex||1000;if(N.handles=="all"){N.handles="n,e,s,w,se,sw,ne,nw"}var O=N.handles.split(",");N.handles={};var G={handle:"position: absolute; display: none; overflow:hidden;",n:"top: 0pt; width:100%;",e:"right: 0pt; height:100%;",s:"bottom: 0pt; width:100%;",w:"left: 0pt; height:100%;",se:"bottom: 0pt; right: 0px;",sw:"bottom: 0pt; left: 0px;",ne:"top: 0pt; right: 0px;",nw:"top: 0pt; left: 0px;"};for(var R=0;R<O.length;R++){var S=A.trim(O[R]),L=N.defaultTheme,F="ui-resizable-"+S,C=!A.ui.css(F)&&!N.knobHandles,P=A.ui.css("ui-resizable-knob-handle"),T=A.extend(L[F],L["ui-resizable-handle"]),D=A.extend(N.knobTheme[F],!P?N.knobTheme["ui-resizable-handle"]:{});var K=/sw|se|ne|nw/.test(S)?{zIndex:++N.zIndex}:{};var I=(C?G[S]:""),E=A(['<div class="ui-resizable-handle ',F,'" style="',I,G.handle,'"></div>'].join("")).css(K);N.handles[S]=".ui-resizable-"+S;this.element.append(E.css(C?T:{}).css(N.knobHandles?D:{}).addClass(N.knobHandles?"ui-resizable-knob-handle":"").addClass(N.knobHandles))}if(N.knobHandles){this.element.addClass("ui-resizable-knob").css(!A.ui.css("ui-resizable-knob")?{}:{})}}this._renderAxis=function(Y){Y=Y||this.element;for(var V in N.handles){if(N.handles[V].constructor==String){N.handles[V]=A(N.handles[V],this.element).show()}if(N.transparent){N.handles[V].css({opacity:0})}if(this.element.is(".ui-wrapper")&&N._nodeName.match(/textarea|input|select|button/i)){var W=A(N.handles[V],this.element),X=0;X=/sw|ne|nw|se|n|s/.test(V)?W.outerHeight():W.outerWidth();var U=["padding",/ne|nw|n/.test(V)?"Top":/se|sw|s/.test(V)?"Bottom":/^e$/.test(V)?"Right":"Left"].join("");if(!N.transparent){Y.css(U,X)}this._proportionallyResize()}if(!A(N.handles[V]).length){continue}}};this._renderAxis(this.element);N._handles=A(".ui-resizable-handle",M.element);if(N.disableSelection){N._handles.each(function(U,V){A.ui.disableSelection(V)})}N._handles.mouseover(function(){if(!N.resizing){if(this.className){var U=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}M.axis=N.axis=U&&U[1]?U[1]:"se"}});if(N.autoHide){N._handles.hide();A(M.element).addClass("ui-resizable-autohide").hover(function(){A(this).removeClass("ui-resizable-autohide");N._handles.show()},function(){if(!N.resizing){A(this).addClass("ui-resizable-autohide");N._handles.hide()}})}this.mouseInit()},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,options:this.options,originalSize:this.originalSize,originalPosition:this.originalPosition}},propagate:function(C,B){A.ui.plugin.call(this,C,[B,this.ui()]);if(C!="resize"){this.element.triggerHandler(["resize",C].join(""),[B,this.ui()],this.options[C])}},destroy:function(){var D=this.element,C=D.children(".ui-resizable").get(0);this.mouseDestroy();var B=function(E){A(E).removeClass("ui-resizable ui-resizable-disabled").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};B(D);if(D.is(".ui-wrapper")&&C){D.parent().append(A(C).css({position:D.css("position"),width:D.outerWidth(),height:D.outerHeight(),top:D.css("top"),left:D.css("left")})).end().remove();B(C)}},mouseStart:function(K){if(this.options.disabled){return false}var J=false;for(var H in this.options.handles){if(A(this.options.handles[H])[0]==K.target){J=true}}if(!J){return false}var C=this.options,B=this.element.position(),D=this.element,I=function(O){return parseInt(O,10)||0},G=A.browser.msie&&A.browser.version<7;C.resizing=true;C.documentScroll={top:A(document).scrollTop(),left:A(document).scrollLeft()};if(D.is(".ui-draggable")||(/absolute/).test(D.css("position"))){var M=A.browser.msie&&!C.containment&&(/absolute/).test(D.css("position"))&&!(/relative/).test(D.parent().css("position"));var L=M?C.documentScroll.top:0,F=M?C.documentScroll.left:0;D.css({position:"absolute",top:(B.top+L),left:(B.left+F)})}if(A.browser.opera&&/relative/.test(D.css("position"))){D.css({position:"relative",top:"auto",left:"auto"})}this._renderProxy();var N=I(this.helper.css("left")),E=I(this.helper.css("top"));if(C.containment){N+=A(C.containment).scrollLeft()||0;E+=A(C.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:N,top:E};this.size=C.helper||G?{width:D.outerWidth(),height:D.outerHeight()}:{width:D.width(),height:D.height()};this.originalSize=C.helper||G?{width:D.outerWidth(),height:D.outerHeight()}:{width:D.width(),height:D.height()};this.originalPosition={left:N,top:E};this.sizeDiff={width:D.outerWidth()-D.width(),height:D.outerHeight()-D.height()};this.originalMousePosition={left:K.pageX,top:K.pageY};C.aspectRatio=(typeof C.aspectRatio=="number")?C.aspectRatio:((this.originalSize.height/this.originalSize.width)||1);if(C.preserveCursor){A("body").css("cursor",this.axis+"-resize")}this.propagate("start",K);return true},mouseDrag:function(I){var D=this.helper,C=this.options,J={},M=this,F=this.originalMousePosition,K=this.axis;var N=(I.pageX-F.left)||0,L=(I.pageY-F.top)||0;var E=this._change[K];if(!E){return false}var H=E.apply(this,[I,N,L]),G=A.browser.msie&&A.browser.version<7,B=this.sizeDiff;if(C._aspectRatio||I.shiftKey){H=this._updateRatio(H,I)}H=this._respectSize(H,I);this.propagate("resize",I);D.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!C.helper&&C.proportionallyResize){this._proportionallyResize()}this._updateCache(H);this.element.triggerHandler("resize",[I,this.ui()],this.options["resize"]);return false},mouseStop:function(I){this.options.resizing=false;var E=this.options,H=function(M){return parseInt(M,10)||0},K=this;if(E.helper){var D=E.proportionallyResize,B=D&&(/textarea/i).test(D.get(0).nodeName),C=B&&A.ui.hasScroll(D.get(0),"left")?0:K.sizeDiff.height,G=B?0:K.sizeDiff.width;var L={width:(K.size.width-G),height:(K.size.height-C)},F=(parseInt(K.element.css("left"),10)+(K.position.left-K.originalPosition.left))||null,J=(parseInt(K.element.css("top"),10)+(K.position.top-K.originalPosition.top))||null;if(!E.animate){this.element.css(A.extend(L,{top:J,left:F}))}if(E.helper&&!E.animate){this._proportionallyResize()}}if(E.preserveCursor){A("body").css("cursor","auto")}this.propagate("stop",I);if(E.helper){this.helper.remove()}return false},_updateCache:function(B){var C=this.options;this.offset=this.helper.offset();if(B.left){this.position.left=B.left}if(B.top){this.position.top=B.top}if(B.height){this.size.height=B.height}if(B.width){this.size.width=B.width}},_updateRatio:function(D,E){var F=this.options,G=this.position,C=this.size,B=this.axis;if(D.height){D.width=(C.height/F.aspectRatio)}else{if(D.width){D.height=(C.width*F.aspectRatio)}}if(B=="sw"){D.left=G.left+(C.width-D.width);D.top=null}if(B=="nw"){D.top=G.top+(C.height-D.height);D.left=G.left+(C.width-D.width)}return D},_respectSize:function(H,I){var F=this.helper,E=this.options,N=E._aspectRatio||I.shiftKey,M=this.axis,P=H.width&&E.maxWidth&&E.maxWidth<H.width,J=H.height&&E.maxHeight&&E.maxHeight<H.height,D=H.width&&E.minWidth&&E.minWidth>H.width,O=H.height&&E.minHeight&&E.minHeight>H.height;if(D){H.width=E.minWidth}if(O){H.height=E.minHeight}if(P){H.width=E.maxWidth}if(J){H.height=E.maxHeight}var C=this.originalPosition.left+this.originalSize.width,L=this.position.top+this.size.height;var G=/sw|nw|w/.test(M),B=/nw|ne|n/.test(M);if(D&&G){H.left=C-E.minWidth}if(P&&G){H.left=C-E.maxWidth}if(O&&B){H.top=L-E.minHeight}if(J&&B){H.top=L-E.maxHeight}var K=!H.width&&!H.height;if(K&&!H.left&&H.top){H.top=null}else{if(K&&!H.top&&H.left){H.left=null}}return H},_proportionallyResize:function(){var F=this.options;if(!F.proportionallyResize){return }var D=F.proportionallyResize,C=this.helper||this.element;if(!F.borderDif){var B=[D.css("borderTopWidth"),D.css("borderRightWidth"),D.css("borderBottomWidth"),D.css("borderLeftWidth")],E=[D.css("paddingTop"),D.css("paddingRight"),D.css("paddingBottom"),D.css("paddingLeft")];F.borderDif=A.map(B,function(G,I){var H=parseInt(G,10)||0,J=parseInt(E[I],10)||0;return H+J})}D.css({height:(C.height()-F.borderDif[0]-F.borderDif[2])+"px",width:(C.width()-F.borderDif[1]-F.borderDif[3])+"px"})},_renderProxy:function(){var C=this.element,F=this.options;this.elementOffset=C.offset();if(F.helper){this.helper=this.helper||A('<div style="overflow:hidden;"></div>');var B=A.browser.msie&&A.browser.version<7,D=(B?1:0),E=(B?2:-1);this.helper.addClass(F.helper).css({width:C.outerWidth()+E,height:C.outerHeight()+E,position:"absolute",left:this.elementOffset.left-D+"px",top:this.elementOffset.top-D+"px",zIndex:++F.zIndex});this.helper.appendTo("body");if(F.disableSelection){A.ui.disableSelection(this.helper.get(0))}}else{this.helper=C}},_change:{e:function(D,C,B){return{width:this.originalSize.width+C}},w:function(F,C,B){var G=this.options,D=this.originalSize,E=this.originalPosition;return{left:E.left+C,width:D.width-C}},n:function(F,C,B){var G=this.options,D=this.originalSize,E=this.originalPosition;return{top:E.top+B,height:D.height-B}},s:function(D,C,B){return{height:this.originalSize.height+B}},se:function(D,C,B){return A.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[D,C,B]))},sw:function(D,C,B){return A.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[D,C,B]))},ne:function(D,C,B){return A.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[D,C,B]))},nw:function(D,C,B){return A.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[D,C,B]))}}}));A.extend(A.ui.resizable,{defaults:{cancel:":input",distance:1,delay:0,preventDefault:true,transparent:false,minWidth:10,minHeight:10,aspectRatio:false,disableSelection:true,preserveCursor:true,autoHide:false,knobHandles:false}});A.ui.plugin.add("resizable","containment",{start:function(I,K){var E=K.options,M=A(this).data("resizable"),G=M.element;var C=E.containment,F=(C instanceof A)?C.get(0):(/parent/.test(C))?G.parent().get(0):C;if(!F){return }M.containerElement=A(F);if(/document/.test(C)||C==document){M.containerOffset={left:0,top:0};M.containerPosition={left:0,top:0};M.parentData={element:A(document),left:0,top:0,width:A(document).width(),height:A(document).height()||document.body.parentNode.scrollHeight}}else{M.containerOffset=A(F).offset();M.containerPosition=A(F).position();M.containerSize={height:A(F).innerHeight(),width:A(F).innerWidth()};var J=M.containerOffset,B=M.containerSize.height,H=M.containerSize.width,D=(A.ui.hasScroll(F,"left")?F.scrollWidth:H),L=(A.ui.hasScroll(F)?F.scrollHeight:B);M.parentData={element:F,left:J.left,top:J.top,width:D,height:L}}},resize:function(H,K){var E=K.options,N=A(this).data("resizable"),C=N.containerSize,J=N.containerOffset,G=N.size,I=N.position,L=E._aspectRatio||H.shiftKey,B={top:0,left:0},D=N.containerElement;if(D[0]!=document&&/static/.test(D.css("position"))){B=N.containerPosition}if(I.left<(E.helper?J.left:B.left)){N.size.width=N.size.width+(E.helper?(N.position.left-J.left):(N.position.left-B.left));if(L){N.size.height=N.size.width*E.aspectRatio}N.position.left=E.helper?J.left:B.left}if(I.top<(E.helper?J.top:0)){N.size.height=N.size.height+(E.helper?(N.position.top-J.top):N.position.top);if(L){N.size.width=N.size.height/E.aspectRatio}N.position.top=E.helper?J.top:0}var F=(E.helper?N.offset.left-J.left:(N.position.left-B.left))+N.sizeDiff.width,M=(E.helper?N.offset.top-J.top:N.position.top)+N.sizeDiff.height;if(F+N.size.width>=N.parentData.width){N.size.width=N.parentData.width-F;if(L){N.size.height=N.size.width*E.aspectRatio}}if(M+N.size.height>=N.parentData.height){N.size.height=N.parentData.height-M;if(L){N.size.width=N.size.height/E.aspectRatio}}},stop:function(G,J){var C=J.options,L=A(this).data("resizable"),H=L.position,I=L.containerOffset,B=L.containerPosition,D=L.containerElement;var E=A(L.helper),M=E.offset(),K=E.innerWidth(),F=E.innerHeight();if(C.helper&&!C.animate&&/relative/.test(D.css("position"))){A(this).css({left:(M.left-I.left),top:(M.top-I.top),width:K,height:F})}if(C.helper&&!C.animate&&/static/.test(D.css("position"))){A(this).css({left:B.left+(M.left-I.left),top:B.top+(M.top-I.top),width:K,height:F})}}});A.ui.plugin.add("resizable","grid",{resize:function(H,J){var D=J.options,L=A(this).data("resizable"),G=L.size,E=L.originalSize,F=L.originalPosition,K=L.axis,I=D._aspectRatio||H.shiftKey;D.grid=typeof D.grid=="number"?[D.grid,D.grid]:D.grid;var C=Math.round((G.width-E.width)/(D.grid[0]||1))*(D.grid[0]||1),B=Math.round((G.height-E.height)/(D.grid[1]||1))*(D.grid[1]||1);if(/^(se|s|e)$/.test(K)){L.size.width=E.width+C;L.size.height=E.height+B}else{if(/^(ne)$/.test(K)){L.size.width=E.width+C;L.size.height=E.height+B;L.position.top=F.top-B}else{if(/^(sw)$/.test(K)){L.size.width=E.width+C;L.size.height=E.height+B;L.position.left=F.left-C}else{L.size.width=E.width+C;L.size.height=E.height+B;L.position.top=F.top-B;L.position.left=F.left-C}}}}});A.ui.plugin.add("resizable","animate",{stop:function(I,K){var F=K.options,L=A(this).data("resizable");var E=F.proportionallyResize,B=E&&(/textarea/i).test(E.get(0).nodeName),C=B&&A.ui.hasScroll(E.get(0),"left")?0:L.sizeDiff.height,H=B?0:L.sizeDiff.width;var D={width:(L.size.width-H),height:(L.size.height-C)},G=(parseInt(L.element.css("left"),10)+(L.position.left-L.originalPosition.left))||null,J=(parseInt(L.element.css("top"),10)+(L.position.top-L.originalPosition.top))||null;L.element.animate(A.extend(D,J&&G?{top:J,left:G}:{}),{duration:F.animateDuration||"slow",easing:F.animateEasing||"swing",step:function(){var M={width:parseInt(L.element.css("width"),10),height:parseInt(L.element.css("height"),10),top:parseInt(L.element.css("top"),10),left:parseInt(L.element.css("left"),10)};if(E){E.css({width:M.width,height:M.height})}L._updateCache(M);L.propagate("animate",I)}})}});A.ui.plugin.add("resizable","ghost",{start:function(E,D){var F=D.options,B=A(this).data("resizable"),G=F.proportionallyResize,C=B.size;if(!G){B.ghost=B.element.clone()}else{B.ghost=G.clone()}B.ghost.css({opacity:0.25,display:"block",position:"relative",height:C.height,width:C.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof F.ghost=="string"?F.ghost:"");B.ghost.appendTo(B.helper)},resize:function(D,C){var E=C.options,B=A(this).data("resizable"),F=E.proportionallyResize;if(B.ghost){B.ghost.css({position:"relative",height:B.size.height,width:B.size.width})}},stop:function(D,C){var E=C.options,B=A(this).data("resizable"),F=E.proportionallyResize;if(B.ghost&&B.helper){B.helper.get(0).removeChild(B.ghost.get(0))}}});A.ui.plugin.add("resizable","alsoResize",{start:function(E,C){var F=C.options,B=A(this).data("resizable"),D=function(G){A(G).each(function(){A(this).data("resizable-alsoresize",{width:parseInt(A(this).width(),10),height:parseInt(A(this).height(),10),left:parseInt(A(this).css("left"),10),top:parseInt(A(this).css("top"),10)})})};if(typeof (F.alsoResize)=="object"){if(F.alsoResize.length){F.alsoResize=F.alsoResize[0];D(F.alsoResize)}else{A.each(F.alsoResize,function(G,H){D(G)})}}else{D(F.alsoResize)}},resize:function(F,E){var G=E.options,C=A(this).data("resizable"),D=C.originalSize,I=C.originalPosition;var H={height:(C.size.height-D.height)||0,width:(C.size.width-D.width)||0,top:(C.position.top-I.top)||0,left:(C.position.left-I.left)||0},B=function(J,K){A(J).each(function(){var N=A(this).data("resizable-alsoresize"),M={},L=K&&K.length?K:["width","height","top","left"];A.each(L||["width","height","top","left"],function(O,Q){var P=(N[Q]||0)+(H[Q]||0);if(P&&P>=0){M[Q]=P||null}});A(this).css(M)})};if(typeof (G.alsoResize)=="object"){A.each(G.alsoResize,function(J,K){B(J,K)})}else{B(G.alsoResize)}},stop:function(C,B){A(this).removeData("resizable-alsoresize-start")}})})(jQuery) \ No newline at end of file
+(function($){$.widget("ui.resizable",$.extend({},$.ui.mouse,{_init:function(){var self=this,o=this.options;this.element.addClass("ui-resizable");$.extend(this,{_aspectRatio:!!(o.aspectRatio),aspectRatio:o.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:o.helper||o.ghost||o.animate?o.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){if(/relative/.test(this.element.css("position"))&&$.browser.opera){this.element.css({position:"relative",top:"auto",left:"auto"})}this.element.wrap($('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=o.handles||(!$(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var n=this.handles.split(",");this.handles={};for(var i=0;i<n.length;i++){var handle=$.trim(n[i]),hname="ui-resizable-"+handle;var axis=$('<div class="ui-resizable-handle '+hname+'"></div>');if(/sw|se|ne|nw/.test(handle)){axis.css({zIndex:++o.zIndex})}if("se"==handle){axis.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[handle]=".ui-resizable-"+handle;this.element.append(axis)}}this._renderAxis=function(target){target=target||this.element;for(var i in this.handles){if(this.handles[i].constructor==String){this.handles[i]=$(this.handles[i],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var axis=$(this.handles[i],this.element),padWrapper=0;padWrapper=/sw|ne|nw|se|n|s/.test(i)?axis.outerHeight():axis.outerWidth();var padPos=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join("");target.css(padPos,padWrapper);this._proportionallyResize()}if(!$(this.handles[i]).length){continue}}};this._renderAxis(this.element);this._handles=$(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!self.resizing){if(this.className){var axis=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}self.axis=axis&&axis[1]?axis[1]:"se"}});if(o.autoHide){this._handles.hide();$(this.element).addClass("ui-resizable-autohide").hover(function(){$(this).removeClass("ui-resizable-autohide");self._handles.show()},function(){if(!self.resizing){$(this).addClass("ui-resizable-autohide");self._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var _destroy=function(exp){$(exp).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){_destroy(this.element);var wrapper=this.element;wrapper.parent().append(this.originalElement.css({position:wrapper.css("position"),width:wrapper.outerWidth(),height:wrapper.outerHeight(),top:wrapper.css("top"),left:wrapper.css("left")})).end().remove()}this.originalElement.css("resize",this.originalResizeStyle);_destroy(this.originalElement)},_mouseCapture:function(event){var handle=false;for(var i in this.handles){if($(this.handles[i])[0]==event.target){handle=true}}return this.options.disabled||!!handle},_mouseStart:function(event){var o=this.options,iniPos=this.element.position(),el=this.element;this.resizing=true;this.documentScroll={top:$(document).scrollTop(),left:$(document).scrollLeft()};if(el.is(".ui-draggable")||(/absolute/).test(el.css("position"))){el.css({position:"absolute",top:iniPos.top,left:iniPos.left})}if($.browser.opera&&(/relative/).test(el.css("position"))){el.css({position:"relative",top:"auto",left:"auto"})}this._renderProxy();var curleft=num(this.helper.css("left")),curtop=num(this.helper.css("top"));if(o.containment){curleft+=$(o.containment).scrollLeft()||0;curtop+=$(o.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:curleft,top:curtop};this.size=this._helper?{width:el.outerWidth(),height:el.outerHeight()}:{width:el.width(),height:el.height()};this.originalSize=this._helper?{width:el.outerWidth(),height:el.outerHeight()}:{width:el.width(),height:el.height()};this.originalPosition={left:curleft,top:curtop};this.sizeDiff={width:el.outerWidth()-el.width(),height:el.outerHeight()-el.height()};this.originalMousePosition={left:event.pageX,top:event.pageY};this.aspectRatio=(typeof o.aspectRatio=="number")?o.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var cursor=$(".ui-resizable-"+this.axis).css("cursor");$("body").css("cursor",cursor=="auto"?this.axis+"-resize":cursor);el.addClass("ui-resizable-resizing");this._propagate("start",event);return true},_mouseDrag:function(event){var el=this.helper,o=this.options,props={},self=this,smp=this.originalMousePosition,a=this.axis;var dx=(event.pageX-smp.left)||0,dy=(event.pageY-smp.top)||0;var trigger=this._change[a];if(!trigger){return false}var data=trigger.apply(this,[event,dx,dy]),ie6=$.browser.msie&&$.browser.version<7,csdif=this.sizeDiff;if(this._aspectRatio||event.shiftKey){data=this._updateRatio(data,event)}data=this._respectSize(data,event);this._propagate("resize",event);el.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(data);this._trigger("resize",event,this.ui());return false},_mouseStop:function(event){this.resizing=false;var o=this.options,self=this;if(this._helper){var pr=this._proportionallyResizeElements,ista=pr.length&&(/textarea/i).test(pr[0].nodeName),soffseth=ista&&$.ui.hasScroll(pr[0],"left")?0:self.sizeDiff.height,soffsetw=ista?0:self.sizeDiff.width;var s={width:(self.size.width-soffsetw),height:(self.size.height-soffseth)},left=(parseInt(self.element.css("left"),10)+(self.position.left-self.originalPosition.left))||null,top=(parseInt(self.element.css("top"),10)+(self.position.top-self.originalPosition.top))||null;if(!o.animate){this.element.css($.extend(s,{top:top,left:left}))}self.helper.height(self.size.height);self.helper.width(self.size.width);if(this._helper&&!o.animate){this._proportionallyResize()}}$("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",event);if(this._helper){this.helper.remove()}return false},_updateCache:function(data){var o=this.options;this.offset=this.helper.offset();if(isNumber(data.left)){this.position.left=data.left}if(isNumber(data.top)){this.position.top=data.top}if(isNumber(data.height)){this.size.height=data.height}if(isNumber(data.width)){this.size.width=data.width}},_updateRatio:function(data,event){var o=this.options,cpos=this.position,csize=this.size,a=this.axis;if(data.height){data.width=(csize.height*this.aspectRatio)}else{if(data.width){data.height=(csize.width/this.aspectRatio)}}if(a=="sw"){data.left=cpos.left+(csize.width-data.width);data.top=null}if(a=="nw"){data.top=cpos.top+(csize.height-data.height);data.left=cpos.left+(csize.width-data.width)}return data},_respectSize:function(data,event){var el=this.helper,o=this.options,pRatio=this._aspectRatio||event.shiftKey,a=this.axis,ismaxw=isNumber(data.width)&&o.maxWidth&&(o.maxWidth<data.width),ismaxh=isNumber(data.height)&&o.maxHeight&&(o.maxHeight<data.height),isminw=isNumber(data.width)&&o.minWidth&&(o.minWidth>data.width),isminh=isNumber(data.height)&&o.minHeight&&(o.minHeight>data.height);if(isminw){data.width=o.minWidth}if(isminh){data.height=o.minHeight}if(ismaxw){data.width=o.maxWidth}if(ismaxh){data.height=o.maxHeight}var dw=this.originalPosition.left+this.originalSize.width,dh=this.position.top+this.size.height;var cw=/sw|nw|w/.test(a),ch=/nw|ne|n/.test(a);if(isminw&&cw){data.left=dw-o.minWidth}if(ismaxw&&cw){data.left=dw-o.maxWidth}if(isminh&&ch){data.top=dh-o.minHeight}if(ismaxh&&ch){data.top=dh-o.maxHeight}var isNotwh=!data.width&&!data.height;if(isNotwh&&!data.left&&data.top){data.top=null}else{if(isNotwh&&!data.top&&data.left){data.left=null}}return data},_proportionallyResize:function(){var o=this.options;if(!this._proportionallyResizeElements.length){return }var element=this.helper||this.element;for(var i=0;i<this._proportionallyResizeElements.length;i++){var prel=this._proportionallyResizeElements[i];if(!this.borderDif){var b=[prel.css("borderTopWidth"),prel.css("borderRightWidth"),prel.css("borderBottomWidth"),prel.css("borderLeftWidth")],p=[prel.css("paddingTop"),prel.css("paddingRight"),prel.css("paddingBottom"),prel.css("paddingLeft")];this.borderDif=$.map(b,function(v,i){var border=parseInt(v,10)||0,padding=parseInt(p[i],10)||0;return border+padding})}if($.browser.msie&&!(!($(element).is(":hidden")||$(element).parents(":hidden").length))){continue}prel.css({height:(element.height()-this.borderDif[0]-this.borderDif[2])||0,width:(element.width()-this.borderDif[1]-this.borderDif[3])||0})}},_renderProxy:function(){var el=this.element,o=this.options;this.elementOffset=el.offset();if(this._helper){this.helper=this.helper||$('<div style="overflow:hidden;"></div>');var ie6=$.browser.msie&&$.browser.version<7,ie6offset=(ie6?1:0),pxyoffset=(ie6?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+pxyoffset,height:this.element.outerHeight()+pxyoffset,position:"absolute",left:this.elementOffset.left-ie6offset+"px",top:this.elementOffset.top-ie6offset+"px",zIndex:++o.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(event,dx,dy){return{width:this.originalSize.width+dx}},w:function(event,dx,dy){var o=this.options,cs=this.originalSize,sp=this.originalPosition;return{left:sp.left+dx,width:cs.width-dx}},n:function(event,dx,dy){var o=this.options,cs=this.originalSize,sp=this.originalPosition;return{top:sp.top+dy,height:cs.height-dy}},s:function(event,dx,dy){return{height:this.originalSize.height+dy}},se:function(event,dx,dy){return $.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[event,dx,dy]))},sw:function(event,dx,dy){return $.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[event,dx,dy]))},ne:function(event,dx,dy){return $.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[event,dx,dy]))},nw:function(event,dx,dy){return $.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[event,dx,dy]))}},_propagate:function(n,event){$.ui.plugin.call(this,n,[event,this.ui()]);(n!="resize"&&this._trigger(n,event,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}));$.extend($.ui.resizable,{version:"1.7.2",eventPrefix:"resize",defaults:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,cancel:":input,option",containment:false,delay:0,distance:1,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000}});$.ui.plugin.add("resizable","alsoResize",{start:function(event,ui){var self=$(this).data("resizable"),o=self.options;_store=function(exp){$(exp).each(function(){$(this).data("resizable-alsoresize",{width:parseInt($(this).width(),10),height:parseInt($(this).height(),10),left:parseInt($(this).css("left"),10),top:parseInt($(this).css("top"),10)})})};if(typeof (o.alsoResize)=="object"&&!o.alsoResize.parentNode){if(o.alsoResize.length){o.alsoResize=o.alsoResize[0];_store(o.alsoResize)}else{$.each(o.alsoResize,function(exp,c){_store(exp)})}}else{_store(o.alsoResize)}},resize:function(event,ui){var self=$(this).data("resizable"),o=self.options,os=self.originalSize,op=self.originalPosition;var delta={height:(self.size.height-os.height)||0,width:(self.size.width-os.width)||0,top:(self.position.top-op.top)||0,left:(self.position.left-op.left)||0},_alsoResize=function(exp,c){$(exp).each(function(){var el=$(this),start=$(this).data("resizable-alsoresize"),style={},css=c&&c.length?c:["width","height","top","left"];$.each(css||["width","height","top","left"],function(i,prop){var sum=(start[prop]||0)+(delta[prop]||0);if(sum&&sum>=0){style[prop]=sum||null}});if(/relative/.test(el.css("position"))&&$.browser.opera){self._revertToRelativePosition=true;el.css({position:"absolute",top:"auto",left:"auto"})}el.css(style)})};if(typeof (o.alsoResize)=="object"&&!o.alsoResize.nodeType){$.each(o.alsoResize,function(exp,c){_alsoResize(exp,c)})}else{_alsoResize(o.alsoResize)}},stop:function(event,ui){var self=$(this).data("resizable");if(self._revertToRelativePosition&&$.browser.opera){self._revertToRelativePosition=false;el.css({position:"relative"})}$(this).removeData("resizable-alsoresize-start")}});$.ui.plugin.add("resizable","animate",{stop:function(event,ui){var self=$(this).data("resizable"),o=self.options;var pr=self._proportionallyResizeElements,ista=pr.length&&(/textarea/i).test(pr[0].nodeName),soffseth=ista&&$.ui.hasScroll(pr[0],"left")?0:self.sizeDiff.height,soffsetw=ista?0:self.sizeDiff.width;var style={width:(self.size.width-soffsetw),height:(self.size.height-soffseth)},left=(parseInt(self.element.css("left"),10)+(self.position.left-self.originalPosition.left))||null,top=(parseInt(self.element.css("top"),10)+(self.position.top-self.originalPosition.top))||null;self.element.animate($.extend(style,top&&left?{top:top,left:left}:{}),{duration:o.animateDuration,easing:o.animateEasing,step:function(){var data={width:parseInt(self.element.css("width"),10),height:parseInt(self.element.css("height"),10),top:parseInt(self.element.css("top"),10),left:parseInt(self.element.css("left"),10)};if(pr&&pr.length){$(pr[0]).css({width:data.width,height:data.height})}self._updateCache(data);self._propagate("resize",event)}})}});$.ui.plugin.add("resizable","containment",{start:function(event,ui){var self=$(this).data("resizable"),o=self.options,el=self.element;var oc=o.containment,ce=(oc instanceof $)?oc.get(0):(/parent/.test(oc))?el.parent().get(0):oc;if(!ce){return }self.containerElement=$(ce);if(/document/.test(oc)||oc==document){self.containerOffset={left:0,top:0};self.containerPosition={left:0,top:0};self.parentData={element:$(document),left:0,top:0,width:$(document).width(),height:$(document).height()||document.body.parentNode.scrollHeight}}else{var element=$(ce),p=[];$(["Top","Right","Left","Bottom"]).each(function(i,name){p[i]=num(element.css("padding"+name))});self.containerOffset=element.offset();self.containerPosition=element.position();self.containerSize={height:(element.innerHeight()-p[3]),width:(element.innerWidth()-p[1])};var co=self.containerOffset,ch=self.containerSize.height,cw=self.containerSize.width,width=($.ui.hasScroll(ce,"left")?ce.scrollWidth:cw),height=($.ui.hasScroll(ce)?ce.scrollHeight:ch);self.parentData={element:ce,left:co.left,top:co.top,width:width,height:height}}},resize:function(event,ui){var self=$(this).data("resizable"),o=self.options,ps=self.containerSize,co=self.containerOffset,cs=self.size,cp=self.position,pRatio=self._aspectRatio||event.shiftKey,cop={top:0,left:0},ce=self.containerElement;if(ce[0]!=document&&(/static/).test(ce.css("position"))){cop=co}if(cp.left<(self._helper?co.left:0)){self.size.width=self.size.width+(self._helper?(self.position.left-co.left):(self.position.left-cop.left));if(pRatio){self.size.height=self.size.width/o.aspectRatio}self.position.left=o.helper?co.left:0}if(cp.top<(self._helper?co.top:0)){self.size.height=self.size.height+(self._helper?(self.position.top-co.top):self.position.top);if(pRatio){self.size.width=self.size.height*o.aspectRatio}self.position.top=self._helper?co.top:0}self.offset.left=self.parentData.left+self.position.left;self.offset.top=self.parentData.top+self.position.top;var woset=Math.abs((self._helper?self.offset.left-cop.left:(self.offset.left-cop.left))+self.sizeDiff.width),hoset=Math.abs((self._helper?self.offset.top-cop.top:(self.offset.top-co.top))+self.sizeDiff.height);var isParent=self.containerElement.get(0)==self.element.parent().get(0),isOffsetRelative=/relative|absolute/.test(self.containerElement.css("position"));if(isParent&&isOffsetRelative){woset-=self.parentData.left}if(woset+self.size.width>=self.parentData.width){self.size.width=self.parentData.width-woset;if(pRatio){self.size.height=self.size.width/self.aspectRatio}}if(hoset+self.size.height>=self.parentData.height){self.size.height=self.parentData.height-hoset;if(pRatio){self.size.width=self.size.height*self.aspectRatio}}},stop:function(event,ui){var self=$(this).data("resizable"),o=self.options,cp=self.position,co=self.containerOffset,cop=self.containerPosition,ce=self.containerElement;var helper=$(self.helper),ho=helper.offset(),w=helper.outerWidth()-self.sizeDiff.width,h=helper.outerHeight()-self.sizeDiff.height;if(self._helper&&!o.animate&&(/relative/).test(ce.css("position"))){$(this).css({left:ho.left-cop.left-co.left,width:w,height:h})}if(self._helper&&!o.animate&&(/static/).test(ce.css("position"))){$(this).css({left:ho.left-cop.left-co.left,width:w,height:h})}}});$.ui.plugin.add("resizable","ghost",{start:function(event,ui){var self=$(this).data("resizable"),o=self.options,cs=self.size;self.ghost=self.originalElement.clone();self.ghost.css({opacity:0.25,display:"block",position:"relative",height:cs.height,width:cs.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof o.ghost=="string"?o.ghost:"");self.ghost.appendTo(self.helper)},resize:function(event,ui){var self=$(this).data("resizable"),o=self.options;if(self.ghost){self.ghost.css({position:"relative",height:self.size.height,width:self.size.width})}},stop:function(event,ui){var self=$(this).data("resizable"),o=self.options;if(self.ghost&&self.helper){self.helper.get(0).removeChild(self.ghost.get(0))}}});$.ui.plugin.add("resizable","grid",{resize:function(event,ui){var self=$(this).data("resizable"),o=self.options,cs=self.size,os=self.originalSize,op=self.originalPosition,a=self.axis,ratio=o._aspectRatio||event.shiftKey;o.grid=typeof o.grid=="number"?[o.grid,o.grid]:o.grid;var ox=Math.round((cs.width-os.width)/(o.grid[0]||1))*(o.grid[0]||1),oy=Math.round((cs.height-os.height)/(o.grid[1]||1))*(o.grid[1]||1);if(/^(se|s|e)$/.test(a)){self.size.width=os.width+ox;self.size.height=os.height+oy}else{if(/^(ne)$/.test(a)){self.size.width=os.width+ox;self.size.height=os.height+oy;self.position.top=op.top-oy}else{if(/^(sw)$/.test(a)){self.size.width=os.width+ox;self.size.height=os.height+oy;self.position.left=op.left-ox}else{self.size.width=os.width+ox;self.size.height=os.height+oy;self.position.top=op.top-oy;self.position.left=op.left-ox}}}}});var num=function(v){return parseInt(v,10)||0};var isNumber=function(value){return !isNaN(parseInt(value,10))}})(jQuery); \ No newline at end of file
diff --git a/template-common/lib/ui/minified/ui.selectable.min.js b/template-common/lib/ui/minified/ui.selectable.min.js
index 0ca350950..b63f55a44 100644
--- a/template-common/lib/ui/minified/ui.selectable.min.js
+++ b/template-common/lib/ui/minified/ui.selectable.min.js
@@ -1 +1 @@
-(function(A){A.widget("ui.selectable",A.extend({},A.ui.mouse,{init:function(){var B=this;this.element.addClass("ui-selectable");this.dragged=false;var C;this.refresh=function(){C=A(B.options.filter,B.element[0]);C.each(function(){var D=A(this);var E=D.offset();A.data(this,"selectable-item",{element:this,$element:D,left:E.left,top:E.top,right:E.left+D.width(),bottom:E.top+D.height(),startselected:false,selected:D.hasClass("ui-selected"),selecting:D.hasClass("ui-selecting"),unselecting:D.hasClass("ui-unselecting")})})};this.refresh();this.selectees=C.addClass("ui-selectee");this.mouseInit();this.helper=A(document.createElement("div")).css({border:"1px dotted black"})},toggle:function(){if(this.options.disabled){this.enable()}else{this.disable()}},destroy:function(){this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this.mouseDestroy()},mouseStart:function(E){var C=this;this.opos=[E.pageX,E.pageY];if(this.options.disabled){return }var D=this.options;this.selectees=A(D.filter,this.element[0]);this.element.triggerHandler("selectablestart",[E,{"selectable":this.element[0],"options":D}],D.start);A("body").append(this.helper);this.helper.css({"z-index":100,"position":"absolute","left":E.clientX,"top":E.clientY,"width":0,"height":0});if(D.autoRefresh){this.refresh()}this.selectees.filter(".ui-selected").each(function(){var F=A.data(this,"selectable-item");F.startselected=true;if(!E.ctrlKey){F.$element.removeClass("ui-selected");F.selected=false;F.$element.addClass("ui-unselecting");F.unselecting=true;C.element.triggerHandler("selectableunselecting",[E,{selectable:C.element[0],unselecting:F.element,options:D}],D.unselecting)}});var B=false;A(E.target).parents().andSelf().each(function(){if(A.data(this,"selectable-item")){B=true}});return this.options.keyboard?!B:true},mouseDrag:function(I){var C=this;this.dragged=true;if(this.options.disabled){return }var E=this.options;var D=this.opos[0],H=this.opos[1],B=I.pageX,G=I.pageY;if(D>B){var F=B;B=D;D=F}if(H>G){var F=G;G=H;H=F}this.helper.css({left:D,top:H,width:B-D,height:G-H});this.selectees.each(function(){var J=A.data(this,"selectable-item");if(!J||J.element==C.element[0]){return }var K=false;if(E.tolerance=="touch"){K=(!(J.left>B||J.right<D||J.top>G||J.bottom<H))}else{if(E.tolerance=="fit"){K=(J.left>D&&J.right<B&&J.top>H&&J.bottom<G)}}if(K){if(J.selected){J.$element.removeClass("ui-selected");J.selected=false}if(J.unselecting){J.$element.removeClass("ui-unselecting");J.unselecting=false}if(!J.selecting){J.$element.addClass("ui-selecting");J.selecting=true;C.element.triggerHandler("selectableselecting",[I,{selectable:C.element[0],selecting:J.element,options:E}],E.selecting)}}else{if(J.selecting){if(I.ctrlKey&&J.startselected){J.$element.removeClass("ui-selecting");J.selecting=false;J.$element.addClass("ui-selected");J.selected=true}else{J.$element.removeClass("ui-selecting");J.selecting=false;if(J.startselected){J.$element.addClass("ui-unselecting");J.unselecting=true}C.element.triggerHandler("selectableunselecting",[I,{selectable:C.element[0],unselecting:J.element,options:E}],E.unselecting)}}if(J.selected){if(!I.ctrlKey&&!J.startselected){J.$element.removeClass("ui-selected");J.selected=false;J.$element.addClass("ui-unselecting");J.unselecting=true;C.element.triggerHandler("selectableunselecting",[I,{selectable:C.element[0],unselecting:J.element,options:E}],E.unselecting)}}}});return false},mouseStop:function(D){var B=this;this.dragged=false;var C=this.options;A(".ui-unselecting",this.element[0]).each(function(){var E=A.data(this,"selectable-item");E.$element.removeClass("ui-unselecting");E.unselecting=false;E.startselected=false;B.element.triggerHandler("selectableunselected",[D,{selectable:B.element[0],unselected:E.element,options:C}],C.unselected)});A(".ui-selecting",this.element[0]).each(function(){var E=A.data(this,"selectable-item");E.$element.removeClass("ui-selecting").addClass("ui-selected");E.selecting=false;E.selected=true;E.startselected=true;B.element.triggerHandler("selectableselected",[D,{selectable:B.element[0],selected:E.element,options:C}],C.selected)});this.element.triggerHandler("selectablestop",[D,{selectable:B.element[0],options:this.options}],this.options.stop);this.helper.remove();return false}}));A.extend(A.ui.selectable,{defaults:{distance:1,delay:0,cancel:":input",appendTo:"body",autoRefresh:true,filter:"*",tolerance:"touch"}})})(jQuery) \ No newline at end of file
+(function($){$.widget("ui.selectable",$.extend({},$.ui.mouse,{_init:function(){var self=this;this.element.addClass("ui-selectable");this.dragged=false;var selectees;this.refresh=function(){selectees=$(self.options.filter,self.element[0]);selectees.each(function(){var $this=$(this);var pos=$this.offset();$.data(this,"selectable-item",{element:this,$element:$this,left:pos.left,top:pos.top,right:pos.left+$this.outerWidth(),bottom:pos.top+$this.outerHeight(),startselected:false,selected:$this.hasClass("ui-selected"),selecting:$this.hasClass("ui-selecting"),unselecting:$this.hasClass("ui-unselecting")})})};this.refresh();this.selectees=selectees.addClass("ui-selectee");this._mouseInit();this.helper=$(document.createElement("div")).css({border:"1px dotted black"}).addClass("ui-selectable-helper")},destroy:function(){this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy()},_mouseStart:function(event){var self=this;this.opos=[event.pageX,event.pageY];if(this.options.disabled){return }var options=this.options;this.selectees=$(options.filter,this.element[0]);this._trigger("start",event);$(options.appendTo).append(this.helper);this.helper.css({"z-index":100,position:"absolute",left:event.clientX,top:event.clientY,width:0,height:0});if(options.autoRefresh){this.refresh()}this.selectees.filter(".ui-selected").each(function(){var selectee=$.data(this,"selectable-item");selectee.startselected=true;if(!event.metaKey){selectee.$element.removeClass("ui-selected");selectee.selected=false;selectee.$element.addClass("ui-unselecting");selectee.unselecting=true;self._trigger("unselecting",event,{unselecting:selectee.element})}});$(event.target).parents().andSelf().each(function(){var selectee=$.data(this,"selectable-item");if(selectee){selectee.$element.removeClass("ui-unselecting").addClass("ui-selecting");selectee.unselecting=false;selectee.selecting=true;selectee.selected=true;self._trigger("selecting",event,{selecting:selectee.element});return false}})},_mouseDrag:function(event){var self=this;this.dragged=true;if(this.options.disabled){return }var options=this.options;var x1=this.opos[0],y1=this.opos[1],x2=event.pageX,y2=event.pageY;if(x1>x2){var tmp=x2;x2=x1;x1=tmp}if(y1>y2){var tmp=y2;y2=y1;y1=tmp}this.helper.css({left:x1,top:y1,width:x2-x1,height:y2-y1});this.selectees.each(function(){var selectee=$.data(this,"selectable-item");if(!selectee||selectee.element==self.element[0]){return }var hit=false;if(options.tolerance=="touch"){hit=(!(selectee.left>x2||selectee.right<x1||selectee.top>y2||selectee.bottom<y1))}else{if(options.tolerance=="fit"){hit=(selectee.left>x1&&selectee.right<x2&&selectee.top>y1&&selectee.bottom<y2)}}if(hit){if(selectee.selected){selectee.$element.removeClass("ui-selected");selectee.selected=false}if(selectee.unselecting){selectee.$element.removeClass("ui-unselecting");selectee.unselecting=false}if(!selectee.selecting){selectee.$element.addClass("ui-selecting");selectee.selecting=true;self._trigger("selecting",event,{selecting:selectee.element})}}else{if(selectee.selecting){if(event.metaKey&&selectee.startselected){selectee.$element.removeClass("ui-selecting");selectee.selecting=false;selectee.$element.addClass("ui-selected");selectee.selected=true}else{selectee.$element.removeClass("ui-selecting");selectee.selecting=false;if(selectee.startselected){selectee.$element.addClass("ui-unselecting");selectee.unselecting=true}self._trigger("unselecting",event,{unselecting:selectee.element})}}if(selectee.selected){if(!event.metaKey&&!selectee.startselected){selectee.$element.removeClass("ui-selected");selectee.selected=false;selectee.$element.addClass("ui-unselecting");selectee.unselecting=true;self._trigger("unselecting",event,{unselecting:selectee.element})}}}});return false},_mouseStop:function(event){var self=this;this.dragged=false;var options=this.options;$(".ui-unselecting",this.element[0]).each(function(){var selectee=$.data(this,"selectable-item");selectee.$element.removeClass("ui-unselecting");selectee.unselecting=false;selectee.startselected=false;self._trigger("unselected",event,{unselected:selectee.element})});$(".ui-selecting",this.element[0]).each(function(){var selectee=$.data(this,"selectable-item");selectee.$element.removeClass("ui-selecting").addClass("ui-selected");selectee.selecting=false;selectee.selected=true;selectee.startselected=true;self._trigger("selected",event,{selected:selectee.element})});this._trigger("stop",event);this.helper.remove();return false}}));$.extend($.ui.selectable,{version:"1.7.2",defaults:{appendTo:"body",autoRefresh:true,cancel:":input,option",delay:0,distance:0,filter:"*",tolerance:"touch"}})})(jQuery); \ No newline at end of file
diff --git a/template-common/lib/ui/minified/ui.slider.min.js b/template-common/lib/ui/minified/ui.slider.min.js
index ee9e202d9..209d8338f 100644
--- a/template-common/lib/ui/minified/ui.slider.min.js
+++ b/template-common/lib/ui/minified/ui.slider.min.js
@@ -1 +1 @@
-(function(A){A.fn.unwrap=A.fn.unwrap||function(B){return this.each(function(){A(this).parents(B).eq(0).after(this).remove()})};A.widget("ui.slider",{plugins:{},ui:function(B){return{options:this.options,handle:this.currentHandle,value:this.options.axis!="both"||!this.options.axis?Math.round(this.value(null,this.options.axis=="vertical"?"y":"x")):{x:Math.round(this.value(null,"x")),y:Math.round(this.value(null,"y"))},range:this.getRange()}},propagate:function(C,B){A.ui.plugin.call(this,C,[B,this.ui()]);this.element.triggerHandler(C=="slide"?C:"slide"+C,[B,this.ui()],this.options[C])},destroy:function(){this.element.removeClass("ui-slider ui-slider-disabled").removeData("slider").unbind(".slider");if(this.handle&&this.handle.length){this.handle.unwrap("a");this.handle.each(function(){A(this).data("mouse").mouseDestroy()})}this.generated&&this.generated.remove()},setData:function(B,C){A.widget.prototype.setData.apply(this,arguments);if(/min|max|steps/.test(B)){this.initBoundaries()}if(B=="range"){C?this.handle.length==2&&this.createRange():this.removeRange()}},init:function(){var B=this;this.element.addClass("ui-slider");this.initBoundaries();this.handle=A(this.options.handle,this.element);if(!this.handle.length){B.handle=B.generated=A(B.options.handles||[0]).map(function(){var D=A("<div/>").addClass("ui-slider-handle").appendTo(B.element);if(this.id){D.attr("id",this.id)}return D[0]})}var C=function(D){this.element=A(D);this.element.data("mouse",this);this.options=B.options;this.element.bind("mousedown",function(){if(B.currentHandle){this.blur(B.currentHandle)}B.focus(this,1)});this.mouseInit()};A.extend(C.prototype,A.ui.mouse,{mouseStart:function(D){return B.start.call(B,D,this.element[0])},mouseStop:function(D){return B.stop.call(B,D,this.element[0])},mouseDrag:function(D){return B.drag.call(B,D,this.element[0])},mouseCapture:function(){return true},trigger:function(D){this.mouseDown(D)}});A(this.handle).each(function(){new C(this)}).wrap('<a href="javascript:void(0)" style="outline:none;border:none;"></a>').parent().bind("focus",function(D){B.focus(this.firstChild)}).bind("blur",function(D){B.blur(this.firstChild)}).bind("keydown",function(D){if(!B.options.noKeyboard){B.keydown(D.keyCode,this.firstChild)}});this.element.bind("mousedown.slider",function(D){B.click.apply(B,[D]);B.currentHandle.data("mouse").trigger(D);B.firstValue=B.firstValue+1});A.each(this.options.handles||[],function(D,E){B.moveTo(E.start,D,true)});if(!isNaN(this.options.startValue)){this.moveTo(this.options.startValue,0,true)}this.previousHandle=A(this.handle[0]);if(this.handle.length==2&&this.options.range){this.createRange()}},initBoundaries:function(){var B=this.element[0],C=this.options;this.actualSize={width:this.element.outerWidth(),height:this.element.outerHeight()};A.extend(C,{axis:C.axis||(B.offsetWidth<B.offsetHeight?"vertical":"horizontal"),max:!isNaN(parseInt(C.max,10))?{x:parseInt(C.max,10),y:parseInt(C.max,10)}:({x:C.max&&C.max.x||100,y:C.max&&C.max.y||100}),min:!isNaN(parseInt(C.min,10))?{x:parseInt(C.min,10),y:parseInt(C.min,10)}:({x:C.min&&C.min.x||0,y:C.min&&C.min.y||0})});C.realMax={x:C.max.x-C.min.x,y:C.max.y-C.min.y};C.stepping={x:C.stepping&&C.stepping.x||parseInt(C.stepping,10)||(C.steps?C.realMax.x/(C.steps.x||parseInt(C.steps,10)||C.realMax.x):0),y:C.stepping&&C.stepping.y||parseInt(C.stepping,10)||(C.steps?C.realMax.y/(C.steps.y||parseInt(C.steps,10)||C.realMax.y):0)}},keydown:function(C,B){if(/(37|38|39|40)/.test(C)){this.moveTo({x:/(37|39)/.test(C)?(C==37?"-":"+")+"="+this.oneStep("x"):0,y:/(38|40)/.test(C)?(C==38?"-":"+")+"="+this.oneStep("y"):0},B)}},focus:function(B,C){this.currentHandle=A(B).addClass("ui-slider-handle-active");if(C){this.currentHandle.parent()[0].focus()}},blur:function(B){A(B).removeClass("ui-slider-handle-active");if(this.currentHandle&&this.currentHandle[0]==B){this.previousHandle=this.currentHandle;this.currentHandle=null}},click:function(C){var D=[C.pageX,C.pageY];var B=false;this.handle.each(function(){if(this==C.target){B=true}});if(B||this.options.disabled||!(this.currentHandle||this.previousHandle)){return }if(!this.currentHandle&&this.previousHandle){this.focus(this.previousHandle,true)}this.offset=this.element.offset();this.moveTo({y:this.convertValue(C.pageY-this.offset.top-this.currentHandle[0].offsetHeight/2,"y"),x:this.convertValue(C.pageX-this.offset.left-this.currentHandle[0].offsetWidth/2,"x")},null,!this.options.distance)},createRange:function(){if(this.rangeElement){return }this.rangeElement=A("<div></div>").addClass("ui-slider-range").css({position:"absolute"}).appendTo(this.element);this.updateRange()},removeRange:function(){this.rangeElement.remove();this.rangeElement=null},updateRange:function(){var C=this.options.axis=="vertical"?"top":"left";var B=this.options.axis=="vertical"?"height":"width";this.rangeElement.css(C,(parseInt(A(this.handle[0]).css(C),10)||0)+this.handleSize(0,this.options.axis=="vertical"?"y":"x")/2);this.rangeElement.css(B,(parseInt(A(this.handle[1]).css(C),10)||0)-(parseInt(A(this.handle[0]).css(C),10)||0))},getRange:function(){return this.rangeElement?this.convertValue(parseInt(this.rangeElement.css(this.options.axis=="vertical"?"height":"width"),10),this.options.axis=="vertical"?"y":"x"):null},handleIndex:function(){return this.handle.index(this.currentHandle[0])},value:function(D,B){if(this.handle.length==1){this.currentHandle=this.handle}if(!B){B=this.options.axis=="vertical"?"y":"x"}var C=A(D!=undefined&&D!==null?this.handle[D]||D:this.currentHandle);if(C.data("mouse").sliderValue){return parseInt(C.data("mouse").sliderValue[B],10)}else{return parseInt(((parseInt(C.css(B=="x"?"left":"top"),10)/(this.actualSize[B=="x"?"width":"height"]-this.handleSize(D,B)))*this.options.realMax[B])+this.options.min[B],10)}},convertValue:function(C,B){return this.options.min[B]+(C/(this.actualSize[B=="x"?"width":"height"]-this.handleSize(null,B)))*this.options.realMax[B]},translateValue:function(C,B){return((C-this.options.min[B])/this.options.realMax[B])*(this.actualSize[B=="x"?"width":"height"]-this.handleSize(null,B))},translateRange:function(D,B){if(this.rangeElement){if(this.currentHandle[0]==this.handle[0]&&D>=this.translateValue(this.value(1),B)){D=this.translateValue(this.value(1,B)-this.oneStep(B),B)}if(this.currentHandle[0]==this.handle[1]&&D<=this.translateValue(this.value(0),B)){D=this.translateValue(this.value(0,B)+this.oneStep(B),B)}}if(this.options.handles){var C=this.options.handles[this.handleIndex()];if(D<this.translateValue(C.min,B)){D=this.translateValue(C.min,B)}else{if(D>this.translateValue(C.max,B)){D=this.translateValue(C.max,B)}}}return D},translateLimits:function(C,B){if(C>=this.actualSize[B=="x"?"width":"height"]-this.handleSize(null,B)){C=this.actualSize[B=="x"?"width":"height"]-this.handleSize(null,B)}if(C<=0){C=0}return C},handleSize:function(C,B){return A(C!=undefined&&C!==null?this.handle[C]:this.currentHandle)[0]["offset"+(B=="x"?"Width":"Height")]},oneStep:function(B){return this.options.stepping[B]||1},start:function(C,B){var D=this.options;if(D.disabled){return false}this.actualSize={width:this.element.outerWidth(),height:this.element.outerHeight()};if(!this.currentHandle){this.focus(this.previousHandle,true)}this.offset=this.element.offset();this.handleOffset=this.currentHandle.offset();this.clickOffset={top:C.pageY-this.handleOffset.top,left:C.pageX-this.handleOffset.left};this.firstValue=this.value();this.propagate("start",C);this.drag(C,B);return true},stop:function(B){this.propagate("stop",B);if(this.firstValue!=this.value()){this.propagate("change",B)}this.focus(this.currentHandle,true);return false},drag:function(E,D){var F=this.options;var B={top:E.pageY-this.offset.top-this.clickOffset.top,left:E.pageX-this.offset.left-this.clickOffset.left};if(!this.currentHandle){this.focus(this.previousHandle,true)}B.left=this.translateLimits(B.left,"x");B.top=this.translateLimits(B.top,"y");if(F.stepping.x){var C=this.convertValue(B.left,"x");C=Math.round(C/F.stepping.x)*F.stepping.x;B.left=this.translateValue(C,"x")}if(F.stepping.y){var C=this.convertValue(B.top,"y");C=Math.round(C/F.stepping.y)*F.stepping.y;B.top=this.translateValue(C,"y")}B.left=this.translateRange(B.left,"x");B.top=this.translateRange(B.top,"y");if(F.axis!="vertical"){this.currentHandle.css({left:B.left})}if(F.axis!="horizontal"){this.currentHandle.css({top:B.top})}this.currentHandle.data("mouse").sliderValue={x:Math.round(this.convertValue(B.left,"x"))||0,y:Math.round(this.convertValue(B.top,"y"))||0};if(this.rangeElement){this.updateRange()}this.propagate("slide",E);return false},moveTo:function(F,E,G){var H=this.options;this.actualSize={width:this.element.outerWidth(),height:this.element.outerHeight()};if(E==undefined&&!this.currentHandle&&this.handle.length!=1){return false}if(E==undefined&&!this.currentHandle){E=0}if(E!=undefined){this.currentHandle=this.previousHandle=A(this.handle[E]||E)}if(F.x!==undefined&&F.y!==undefined){var B=F.x,I=F.y}else{var B=F,I=F}if(B!==undefined&&B.constructor!=Number){var D=/^\-\=/.test(B),C=/^\+\=/.test(B);if(D||C){B=this.value(null,"x")+parseInt(B.replace(D?"=":"+=",""),10)}else{B=isNaN(parseInt(B,10))?undefined:parseInt(B,10)}}if(I!==undefined&&I.constructor!=Number){var D=/^\-\=/.test(I),C=/^\+\=/.test(I);if(D||C){I=this.value(null,"y")+parseInt(I.replace(D?"=":"+=",""),10)}else{I=isNaN(parseInt(I,10))?undefined:parseInt(I,10)}}if(H.axis!="vertical"&&B!==undefined){if(H.stepping.x){B=Math.round(B/H.stepping.x)*H.stepping.x}B=this.translateValue(B,"x");B=this.translateLimits(B,"x");B=this.translateRange(B,"x");H.animate?this.currentHandle.stop().animate({left:B},(Math.abs(parseInt(this.currentHandle.css("left"))-B))*(!isNaN(parseInt(H.animate))?H.animate:5)):this.currentHandle.css({left:B})}if(H.axis!="horizontal"&&I!==undefined){if(H.stepping.y){I=Math.round(I/H.stepping.y)*H.stepping.y}I=this.translateValue(I,"y");I=this.translateLimits(I,"y");I=this.translateRange(I,"y");H.animate?this.currentHandle.stop().animate({top:I},(Math.abs(parseInt(this.currentHandle.css("top"))-I))*(!isNaN(parseInt(H.animate))?H.animate:5)):this.currentHandle.css({top:I})}if(this.rangeElement){this.updateRange()}this.currentHandle.data("mouse").sliderValue={x:Math.round(this.convertValue(B,"x"))||0,y:Math.round(this.convertValue(I,"y"))||0};if(!G){this.propagate("start",null);this.propagate("stop",null);this.propagate("change",null);this.propagate("slide",null)}}});A.ui.slider.getter="value";A.ui.slider.defaults={handle:".ui-slider-handle",distance:1,animate:false}})(jQuery) \ No newline at end of file
+(function($){$.widget("ui.slider",$.extend({},$.ui.mouse,{_init:function(){var self=this,o=this.options;this._keySliding=false;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");this.range=$([]);if(o.range){if(o.range===true){this.range=$("<div></div>");if(!o.values){o.values=[this._valueMin(),this._valueMin()]}if(o.values.length&&o.values.length!=2){o.values=[o.values[0],o.values[0]]}}else{this.range=$("<div></div>")}this.range.appendTo(this.element).addClass("ui-slider-range");if(o.range=="min"||o.range=="max"){this.range.addClass("ui-slider-range-"+o.range)}this.range.addClass("ui-widget-header")}if($(".ui-slider-handle",this.element).length==0){$('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle")}if(o.values&&o.values.length){while($(".ui-slider-handle",this.element).length<o.values.length){$('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle")}}this.handles=$(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(event){event.preventDefault()}).hover(function(){if(!o.disabled){$(this).addClass("ui-state-hover")}},function(){$(this).removeClass("ui-state-hover")}).focus(function(){if(!o.disabled){$(".ui-slider .ui-state-focus").removeClass("ui-state-focus");$(this).addClass("ui-state-focus")}else{$(this).blur()}}).blur(function(){$(this).removeClass("ui-state-focus")});this.handles.each(function(i){$(this).data("index.ui-slider-handle",i)});this.handles.keydown(function(event){var ret=true;var index=$(this).data("index.ui-slider-handle");if(self.options.disabled){return }switch(event.keyCode){case $.ui.keyCode.HOME:case $.ui.keyCode.END:case $.ui.keyCode.UP:case $.ui.keyCode.RIGHT:case $.ui.keyCode.DOWN:case $.ui.keyCode.LEFT:ret=false;if(!self._keySliding){self._keySliding=true;$(this).addClass("ui-state-active");self._start(event,index)}break}var curVal,newVal,step=self._step();if(self.options.values&&self.options.values.length){curVal=newVal=self.values(index)}else{curVal=newVal=self.value()}switch(event.keyCode){case $.ui.keyCode.HOME:newVal=self._valueMin();break;case $.ui.keyCode.END:newVal=self._valueMax();break;case $.ui.keyCode.UP:case $.ui.keyCode.RIGHT:if(curVal==self._valueMax()){return }newVal=curVal+step;break;case $.ui.keyCode.DOWN:case $.ui.keyCode.LEFT:if(curVal==self._valueMin()){return }newVal=curVal-step;break}self._slide(event,index,newVal);return ret}).keyup(function(event){var index=$(this).data("index.ui-slider-handle");if(self._keySliding){self._stop(event,index);self._change(event,index);self._keySliding=false;$(this).removeClass("ui-state-active")}});this._refreshValue()},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy()},_mouseCapture:function(event){var o=this.options;if(o.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();var position={x:event.pageX,y:event.pageY};var normValue=this._normValueFromMouse(position);var distance=this._valueMax()-this._valueMin()+1,closestHandle;var self=this,index;this.handles.each(function(i){var thisDistance=Math.abs(normValue-self.values(i));if(distance>thisDistance){distance=thisDistance;closestHandle=$(this);index=i}});if(o.range==true&&this.values(1)==o.min){closestHandle=$(this.handles[++index])}this._start(event,index);self._handleIndex=index;closestHandle.addClass("ui-state-active").focus();var offset=closestHandle.offset();var mouseOverHandle=!$(event.target).parents().andSelf().is(".ui-slider-handle");this._clickOffset=mouseOverHandle?{left:0,top:0}:{left:event.pageX-offset.left-(closestHandle.width()/2),top:event.pageY-offset.top-(closestHandle.height()/2)-(parseInt(closestHandle.css("borderTopWidth"),10)||0)-(parseInt(closestHandle.css("borderBottomWidth"),10)||0)+(parseInt(closestHandle.css("marginTop"),10)||0)};normValue=this._normValueFromMouse(position);this._slide(event,index,normValue);return true},_mouseStart:function(event){return true},_mouseDrag:function(event){var position={x:event.pageX,y:event.pageY};var normValue=this._normValueFromMouse(position);this._slide(event,this._handleIndex,normValue);return false},_mouseStop:function(event){this.handles.removeClass("ui-state-active");this._stop(event,this._handleIndex);this._change(event,this._handleIndex);this._handleIndex=null;this._clickOffset=null;return false},_detectOrientation:function(){this.orientation=this.options.orientation=="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(position){var pixelTotal,pixelMouse;if("horizontal"==this.orientation){pixelTotal=this.elementSize.width;pixelMouse=position.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{pixelTotal=this.elementSize.height;pixelMouse=position.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}var percentMouse=(pixelMouse/pixelTotal);if(percentMouse>1){percentMouse=1}if(percentMouse<0){percentMouse=0}if("vertical"==this.orientation){percentMouse=1-percentMouse}var valueTotal=this._valueMax()-this._valueMin(),valueMouse=percentMouse*valueTotal,valueMouseModStep=valueMouse%this.options.step,normValue=this._valueMin()+valueMouse-valueMouseModStep;if(valueMouseModStep>(this.options.step/2)){normValue+=this.options.step}return parseFloat(normValue.toFixed(5))},_start:function(event,index){var uiHash={handle:this.handles[index],value:this.value()};if(this.options.values&&this.options.values.length){uiHash.value=this.values(index);uiHash.values=this.values()}this._trigger("start",event,uiHash)},_slide:function(event,index,newVal){var handle=this.handles[index];if(this.options.values&&this.options.values.length){var otherVal=this.values(index?0:1);if((this.options.values.length==2&&this.options.range===true)&&((index==0&&newVal>otherVal)||(index==1&&newVal<otherVal))){newVal=otherVal}if(newVal!=this.values(index)){var newValues=this.values();newValues[index]=newVal;var allowed=this._trigger("slide",event,{handle:this.handles[index],value:newVal,values:newValues});var otherVal=this.values(index?0:1);if(allowed!==false){this.values(index,newVal,(event.type=="mousedown"&&this.options.animate),true)}}}else{if(newVal!=this.value()){var allowed=this._trigger("slide",event,{handle:this.handles[index],value:newVal});if(allowed!==false){this._setData("value",newVal,(event.type=="mousedown"&&this.options.animate))}}}},_stop:function(event,index){var uiHash={handle:this.handles[index],value:this.value()};if(this.options.values&&this.options.values.length){uiHash.value=this.values(index);uiHash.values=this.values()}this._trigger("stop",event,uiHash)},_change:function(event,index){var uiHash={handle:this.handles[index],value:this.value()};if(this.options.values&&this.options.values.length){uiHash.value=this.values(index);uiHash.values=this.values()}this._trigger("change",event,uiHash)},value:function(newValue){if(arguments.length){this._setData("value",newValue);this._change(null,0)}return this._value()},values:function(index,newValue,animated,noPropagation){if(arguments.length>1){this.options.values[index]=newValue;this._refreshValue(animated);if(!noPropagation){this._change(null,index)}}if(arguments.length){if(this.options.values&&this.options.values.length){return this._values(index)}else{return this.value()}}else{return this._values()}},_setData:function(key,value,animated){$.widget.prototype._setData.apply(this,arguments);switch(key){case"disabled":if(value){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled")}else{this.handles.removeAttr("disabled")}case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue(animated);break;case"value":this._refreshValue(animated);break}},_step:function(){var step=this.options.step;return step},_value:function(){var val=this.options.value;if(val<this._valueMin()){val=this._valueMin()}if(val>this._valueMax()){val=this._valueMax()}return val},_values:function(index){if(arguments.length){var val=this.options.values[index];if(val<this._valueMin()){val=this._valueMin()}if(val>this._valueMax()){val=this._valueMax()}return val}else{return this.options.values}},_valueMin:function(){var valueMin=this.options.min;return valueMin},_valueMax:function(){var valueMax=this.options.max;return valueMax},_refreshValue:function(animate){var oRange=this.options.range,o=this.options,self=this;if(this.options.values&&this.options.values.length){var vp0,vp1;this.handles.each(function(i,j){var valPercent=(self.values(i)-self._valueMin())/(self._valueMax()-self._valueMin())*100;var _set={};_set[self.orientation=="horizontal"?"left":"bottom"]=valPercent+"%";$(this).stop(1,1)[animate?"animate":"css"](_set,o.animate);if(self.options.range===true){if(self.orientation=="horizontal"){(i==0)&&self.range.stop(1,1)[animate?"animate":"css"]({left:valPercent+"%"},o.animate);(i==1)&&self.range[animate?"animate":"css"]({width:(valPercent-lastValPercent)+"%"},{queue:false,duration:o.animate})}else{(i==0)&&self.range.stop(1,1)[animate?"animate":"css"]({bottom:(valPercent)+"%"},o.animate);(i==1)&&self.range[animate?"animate":"css"]({height:(valPercent-lastValPercent)+"%"},{queue:false,duration:o.animate})}}lastValPercent=valPercent})}else{var value=this.value(),valueMin=this._valueMin(),valueMax=this._valueMax(),valPercent=valueMax!=valueMin?(value-valueMin)/(valueMax-valueMin)*100:0;var _set={};_set[self.orientation=="horizontal"?"left":"bottom"]=valPercent+"%";this.handle.stop(1,1)[animate?"animate":"css"](_set,o.animate);(oRange=="min")&&(this.orientation=="horizontal")&&this.range.stop(1,1)[animate?"animate":"css"]({width:valPercent+"%"},o.animate);(oRange=="max")&&(this.orientation=="horizontal")&&this.range[animate?"animate":"css"]({width:(100-valPercent)+"%"},{queue:false,duration:o.animate});(oRange=="min")&&(this.orientation=="vertical")&&this.range.stop(1,1)[animate?"animate":"css"]({height:valPercent+"%"},o.animate);(oRange=="max")&&(this.orientation=="vertical")&&this.range[animate?"animate":"css"]({height:(100-valPercent)+"%"},{queue:false,duration:o.animate})}}}));$.extend($.ui.slider,{getter:"value values",version:"1.7.2",eventPrefix:"slide",defaults:{animate:false,delay:0,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null}})})(jQuery); \ No newline at end of file
diff --git a/template-common/lib/ui/minified/ui.sortable.min.js b/template-common/lib/ui/minified/ui.sortable.min.js
index 887d685ed..4c4c87265 100644
--- a/template-common/lib/ui/minified/ui.sortable.min.js
+++ b/template-common/lib/ui/minified/ui.sortable.min.js
@@ -1 +1 @@
-(function(B){function A(E,D){var C=B.browser.safari&&B.browser.version<522;if(E.contains&&!C){return E.contains(D)}if(E.compareDocumentPosition){return !!(E.compareDocumentPosition(D)&16)}while(D=D.parentNode){if(D==E){return true}}return false}B.widget("ui.sortable",B.extend({},B.ui.mouse,{init:function(){var C=this.options;this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?(/left|right/).test(this.items[0].item.css("float")):false;if(!(/(relative|absolute|fixed)/).test(this.element.css("position"))){this.element.css("position","relative")}this.offset=this.element.offset();this.mouseInit()},plugins:{},ui:function(C){return{helper:(C||this)["helper"],placeholder:(C||this)["placeholder"]||B([]),position:(C||this)["position"],absolutePosition:(C||this)["positionAbs"],options:this.options,element:this.element,item:(C||this)["currentItem"],sender:C?C.element:null}},propagate:function(F,E,C,D){B.ui.plugin.call(this,F,[E,this.ui(C)]);if(!D){this.element.triggerHandler(F=="sort"?F:"sort"+F,[E,this.ui(C)],this.options[F])}},serialize:function(E){var C=(B.isFunction(this.options.items)?this.options.items.call(this.element):B(this.options.items,this.element)).not(".ui-sortable-helper");var D=[];E=E||{};C.each(function(){var F=(B(this).attr(E.attribute||"id")||"").match(E.expression||(/(.+)[-=_](.+)/));if(F){D.push((E.key||F[1])+"[]="+(E.key&&E.expression?F[1]:F[2]))}});return D.join("&")},toArray:function(C){var D=(B.isFunction(this.options.items)?this.options.items.call(this.element):B(this.options.items,this.element)).not(".ui-sortable-helper");var E=[];D.each(function(){E.push(B(this).attr(C||"id"))});return E},intersectsWith:function(J){var E=this.positionAbs.left,D=E+this.helperProportions.width,I=this.positionAbs.top,H=I+this.helperProportions.height;var F=J.left,C=F+J.width,K=J.top,G=K+J.height;if(this.options.tolerance=="pointer"||this.options.forcePointerForContainers||(this.options.tolerance=="guess"&&this.helperProportions[this.floating?"width":"height"]>J[this.floating?"width":"height"])){return(I+this.offset.click.top>K&&I+this.offset.click.top<G&&E+this.offset.click.left>F&&E+this.offset.click.left<C)}else{return(F<E+(this.helperProportions.width/2)&&D-(this.helperProportions.width/2)<C&&K<I+(this.helperProportions.height/2)&&H-(this.helperProportions.height/2)<G)}},intersectsWithEdge:function(J){var E=this.positionAbs.left,D=E+this.helperProportions.width,I=this.positionAbs.top,H=I+this.helperProportions.height;var F=J.left,C=F+J.width,K=J.top,G=K+J.height;if(this.options.tolerance=="pointer"||(this.options.tolerance=="guess"&&this.helperProportions[this.floating?"width":"height"]>J[this.floating?"width":"height"])){if(!(I+this.offset.click.top>K&&I+this.offset.click.top<G&&E+this.offset.click.left>F&&E+this.offset.click.left<C)){return false}if(this.floating){if(E+this.offset.click.left>F&&E+this.offset.click.left<F+J.width/2){return 2}if(E+this.offset.click.left>F+J.width/2&&E+this.offset.click.left<C){return 1}}else{if(I+this.offset.click.top>K&&I+this.offset.click.top<K+J.height/2){return 2}if(I+this.offset.click.top>K+J.height/2&&I+this.offset.click.top<G){return 1}}}else{if(!(F<E+(this.helperProportions.width/2)&&D-(this.helperProportions.width/2)<C&&K<I+(this.helperProportions.height/2)&&H-(this.helperProportions.height/2)<G)){return false}if(this.floating){if(D>F&&E<F){return 2}if(E<C&&D>C){return 1}}else{if(H>K&&I<K){return 1}if(I<G&&H>G){return 2}}}return false},refresh:function(){this.refreshItems();this.refreshPositions()},refreshItems:function(){this.items=[];this.containers=[this];var D=this.items;var C=this;var F=[[B.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):B(this.options.items,this.element),this]];if(this.options.connectWith){for(var G=this.options.connectWith.length-1;G>=0;G--){var I=B(this.options.connectWith[G]);for(var E=I.length-1;E>=0;E--){var H=B.data(I[E],"sortable");if(H&&!H.options.disabled){F.push([B.isFunction(H.options.items)?H.options.items.call(H.element):B(H.options.items,H.element),H]);this.containers.push(H)}}}}for(var G=F.length-1;G>=0;G--){F[G][0].each(function(){B.data(this,"sortable-item",F[G][1]);D.push({item:B(this),instance:F[G][1],width:0,height:0,left:0,top:0})})}},refreshPositions:function(D){if(this.offsetParent){var C=this.offsetParent.offset();this.offset.parent={top:C.top+this.offsetParentBorders.top,left:C.left+this.offsetParentBorders.left}}for(var F=this.items.length-1;F>=0;F--){if(this.items[F].instance!=this.currentContainer&&this.currentContainer&&this.items[F].item[0]!=this.currentItem[0]){continue}var E=this.options.toleranceElement?B(this.options.toleranceElement,this.items[F].item):this.items[F].item;if(!D){this.items[F].width=E[0].offsetWidth;this.items[F].height=E[0].offsetHeight}var G=E.offset();this.items[F].left=G.left;this.items[F].top=G.top}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(var F=this.containers.length-1;F>=0;F--){var G=this.containers[F].element.offset();this.containers[F].containerCache.left=G.left;this.containers[F].containerCache.top=G.top;this.containers[F].containerCache.width=this.containers[F].element.outerWidth();this.containers[F].containerCache.height=this.containers[F].element.outerHeight()}}},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this.mouseDestroy();for(var C=this.items.length-1;C>=0;C--){this.items[C].item.removeData("sortable-item")}},createPlaceholder:function(E){var C=E||this,F=C.options;if(F.placeholder.constructor==String){var D=F.placeholder;F.placeholder={element:function(){return B("<div></div>").addClass(D)[0]},update:function(G,H){H.css(G.offset()).css({width:G.outerWidth(),height:G.outerHeight()})}}}C.placeholder=B(F.placeholder.element.call(C.element,C.currentItem)).appendTo("body").css({position:"absolute"});F.placeholder.update.call(C.element,C.currentItem,C.placeholder)},contactContainers:function(F){for(var D=this.containers.length-1;D>=0;D--){if(this.intersectsWith(this.containers[D].containerCache)){if(!this.containers[D].containerCache.over){if(this.currentContainer!=this.containers[D]){var I=10000;var H=null;var E=this.positionAbs[this.containers[D].floating?"left":"top"];for(var C=this.items.length-1;C>=0;C--){if(!A(this.containers[D].element[0],this.items[C].item[0])){continue}var G=this.items[C][this.containers[D].floating?"left":"top"];if(Math.abs(G-E)<I){I=Math.abs(G-E);H=this.items[C]}}if(!H&&!this.options.dropOnEmpty){continue}if(this.placeholder){this.placeholder.remove()}if(this.containers[D].options.placeholder){this.containers[D].createPlaceholder(this)}else{this.placeholder=null}this.currentContainer=this.containers[D];H?this.rearrange(F,H,null,true):this.rearrange(F,null,this.containers[D].element,true);this.propagate("change",F);this.containers[D].propagate("change",F,this)}this.containers[D].propagate("over",F,this);this.containers[D].containerCache.over=1}}else{if(this.containers[D].containerCache.over){this.containers[D].propagate("out",F,this);this.containers[D].containerCache.over=0}}}},mouseCapture:function(G,F){if(this.options.disabled||this.options.type=="static"){return false}this.refreshItems();var E=null,D=this,C=B(G.target).parents().each(function(){if(B.data(this,"sortable-item")==D){E=B(this);return false}});if(B.data(G.target,"sortable-item")==D){E=B(G.target)}if(!E){return false}if(this.options.handle&&!F){var H=false;B(this.options.handle,E).find("*").andSelf().each(function(){if(this==G.target){H=true}});if(!H){return false}}this.currentItem=E;return true},mouseStart:function(H,F,C){var J=this.options;this.currentContainer=this;this.refreshPositions();this.helper=typeof J.helper=="function"?B(J.helper.apply(this.element[0],[H,this.currentItem])):this.currentItem.clone();if(!this.helper.parents("body").length){B(J.appendTo!="parent"?J.appendTo:this.currentItem[0].parentNode)[0].appendChild(this.helper[0])}this.helper.css({position:"absolute",clear:"both"}).addClass("ui-sortable-helper");this.margins={left:(parseInt(this.currentItem.css("marginLeft"),10)||0),top:(parseInt(this.currentItem.css("marginTop"),10)||0)};this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.offset.click={left:H.pageX-this.offset.left,top:H.pageY-this.offset.top};this.offsetParent=this.helper.offsetParent();var D=this.offsetParent.offset();this.offsetParentBorders={top:(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)};this.offset.parent={top:D.top+this.offsetParentBorders.top,left:D.left+this.offsetParentBorders.left};this.originalPosition=this.generatePosition(H);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};if(J.placeholder){this.createPlaceholder()}this.propagate("start",H);this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};if(J.cursorAt){if(J.cursorAt.left!=undefined){this.offset.click.left=J.cursorAt.left}if(J.cursorAt.right!=undefined){this.offset.click.left=this.helperProportions.width-J.cursorAt.right}if(J.cursorAt.top!=undefined){this.offset.click.top=J.cursorAt.top}if(J.cursorAt.bottom!=undefined){this.offset.click.top=this.helperProportions.height-J.cursorAt.bottom}}if(J.containment){if(J.containment=="parent"){J.containment=this.helper[0].parentNode}if(J.containment=="document"||J.containment=="window"){this.containment=[0-this.offset.parent.left,0-this.offset.parent.top,B(J.containment=="document"?document:window).width()-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.element.css("marginRight"),10)||0),(B(J.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.element.css("marginBottom"),10)||0)]}if(!(/^(document|window|parent)$/).test(J.containment)){var G=B(J.containment)[0];var I=B(J.containment).offset();this.containment=[I.left+(parseInt(B(G).css("borderLeftWidth"),10)||0)-this.offset.parent.left,I.top+(parseInt(B(G).css("borderTopWidth"),10)||0)-this.offset.parent.top,I.left+Math.max(G.scrollWidth,G.offsetWidth)-(parseInt(B(G).css("borderLeftWidth"),10)||0)-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.currentItem.css("marginRight"),10)||0),I.top+Math.max(G.scrollHeight,G.offsetHeight)-(parseInt(B(G).css("borderTopWidth"),10)||0)-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.currentItem.css("marginBottom"),10)||0)]}}if(this.options.placeholder!="clone"){this.currentItem.css("visibility","hidden")}if(!C){for(var E=this.containers.length-1;E>=0;E--){this.containers[E].propagate("activate",H,this)}}if(B.ui.ddmanager){B.ui.ddmanager.current=this}if(B.ui.ddmanager&&!J.dropBehaviour){B.ui.ddmanager.prepareOffsets(this,H)}this.dragging=true;this.mouseDrag(H);return true},convertPositionTo:function(D,E){if(!E){E=this.position}var C=D=="absolute"?1:-1;return{top:(E.top+this.offset.parent.top*C-(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)*C+this.margins.top*C),left:(E.left+this.offset.parent.left*C-(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft)*C+this.margins.left*C)}},generatePosition:function(F){var G=this.options;var C={top:(F.pageY-this.offset.click.top-this.offset.parent.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)),left:(F.pageX-this.offset.click.left-this.offset.parent.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft))};if(!this.originalPosition){return C}if(this.containment){if(C.left<this.containment[0]){C.left=this.containment[0]}if(C.top<this.containment[1]){C.top=this.containment[1]}if(C.left>this.containment[2]){C.left=this.containment[2]}if(C.top>this.containment[3]){C.top=this.containment[3]}}if(G.grid){var E=this.originalPosition.top+Math.round((C.top-this.originalPosition.top)/G.grid[1])*G.grid[1];C.top=this.containment?(!(E<this.containment[1]||E>this.containment[3])?E:(!(E<this.containment[1])?E-G.grid[1]:E+G.grid[1])):E;var D=this.originalPosition.left+Math.round((C.left-this.originalPosition.left)/G.grid[0])*G.grid[0];C.left=this.containment?(!(D<this.containment[0]||D>this.containment[2])?D:(!(D<this.containment[0])?D-G.grid[0]:D+G.grid[0])):D}return C},mouseDrag:function(D){this.position=this.generatePosition(D);this.positionAbs=this.convertPositionTo("absolute");B.ui.plugin.call(this,"sort",[D,this.ui()]);this.positionAbs=this.convertPositionTo("absolute");this.helper[0].style.left=this.position.left+"px";this.helper[0].style.top=this.position.top+"px";for(var C=this.items.length-1;C>=0;C--){var E=this.intersectsWithEdge(this.items[C]);if(!E){continue}if(this.items[C].item[0]!=this.currentItem[0]&&this.currentItem[E==1?"next":"prev"]()[0]!=this.items[C].item[0]&&!A(this.currentItem[0],this.items[C].item[0])&&(this.options.type=="semi-dynamic"?!A(this.element[0],this.items[C].item[0]):true)){this.direction=E==1?"down":"up";this.rearrange(D,this.items[C]);this.propagate("change",D);break}}this.contactContainers(D);if(B.ui.ddmanager){B.ui.ddmanager.drag(this,D)}this.element.triggerHandler("sort",[D,this.ui()],this.options["sort"]);return false},rearrange:function(H,G,D,F){D?D[0].appendChild(this.currentItem[0]):G.item[0].parentNode.insertBefore(this.currentItem[0],(this.direction=="down"?G.item[0]:G.item[0].nextSibling));this.counter=this.counter?++this.counter:1;var E=this,C=this.counter;window.setTimeout(function(){if(C==E.counter){E.refreshPositions(!F)}},0);if(this.options.placeholder){this.options.placeholder.update.call(this.element,this.currentItem,this.placeholder)}},mouseStop:function(E,D){if(B.ui.ddmanager&&!this.options.dropBehaviour){B.ui.ddmanager.drop(this,E)}if(this.options.revert){var C=this;var F=C.currentItem.offset();if(C.placeholder){C.placeholder.animate({opacity:"hide"},(parseInt(this.options.revert,10)||500)-50)}B(this.helper).animate({left:F.left-this.offset.parent.left-C.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:F.top-this.offset.parent.top-C.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){C.clear(E)})}else{this.clear(E,D)}return false},clear:function(E,D){if(this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0]){this.propagate("update",E,null,D)}if(!A(this.element[0],this.currentItem[0])){this.propagate("remove",E,null,D);for(var C=this.containers.length-1;C>=0;C--){if(A(this.containers[C].element[0],this.currentItem[0])){this.containers[C].propagate("update",E,this,D);this.containers[C].propagate("receive",E,this,D)}}}for(var C=this.containers.length-1;C>=0;C--){this.containers[C].propagate("deactivate",E,this,D);if(this.containers[C].containerCache.over){this.containers[C].propagate("out",E,this);this.containers[C].containerCache.over=0}}this.dragging=false;if(this.cancelHelperRemoval){this.propagate("stop",E,null,D);return false}B(this.currentItem).css("visibility","");if(this.placeholder){this.placeholder.remove()}this.helper.remove();this.helper=null;this.propagate("stop",E,null,D);return true}}));B.extend(B.ui.sortable,{getter:"serialize toArray",defaults:{helper:"clone",tolerance:"guess",distance:1,delay:0,scroll:true,scrollSensitivity:20,scrollSpeed:20,cancel:":input",items:"> *",zIndex:1000,dropOnEmpty:true,appendTo:"parent"}});B.ui.plugin.add("sortable","cursor",{start:function(E,D){var C=B("body");if(C.css("cursor")){D.options._cursor=C.css("cursor")}C.css("cursor",D.options.cursor)},stop:function(D,C){if(C.options._cursor){B("body").css("cursor",C.options._cursor)}}});B.ui.plugin.add("sortable","zIndex",{start:function(E,D){var C=D.helper;if(C.css("zIndex")){D.options._zIndex=C.css("zIndex")}C.css("zIndex",D.options.zIndex)},stop:function(D,C){if(C.options._zIndex){B(C.helper).css("zIndex",C.options._zIndex)}}});B.ui.plugin.add("sortable","opacity",{start:function(E,D){var C=D.helper;if(C.css("opacity")){D.options._opacity=C.css("opacity")}C.css("opacity",D.options.opacity)},stop:function(D,C){if(C.options._opacity){B(C.helper).css("opacity",C.options._opacity)}}});B.ui.plugin.add("sortable","scroll",{start:function(E,D){var F=D.options;var C=B(this).data("sortable");C.overflowY=function(G){do{if(/auto|scroll/.test(G.css("overflow"))||(/auto|scroll/).test(G.css("overflow-y"))){return G}G=G.parent()}while(G[0].parentNode);return B(document)}(C.currentItem);C.overflowX=function(G){do{if(/auto|scroll/.test(G.css("overflow"))||(/auto|scroll/).test(G.css("overflow-x"))){return G}G=G.parent()}while(G[0].parentNode);return B(document)}(C.currentItem);if(C.overflowY[0]!=document&&C.overflowY[0].tagName!="HTML"){C.overflowYOffset=C.overflowY.offset()}if(C.overflowX[0]!=document&&C.overflowX[0].tagName!="HTML"){C.overflowXOffset=C.overflowX.offset()}},sort:function(E,D){var F=D.options;var C=B(this).data("sortable");if(C.overflowY[0]!=document&&C.overflowY[0].tagName!="HTML"){if((C.overflowYOffset.top+C.overflowY[0].offsetHeight)-E.pageY<F.scrollSensitivity){C.overflowY[0].scrollTop=C.overflowY[0].scrollTop+F.scrollSpeed}if(E.pageY-C.overflowYOffset.top<F.scrollSensitivity){C.overflowY[0].scrollTop=C.overflowY[0].scrollTop-F.scrollSpeed}}else{if(E.pageY-B(document).scrollTop()<F.scrollSensitivity){B(document).scrollTop(B(document).scrollTop()-F.scrollSpeed)}if(B(window).height()-(E.pageY-B(document).scrollTop())<F.scrollSensitivity){B(document).scrollTop(B(document).scrollTop()+F.scrollSpeed)}}if(C.overflowX[0]!=document&&C.overflowX[0].tagName!="HTML"){if((C.overflowXOffset.left+C.overflowX[0].offsetWidth)-E.pageX<F.scrollSensitivity){C.overflowX[0].scrollLeft=C.overflowX[0].scrollLeft+F.scrollSpeed}if(E.pageX-C.overflowXOffset.left<F.scrollSensitivity){C.overflowX[0].scrollLeft=C.overflowX[0].scrollLeft-F.scrollSpeed}}else{if(E.pageX-B(document).scrollLeft()<F.scrollSensitivity){B(document).scrollLeft(B(document).scrollLeft()-F.scrollSpeed)}if(B(window).width()-(E.pageX-B(document).scrollLeft())<F.scrollSensitivity){B(document).scrollLeft(B(document).scrollLeft()+F.scrollSpeed)}}}});B.ui.plugin.add("sortable","axis",{sort:function(E,D){var C=B(this).data("sortable");if(D.options.axis=="y"){C.position.left=C.originalPosition.left}if(D.options.axis=="x"){C.position.top=C.originalPosition.top}}})})(jQuery) \ No newline at end of file
+(function($){$.widget("ui.sortable",$.extend({},$.ui.mouse,{_init:function(){var o=this.options;this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?(/left|right/).test(this.items[0].item.css("float")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var i=this.items.length-1;i>=0;i--){this.items[i].item.removeData("sortable-item")}},_mouseCapture:function(event,overrideHandle){if(this.reverting){return false}if(this.options.disabled||this.options.type=="static"){return false}this._refreshItems(event);var currentItem=null,self=this,nodes=$(event.target).parents().each(function(){if($.data(this,"sortable-item")==self){currentItem=$(this);return false}});if($.data(event.target,"sortable-item")==self){currentItem=$(event.target)}if(!currentItem){return false}if(this.options.handle&&!overrideHandle){var validHandle=false;$(this.options.handle,currentItem).find("*").andSelf().each(function(){if(this==event.target){validHandle=true}});if(!validHandle){return false}}this.currentItem=currentItem;this._removeCurrentsFromItems();return true},_mouseStart:function(event,overrideHandle,noActivation){var o=this.options,self=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(event);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");$.extend(this.offset,{click:{left:event.pageX-this.offset.left,top:event.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(event);this.originalPageX=event.pageX;this.originalPageY=event.pageY;if(o.cursorAt){this._adjustOffsetFromHelper(o.cursorAt)}this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};if(this.helper[0]!=this.currentItem[0]){this.currentItem.hide()}this._createPlaceholder();if(o.containment){this._setContainment()}if(o.cursor){if($("body").css("cursor")){this._storedCursor=$("body").css("cursor")}$("body").css("cursor",o.cursor)}if(o.opacity){if(this.helper.css("opacity")){this._storedOpacity=this.helper.css("opacity")}this.helper.css("opacity",o.opacity)}if(o.zIndex){if(this.helper.css("zIndex")){this._storedZIndex=this.helper.css("zIndex")}this.helper.css("zIndex",o.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){this.overflowOffset=this.scrollParent.offset()}this._trigger("start",event,this._uiHash());if(!this._preserveHelperProportions){this._cacheHelperProportions()}if(!noActivation){for(var i=this.containers.length-1;i>=0;i--){this.containers[i]._trigger("activate",event,self._uiHash(this))}}if($.ui.ddmanager){$.ui.ddmanager.current=this}if($.ui.ddmanager&&!o.dropBehaviour){$.ui.ddmanager.prepareOffsets(this,event)}this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(event);return true},_mouseDrag:function(event){this.position=this._generatePosition(event);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs}if(this.options.scroll){var o=this.options,scrolled=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if((this.overflowOffset.top+this.scrollParent[0].offsetHeight)-event.pageY<o.scrollSensitivity){this.scrollParent[0].scrollTop=scrolled=this.scrollParent[0].scrollTop+o.scrollSpeed}else{if(event.pageY-this.overflowOffset.top<o.scrollSensitivity){this.scrollParent[0].scrollTop=scrolled=this.scrollParent[0].scrollTop-o.scrollSpeed}}if((this.overflowOffset.left+this.scrollParent[0].offsetWidth)-event.pageX<o.scrollSensitivity){this.scrollParent[0].scrollLeft=scrolled=this.scrollParent[0].scrollLeft+o.scrollSpeed}else{if(event.pageX-this.overflowOffset.left<o.scrollSensitivity){this.scrollParent[0].scrollLeft=scrolled=this.scrollParent[0].scrollLeft-o.scrollSpeed}}}else{if(event.pageY-$(document).scrollTop()<o.scrollSensitivity){scrolled=$(document).scrollTop($(document).scrollTop()-o.scrollSpeed)}else{if($(window).height()-(event.pageY-$(document).scrollTop())<o.scrollSensitivity){scrolled=$(document).scrollTop($(document).scrollTop()+o.scrollSpeed)}}if(event.pageX-$(document).scrollLeft()<o.scrollSensitivity){scrolled=$(document).scrollLeft($(document).scrollLeft()-o.scrollSpeed)}else{if($(window).width()-(event.pageX-$(document).scrollLeft())<o.scrollSensitivity){scrolled=$(document).scrollLeft($(document).scrollLeft()+o.scrollSpeed)}}}if(scrolled!==false&&$.ui.ddmanager&&!o.dropBehaviour){$.ui.ddmanager.prepareOffsets(this,event)}}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}for(var i=this.items.length-1;i>=0;i--){var item=this.items[i],itemElement=item.item[0],intersection=this._intersectsWithPointer(item);if(!intersection){continue}if(itemElement!=this.currentItem[0]&&this.placeholder[intersection==1?"next":"prev"]()[0]!=itemElement&&!$.ui.contains(this.placeholder[0],itemElement)&&(this.options.type=="semi-dynamic"?!$.ui.contains(this.element[0],itemElement):true)){this.direction=intersection==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(item)){this._rearrange(event,item)}else{break}this._trigger("change",event,this._uiHash());break}}this._contactContainers(event);if($.ui.ddmanager){$.ui.ddmanager.drag(this,event)}this._trigger("sort",event,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(event,noPropagation){if(!event){return }if($.ui.ddmanager&&!this.options.dropBehaviour){$.ui.ddmanager.drop(this,event)}if(this.options.revert){var self=this;var cur=self.placeholder.offset();self.reverting=true;$(this.helper).animate({left:cur.left-this.offset.parent.left-self.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:cur.top-this.offset.parent.top-self.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){self._clear(event)})}else{this._clear(event,noPropagation)}return false},cancel:function(){var self=this;if(this.dragging){this._mouseUp();if(this.options.helper=="original"){this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}for(var i=this.containers.length-1;i>=0;i--){this.containers[i]._trigger("deactivate",null,self._uiHash(this));if(this.containers[i].containerCache.over){this.containers[i]._trigger("out",null,self._uiHash(this));this.containers[i].containerCache.over=0}}}if(this.placeholder[0].parentNode){this.placeholder[0].parentNode.removeChild(this.placeholder[0])}if(this.options.helper!="original"&&this.helper&&this.helper[0].parentNode){this.helper.remove()}$.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});if(this.domPosition.prev){$(this.domPosition.prev).after(this.currentItem)}else{$(this.domPosition.parent).prepend(this.currentItem)}return true},serialize:function(o){var items=this._getItemsAsjQuery(o&&o.connected);var str=[];o=o||{};$(items).each(function(){var res=($(o.item||this).attr(o.attribute||"id")||"").match(o.expression||(/(.+)[-=_](.+)/));if(res){str.push((o.key||res[1]+"[]")+"="+(o.key&&o.expression?res[1]:res[2]))}});return str.join("&")},toArray:function(o){var items=this._getItemsAsjQuery(o&&o.connected);var ret=[];o=o||{};items.each(function(){ret.push($(o.item||this).attr(o.attribute||"id")||"")});return ret},_intersectsWith:function(item){var x1=this.positionAbs.left,x2=x1+this.helperProportions.width,y1=this.positionAbs.top,y2=y1+this.helperProportions.height;var l=item.left,r=l+item.width,t=item.top,b=t+item.height;var dyClick=this.offset.click.top,dxClick=this.offset.click.left;var isOverElement=(y1+dyClick)>t&&(y1+dyClick)<b&&(x1+dxClick)>l&&(x1+dxClick)<r;if(this.options.tolerance=="pointer"||this.options.forcePointerForContainers||(this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>item[this.floating?"width":"height"])){return isOverElement}else{return(l<x1+(this.helperProportions.width/2)&&x2-(this.helperProportions.width/2)<r&&t<y1+(this.helperProportions.height/2)&&y2-(this.helperProportions.height/2)<b)}},_intersectsWithPointer:function(item){var isOverElementHeight=$.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,item.top,item.height),isOverElementWidth=$.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,item.left,item.width),isOverElement=isOverElementHeight&&isOverElementWidth,verticalDirection=this._getDragVerticalDirection(),horizontalDirection=this._getDragHorizontalDirection();if(!isOverElement){return false}return this.floating?(((horizontalDirection&&horizontalDirection=="right")||verticalDirection=="down")?2:1):(verticalDirection&&(verticalDirection=="down"?2:1))},_intersectsWithSides:function(item){var isOverBottomHalf=$.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,item.top+(item.height/2),item.height),isOverRightHalf=$.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,item.left+(item.width/2),item.width),verticalDirection=this._getDragVerticalDirection(),horizontalDirection=this._getDragHorizontalDirection();if(this.floating&&horizontalDirection){return((horizontalDirection=="right"&&isOverRightHalf)||(horizontalDirection=="left"&&!isOverRightHalf))}else{return verticalDirection&&((verticalDirection=="down"&&isOverBottomHalf)||(verticalDirection=="up"&&!isOverBottomHalf))}},_getDragVerticalDirection:function(){var delta=this.positionAbs.top-this.lastPositionAbs.top;return delta!=0&&(delta>0?"down":"up")},_getDragHorizontalDirection:function(){var delta=this.positionAbs.left-this.lastPositionAbs.left;return delta!=0&&(delta>0?"right":"left")},refresh:function(event){this._refreshItems(event);this.refreshPositions()},_connectWith:function(){var options=this.options;return options.connectWith.constructor==String?[options.connectWith]:options.connectWith},_getItemsAsjQuery:function(connected){var self=this;var items=[];var queries=[];var connectWith=this._connectWith();if(connectWith&&connected){for(var i=connectWith.length-1;i>=0;i--){var cur=$(connectWith[i]);for(var j=cur.length-1;j>=0;j--){var inst=$.data(cur[j],"sortable");if(inst&&inst!=this&&!inst.options.disabled){queries.push([$.isFunction(inst.options.items)?inst.options.items.call(inst.element):$(inst.options.items,inst.element).not(".ui-sortable-helper"),inst])}}}}queries.push([$.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):$(this.options.items,this.element).not(".ui-sortable-helper"),this]);for(var i=queries.length-1;i>=0;i--){queries[i][0].each(function(){items.push(this)})}return $(items)},_removeCurrentsFromItems:function(){var list=this.currentItem.find(":data(sortable-item)");for(var i=0;i<this.items.length;i++){for(var j=0;j<list.length;j++){if(list[j]==this.items[i].item[0]){this.items.splice(i,1)}}}},_refreshItems:function(event){this.items=[];this.containers=[this];var items=this.items;var self=this;var queries=[[$.isFunction(this.options.items)?this.options.items.call(this.element[0],event,{item:this.currentItem}):$(this.options.items,this.element),this]];var connectWith=this._connectWith();if(connectWith){for(var i=connectWith.length-1;i>=0;i--){var cur=$(connectWith[i]);for(var j=cur.length-1;j>=0;j--){var inst=$.data(cur[j],"sortable");if(inst&&inst!=this&&!inst.options.disabled){queries.push([$.isFunction(inst.options.items)?inst.options.items.call(inst.element[0],event,{item:this.currentItem}):$(inst.options.items,inst.element),inst]);this.containers.push(inst)}}}}for(var i=queries.length-1;i>=0;i--){var targetData=queries[i][1];var _queries=queries[i][0];for(var j=0,queriesLength=_queries.length;j<queriesLength;j++){var item=$(_queries[j]);item.data("sortable-item",targetData);items.push({item:item,instance:targetData,width:0,height:0,left:0,top:0})}}},refreshPositions:function(fast){if(this.offsetParent&&this.helper){this.offset.parent=this._getParentOffset()}for(var i=this.items.length-1;i>=0;i--){var item=this.items[i];if(item.instance!=this.currentContainer&&this.currentContainer&&item.item[0]!=this.currentItem[0]){continue}var t=this.options.toleranceElement?$(this.options.toleranceElement,item.item):item.item;if(!fast){item.width=t.outerWidth();item.height=t.outerHeight()}var p=t.offset();item.left=p.left;item.top=p.top}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(var i=this.containers.length-1;i>=0;i--){var p=this.containers[i].element.offset();this.containers[i].containerCache.left=p.left;this.containers[i].containerCache.top=p.top;this.containers[i].containerCache.width=this.containers[i].element.outerWidth();this.containers[i].containerCache.height=this.containers[i].element.outerHeight()}}},_createPlaceholder:function(that){var self=that||this,o=self.options;if(!o.placeholder||o.placeholder.constructor==String){var className=o.placeholder;o.placeholder={element:function(){var el=$(document.createElement(self.currentItem[0].nodeName)).addClass(className||self.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!className){el.style.visibility="hidden"}return el},update:function(container,p){if(className&&!o.forcePlaceholderSize){return }if(!p.height()){p.height(self.currentItem.innerHeight()-parseInt(self.currentItem.css("paddingTop")||0,10)-parseInt(self.currentItem.css("paddingBottom")||0,10))}if(!p.width()){p.width(self.currentItem.innerWidth()-parseInt(self.currentItem.css("paddingLeft")||0,10)-parseInt(self.currentItem.css("paddingRight")||0,10))}}}}self.placeholder=$(o.placeholder.element.call(self.element,self.currentItem));self.currentItem.after(self.placeholder);o.placeholder.update(self,self.placeholder)},_contactContainers:function(event){for(var i=this.containers.length-1;i>=0;i--){if(this._intersectsWith(this.containers[i].containerCache)){if(!this.containers[i].containerCache.over){if(this.currentContainer!=this.containers[i]){var dist=10000;var itemWithLeastDistance=null;var base=this.positionAbs[this.containers[i].floating?"left":"top"];for(var j=this.items.length-1;j>=0;j--){if(!$.ui.contains(this.containers[i].element[0],this.items[j].item[0])){continue}var cur=this.items[j][this.containers[i].floating?"left":"top"];if(Math.abs(cur-base)<dist){dist=Math.abs(cur-base);itemWithLeastDistance=this.items[j]}}if(!itemWithLeastDistance&&!this.options.dropOnEmpty){continue}this.currentContainer=this.containers[i];itemWithLeastDistance?this._rearrange(event,itemWithLeastDistance,null,true):this._rearrange(event,null,this.containers[i].element,true);this._trigger("change",event,this._uiHash());this.containers[i]._trigger("change",event,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder)}this.containers[i]._trigger("over",event,this._uiHash(this));this.containers[i].containerCache.over=1}}else{if(this.containers[i].containerCache.over){this.containers[i]._trigger("out",event,this._uiHash(this));this.containers[i].containerCache.over=0}}}},_createHelper:function(event){var o=this.options;var helper=$.isFunction(o.helper)?$(o.helper.apply(this.element[0],[event,this.currentItem])):(o.helper=="clone"?this.currentItem.clone():this.currentItem);if(!helper.parents("body").length){$(o.appendTo!="parent"?o.appendTo:this.currentItem[0].parentNode)[0].appendChild(helper[0])}if(helper[0]==this.currentItem[0]){this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}}if(helper[0].style.width==""||o.forceHelperSize){helper.width(this.currentItem.width())}if(helper[0].style.height==""||o.forceHelperSize){helper.height(this.currentItem.height())}return helper},_adjustOffsetFromHelper:function(obj){if(obj.left!=undefined){this.offset.click.left=obj.left+this.margins.left}if(obj.right!=undefined){this.offset.click.left=this.helperProportions.width-obj.right+this.margins.left}if(obj.top!=undefined){this.offset.click.top=obj.top+this.margins.top}if(obj.bottom!=undefined){this.offset.click.top=this.helperProportions.height-obj.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var po=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0])){po.left+=this.scrollParent.scrollLeft();po.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&$.browser.msie)){po={top:0,left:0}}return{top:po.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:po.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var p=this.currentItem.position();return{top:p.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:p.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.currentItem.css("marginLeft"),10)||0),top:(parseInt(this.currentItem.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var o=this.options;if(o.containment=="parent"){o.containment=this.helper[0].parentNode}if(o.containment=="document"||o.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,$(o.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,($(o.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(o.containment)){var ce=$(o.containment)[0];var co=$(o.containment).offset();var over=($(ce).css("overflow")!="hidden");this.containment=[co.left+(parseInt($(ce).css("borderLeftWidth"),10)||0)+(parseInt($(ce).css("paddingLeft"),10)||0)-this.margins.left,co.top+(parseInt($(ce).css("borderTopWidth"),10)||0)+(parseInt($(ce).css("paddingTop"),10)||0)-this.margins.top,co.left+(over?Math.max(ce.scrollWidth,ce.offsetWidth):ce.offsetWidth)-(parseInt($(ce).css("borderLeftWidth"),10)||0)-(parseInt($(ce).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,co.top+(over?Math.max(ce.scrollHeight,ce.offsetHeight):ce.offsetHeight)-(parseInt($(ce).css("borderTopWidth"),10)||0)-(parseInt($(ce).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(d,pos){if(!pos){pos=this.position}var mod=d=="absolute"?1:-1;var o=this.options,scroll=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,scrollIsRootNode=(/(html|body)/i).test(scroll[0].tagName);return{top:(pos.top+this.offset.relative.top*mod+this.offset.parent.top*mod-($.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(scrollIsRootNode?0:scroll.scrollTop()))*mod)),left:(pos.left+this.offset.relative.left*mod+this.offset.parent.left*mod-($.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft())*mod))}},_generatePosition:function(event){var o=this.options,scroll=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,scrollIsRootNode=(/(html|body)/i).test(scroll[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var pageX=event.pageX;var pageY=event.pageY;if(this.originalPosition){if(this.containment){if(event.pageX-this.offset.click.left<this.containment[0]){pageX=this.containment[0]+this.offset.click.left}if(event.pageY-this.offset.click.top<this.containment[1]){pageY=this.containment[1]+this.offset.click.top}if(event.pageX-this.offset.click.left>this.containment[2]){pageX=this.containment[2]+this.offset.click.left}if(event.pageY-this.offset.click.top>this.containment[3]){pageY=this.containment[3]+this.offset.click.top}}if(o.grid){var top=this.originalPageY+Math.round((pageY-this.originalPageY)/o.grid[1])*o.grid[1];pageY=this.containment?(!(top-this.offset.click.top<this.containment[1]||top-this.offset.click.top>this.containment[3])?top:(!(top-this.offset.click.top<this.containment[1])?top-o.grid[1]:top+o.grid[1])):top;var left=this.originalPageX+Math.round((pageX-this.originalPageX)/o.grid[0])*o.grid[0];pageX=this.containment?(!(left-this.offset.click.left<this.containment[0]||left-this.offset.click.left>this.containment[2])?left:(!(left-this.offset.click.left<this.containment[0])?left-o.grid[0]:left+o.grid[0])):left}}return{top:(pageY-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+($.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(scrollIsRootNode?0:scroll.scrollTop())))),left:(pageX-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+($.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft())))}},_rearrange:function(event,i,a,hardRefresh){a?a[0].appendChild(this.placeholder[0]):i.item[0].parentNode.insertBefore(this.placeholder[0],(this.direction=="down"?i.item[0]:i.item[0].nextSibling));this.counter=this.counter?++this.counter:1;var self=this,counter=this.counter;window.setTimeout(function(){if(counter==self.counter){self.refreshPositions(!hardRefresh)}},0)},_clear:function(event,noPropagation){this.reverting=false;var delayedTriggers=[],self=this;if(!this._noFinalSort&&this.currentItem[0].parentNode){this.placeholder.before(this.currentItem)}this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var i in this._storedCSS){if(this._storedCSS[i]=="auto"||this._storedCSS[i]=="static"){this._storedCSS[i]=""}}this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}if(this.fromOutside&&!noPropagation){delayedTriggers.push(function(event){this._trigger("receive",event,this._uiHash(this.fromOutside))})}if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!noPropagation){delayedTriggers.push(function(event){this._trigger("update",event,this._uiHash())})}if(!$.ui.contains(this.element[0],this.currentItem[0])){if(!noPropagation){delayedTriggers.push(function(event){this._trigger("remove",event,this._uiHash())})}for(var i=this.containers.length-1;i>=0;i--){if($.ui.contains(this.containers[i].element[0],this.currentItem[0])&&!noPropagation){delayedTriggers.push((function(c){return function(event){c._trigger("receive",event,this._uiHash(this))}}).call(this,this.containers[i]));delayedTriggers.push((function(c){return function(event){c._trigger("update",event,this._uiHash(this))}}).call(this,this.containers[i]))}}}for(var i=this.containers.length-1;i>=0;i--){if(!noPropagation){delayedTriggers.push((function(c){return function(event){c._trigger("deactivate",event,this._uiHash(this))}}).call(this,this.containers[i]))}if(this.containers[i].containerCache.over){delayedTriggers.push((function(c){return function(event){c._trigger("out",event,this._uiHash(this))}}).call(this,this.containers[i]));this.containers[i].containerCache.over=0}}if(this._storedCursor){$("body").css("cursor",this._storedCursor)}if(this._storedOpacity){this.helper.css("opacity",this._storedOpacity)}if(this._storedZIndex){this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex)}this.dragging=false;if(this.cancelHelperRemoval){if(!noPropagation){this._trigger("beforeStop",event,this._uiHash());for(var i=0;i<delayedTriggers.length;i++){delayedTriggers[i].call(this,event)}this._trigger("stop",event,this._uiHash())}return false}if(!noPropagation){this._trigger("beforeStop",event,this._uiHash())}this.placeholder[0].parentNode.removeChild(this.placeholder[0]);if(this.helper[0]!=this.currentItem[0]){this.helper.remove()}this.helper=null;if(!noPropagation){for(var i=0;i<delayedTriggers.length;i++){delayedTriggers[i].call(this,event)}this._trigger("stop",event,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){if($.widget.prototype._trigger.apply(this,arguments)===false){this.cancel()}},_uiHash:function(inst){var self=inst||this;return{helper:self.helper,placeholder:self.placeholder||$([]),position:self.position,absolutePosition:self.positionAbs,offset:self.positionAbs,item:self.currentItem,sender:inst?inst.element:null}}}));$.extend($.ui.sortable,{getter:"serialize toArray",version:"1.7.2",eventPrefix:"sort",defaults:{appendTo:"parent",axis:false,cancel:":input,option",connectWith:false,containment:false,cursor:"auto",cursorAt:false,delay:0,distance:1,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1000}})})(jQuery); \ No newline at end of file
diff --git a/template-common/lib/ui/minified/ui.tabs.min.js b/template-common/lib/ui/minified/ui.tabs.min.js
index 784dc5b0a..39e8edae9 100644
--- a/template-common/lib/ui/minified/ui.tabs.min.js
+++ b/template-common/lib/ui/minified/ui.tabs.min.js
@@ -1 +1 @@
-(function(A){A.widget("ui.tabs",{init:function(){this.options.event+=".tabs";this.tabify(true)},setData:function(B,C){if((/^selected/).test(B)){this.select(C)}else{this.options[B]=C;this.tabify()}},length:function(){return this.$tabs.length},tabId:function(B){return B.title&&B.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+A.data(B)},ui:function(C,B){return{options:this.options,tab:C,panel:B,index:this.$tabs.index(C)}},tabify:function(O){this.$lis=A("li:has(a[href])",this.element);this.$tabs=this.$lis.map(function(){return A("a",this)[0]});this.$panels=A([]);var P=this,D=this.options;this.$tabs.each(function(R,Q){if(Q.hash&&Q.hash.replace("#","")){P.$panels=P.$panels.add(Q.hash)}else{if(A(Q).attr("href")!="#"){A.data(Q,"href.tabs",Q.href);A.data(Q,"load.tabs",Q.href);var T=P.tabId(Q);Q.href="#"+T;var S=A("#"+T);if(!S.length){S=A(D.panelTemplate).attr("id",T).addClass(D.panelClass).insertAfter(P.$panels[R-1]||P.element);S.data("destroy.tabs",true)}P.$panels=P.$panels.add(S)}else{D.disabled.push(R+1)}}});if(O){this.element.addClass(D.navClass);this.$panels.each(function(){var Q=A(this);Q.addClass(D.panelClass)});if(D.selected===undefined){if(location.hash){this.$tabs.each(function(S,Q){if(Q.hash==location.hash){D.selected=S;if(A.browser.msie||A.browser.opera){var R=A(location.hash),T=R.attr("id");R.attr("id","");setTimeout(function(){R.attr("id",T)},500)}scrollTo(0,0);return false}})}else{if(D.cookie){var J=parseInt(A.cookie("ui-tabs"+A.data(P.element)),10);if(J&&P.$tabs[J]){D.selected=J}}else{if(P.$lis.filter("."+D.selectedClass).length){D.selected=P.$lis.index(P.$lis.filter("."+D.selectedClass)[0])}}}}D.selected=D.selected===null||D.selected!==undefined?D.selected:0;D.disabled=A.unique(D.disabled.concat(A.map(this.$lis.filter("."+D.disabledClass),function(R,Q){return P.$lis.index(R)}))).sort();if(A.inArray(D.selected,D.disabled)!=-1){D.disabled.splice(A.inArray(D.selected,D.disabled),1)}this.$panels.addClass(D.hideClass);this.$lis.removeClass(D.selectedClass);if(D.selected!==null){this.$panels.eq(D.selected).show().removeClass(D.hideClass);this.$lis.eq(D.selected).addClass(D.selectedClass);var K=function(){A(P.element).triggerHandler("tabsshow",[P.fakeEvent("tabsshow"),P.ui(P.$tabs[D.selected],P.$panels[D.selected])],D.show)};if(A.data(this.$tabs[D.selected],"load.tabs")){this.load(D.selected,K)}else{K()}}A(window).bind("unload",function(){P.$tabs.unbind(".tabs");P.$lis=P.$tabs=P.$panels=null})}for(var G=0,N;N=this.$lis[G];G++){A(N)[A.inArray(G,D.disabled)!=-1&&!A(N).hasClass(D.selectedClass)?"addClass":"removeClass"](D.disabledClass)}if(D.cache===false){this.$tabs.removeData("cache.tabs")}var C,I,B={"min-width":0,duration:1},E="normal";if(D.fx&&D.fx.constructor==Array){C=D.fx[0]||B,I=D.fx[1]||B}else{C=I=D.fx||B}var H={display:"",overflow:"",height:""};if(!A.browser.msie){H.opacity=""}function M(R,Q,S){Q.animate(C,C.duration||E,function(){Q.addClass(D.hideClass).css(H);if(A.browser.msie&&C.opacity){Q[0].style.filter=""}if(S){L(R,S,Q)}})}function L(R,S,Q){if(I===B){S.css("display","block")}S.animate(I,I.duration||E,function(){S.removeClass(D.hideClass).css(H);if(A.browser.msie&&I.opacity){S[0].style.filter=""}A(P.element).triggerHandler("tabsshow",[P.fakeEvent("tabsshow"),P.ui(R,S[0])],D.show)})}function F(R,T,Q,S){T.addClass(D.selectedClass).siblings().removeClass(D.selectedClass);M(R,Q,S)}this.$tabs.unbind(".tabs").bind(D.event,function(){var T=A(this).parents("li:eq(0)"),Q=P.$panels.filter(":visible"),S=A(this.hash);if((T.hasClass(D.selectedClass)&&!D.unselect)||T.hasClass(D.disabledClass)||A(this).hasClass(D.loadingClass)||A(P.element).triggerHandler("tabsselect",[P.fakeEvent("tabsselect"),P.ui(this,S[0])],D.select)===false){this.blur();return false}P.options.selected=P.$tabs.index(this);if(D.unselect){if(T.hasClass(D.selectedClass)){P.options.selected=null;T.removeClass(D.selectedClass);P.$panels.stop();M(this,Q);this.blur();return false}else{if(!Q.length){P.$panels.stop();var R=this;P.load(P.$tabs.index(this),function(){T.addClass(D.selectedClass).addClass(D.unselectClass);L(R,S)});this.blur();return false}}}if(D.cookie){A.cookie("ui-tabs"+A.data(P.element),P.options.selected,D.cookie)}P.$panels.stop();if(S.length){var R=this;P.load(P.$tabs.index(this),Q.length?function(){F(R,T,Q,S)}:function(){T.addClass(D.selectedClass);L(R,S)})}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}if(A.browser.msie){this.blur()}return false});if(!(/^click/).test(D.event)){this.$tabs.bind("click.tabs",function(){return false})}},add:function(E,D,C){if(C==undefined){C=this.$tabs.length}var G=this.options;var I=A(G.tabTemplate.replace(/#\{href\}/g,E).replace(/#\{label\}/g,D));I.data("destroy.tabs",true);var H=E.indexOf("#")==0?E.replace("#",""):this.tabId(A("a:first-child",I)[0]);var F=A("#"+H);if(!F.length){F=A(G.panelTemplate).attr("id",H).addClass(G.hideClass).data("destroy.tabs",true)}F.addClass(G.panelClass);if(C>=this.$lis.length){I.appendTo(this.element);F.appendTo(this.element[0].parentNode)}else{I.insertBefore(this.$lis[C]);F.insertBefore(this.$panels[C])}G.disabled=A.map(G.disabled,function(K,J){return K>=C?++K:K});this.tabify();if(this.$tabs.length==1){I.addClass(G.selectedClass);F.removeClass(G.hideClass);var B=A.data(this.$tabs[0],"load.tabs");if(B){this.load(C,B)}}this.element.triggerHandler("tabsadd",[this.fakeEvent("tabsadd"),this.ui(this.$tabs[C],this.$panels[C])],G.add)},remove:function(B){var D=this.options,E=this.$lis.eq(B).remove(),C=this.$panels.eq(B).remove();if(E.hasClass(D.selectedClass)&&this.$tabs.length>1){this.select(B+(B+1<this.$tabs.length?1:-1))}D.disabled=A.map(A.grep(D.disabled,function(G,F){return G!=B}),function(G,F){return G>=B?--G:G});this.tabify();this.element.triggerHandler("tabsremove",[this.fakeEvent("tabsremove"),this.ui(E.find("a")[0],C[0])],D.remove)},enable:function(B){var C=this.options;if(A.inArray(B,C.disabled)==-1){return }var D=this.$lis.eq(B).removeClass(C.disabledClass);if(A.browser.safari){D.css("display","inline-block");setTimeout(function(){D.css("display","block")},0)}C.disabled=A.grep(C.disabled,function(F,E){return F!=B});this.element.triggerHandler("tabsenable",[this.fakeEvent("tabsenable"),this.ui(this.$tabs[B],this.$panels[B])],C.enable)},disable:function(C){var B=this,D=this.options;if(C!=D.selected){this.$lis.eq(C).addClass(D.disabledClass);D.disabled.push(C);D.disabled.sort();this.element.triggerHandler("tabsdisable",[this.fakeEvent("tabsdisable"),this.ui(this.$tabs[C],this.$panels[C])],D.disable)}},select:function(B){if(typeof B=="string"){B=this.$tabs.index(this.$tabs.filter("[href$="+B+"]")[0])}this.$tabs.eq(B).trigger(this.options.event)},load:function(G,K){var L=this,D=this.options,E=this.$tabs.eq(G),J=E[0],H=K==undefined||K===false,B=E.data("load.tabs");K=K||function(){};if(!B||!H&&A.data(J,"cache.tabs")){K();return }var M=function(N){var O=A(N),P=O.find("*:last");return P.length&&P.is(":not(img)")&&P||O};var C=function(){L.$tabs.filter("."+D.loadingClass).removeClass(D.loadingClass).each(function(){if(D.spinner){M(this).parent().html(M(this).data("label.tabs"))}});L.xhr=null};if(D.spinner){var I=M(J).html();M(J).wrapInner("<em></em>").find("em").data("label.tabs",I).html(D.spinner)}var F=A.extend({},D.ajaxOptions,{url:B,success:function(O,N){A(J.hash).html(O);C();if(D.cache){A.data(J,"cache.tabs",true)}A(L.element).triggerHandler("tabsload",[L.fakeEvent("tabsload"),L.ui(L.$tabs[G],L.$panels[G])],D.load);D.ajaxOptions.success&&D.ajaxOptions.success(O,N);K()}});if(this.xhr){this.xhr.abort();C()}E.addClass(D.loadingClass);setTimeout(function(){L.xhr=A.ajax(F)},0)},url:function(C,B){this.$tabs.eq(C).removeData("cache.tabs").data("load.tabs",B)},destroy:function(){var B=this.options;this.element.unbind(".tabs").removeClass(B.navClass).removeData("tabs");this.$tabs.each(function(){var C=A.data(this,"href.tabs");if(C){this.href=C}var D=A(this).unbind(".tabs");A.each(["href","load","cache"],function(E,F){D.removeData(F+".tabs")})});this.$lis.add(this.$panels).each(function(){if(A.data(this,"destroy.tabs")){A(this).remove()}else{A(this).removeClass([B.selectedClass,B.unselectClass,B.disabledClass,B.panelClass,B.hideClass].join(" "))}})},fakeEvent:function(B){return A.event.fix({type:B,target:this.element[0]})}});A.ui.tabs.defaults={unselect:false,event:"click",disabled:[],cookie:null,spinner:"Loading&#8230;",cache:false,idPrefix:"ui-tabs-",ajaxOptions:{},fx:null,tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>',panelTemplate:"<div></div>",navClass:"ui-tabs-nav",selectedClass:"ui-tabs-selected",unselectClass:"ui-tabs-unselect",disabledClass:"ui-tabs-disabled",panelClass:"ui-tabs-panel",hideClass:"ui-tabs-hide",loadingClass:"ui-tabs-loading"};A.ui.tabs.getter="length";A.extend(A.ui.tabs.prototype,{rotation:null,rotate:function(C,F){F=F||false;var B=this,E=this.options.selected;function G(){B.rotation=setInterval(function(){E=++E<B.$tabs.length?E:0;B.select(E)},C)}function D(H){if(!H||H.clientX){clearInterval(B.rotation)}}if(C){G();if(!F){this.$tabs.bind(this.options.event,D)}else{this.$tabs.bind(this.options.event,function(){D();E=B.options.selected;G()})}}else{D();this.$tabs.unbind(this.options.event,D)}}})})(jQuery) \ No newline at end of file
+(function($){$.widget("ui.tabs",{_init:function(){if(this.options.deselectable!==undefined){this.options.collapsible=this.options.deselectable}this._tabify(true)},_setData:function(key,value){if(key=="selected"){if(this.options.collapsible&&value==this.options.selected){return }this.select(value)}else{this.options[key]=value;if(key=="deselectable"){this.options.collapsible=value}this._tabify()}},_tabId:function(a){return a.title&&a.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+$.data(a)},_sanitizeSelector:function(hash){return hash.replace(/:/g,"\\:")},_cookie:function(){var cookie=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+$.data(this.list[0]));return $.cookie.apply(null,[cookie].concat($.makeArray(arguments)))},_ui:function(tab,panel){return{tab:tab,panel:panel,index:this.anchors.index(tab)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var el=$(this);el.html(el.data("label.tabs")).removeData("label.tabs")})},_tabify:function(init){this.list=this.element.children("ul:first");this.lis=$("li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return $("a",this)[0]});this.panels=$([]);var self=this,o=this.options;var fragmentId=/^#.+/;this.anchors.each(function(i,a){var href=$(a).attr("href");var hrefBase=href.split("#")[0],baseEl;if(hrefBase&&(hrefBase===location.toString().split("#")[0]||(baseEl=$("base")[0])&&hrefBase===baseEl.href)){href=a.hash;a.href=href}if(fragmentId.test(href)){self.panels=self.panels.add(self._sanitizeSelector(href))}else{if(href!="#"){$.data(a,"href.tabs",href);$.data(a,"load.tabs",href.replace(/#.*$/,""));var id=self._tabId(a);a.href="#"+id;var $panel=$("#"+id);if(!$panel.length){$panel=$(o.panelTemplate).attr("id",id).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(self.panels[i-1]||self.list);$panel.data("destroy.tabs",true)}self.panels=self.panels.add($panel)}else{o.disabled.push(i)}}});if(init){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(o.selected===undefined){if(location.hash){this.anchors.each(function(i,a){if(a.hash==location.hash){o.selected=i;return false}})}if(typeof o.selected!="number"&&o.cookie){o.selected=parseInt(self._cookie(),10)}if(typeof o.selected!="number"&&this.lis.filter(".ui-tabs-selected").length){o.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}o.selected=o.selected||0}else{if(o.selected===null){o.selected=-1}}o.selected=((o.selected>=0&&this.anchors[o.selected])||o.selected<0)?o.selected:0;o.disabled=$.unique(o.disabled.concat($.map(this.lis.filter(".ui-state-disabled"),function(n,i){return self.lis.index(n)}))).sort();if($.inArray(o.selected,o.disabled)!=-1){o.disabled.splice($.inArray(o.selected,o.disabled),1)}this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(o.selected>=0&&this.anchors.length){this.panels.eq(o.selected).removeClass("ui-tabs-hide");this.lis.eq(o.selected).addClass("ui-tabs-selected ui-state-active");self.element.queue("tabs",function(){self._trigger("show",null,self._ui(self.anchors[o.selected],self.panels[o.selected]))});this.load(o.selected)}$(window).bind("unload",function(){self.lis.add(self.anchors).unbind(".tabs");self.lis=self.anchors=self.panels=null})}else{o.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}this.element[o.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");if(o.cookie){this._cookie(o.selected,o.cookie)}for(var i=0,li;(li=this.lis[i]);i++){$(li)[$.inArray(i,o.disabled)!=-1&&!$(li).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled")}if(o.cache===false){this.anchors.removeData("cache.tabs")}this.lis.add(this.anchors).unbind(".tabs");if(o.event!="mouseover"){var addState=function(state,el){if(el.is(":not(.ui-state-disabled)")){el.addClass("ui-state-"+state)}};var removeState=function(state,el){el.removeClass("ui-state-"+state)};this.lis.bind("mouseover.tabs",function(){addState("hover",$(this))});this.lis.bind("mouseout.tabs",function(){removeState("hover",$(this))});this.anchors.bind("focus.tabs",function(){addState("focus",$(this).closest("li"))});this.anchors.bind("blur.tabs",function(){removeState("focus",$(this).closest("li"))})}var hideFx,showFx;if(o.fx){if($.isArray(o.fx)){hideFx=o.fx[0];showFx=o.fx[1]}else{hideFx=showFx=o.fx}}function resetStyle($el,fx){$el.css({display:""});if($.browser.msie&&fx.opacity){$el[0].style.removeAttribute("filter")}}var showTab=showFx?function(clicked,$show){$(clicked).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");$show.hide().removeClass("ui-tabs-hide").animate(showFx,showFx.duration||"normal",function(){resetStyle($show,showFx);self._trigger("show",null,self._ui(clicked,$show[0]))})}:function(clicked,$show){$(clicked).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");$show.removeClass("ui-tabs-hide");self._trigger("show",null,self._ui(clicked,$show[0]))};var hideTab=hideFx?function(clicked,$hide){$hide.animate(hideFx,hideFx.duration||"normal",function(){self.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");$hide.addClass("ui-tabs-hide");resetStyle($hide,hideFx);self.element.dequeue("tabs")})}:function(clicked,$hide,$show){self.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");$hide.addClass("ui-tabs-hide");self.element.dequeue("tabs")};this.anchors.bind(o.event+".tabs",function(){var el=this,$li=$(this).closest("li"),$hide=self.panels.filter(":not(.ui-tabs-hide)"),$show=$(self._sanitizeSelector(this.hash));if(($li.hasClass("ui-tabs-selected")&&!o.collapsible)||$li.hasClass("ui-state-disabled")||$li.hasClass("ui-state-processing")||self._trigger("select",null,self._ui(this,$show[0]))===false){this.blur();return false}o.selected=self.anchors.index(this);self.abort();if(o.collapsible){if($li.hasClass("ui-tabs-selected")){o.selected=-1;if(o.cookie){self._cookie(o.selected,o.cookie)}self.element.queue("tabs",function(){hideTab(el,$hide)}).dequeue("tabs");this.blur();return false}else{if(!$hide.length){if(o.cookie){self._cookie(o.selected,o.cookie)}self.element.queue("tabs",function(){showTab(el,$show)});self.load(self.anchors.index(this));this.blur();return false}}}if(o.cookie){self._cookie(o.selected,o.cookie)}if($show.length){if($hide.length){self.element.queue("tabs",function(){hideTab(el,$hide)})}self.element.queue("tabs",function(){showTab(el,$show)});self.load(self.anchors.index(this))}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}if($.browser.msie){this.blur()}});this.anchors.bind("click.tabs",function(){return false})},destroy:function(){var o=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var href=$.data(this,"href.tabs");if(href){this.href=href}var $this=$(this).unbind(".tabs");$.each(["href","load","cache"],function(i,prefix){$this.removeData(prefix+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){if($.data(this,"destroy.tabs")){$(this).remove()}else{$(this).removeClass(["ui-state-default","ui-corner-top","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-corner-bottom","ui-tabs-hide"].join(" "))}});if(o.cookie){this._cookie(null,o.cookie)}},add:function(url,label,index){if(index===undefined){index=this.anchors.length}var self=this,o=this.options,$li=$(o.tabTemplate.replace(/#\{href\}/g,url).replace(/#\{label\}/g,label)),id=!url.indexOf("#")?url.replace("#",""):this._tabId($("a",$li)[0]);$li.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var $panel=$("#"+id);if(!$panel.length){$panel=$(o.panelTemplate).attr("id",id).data("destroy.tabs",true)}$panel.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(index>=this.lis.length){$li.appendTo(this.list);$panel.appendTo(this.list[0].parentNode)}else{$li.insertBefore(this.lis[index]);$panel.insertBefore(this.panels[index])}o.disabled=$.map(o.disabled,function(n,i){return n>=index?++n:n});this._tabify();if(this.anchors.length==1){$li.addClass("ui-tabs-selected ui-state-active");$panel.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){self._trigger("show",null,self._ui(self.anchors[0],self.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[index],this.panels[index]))},remove:function(index){var o=this.options,$li=this.lis.eq(index).remove(),$panel=this.panels.eq(index).remove();if($li.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(index+(index+1<this.anchors.length?1:-1))}o.disabled=$.map($.grep(o.disabled,function(n,i){return n!=index}),function(n,i){return n>=index?--n:n});this._tabify();this._trigger("remove",null,this._ui($li.find("a")[0],$panel[0]))},enable:function(index){var o=this.options;if($.inArray(index,o.disabled)==-1){return }this.lis.eq(index).removeClass("ui-state-disabled");o.disabled=$.grep(o.disabled,function(n,i){return n!=index});this._trigger("enable",null,this._ui(this.anchors[index],this.panels[index]))},disable:function(index){var self=this,o=this.options;if(index!=o.selected){this.lis.eq(index).addClass("ui-state-disabled");o.disabled.push(index);o.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[index],this.panels[index]))}},select:function(index){if(typeof index=="string"){index=this.anchors.index(this.anchors.filter("[href$="+index+"]"))}else{if(index===null){index=-1}}if(index==-1&&this.options.collapsible){index=this.options.selected}this.anchors.eq(index).trigger(this.options.event+".tabs")},load:function(index){var self=this,o=this.options,a=this.anchors.eq(index)[0],url=$.data(a,"load.tabs");this.abort();if(!url||this.element.queue("tabs").length!==0&&$.data(a,"cache.tabs")){this.element.dequeue("tabs");return }this.lis.eq(index).addClass("ui-state-processing");if(o.spinner){var span=$("span",a);span.data("label.tabs",span.html()).html(o.spinner)}this.xhr=$.ajax($.extend({},o.ajaxOptions,{url:url,success:function(r,s){$(self._sanitizeSelector(a.hash)).html(r);self._cleanup();if(o.cache){$.data(a,"cache.tabs",true)}self._trigger("load",null,self._ui(self.anchors[index],self.panels[index]));try{o.ajaxOptions.success(r,s)}catch(e){}self.element.dequeue("tabs")}}))},abort:function(){this.element.queue([]);this.panels.stop(false,true);if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup()},url:function(index,url){this.anchors.eq(index).removeData("cache.tabs").data("load.tabs",url)},length:function(){return this.anchors.length}});$.extend($.ui.tabs,{version:"1.7.2",getter:"length",defaults:{ajaxOptions:null,cache:false,cookie:null,collapsible:false,disabled:[],event:"click",fx:null,idPrefix:"ui-tabs-",panelTemplate:"<div></div>",spinner:"<em>Loading&#8230;</em>",tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>'}});$.extend($.ui.tabs.prototype,{rotation:null,rotate:function(ms,continuing){var self=this,o=this.options;var rotate=self._rotate||(self._rotate=function(e){clearTimeout(self.rotation);self.rotation=setTimeout(function(){var t=o.selected;self.select(++t<self.anchors.length?t:0)},ms);if(e){e.stopPropagation()}});var stop=self._unrotate||(self._unrotate=!continuing?function(e){if(e.clientX){self.rotate(null)}}:function(e){t=o.selected;rotate()});if(ms){this.element.bind("tabsshow",rotate);this.anchors.bind(o.event+".tabs",stop);rotate()}else{clearTimeout(self.rotation);this.element.unbind("tabsshow",rotate);this.anchors.unbind(o.event+".tabs",stop);delete this._rotate;delete this._unrotate}}})})(jQuery); \ No newline at end of file
diff --git a/template-common/lib/ui/packed/effects.blind.packed.js b/template-common/lib/ui/packed/effects.blind.packed.js
index c6f071982..47c1f6ee4 100644
--- a/template-common/lib/ui/packed/effects.blind.packed.js
+++ b/template-common/lib/ui/packed/effects.blind.packed.js
@@ -1,2 +1 @@
-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}('(3(A){A.2.z=3(B){y d.x(3(){1 D=A(d),C=["w","v","u"];1 H=A.2.t(D,B.6.s||"5");1 G=B.6.r||"8";A.2.q(D,C);D.7();1 J=A.2.p(D).a({o:"n"});1 E=(G=="8")?"c":"b";1 I=(G=="8")?J.c():J.b();4(H=="7"){J.a(E,0)}1 F={};F[E]=H=="7"?I:0;J.m(F,B.l,B.6.k,3(){4(H=="5"){D.5()}A.2.j(D,C);A.2.i(D);4(B.9){B.9.h(D[0],g)}D.f()})})}})(e)',46,46,'|var|effects|function|if|hide|options|show|vertical|callback|css|width|height|this|jQuery|dequeue|arguments|apply|removeWrapper|restore|easing|duration|animate|hidden|overflow|createWrapper|save|direction|mode|setMode|left|top|position|queue|return|blind||||||||||'.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($){$.3.t=6(o){u j.v(6(){2 1=$(j),e=[\'s\',\'r\',\'m\'];2 4=$.3.n(1,o.8.4||\'c\');2 7=o.8.7||\'b\';$.3.p(1,e);1.d();2 5=$.3.q(1).g({x:\'y\'});2 a=(7==\'b\')?\'h\':\'l\';2 k=(7==\'b\')?5.h():5.l();f(4==\'d\')5.g(a,0);2 9={};9[a]=4==\'d\'?k:0;5.C(9,o.D,o.8.G,6(){f(4==\'c\')1.c();$.3.E(1,e);$.3.A(1);f(o.i)o.i.B(1[0],w);1.z()})})}})(F);',43,43,'|el|var|effects|mode|wrapper|function|direction|options|animation|ref|vertical|hide|show|props|if|css|height|callback|this|distance|width|left|setMode||save|createWrapper|top|position|blind|return|queue|arguments|overflow|hidden|dequeue|removeWrapper|apply|animate|duration|restore|jQuery|easing'.split('|'),0,{}))
diff --git a/template-common/lib/ui/packed/effects.bounce.packed.js b/template-common/lib/ui/packed/effects.bounce.packed.js
index 8b86a17a5..d1cc78c04 100644
--- a/template-common/lib/ui/packed/effects.bounce.packed.js
+++ b/template-common/lib/ui/packed/effects.bounce.packed.js
@@ -1,2 +1 @@
-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}('(a(A){A.8.16=a(B){15 e.m(a(){4 E=A(e),K=["14","i","j"];4 J=A.8.13(E,B.6.12||"11");4 M=B.6.10||"k";4 C=B.6.u||Z;4 D=B.6.Y||5;4 G=B.X||W;7(/h|d/.V(J)){K.U("g")}A.8.T(E,K);E.h();A.8.S(E);4 F=(M=="k"||M=="R")?"i":"j";4 O=(M=="k"||M=="j")?"9":"Q";4 C=B.6.u||(F=="i"?E.P({t:s})/3:E.z({t:s})/3);7(J=="h"){E.r("g",0).r(F,O=="9"?-C:C)}7(J=="d"){C=C/(D*2)}7(J!="d"){D--}7(J=="h"){4 H={g:1};H[F]=(O=="9"?"+=":"-=")+C;E.c(H,G/2,B.6.b);C=C/2;D--}y(4 I=0;I<D;I++){4 N={},L={};N[F]=(O=="9"?"-=":"+=")+C;L[F]=(O=="9"?"+=":"-=")+C;E.c(N,G/2,B.6.b).c(L,G/2,B.6.b);C=(J=="d")?C*2:C/2}7(J=="d"){4 H={g:0};H[F]=(O=="9"?"-=":"+=")+C;E.c(H,G/2,B.6.b,a(){E.d();A.8.q(E,K);A.8.p(E);7(B.f){B.f.o(e,n)}})}x{4 N={},L={};N[F]=(O=="9"?"-=":"+=")+C;L[F]=(O=="9"?"+=":"-=")+C;E.c(N,G/2,B.6.b).c(L,G/2,B.6.b,a(){A.8.q(E,K);A.8.p(E);7(B.f){B.f.o(e,n)}})}E.m("w",a(){E.l()});E.l()})}})(v)',62,69,'||||var||options|if|effects|pos|function|easing|animate|hide|this|callback|opacity|show|top|left|up|dequeue|queue|arguments|apply|removeWrapper|restore|css|true|margin|distance|jQuery|fx|else|for|outerWidth||||||||||||||||outerHeight|neg|down|createWrapper|save|push|test|250|duration|times|20|direction|effect|mode|setMode|position|return|bounce'.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}('(q($){$.c.T=q(o){S v.H(q(){7 4=$(v),r=[\'W\',\'w\',\'x\'];7 a=$.c.Z(4,o.8.a||\'Y\');7 l=o.8.l||\'y\';7 6=o.8.6||R;7 k=o.8.k||5;7 f=o.N||L;b(/s|j/.M(a))r.K(\'t\');$.c.J(4,r);4.s();$.c.O(4);7 9=(l==\'y\'||l==\'P\')?\'w\':\'x\';7 d=(l==\'y\'||l==\'x\')?\'e\':\'I\';7 6=o.8.6||(9==\'w\'?4.11({D:z})/3:4.X({D:z})/3);b(a==\'s\')4.C(\'t\',0).C(9,d==\'e\'?-6:6);b(a==\'j\')6=6/(k*2);b(a!=\'j\')k--;b(a==\'s\'){7 m={t:1};m[9]=(d==\'e\'?\'+=\':\'-=\')+6;4.h(m,f/2,o.8.p);6=6/2;k--};10(7 i=0;i<k;i++){7 n={},g={};n[9]=(d==\'e\'?\'-=\':\'+=\')+6;g[9]=(d==\'e\'?\'+=\':\'-=\')+6;4.h(n,f/2,o.8.p).h(g,f/2,o.8.p);6=(a==\'j\')?6*2:6/2};b(a==\'j\'){7 m={t:0};m[9]=(d==\'e\'?\'-=\':\'+=\')+6;4.h(m,f/2,o.8.p,q(){4.j();$.c.B(4,r);$.c.F(4);b(o.u)o.u.E(v,G)})}Q{7 n={},g={};n[9]=(d==\'e\'?\'-=\':\'+=\')+6;g[9]=(d==\'e\'?\'+=\':\'-=\')+6;4.h(n,f/2,o.8.p).h(g,f/2,o.8.p,q(){$.c.B(4,r);$.c.F(4);b(o.u)o.u.E(v,G)})};4.H(\'U\',q(){4.A()});4.A()})}})(V);',62,64,'||||el||distance|var|options|ref|mode|if|effects|motion|pos|speed|animation2|animate||hide|times|direction|animation|animation1||easing|function|props|show|opacity|callback|this|top|left|up|true|dequeue|restore|css|margin|apply|removeWrapper|arguments|queue|neg|save|push|250|test|duration|createWrapper|down|else|20|return|bounce|fx|jQuery|position|outerWidth|effect|setMode|for|outerHeight'.split('|'),0,{}))
diff --git a/template-common/lib/ui/packed/effects.clip.packed.js b/template-common/lib/ui/packed/effects.clip.packed.js
index 8876e7b5e..925218295 100644
--- a/template-common/lib/ui/packed/effects.clip.packed.js
+++ b/template-common/lib/ui/packed/effects.clip.packed.js
@@ -1,2 +1 @@
-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}('(4(A){A.3.Q=4(B){P l.i(4(){1 F=A(l),J=["6","k","j","e","d"];1 I=A.3.O(F,B.a.N||"9");1 K=B.a.M||"7";A.3.L(F,J);F.5();1 C=A.3.z(F).c({y:"x"});1 E=F[0].w=="v"?C:F;1 G={b:(K=="7")?"e":"d",6:(K=="7")?"k":"j"};1 D=(K=="7")?E.e():E.d();8(I=="5"){E.c(G.b,0);E.c(G.6,D/2)}1 H={};H[G.b]=I=="5"?D:0;H[G.6]=I=="5"?0:D/2;E.u(H,{i:t,h:B.h,g:B.a.g,s:4(){8(I=="9"){F.9()}A.3.r(F,J);A.3.q(F);8(B.f){B.f.p(F[0],o)}F.n()}})})}})(m)',53,53,'|var||effects|function|show|position|vertical|if|hide|options|size|css|width|height|callback|easing|duration|queue|left|top|this|jQuery|dequeue|arguments|apply|removeWrapper|restore|complete|false|animate|IMG|tagName|hidden|overflow|createWrapper||||||||||||save|direction|mode|setMode|return|clip'.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}('(9($){$.6.L=9(o){H t.s(9(){3 1=$(t),m=[\'d\',\'u\',\'p\',\'i\',\'h\'];3 5=$.6.y(1,o.l.5||\'f\');3 8=o.l.8||\'a\';$.6.z(1,m);1.c();3 v=$.6.A(1).g({B:\'x\'});3 4=1[0].C==\'w\'?v:1;3 7={k:(8==\'a\')?\'i\':\'h\',d:(8==\'a\')?\'u\':\'p\'};3 b=(8==\'a\')?4.i():4.h();j(5==\'c\'){4.g(7.k,0);4.g(7.d,b/2)} 3 e={};e[7.k]=5==\'c\'?b:0;e[7.d]=5==\'c\'?0:b/2;4.4(e,{s:E,r:o.r,q:o.l.q,K:9(){j(5==\'f\')1.f();$.6.D(1,m);$.6.G(1);j(o.n)o.n.I(1[0],J);1.M()}})})}})(F);',49,49,'|el||var|animate|mode|effects|ref|direction|function|vertical|distance|show|position|animation|hide|css|width|height|if|size|options|props|callback||left|easing|duration|queue|this|top|wrapper|IMG|hidden|setMode|save|createWrapper|overflow|tagName|restore|false|jQuery|removeWrapper|return|apply|arguments|complete|clip|dequeue'.split('|'),0,{}))
diff --git a/template-common/lib/ui/packed/effects.core.packed.js b/template-common/lib/ui/packed/effects.core.packed.js
new file mode 100644
index 000000000..9d13af062
--- /dev/null
+++ b/template-common/lib/ui/packed/effects.core.packed.js
@@ -0,0 +1 @@
+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}(';2n.I||(e($){$.I={34:"1.7.2",33:e(k,L){21(g i=0;i<L.1C;i++){8(L[i]!==13)k.2Z("2y.2z."+L[i],k[0].G[L[i]])}},36:e(k,L){21(g i=0;i<L.1C;i++){8(L[i]!==13)k.D(L[i],k.2Z("2y.2z."+L[i]))}},3b:e(2v,1j){8(1j==\'Q\')1j=2v.23(\':39\')?\'1e\':\'1x\';6 1j},3d:e(1m,1Y){g y,x;2K(1m[0]){17\'N\':y=0;Y;17\'38\':y=0.5;Y;17\'2r\':y=1;Y;2H:y=1m[0]/1Y.2E};2K(1m[1]){17\'O\':x=0;Y;17\'3c\':x=0.5;Y;17\'2W\':x=1;Y;2H:x=1m[1]/1Y.2D};6{x:x,y:y}},31:e(k){8(k.1l().23(\'.22-I-W\'))6 k.1l();g 2B={2D:k.32(2A),2E:k.35(2A),\'2F\':k.D(\'2F\')};k.3C(\'<2I 3v="22-I-W" G="3t-3s:2m%;3w:1u;3x:3B;3A:0;3e:0"></2I>\');g W=k.1l();8(k.D(\'V\')==\'1S\'){W.D({V:\'1T\'});k.D({V:\'1T\'})}K{g N=k.D(\'N\');8(26(C(N,10)))N=\'2C\';g O=k.D(\'O\');8(26(C(O,10)))O=\'2C\';W.D({V:k.D(\'V\'),N:N,O:O,3y:k.D(\'z-3r\')}).1e();k.D({V:\'1T\',N:0,O:0})}W.D(2B);6 W},3q:e(k){8(k.1l().23(\'.22-I-W\'))6 k.1l().3j(k);6 k},3i:e(k,2x,2M,q){q=q||{};$.1v(2x,e(i,x){15=k.2l(x);8(15[0]>0)q[x]=15[0]*2M+15[1]});6 q},1n:e(q,1h,u,B){g 1L=(X u=="e"?u:(B?B:13));g 2O=(X u=="3h"?u:13);6 h.1v(e(){g 1Q={};g T=$(h);g 1d=T.E("G")||\'\';8(X 1d==\'2Q\')1d=1d["1N"];8(q.Q){T.3f(q.Q)?q.J=q.Q:q.H=q.Q}g 1z=$.1E({},(1r.1p?1r.1p.2L(h,13):h.2N));8(q.H)T.1o(q.H);8(q.J)T.1g(q.J);g Z=$.1E({},(1r.1p?1r.1p.2L(h,13):h.2N));8(q.H)T.1g(q.H);8(q.J)T.1o(q.J);21(g n 3g Z){8(X Z[n]!="e"&&Z[n]&&n.1K("3k")==-1&&n.1K("1C")==-1&&Z[n]!=1z[n]&&(n.1G(/A/i)||(!n.1G(/A/i)&&!26(C(Z[n],10))))&&(1z.V!="1S"||(1z.V=="1S"&&!n.1G(/O|N|2r|2W/))))1Q[n]=Z[n]}T.3l(1Q,1h,2O,e(){8(X $(h).E("G")==\'2Q\'){$(h).E("G")["1N"]="";$(h).E("G")["1N"]=1d}K $(h).E("G",1d);8(q.H)$(h).1o(q.H);8(q.J)$(h).1g(q.J);8(1L)1L.F(h,w)})})}};e 1s(a,m){g o=a[1]&&a[1].18==2S?a[1]:{};8(m)o.1j=m;g r=a[1]&&a[1].18!=2S?a[1]:(o.1h?o.1h:a[2]);r=$.l.3p?0:X r==="3o"?r:$.l.2R[r]||$.l.2R.3n;g B=o.B||($.1y(a[1])&&a[1])||($.1y(a[2])&&a[2])||($.1y(a[3])&&a[3]);6[a[0],o,r,B]}$.14.1E({2c:$.14.1e,2a:$.14.1x,2d:$.14.Q,2k:$.14.1o,2j:$.14.1g,2f:$.14.2g,1t:e(l,1Z,r,B){6 $.I[l]?$.I[l].3m(h,{3z:l,1Z:1Z||{},1h:r,B:B}):13},1e:e(){8(!w[0]||(w[0].18==1F||(/(1M|1O|1P)/).1R(w[0])))6 h.2c.F(h,w);K{6 h.1t.F(h,1s(w,\'1e\'))}},1x:e(){8(!w[0]||(w[0].18==1F||(/(1M|1O|1P)/).1R(w[0])))6 h.2a.F(h,w);K{6 h.1t.F(h,1s(w,\'1x\'))}},Q:e(){8(!w[0]||(w[0].18==1F||(/(1M|1O|1P)/).1R(w[0]))||($.1y(w[0])||X w[0]==\'2h\')){6 h.2d.F(h,w)}K{6 h.1t.F(h,1s(w,\'Q\'))}},1o:e(R,r,u,B){6 r?$.I.1n.F(h,[{H:R},r,u,B]):h.2k(R)},1g:e(R,r,u,B){6 r?$.I.1n.F(h,[{J:R},r,u,B]):h.2j(R)},2g:e(R,r,u,B){6((X r!=="2h")&&r)?$.I.1n.F(h,[{Q:R},r,u,B]):h.2f(R,r)},2q:e(J,H,r,u,B){6 $.I.1n.F(h,[{H:H,J:J},r,u,B])},3u:e(){6 h.2q.F(h,w)},2l:e(2e){g G=h.D(2e),20=[];$.1v([\'3a\',\'30\',\'%\',\'37\'],e(i,15){8(G.1K(15)>0)20=[1q(G),15]});6 20}});$.1v([\'2p\',\'40\',\'4W\',\'4V\',\'4U\',\'A\',\'4S\'],e(i,E){$.l.4T[E]=e(l){8(l.4X==0){l.11=2o(l.12,E);l.1f=28(l.1f)}l.12.G[E]="29("+[f.24(f.1X(C((l.27*(l.1f[0]-l.11[0]))+l.11[0],10),j),0),f.24(f.1X(C((l.27*(l.1f[1]-l.11[1]))+l.11[1],10),j),0),f.24(f.1X(C((l.27*(l.1f[2]-l.11[2]))+l.11[2],10),j),0)].4Y(",")+")"}});e 28(A){g v;8(A&&A.18==54&&A.1C==3)6 A;8(v=/29\\(\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*\\)/.1k(A))6[C(v[1],10),C(v[2],10),C(v[3],10)];8(v=/29\\(\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*\\)/.1k(A))6[1q(v[1])*2.55,1q(v[2])*2.55,1q(v[3])*2.55];8(v=/#([a-1c-1b-9]{2})([a-1c-1b-9]{2})([a-1c-1b-9]{2})/.1k(A))6[C(v[1],16),C(v[2],16),C(v[3],16)];8(v=/#([a-1c-1b-9])([a-1c-1b-9])([a-1c-1b-9])/.1k(A))6[C(v[1]+v[1],16),C(v[2]+v[2],16),C(v[3]+v[3],16)];8(v=/53\\(0, 0, 0, 0\\)/.1k(A))6 1V[\'1u\'];6 1V[$.3D(A).52()]}e 2o(12,E){g A;4Z{A=$.51(12,E);8(A!=\'\'&&A!=\'1u\'||$.4R(12,"4Q"))Y;E="2p"}4I(12=12.4H);6 28(A)};g 1V={57:[0,j,j],4E:[2P,j,j],4F:[2i,2i,4J],4K:[0,0,0],4P:[0,0,j],4O:[2X,42,42],4N:[0,j,j],4L:[0,0,19],4M:[0,19,19],56:[1H,1H,1H],5e:[0,2m,0],5m:[5n,5o,2b],5l:[19,0,19],5q:[5p,2b,47],5r:[j,2U,0],5s:[5j,50,5c],5b:[19,0,0],5a:[58,59,5d],5k:[5i,0,1w],5h:[j,0,j],5g:[j,5f,0],4G:[0,P,0],4C:[U,0,3X],3Y:[2P,2T,2U],3W:[3V,3T,2T],3U:[2V,j,j],3Z:[2Y,4D,2Y],46:[1w,1w,1w],45:[j,44,41],43:[j,j,2V],3S:[0,j,0],3R:[j,0,j],3I:[P,0,0],3J:[0,0,P],3H:[P,P,0],3G:[j,2X,0],3E:[j,1A,3F],3K:[P,0,P],3L:[P,0,P],3Q:[j,0,0],3P:[1A,1A,1A],3O:[j,j,j],3M:[j,j,0],1u:[j,j,j]};$.u.3N=$.u.2w;$.1E($.u,{2s:\'2t\',2w:e(x,t,b,c,d){6 $.u[$.u.2s](x,t,b,c,d)},48:e(x,t,b,c,d){6 c*(t/=d)*t+b},2t:e(x,t,b,c,d){6-c*(t/=d)*(t-2)+b},49:e(x,t,b,c,d){8((t/=d/2)<1)6 c/2*t*t+b;6-c/2*((--t)*(t-2)-1)+b},4t:e(x,t,b,c,d){6 c*(t/=d)*t*t+b},4u:e(x,t,b,c,d){6 c*((t=t/d-1)*t*t+1)+b},4s:e(x,t,b,c,d){8((t/=d/2)<1)6 c/2*t*t*t+b;6 c/2*((t-=2)*t*t+2)+b},4r:e(x,t,b,c,d){6 c*(t/=d)*t*t*t+b},4p:e(x,t,b,c,d){6-c*((t=t/d-1)*t*t*t-1)+b},4q:e(x,t,b,c,d){8((t/=d/2)<1)6 c/2*t*t*t*t+b;6-c/2*((t-=2)*t*t*t-2)+b},4v:e(x,t,b,c,d){6 c*(t/=d)*t*t*t*t+b},4w:e(x,t,b,c,d){6 c*((t=t/d-1)*t*t*t*t+1)+b},4B:e(x,t,b,c,d){8((t/=d/2)<1)6 c/2*t*t*t*t*t+b;6 c/2*((t-=2)*t*t*t*t+2)+b},4A:e(x,t,b,c,d){6-c*f.2J(t/d*(f.M/2))+c+b},4z:e(x,t,b,c,d){6 c*f.1i(t/d*(f.M/2))+b},4x:e(x,t,b,c,d){6-c/2*(f.2J(f.M*t/d)-1)+b},4y:e(x,t,b,c,d){6(t==0)?b:c*f.S(2,10*(t/d-1))+b},4o:e(x,t,b,c,d){6(t==d)?b+c:c*(-f.S(2,-10*t/d)+1)+b},4n:e(x,t,b,c,d){8(t==0)6 b;8(t==d)6 b+c;8((t/=d/2)<1)6 c/2*f.S(2,10*(t-1))+b;6 c/2*(-f.S(2,-10*--t)+2)+b},4e:e(x,t,b,c,d){6-c*(f.1B(1-(t/=d)*t)-1)+b},4f:e(x,t,b,c,d){6 c*f.1B(1-(t=t/d-1)*t)+b},4d:e(x,t,b,c,d){8((t/=d/2)<1)6-c/2*(f.1B(1-t*t)-1)+b;6 c/2*(f.1B(1-(t-=2)*t)+1)+b},4c:e(x,t,b,c,d){g s=1.1a;g p=0;g a=c;8(t==0)6 b;8((t/=d)==1)6 b+c;8(!p)p=d*.3;8(a<f.1J(c)){a=c;g s=p/4}K g s=p/(2*f.M)*f.1W(c/a);6-(a*f.S(2,10*(t-=1))*f.1i((t*d-s)*(2*f.M)/p))+b},4a:e(x,t,b,c,d){g s=1.1a;g p=0;g a=c;8(t==0)6 b;8((t/=d)==1)6 b+c;8(!p)p=d*.3;8(a<f.1J(c)){a=c;g s=p/4}K g s=p/(2*f.M)*f.1W(c/a);6 a*f.S(2,-10*t)*f.1i((t*d-s)*(2*f.M)/p)+c+b},4b:e(x,t,b,c,d){g s=1.1a;g p=0;g a=c;8(t==0)6 b;8((t/=d/2)==2)6 b+c;8(!p)p=d*(.3*1.5);8(a<f.1J(c)){a=c;g s=p/4}K g s=p/(2*f.M)*f.1W(c/a);8(t<1)6-.5*(a*f.S(2,10*(t-=1))*f.1i((t*d-s)*(2*f.M)/p))+b;6 a*f.S(2,-10*(t-=1))*f.1i((t*d-s)*(2*f.M)/p)*.5+c+b},4g:e(x,t,b,c,d,s){8(s==1U)s=1.1a;6 c*(t/=d)*t*((s+1)*t-s)+b},4h:e(x,t,b,c,d,s){8(s==1U)s=1.1a;6 c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},4m:e(x,t,b,c,d,s){8(s==1U)s=1.1a;8((t/=d/2)<1)6 c/2*(t*t*(((s*=(1.2G))+1)*t-s))+b;6 c/2*((t-=2)*t*(((s*=(1.2G))+1)*t+s)+2)+b},2u:e(x,t,b,c,d){6 c-$.u.1I(x,d-t,0,c,d)+b},1I:e(x,t,b,c,d){8((t/=d)<(1/2.U)){6 c*(7.1D*t*t)+b}K 8(t<(2/2.U)){6 c*(7.1D*(t-=(1.5/2.U))*t+.U)+b}K 8(t<(2.5/2.U)){6 c*(7.1D*(t-=(2.25/2.U))*t+.4l)+b}K{6 c*(7.1D*(t-=(2.4k/2.U))*t+.4i)+b}},4j:e(x,t,b,c,d){8(t<d/2)6 $.u.2u(x,t*2,0,c,d)*.5+b;6 $.u.1I(x,t*2-d,0,c,d)*.5+c*.5+b}})})(2n);',62,339,'||||||return||if||||||function|Math|var|this||255|element|fx|||||value|speed|||easing|result|arguments||||color|callback|parseInt|css|attr|apply|style|add|effects|remove|else|set|PI|top|left|128|toggle|classNames|pow|that|75|position|wrapper|typeof|break|newStyle||start|elem|null|fn|unit||case|constructor|139|70158|F0|fA|oldStyleAttr|show|end|removeClass|duration|sin|mode|exec|parent|origin|animateClass|addClass|defaultView|parseFloat|document|_normalizeArguments|effect|transparent|each|211|hide|isFunction|oldStyle|192|sqrt|length|5625|extend|Number|match|169|easeOutBounce|abs|indexOf|cb|slow|cssText|normal|fast|offset|test|static|relative|undefined|colors|asin|min|original|options|val|for|ui|is|max||isNaN|pos|getRGB|rgb|_hide|107|_show|__toggle|key|_toggleClass|toggleClass|boolean|245|_removeClass|_addClass|cssUnit|100|jQuery|getColor|backgroundColor|morph|bottom|def|easeOutQuad|easeInBounce|el|swing|list|ec|storage|true|props|auto|width|height|float|525|default|div|cos|switch|getComputedStyle|factor|currentStyle|ea|240|object|speeds|Object|230|140|224|right|165|144|data|px|createWrapper|outerWidth|save|version|outerHeight|restore|pt|middle|hidden|em|setMode|center|getBaseline|padding|hasClass|in|string|setTransition|replaceWith|Moz|animate|call|_default|number|off|removeWrapper|index|size|font|switchClass|class|background|border|zIndex|method|margin|none|wrap|trim|pink|203|orange|olive|maroon|navy|purple|violet|yellow|jswing|white|silver|red|magenta|lime|216|lightcyan|173|lightblue|130|khaki|lightgreen|borderBottomColor|193||lightyellow|182|lightpink|lightgrey||easeInQuad|easeInOutQuad|easeOutElastic|easeInOutElastic|easeInElastic|easeInOutCirc|easeInCirc|easeOutCirc|easeInBack|easeOutBack|984375|easeInOutBounce|625|9375|easeInOutBack|easeInOutExpo|easeOutExpo|easeOutQuart|easeInOutQuart|easeInQuart|easeInOutCubic|easeInCubic|easeOutCubic|easeInQuint|easeOutQuint|easeInOutSine|easeInExpo|easeOutSine|easeInSine|easeInOutQuint|indigo|238|azure|beige|green|parentNode|while|220|black|darkblue|darkcyan|cyan|brown|blue|body|nodeName|outlineColor|step|borderTopColor|borderRightColor|borderLeftColor|state|join|do||curCSS|toLowerCase|rgba|Array||darkgrey|aqua|233|150|darksalmon|darkred|204|122|darkgreen|215|gold|fuchsia|148|153|darkviolet|darkmagenta|darkkhaki|189|183|85|darkolivegreen|darkorange|darkorchid'.split('|'),0,{}))
diff --git a/template-common/lib/ui/packed/effects.drop.packed.js b/template-common/lib/ui/packed/effects.drop.packed.js
index 26a36008f..ff9373d35 100644
--- a/template-common/lib/ui/packed/effects.drop.packed.js
+++ b/template-common/lib/ui/packed/effects.drop.packed.js
@@ -1,2 +1 @@
-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}('(5(A){A.4.S=5(B){R a.i(5(){3 E=A(a),D=["Q","e","9","d"];3 I=A.4.P(E,B.6.O||"c");3 H=B.6.N||"9";A.4.M(E,D);E.8();A.4.L(E);3 F=(H=="m"||H=="K")?"e":"9";3 C=(H=="m"||H=="9")?"7":"z";3 J=B.6.y||(F=="e"?E.x({l:k})/2:E.w({l:k})/2);b(I=="8"){E.j("d",0).j(F,C=="7"?-J:J)}3 G={d:I=="8"?1:0};G[F]=(I=="8"?(C=="7"?"+=":"-="):(C=="7"?"-=":"+="))+J;E.v(G,{i:u,h:B.h,g:B.6.g,t:5(){b(I=="c"){E.c()}A.4.s(E,D);A.4.r(E);b(B.f){B.f.q(a,p)}E.o()}})})}})(n)',55,55,'|||var|effects|function|options|pos|show|left|this|if|hide|opacity|top|callback|easing|duration|queue|css|true|margin|up|jQuery|dequeue|arguments|apply|removeWrapper|restore|complete|false|animate|outerWidth|outerHeight|distance|neg|||||||||||down|createWrapper|save|direction|mode|setMode|position|return|drop'.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}('(a($){$.5.O=a(o){G i.v(a(){4 3=$(i),m=[\'J\',\'j\',\'c\',\'l\'];4 6=$.5.N(3,o.9.6||\'h\');4 7=o.9.7||\'c\';$.5.B(3,m);3.d();$.5.C(3);4 b=(7==\'r\'||7==\'D\')?\'j\':\'c\';4 e=(7==\'r\'||7==\'c\')?\'f\':\'w\';4 8=o.9.8||(b==\'j\'?3.y({q:p})/2:3.E({q:p})/2);g(6==\'d\')3.t(\'l\',0).t(b,e==\'f\'?-8:8);4 k={l:6==\'d\'?1:0};k[b]=(6==\'d\'?(e==\'f\'?\'+=\':\'-=\'):(e==\'f\'?\'-=\':\'+=\'))+8;3.L(k,{v:M,n:o.n,u:o.9.u,K:a(){g(6==\'h\')3.h();$.5.x(3,m);$.5.F(3);g(o.s)o.s.H(i,z);3.A()}})})}})(I);',51,51,'|||el|var|effects|mode|direction|distance|options|function|ref|left|show|motion|pos|if|hide|this|top|animation|opacity|props|duration||true|margin|up|callback|css|easing|queue|neg|restore|outerHeight|arguments|dequeue|save|createWrapper|down|outerWidth|removeWrapper|return|apply|jQuery|position|complete|animate|false|setMode|drop'.split('|'),0,{}))
diff --git a/template-common/lib/ui/packed/effects.explode.packed.js b/template-common/lib/ui/packed/effects.explode.packed.js
index 8e15e50b9..d82346710 100644
--- a/template-common/lib/ui/packed/effects.explode.packed.js
+++ b/template-common/lib/ui/packed/effects.explode.packed.js
@@ -1,2 +1 @@
-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}('(e(A){A.i.h=e(B){16 j.15(e(){8 I=B.4.g?7.x(7.w(B.4.g)):3;8 E=B.4.g?7.x(7.w(B.4.g)):3;B.4.5=B.4.5=="14"?(A(j).13(":c")?"n":"6"):B.4.5;8 H=A(j).6().9("d","p");8 J=H.12();J.a-=v(H.9("11"))||0;J.b-=v(H.9("10"))||0;8 G=H.Z(u);8 C=H.Y(u);t(8 F=0;F<I;F++){t(8 D=0;D<E;D++){H.X().W("V").U("<s></s>").9({r:"q",d:"c",b:-D*(G/E),a:-F*(C/I)}).T().S("i-h").9({r:"q",R:"p",Q:G/E,P:C/I,b:J.b+D*(G/E)+(B.4.5=="6"?(D-7.f(E/2))*(G/E):0),a:J.a+F*(C/I)+(B.4.5=="6"?(F-7.f(I/2))*(C/I):0),o:B.4.5=="6"?0:1}).O({b:J.b+D*(G/E)+(B.4.5=="6"?0:(D-7.f(E/2))*(G/E)),a:J.a+F*(C/I)+(B.4.5=="6"?0:(F-7.f(I/2))*(C/I)),o:B.4.5=="6"?1:0},B.l||k)}}N(e(){B.4.5=="6"?H.9({d:"c"}):H.9({d:"c"}).n();M(B.m){B.m.L(H[0])}H.K();A(".i-h").z()},B.l||k)})}})(y)',62,69,'||||options|mode|show|Math|var|css|top|left|visible|visibility|function|floor|pieces|explode|effects|this|500|duration|callback|hide|opacity|hidden|absolute|position|div|for|true|parseInt|sqrt|round|jQuery|remove|||||||||||dequeue|apply|if|setTimeout|animate|height|width|overflow|addClass|parent|wrap|body|appendTo|clone|outerHeight|outerWidth|marginLeft|marginTop|offset|is|toggle|queue|return'.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}('(k($){$.r.t=k(o){M q.L(k(){b 8=o.4.n?a.C(a.F(o.4.n)):3;b 6=o.4.n?a.C(a.F(o.4.n)):3;o.4.7=o.4.7==\'K\'?($(q).O(\':p\')?\'E\':\'9\'):o.4.7;b 5=$(q).9().f(\'m\',\'H\');b e=5.e();e.g-=y(5.f("Q"),10)||0;e.h-=y(5.f("P"),10)||0;b c=5.R(z);b d=5.I(z);A(b i=0;i<8;i++){A(b j=0;j<6;j++){5.J().N(\'Y\').14(\'<s></s>\').f({v:\'w\',m:\'p\',h:-j*(c/6),g:-i*(d/8)}).13().12(\'B-r-t\').f({v:\'w\',11:\'H\',c:c/6,d:d/8,h:e.h+j*(c/6)+(o.4.7==\'9\'?(j-a.l(6/2))*(c/6):0),g:e.g+i*(d/8)+(o.4.7==\'9\'?(i-a.l(8/2))*(d/8):0),G:o.4.7==\'9\'?0:1}).S({h:e.h+j*(c/6)+(o.4.7==\'9\'?0:(j-a.l(6/2))*(c/6)),g:e.g+i*(d/8)+(o.4.7==\'9\'?0:(i-a.l(8/2))*(d/8)),G:o.4.7==\'9\'?1:0},o.x||D)}}T(k(){o.4.7==\'9\'?5.f({m:\'p\'}):5.f({m:\'p\'}).E();W(o.u)o.u.X(5[0]);5.V();$(\'s.B-r-t\').U()},o.x||D)})}})(Z);',62,67,'||||options|el|cells|mode|rows|show|Math|var|width|height|offset|css|top|left|||function|floor|visibility|pieces||visible|this|effects|div|explode|callback|position|absolute|duration|parseInt|true|for|ui|round|500|hide|sqrt|opacity|hidden|outerHeight|clone|toggle|queue|return|appendTo|is|marginLeft|marginTop|outerWidth|animate|setTimeout|remove|dequeue|if|apply|body|jQuery||overflow|addClass|parent|wrap'.split('|'),0,{}))
diff --git a/template-common/lib/ui/packed/effects.fold.packed.js b/template-common/lib/ui/packed/effects.fold.packed.js
index 0c232708f..35d4a4170 100644
--- a/template-common/lib/ui/packed/effects.fold.packed.js
+++ b/template-common/lib/ui/packed/effects.fold.packed.js
@@ -1,2 +1 @@
-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}('(c(A){A.4.U=c(B){T i.S(c(){3 E=A(i),J=["R","Q","P"];3 G=A.4.O(E,B.7.z||"b");3 N=B.7.y||x;3 M=!(!B.7.w);A.4.v(E,J);E.8();3 D=A.4.u(E).h({t:"s"});3 H=((G=="8")!=M);3 F=H?["5","6"]:["6","5"];3 C=H?[D.5(),D.6()]:[D.6(),D.5()];3 I=/([0-9]+)%/.r(N);a(I){N=q(I[1])/p*C[G=="b"?0:1]}a(G=="8"){D.h(M?{6:0,5:N}:{6:N,5:0})}3 L={},K={};L[F[0]]=G=="8"?C[0]:N;K[F[1]]=G=="8"?C[1]:0;D.g(L,B.f/2,B.7.e).g(K,B.f/2,B.7.e,c(){a(G=="b"){E.b()}A.4.o(E,J);A.4.n(E);a(B.d){B.d.m(E[0],l)}E.k()})})}})(j)',57,57,'|||var|effects|width|height|options|show||if|hide|function|callback|easing|duration|animate|css|this|jQuery|dequeue|arguments|apply|removeWrapper|restore|100|parseInt|exec|hidden|overflow|createWrapper|save|horizFirst|15|size|mode|||||||||||||||setMode|left|top|position|queue|return|fold'.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}('(f($){$.8.A=f(o){w u.D(f(){3 4=$(u),m=[\'H\',\'E\',\'I\'];3 5=$.8.G(4,o.c.5||\'h\');3 6=o.c.6||J;3 g=!(!o.c.g);3 e=o.e?o.e/2:$.B.x.C/2;$.8.y(4,m);4.d();3 7=$.8.z(4).r({F:\'M\'});3 q=((5==\'d\')!=g);3 p=q?[\'b\',\'a\']:[\'a\',\'b\'];3 i=q?[7.b(),7.a()]:[7.a(),7.b()];3 n=/([0-9]+)%/.U(6);j(n)6=T(n[1],S)/Q*i[5==\'h\'?0:1];j(5==\'d\')7.r(g?{a:0,b:6}:{a:6,b:0});3 k={},l={};k[p[0]]=5==\'d\'?i[0]:6;l[p[1]]=5==\'d\'?i[1]:0;7.s(k,e,o.c.v).s(l,e,o.c.v,f(){j(5==\'h\')4.h();$.8.L(4,m);$.8.N(4);j(o.t)o.t.O(4[0],P);4.R()})})}})(K);',57,57,'|||var|el|mode|size|wrapper|effects||height|width|options|show|duration|function|horizFirst|hide|distance|if|animation1|animation2|props|percent||ref|widthFirst|css|animate|callback|this|easing|return|speeds|save|createWrapper|fold|fx|_default|queue|top|overflow|setMode|position|left|15|jQuery|restore|hidden|removeWrapper|apply|arguments|100|dequeue|10|parseInt|exec'.split('|'),0,{}))
diff --git a/template-common/lib/ui/packed/effects.highlight.packed.js b/template-common/lib/ui/packed/effects.highlight.packed.js
index 955883ac0..523849a2e 100644
--- a/template-common/lib/ui/packed/effects.highlight.packed.js
+++ b/template-common/lib/ui/packed/effects.highlight.packed.js
@@ -1,2 +1 @@
-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}('(5(A){A.4.J=5(B){I 2.e(5(){1 E=A(2),D=["g","6","f"];1 H=A.4.z(E,B.9.y||"7");1 C=B.9.x||"#w";1 G=E.h("6");A.4.v(E,D);E.7();E.h({g:"u",6:C});1 F={6:G};3(H=="8"){F["f"]=0}E.t(F,{e:s,d:B.d,c:B.9.c,r:5(){3(H=="8"){E.8()}A.4.q(E,D);3(H=="7"&&a.p.o){2.n.m("l")}3(B.b){B.b.k(2,j)}E.i()}})})}})(a)',46,46,'|var|this|if|effects|function|backgroundColor|show|hide|options|jQuery|callback|easing|duration|queue|opacity|backgroundImage|css|dequeue|arguments|apply|filter|removeAttribute|style|msie|browser|restore|complete|false|animate|none|save|ffff99|color|mode|setMode|||||||||return|highlight'.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($){$.4.n=6(o){q 8.i(6(){2 1=$(8),a=[\'m\',\'7\',\'j\'];2 3=$.4.r(1,o.b.3||\'c\');2 e=o.b.e||"#t";2 h=1.l("7");$.4.s(1,a);1.c();1.l({m:\'p\',7:e});2 9={7:h};5(3=="d")9[\'j\']=0;1.D(9,{i:G,g:o.g,f:o.b.f,u:6(){5(3=="d")1.d();$.4.E(1,a);5(3=="c"&&$.F.B)8.A.w(\'v\');5(o.k)o.k.x(8,y);1.z()}})})}})(C);',43,43,'|el|var|mode|effects|if|function|backgroundColor|this|animation|props|options|show|hide|color|easing|duration|oldColor|queue|opacity|callback|css|backgroundImage|highlight||none|return|setMode|save|ffff99|complete|filter|removeAttribute|apply|arguments|dequeue|style|msie|jQuery|animate|restore|browser|false'.split('|'),0,{}))
diff --git a/template-common/lib/ui/packed/effects.pulsate.packed.js b/template-common/lib/ui/packed/effects.pulsate.packed.js
index 5626423b8..895b7b22d 100644
--- a/template-common/lib/ui/packed/effects.pulsate.packed.js
+++ b/template-common/lib/ui/packed/effects.pulsate.packed.js
@@ -1,2 +1 @@
-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}('(7(A){A.n.z=7(B){y d.j(7(){f 3=A(d);f h=A.n.x(3,B.4.w||"m");f c=B.4.v||5;b(h=="g"){c--}b(3.u(":t")){3.s("6",0);3.m();3.a({6:1},B.9/2,B.4.8);c=c-2}r(f C=0;C<c;C++){3.a({6:0},B.9/2,B.4.8).a({6:1},B.9/2,B.4.8)}b(h=="g"){3.a({6:0},B.9/2,B.4.8,7(){3.g();b(B.e){B.e.l(d,k)}})}q{3.a({6:0},B.9/2,B.4.8).a({6:1},B.9/2,B.4.8,7(){b(B.e){B.e.l(d,k)}})}3.j("p",7(){3.i()});3.i()})}})(o)',39,39,'|||D|options||opacity|function|easing|duration|animate|if|E|this|callback|var|hide|F|dequeue|queue|arguments|apply|show|effects|jQuery|fx|else|for|css|hidden|is|times|mode|setMode|return|pulsate|||'.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}('(a($){$.k.x=a(o){y g.p(a(){c 3=$(g);c f=$.k.B(3,o.6.f||\'n\');c b=o.6.b||5;c 4=o.4?o.4/2:$.j.s.t/2;d(f==\'h\')b--;d(3.v(\':u\')){3.r(\'7\',0);3.n();3.9({7:1},4,o.6.8);b=b-2}A(c i=0;i<b;i++){3.9({7:0},4,o.6.8).9({7:1},4,o.6.8)};d(f==\'h\'){3.9({7:0},4,o.6.8,a(){3.h();d(o.e)o.e.q(g,m)})}z{3.9({7:0},4,o.6.8).9({7:1},4,o.6.8,a(){d(o.e)o.e.q(g,m)})};3.p(\'j\',a(){3.l()});3.l()})}})(w);',38,38,'|||el|duration||options|opacity|easing|animate|function|times|var|if|callback|mode|this|hide||fx|effects|dequeue|arguments|show||queue|apply|css|speeds|_default|hidden|is|jQuery|pulsate|return|else|for|setMode'.split('|'),0,{}))
diff --git a/template-common/lib/ui/packed/effects.scale.packed.js b/template-common/lib/ui/packed/effects.scale.packed.js
index cb888b141..8ec5fb862 100644
--- a/template-common/lib/ui/packed/effects.scale.packed.js
+++ b/template-common/lib/ui/packed/effects.scale.packed.js
@@ -1,2 +1 @@
-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}('(b(A){A.7.1y=b(B){U d.o(b(){5 F=A(d);5 C=A.13(s,{},B.9);5 H=A.7.T(F,B.9.k||"f");5 G=V(B.9.t)||1x;C.12=s;5 E={6:F.6(),4:F.4()};5 D=G/l;F.2=(H=="f")?E:{6:E.6*D,4:E.4*D};C.2=F.2;C.t=(H=="f")?G:l;C.k=H;F.j("S",C,B.h,B.m);F.u()})};A.7.S=b(B){U d.o(b(){5 G=A(d);5 D=A.13(s,{},B.9);5 J=A.7.T(G,B.9.k||"j");5 H=V(B.9.t)||(V(B.9.t)==0?0:(J=="f"?0:l));5 I=B.9.1w||"i";5 C=B.9.R;a(J!="j"){D.R=C||["1v","1u"];D.n=s}5 F={6:G.6(),4:G.4()};G.2=B.9.2||(J=="z"?{6:0,4:0}:F);5 E={y:I!="1t"?(H/l):1,x:I!="1s"?(H/l):1};G.3={6:F.6*E.y,4:F.4*E.x};a(B.9.12){a(J=="z"){G.2.g=0;G.3.g=1}a(J=="f"){G.2.g=1;G.3.g=0}}D.2=G.2;D.3=G.3;D.k=J;G.j("11",D,B.h,B.m);G.u()})};A.7.11=b(B){U d.o(b(){5 C=A(d),N=["10","r","q","4","6","p","g"];5 M=["10","r","q","p","g"];5 J=["4","6","p"];5 P=["1r"];5 K=["1q","1p","1o","1n"];5 F=["1m","1l","1k","1j"];5 G=A.7.T(C,B.9.k||"j");5 I=B.9.n||W;5 E=B.9.S||"i";5 O=B.9.R;5 D={6:C.6(),4:C.4()};C.2=B.9.2||D;C.3=B.9.3||D;a(O){5 H=A.7.1i(O,D);C.2.r=(D.6-C.2.6)*H.y;C.2.q=(D.4-C.2.4)*H.x;C.3.r=(D.6-C.3.6)*H.y;C.3.q=(D.4-C.3.4)*H.x}5 L={2:{y:C.2.6/D.6,x:C.2.4/D.4},3:{y:C.3.6/D.6,x:C.3.4/D.4}};a(E=="1h"||E=="i"){a(L.2.y!=L.3.y){N=N.e(K);C.2=A.7.c(C,K,L.2.y,C.2);C.3=A.7.c(C,K,L.3.y,C.3)}a(L.2.x!=L.3.x){N=N.e(F);C.2=A.7.c(C,F,L.2.x,C.2);C.3=A.7.c(C,F,L.3.x,C.3)}}a(E=="Z"||E=="i"){a(L.2.y!=L.3.y){N=N.e(P);C.2=A.7.c(C,P,L.2.y,C.2);C.3=A.7.c(C,P,L.3.y,C.3)}}A.7.Y(C,I?N:M);C.z();A.7.1g(C);C.w("p","1f").w(C.2);a(E=="Z"||E=="i"){K=K.e(["1e","1d"]).e(P);F=F.e(["1c","1b"]);J=N.e(K).e(F);C.1a("*[4]").19(b(){8=A(d);a(I){A.7.Y(8,J)}5 Q={6:8.6(),4:8.4()};8.2={6:Q.6*L.2.y,4:Q.4*L.2.x};8.3={6:Q.6*L.3.y,4:Q.4*L.3.x};a(L.2.y!=L.3.y){8.2=A.7.c(8,K,L.2.y,8.2);8.3=A.7.c(8,K,L.3.y,8.3)}a(L.2.x!=L.3.x){8.2=A.7.c(8,F,L.2.x,8.2);8.3=A.7.c(8,F,L.3.x,8.3)}8.w(8.2);8.X(8.3,B.h,B.9.v,b(){a(I){A.7.n(8,J)}})})}C.X(C.3,{o:W,h:B.h,v:B.9.v,18:b(){a(G=="f"){C.f()}A.7.n(C,I?N:M);A.7.17(C);a(B.m){B.m.16(d,15)}C.u()}})})}})(14)',62,97,'||from|to|width|var|height|effects|child|options|if|function|setTransition|this|concat|hide|opacity|duration|both|effect|mode|100|callback|restore|queue|overflow|left|top|true|percent|dequeue|easing|css|||show||||||||||||||||||origin|scale|setMode|return|parseInt|false|animate|save|content|position|size|fade|extend|jQuery|arguments|apply|removeWrapper|complete|each|find|marginRight|marginLeft|marginBottom|marginTop|hidden|createWrapper|box|getBaseline|paddingRight|paddingLeft|borderRightWidth|borderLeftWidth|paddingBottom|paddingTop|borderBottomWidth|borderTopWidth|fontSize|vertical|horizontal|center|middle|direction|150|puff'.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}('(h($){$.a.1b=h(o){K p.J(h(){7 2=$(p);7 5=$.X(G,{},o.5);7 d=$.a.N(2,o.5.d||\'r\');7 f=O(o.5.f,10)||1a;5.W=G;7 c={9:2.9(),8:2.8()};7 6=f/z;2.3=(d==\'r\')?c:{9:c.9*6,8:c.8*6};5.3=2.3;5.f=(d==\'r\')?f:z;5.d=d;2.t(\'i\',5,o.v,o.I);2.P()})};$.a.i=h(o){K p.J(h(){7 2=$(p);7 5=$.X(G,{},o.5);7 d=$.a.N(2,o.5.d||\'t\');7 f=O(o.5.f,10)||(O(o.5.f,10)==0?0:(d==\'r\'?0:z));7 F=o.5.F||\'w\';7 q=o.5.q;e(d!=\'t\'){5.q=q||[\'15\',\'16\'];5.m=G}7 c={9:2.9(),8:2.8()};2.3=o.5.3||(d==\'L\'?{9:0,8:0}:c);7 6={y:F!=\'17\'?(f/z):1,x:F!=\'18\'?(f/z):1};2.4={9:c.9*6.y,8:c.8*6.x};e(o.5.W){e(d==\'L\'){2.3.s=0;2.4.s=1};e(d==\'r\'){2.3.s=1;2.4.s=0}};5.3=2.3;5.4=2.4;5.d=d;2.t(\'Z\',5,o.v,o.I);2.P()})};$.a.Z=h(o){K p.J(h(){7 2=$(p),j=[\'T\',\'E\',\'C\',\'8\',\'9\',\'D\',\'s\'];7 M=[\'T\',\'E\',\'C\',\'D\',\'s\'];7 H=[\'8\',\'9\',\'D\'];7 u=[\'13\'];7 k=[\'12\',\'14\',\'11\',\'19\'];7 l=[\'1g\',\'1s\',\'1o\',\'1u\'];7 d=$.a.N(2,o.5.d||\'t\');7 m=o.5.m||S;7 i=o.5.i||\'w\';7 q=o.5.q;7 c={9:2.9(),8:2.8()};2.3=o.5.3||c;2.4=o.5.4||c;e(q){7 A=$.a.1p(q,c);2.3.E=(c.9-2.3.9)*A.y;2.3.C=(c.8-2.3.8)*A.x;2.4.E=(c.9-2.4.9)*A.y;2.4.C=(c.8-2.4.8)*A.x};7 6={3:{y:2.3.9/c.9,x:2.3.8/c.8},4:{y:2.4.9/c.9,x:2.4.8/c.8}};e(i==\'1q\'||i==\'w\'){e(6.3.y!=6.4.y){j=j.n(k);2.3=$.a.g(2,k,6.3.y,2.3);2.4=$.a.g(2,k,6.4.y,2.4)};e(6.3.x!=6.4.x){j=j.n(l);2.3=$.a.g(2,l,6.3.x,2.3);2.4=$.a.g(2,l,6.4.x,2.4)}};e(i==\'Y\'||i==\'w\'){e(6.3.y!=6.4.y){j=j.n(u);2.3=$.a.g(2,u,6.3.y,2.3);2.4=$.a.g(2,u,6.4.y,2.4)}};$.a.V(2,m?j:M);2.L();$.a.1r(2);2.R(\'D\',\'1t\').R(2.3);e(i==\'Y\'||i==\'w\'){k=k.n([\'1m\',\'1c\']).n(u);l=l.n([\'1f\',\'1e\']);H=j.n(k).n(l);2.1d("*[8]").1h(h(){b=$(p);e(m)$.a.V(b,H);7 B={9:b.9(),8:b.8()};b.3={9:B.9*6.3.y,8:B.8*6.3.x};b.4={9:B.9*6.4.y,8:B.8*6.4.x};e(6.3.y!=6.4.y){b.3=$.a.g(b,k,6.3.y,b.3);b.4=$.a.g(b,k,6.4.y,b.4)};e(6.3.x!=6.4.x){b.3=$.a.g(b,l,6.3.x,b.3);b.4=$.a.g(b,l,6.4.x,b.4)};b.R(b.3);b.U(b.4,o.v,o.5.Q,h(){e(m)$.a.m(b,H)})})};2.U(2.4,{J:S,v:o.v,Q:o.5.Q,1i:h(){e(d==\'r\')2.r();$.a.m(2,m?j:M);$.a.1l(2);e(o.I)o.I.1k(p,1j);2.P()}})})}})(1n);',62,93,'||el|from|to|options|factor|var|width|height|effects|child|original|mode|if|percent|setTransition|function|scale|props|vProps|hProps|restore|concat||this|origin|hide|opacity|effect|cProps|duration|both|||100|baseline|c_original|left|overflow|top|direction|true|props2|callback|queue|return|show|props1|setMode|parseInt|dequeue|easing|css|false|position|animate|save|fade|extend|content|size||paddingTop|borderTopWidth|fontSize|borderBottomWidth|middle|center|horizontal|vertical|paddingBottom|150|puff|marginBottom|find|marginRight|marginLeft|borderLeftWidth|each|complete|arguments|apply|removeWrapper|marginTop|jQuery|paddingLeft|getBaseline|box|createWrapper|borderRightWidth|hidden|paddingRight'.split('|'),0,{}))
diff --git a/template-common/lib/ui/packed/effects.shake.packed.js b/template-common/lib/ui/packed/effects.shake.packed.js
index 478fa8c8a..27087ba2c 100644
--- a/template-common/lib/ui/packed/effects.shake.packed.js
+++ b/template-common/lib/ui/packed/effects.shake.packed.js
@@ -1,2 +1 @@
-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.5.U=6(B){T b.d(6(){4 E=A(b),K=["S","g","a"];4 J=A.5.R(E,B.0.Q||"P");4 M=B.0.z||"a";4 C=B.0.y||x;4 D=B.0.w||3;4 G=B.h||B.0.h||v;A.5.u(E,K);E.t();A.5.s(E);4 F=(M=="f"||M=="r")?"g":"a";4 O=(M=="f"||M=="a")?"9":"q";4 H={},N={},L={};H[F]=(O=="9"?"-=":"+=")+C;N[F]=(O=="9"?"+=":"-=")+C*2;L[F]=(O=="9"?"-=":"+=")+C*2;E.8(H,G,B.0.7);p(4 I=1;I<D;I++){E.8(N,G,B.0.7).8(L,G,B.0.7)}E.8(N,G,B.0.7).8(H,G/2,B.0.7,6(){A.5.o(E,K);A.5.n(E);m(B.e){B.e.l(b,k)}});E.d("j",6(){E.c()});E.c()})}})(i)',57,57,'options||||var|effects|function|easing|animate|pos|left|this|dequeue|queue|callback|up|top|duration|jQuery|fx|arguments|apply|if|removeWrapper|restore|for|neg|down|createWrapper|show|save|140|times|20|distance|direction||||||||||||||||effect|mode|setMode|position|return|shake'.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}('(c($){$.6.z=c(o){y n.p(c(){4 0=$(n),m=[\'x\',\'s\',\'e\'];4 v=$.6.G(0,o.5.v||\'D\');4 8=o.5.8||\'e\';4 b=o.5.b||F;4 l=o.5.l||3;4 7=o.t||o.5.t||E;$.6.B(0,m);0.A();$.6.w(0);4 f=(8==\'r\'||8==\'C\')?\'s\':\'e\';4 g=(8==\'r\'||8==\'e\')?\'h\':\'N\';4 d={},j={},k={};d[f]=(g==\'h\'?\'-=\':\'+=\')+b;j[f]=(g==\'h\'?\'+=\':\'-=\')+b*2;k[f]=(g==\'h\'?\'-=\':\'+=\')+b*2;0.a(d,7,o.5.9);M(4 i=1;i<l;i++){0.a(j,7,o.5.9).a(k,7,o.5.9)};0.a(j,7,o.5.9).a(d,7/2,o.5.9,c(){ $.6.L(0,m);$.6.I(0);K(o.u)o.u.P(n,O)});0.p(\'H\',c(){0.q()});0.q()})}})(J);',52,52,'el||||var|options|effects|speed|direction|easing|animate|distance|function|animation|left|ref|motion|pos||animation1|animation2|times|props|this||queue|dequeue|up|top|duration|callback|mode|createWrapper|position|return|shake|show|save|down|effect|140|20|setMode|fx|removeWrapper|jQuery|if|restore|for|neg|arguments|apply'.split('|'),0,{}))
diff --git a/template-common/lib/ui/packed/effects.slide.packed.js b/template-common/lib/ui/packed/effects.slide.packed.js
index 8d65c4055..c4559bfd8 100644
--- a/template-common/lib/ui/packed/effects.slide.packed.js
+++ b/template-common/lib/ui/packed/effects.slide.packed.js
@@ -1,2 +1 @@
-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}('(2(A){A.1.Q=2(B){P 7.e(2(){0 E=A(7),D=["O","9","6"];0 I=A.1.N(E,B.3.M||"5");0 H=B.3.L||"6";A.1.K(E,D);E.5();A.1.z(E).f({y:"x"});0 F=(H=="i"||H=="w")?"9":"6";0 C=(H=="i"||H=="6")?"4":"v";0 J=B.3.u||(F=="9"?E.t({h:g}):E.s({h:g}));8(I=="5"){E.f(F,C=="4"?-J:J)}0 G={};G[F]=(I=="5"?(C=="4"?"+=":"-="):(C=="4"?"-=":"+="))+J;E.r(G,{e:q,d:B.d,c:B.3.c,p:2(){8(I=="b"){E.b()}A.1.o(E,D);A.1.n(E);8(B.a){B.a.m(7,l)}E.k()}})})}})(j)',53,53,'var|effects|function|options|pos|show|left|this|if|top|callback|hide|easing|duration|queue|css|true|margin|up|jQuery|dequeue|arguments|apply|removeWrapper|restore|complete|false|animate|outerWidth|outerHeight|distance|neg|down|hidden|overflow|createWrapper|||||||||||save|direction|mode|setMode|position|return|slide'.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}('(b($){$.2.y=b(o){z h.p(b(){1 0=$(h),e=[\'A\',\'f\',\'a\'];1 4=$.2.B(0,o.7.4||\'c\');1 3=o.7.3||\'a\';$.2.x(0,e);0.c();$.2.s(0).n({t:\'u\'});1 9=(3==\'k\'||3==\'w\')?\'f\':\'a\';1 8=(3==\'k\'||3==\'a\')?\'6\':\'D\';1 5=o.7.5||(9==\'f\'?0.M({j:m}):0.J({j:m}));d(4==\'c\')0.n(9,8==\'6\'?-5:5);1 g={};g[9]=(4==\'c\'?(8==\'6\'?\'+=\':\'-=\'):(8==\'6\'?\'-=\':\'+=\'))+5;0.F(g,{p:I,q:o.q,r:o.7.r,L:b(){d(4==\'i\')0.i();$.2.v(0,e);$.2.G(0);d(o.l)o.l.H(h,E);0.C()}})})}})(K);',49,49,'el|var|effects|direction|mode|distance|pos|options|motion|ref|left|function|show|if|props|top|animation|this|hide|margin|up|callback|true|css||queue|duration|easing|createWrapper|overflow|hidden|restore|down|save|slide|return|position|setMode|dequeue|neg|arguments|animate|removeWrapper|apply|false|outerWidth|jQuery|complete|outerHeight'.split('|'),0,{}))
diff --git a/template-common/lib/ui/packed/effects.transfer.packed.js b/template-common/lib/ui/packed/effects.transfer.packed.js
index 8fd2399c3..284fcf37b 100644
--- a/template-common/lib/ui/packed/effects.transfer.packed.js
+++ b/template-common/lib/ui/packed/effects.transfer.packed.js
@@ -1,2 +1 @@
-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}('(5(A){A.9.o=5(B){R p.Q(5(){4 E=A(p);4 G=A.9.P(E,B.3.O||"N");4 F=A(B.3.M);4 C=E.l();4 D=A(\'<n L="K-9-o"></n>\').J(I.H);b(B.3.8){D.m(B.3.8)}D.m(B.3.8);D.1({7:C.7,6:C.6,k:E.j()-2(D.1("i"))-2(D.1("h")),g:E.f()-2(D.1("e"))-2(D.1("d")),z:"y"});C=F.l();c={7:C.7,6:C.6,k:F.j()-2(D.1("i"))-2(D.1("h")),g:F.f()-2(D.1("e"))-2(D.1("d"))};D.x(c,B.w,B.3.v,5(){D.u();b(B.a){B.a.t(E[0],s)}E.r()})})}})(q)',54,54,'|css|parseInt|options|var|function|left|top|className|effects|callback|if|animation|borderRightWidth|borderLeftWidth|outerWidth|width|borderBottomWidth|borderTopWidth|outerHeight|height|offset|addClass|div|transfer|this|jQuery|dequeue|arguments|apply|remove|easing|duration|animate|absolute|position||||||||body|document|appendTo|ui|class|to|effect|mode|setMode|queue|return'.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($){$.f.4=6(o){q d.r(6(){s 1=$(d),5=$(o.7.u),8=5.e(),i={3:8.3,2:8.2,h:5.a(),b:5.g()},9=1.e(),4=$(\'<c k="m-f-4"></c>\').t(v.D).E(o.7.F).B({3:9.3,2:9.2,h:1.a(),b:1.g(),A:\'C\'}).G(i,o.y,o.7.x,6(){4.w();(o.j&&o.j.l(1[0],n));1.p()})})}})(z);',43,43,'|elem|left|top|transfer|target|function|options|endPosition|startPosition|innerHeight|width|div|this|offset|effects|innerWidth|height|animation|callback|class|apply|ui|arguments||dequeue|return|queue|var|appendTo|to|document|remove|easing|duration|jQuery|position|css|absolute|body|addClass|className|animate'.split('|'),0,{}))
diff --git a/template-common/lib/ui/packed/ui.accordion.packed.js b/template-common/lib/ui/packed/ui.accordion.packed.js
index 70b95d682..bf3a65504 100644
--- a/template-common/lib/ui/packed/ui.accordion.packed.js
+++ b/template-common/lib/ui/packed/ui.accordion.packed.js
@@ -1,2 +1 @@
-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}('(4(E){E.2i("e.5",{2h:4(){7 G=2.c;3(G.2g){7 J=2.d.13("a").l(G.1c);3(J.1q){3(J.l(G.n).1q){G.6=J}w{G.6=J.j().j().2f();J.v("2e")}}}G.8=2.d.13(G.n);G.6=C(G.8,G.6);3(E.W.15){2.d.13("a").k("2d","1")}3(!2.d.2c("e-5")){2.d.v("e-5");E("<1p 1o=\'e-5-2b\'/>").2a(G.8);E("<1p 1o=\'e-5-29\'/>").28(G.8);G.8.v("e-5-n").27("26","0")}7 I;3(G.1l){I=2.d.j().b();G.8.O(4(){I-=E(2).1m()});7 H=0;G.8.h().O(4(){H=V.1n(H,E(2).25()-E(2).b())}).b(I-H)}w{3(G.g){I=0;G.8.h().O(4(){I=V.1n(I,E(2).1m())}).b(I)}}G.8.11(G.6||"").h().X();G.6.j().S().v(G.t);3(G.Q){2.d.24((G.Q)+".5",F)}},U:4(G){F.12(2.d[0],{T:C(2.c.8,G)[0]})},23:4(){2.c.8.h().k("22","");3(2.c.1l||2.c.g){2.c.8.h().k("b","")}E.21(2.d[0],"5");2.d.20("e-5").1Z(".5")}});4 B(H,G){9 4(){9 H.1Y(G,1X)}}4 D(I){3(!E.o(2,"5")){9}7 G=E.o(2,"5");7 H=G.c;H.m=I?0:--H.m;3(H.m){9}3(H.1W){H.f.1V(H.i).k({b:"",18:""})}E(2).1U("1k",[E.Q.1T({1S:"1k",T:G.d[0]}),H.o],H.1R)}4 A(G,K,L,J,M){7 I=E.o(2,"5").c;I.f=G;I.i=K;I.o=L;7 H=B(D,2);I.m=K.P()===0?G.P():K.P();3(I.R){3(!I.s&&J){E.e.5.Z[I.R]({f:x([]),i:K,r:H,z:M,g:I.g})}w{E.e.5.Z[I.R]({f:G,i:K,r:H,z:M,g:I.g})}}w{3(!I.s&&J){G.1Q()}w{K.X();G.Y()}H(10)}}4 F(L){7 J=E.o(2,"5").c;3(J.1P){9 u}3(!L.T&&!J.s){J.6.j().S().1j(J.t);7 I=J.6.h(),M={c:J,1i:x([]),1h:J.6,1g:x([]),1f:I},G=(J.6=E([]));A.12(2,G,I,M);9 u}7 K=E(L.T);K=E(K.1O(J.n)[0]||K);7 H=K[0]==J.6[0];3(J.m||(J.s&&H)){9 u}3(!K.1N(J.n)){9}J.6.j().S().1j(J.t);3(!H){K.j().S().v(J.t)}7 G=K.h(),I=J.6.h(),M={c:J,1i:K,1h:J.6,1g:G,1f:I},N=J.8.1e(J.6[0])>J.8.1e(K[0]);J.6=H?E([]):K;A.12(2,G,I,M,H,N);9 u}4 C(H,G){9 G!=1M?1L G=="1K"?H.l(":1d("+G+")"):H.11(H.11(G)):G===u?E([]):H.l(":1d(0)")}E.19(E.e.5,{1J:{t:"1I",s:10,R:"y",Q:"1H",n:"a",g:10,m:0,1c:4(){9 2.1b.1a()==1G.1b.1a()}},Z:{y:4(G,I){G=E.19({q:"14",p:1F},G,I);3(!G.i.P()){G.f.16({b:"Y"},G);9}7 H=G.i.b(),J=G.f.b(),K=J/H;G.f.k({b:0,18:"17"}).Y();G.i.l(":17").O(G.r).1E().l(":1D").16({b:"X"},{1C:4(L){7 M=(H-L)*K;3(E.W.15||E.W.1B){M=V.1A(M)}G.f.b(M)},p:G.p,q:G.q,r:4(){3(!G.g){G.f.k("b","1z")}G.r()}})},1y:4(G){2.y(G,{q:G.z?"1x":"14",p:G.z?1w:1v})},1u:4(G){2.y(G,{q:"1t",p:1s})}}});E.1r.U=4(G){9 2.5("U",G)}})(x)',62,143,'||this|if|function|accordion|active|var|headers|return||height|options|element|ui|toShow|autoHeight|next|toHide|parent|css|filter|running|header|data|duration|easing|complete|alwaysOpen|selectedClass|false|addClass|else|jQuery|slide|down|||||||||||||||each|size|event|animated|andSelf|target|activate|Math|browser|hide|show|animations|true|not|call|find|swing|msie|animate|hidden|overflow|extend|toLowerCase|href|navigationFilter|eq|index|oldContent|newContent|oldHeader|newHeader|toggleClass|accordionchange|fillSpace|outerHeight|max|class|span|length|fn|700|easeinout|easeslide|200|1000|bounceout|bounceslide|auto|ceil|opera|step|visible|end|300|location|click|selected|defaults|number|typeof|undefined|is|parents|disabled|toggle|change|type|fix|triggerHandler|add|clearStyle|arguments|apply|unbind|removeClass|removeData|display|destroy|bind|innerHeight|tabindex|attr|appendTo|right|insertBefore|left|hasClass|zoom|current|prev|navigation|init|widget'.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}('(9($){$.1c("4.c",{2M:9(){g o=3.5,N=3;3.W=0;8(o.y==$.4.c.1U.y&&o.1l!=$.4.c.1U.1l){o.y=!o.1l}8(o.2e){g Y=3.u.x("a").17(o.2t);8(Y.P){8(Y.17(o.w).P){3.6=Y}1e{3.6=Y.U().U().1I();Y.l("4-c-F-6")}}}3.u.l("4-c 4-1c 4-Z-1d");8(3.u[0].36=="2O"){3.u.2g("1B").l("4-c-1B-2S")}3.f=3.u.x(o.w).l("4-c-w 4-Z-1d 4-n-19 4-q-18").14("2W.c",9(){$(3).l(\'4-n-1V\')}).14("31.c",9(){$(3).z(\'4-n-1V\')}).14("1o.c",9(){$(3).l(\'4-n-1o\')}).14("2n.c",9(){$(3).z(\'4-n-1o\')});3.f.r().l("4-c-F 4-Z-1d 4-1c-F 4-q-2b");3.6=3.1L(3.6||o.6).X("4-n-19").X("4-n-6").X("4-q-18").X("4-q-1j");3.6.r().l(\'4-c-F-6\');$("<2U/>").l("4-Q "+o.E.w).2V(3.f);3.6.x(".4-Q").X(o.E.w).X(o.E.1g);8($.1v.1N){3.u.x(\'a\').j(\'2P\',\'1\')}3.26();3.u.p(\'12\',\'2Q\');3.f.p(\'12\',\'2R\').14(\'2X\',9(k){m N.28(k)}).r().p(\'12\',\'2Y\');3.f.1C(3.6||"").p(\'1i-1n\',\'t\').p("R","-1").r().1y();8(!3.6.P){3.f.1J(0).p(\'R\',\'0\')}1e{3.6.p(\'1i-1n\',\'13\').p(\'R\',\'0\')}8(!$.1v.34)3.f.x(\'a\').p(\'R\',\'-1\');8(o.k){3.f.14((o.k)+".c",9(k){m N.1z.32(N,k,3)})}},2Z:9(){g o=3.5;3.u.z("4-c 4-1c 4-Z-1d").11("12").2d(\'.c\').30(\'c\');3.f.2d(".c").z("4-c-w 4-Z-1d 4-n-19 4-q-18 4-n-6 4-q-1j").11("12").11("1i-1n").11("2f");3.f.x("a").11("2f");3.f.2g(".4-Q").2B();g 29=3.f.r().j("2C","").11("12").z("4-Z-1d 4-1c-F 4-q-2b 4-c-F 4-c-F-6");8(o.O||o.2N){29.j("v","")}},2a:9(1H,1s){8(1H==\'1l\'){1H=\'y\';1s=!1s}$.1c.2J.2a.2x(3,2v)},28:9(k){g o=3.5,I=$.4.I;8(o.2j||k.2I||k.33)m;g P=3.f.P;g 1P=3.f.1m(k.L);g 1a=t;3d(k.I){16 I.3t:16 I.3u:1a=3.f[(1P+1)%P];27;16 I.3s:16 I.37:1a=3.f[(1P-1+P)%P];27;16 I.3p:16 I.3v:m 3.1z({L:k.L},k.L)}8(1a){$(k.L).p(\'R\',\'-1\');$(1a).p(\'R\',\'0\');1a.1o();m t}m 13},26:9(){g o=3.5,T;8(o.1x){8($.1v.1N){g 2c=3.u.U().j(\'C\');3.u.U().j(\'C\',\'1R\')}T=3.u.U().v();8($.1v.1N){3.u.U().j(\'C\',2c)}3.f.1t(9(){T-=$(3).24()});g 1w=0;3.f.r().1t(9(){1w=1E.1G(1w,$(3).3c()-$(3).v())}).v(1E.1G(0,T-1w)).j(\'C\',\'3n\')}1e 8(o.O){T=0;3.f.r().1t(9(){T=1E.1G(T,$(3).24())}).v(T)}},3a:9(1m){g 6=3.1L(1m)[0];3.1z({L:6},6)},1L:9(1b){m 1b?39 1b=="3e"?3.f.17(":1J("+1b+")"):3.f.1C(3.f.1C(1b)):1b===t?$([]):3.f.17(":1J(0)")},1z:9(k,L){g o=3.5;8(o.2j)m t;8(!k.L&&o.y){3.6.z("4-n-6 4-q-1j").l("4-n-19 4-q-18").x(".4-Q").z(o.E.1g).l(o.E.w);3.6.r().l(\'4-c-F-6\');g h=3.6.r(),H={5:o,20:$([]),23:o.6,21:$([]),1Y:h},b=(3.6=$([]));3.1Q(b,h,H);m t}g S=$(k.3k||L);g D=S[0]==3.6[0];8(3.W||(!o.y&&D)){m t}3.6.z("4-n-6 4-q-1j").l("4-n-19 4-q-18").x(".4-Q").z(o.E.1g).l(o.E.w);3.6.r().l(\'4-c-F-6\');8(!D){S.z("4-n-19 4-q-18").l("4-n-6 4-q-1j").x(".4-Q").z(o.E.w).l(o.E.1g);S.r().l(\'4-c-F-6\')}g b=S.r(),h=3.6.r(),H={5:o,20:D&&o.y?$([]):S,23:3.6,21:D&&o.y?$([]):b.x(\'> *\'),1Y:h.x(\'> *\')},G=3.f.1m(3.6[0])>3.f.1m(S[0]);3.6=D?$([]):S;3.1Q(b,h,H,D,G);m t},1Q:9(b,h,H,D,G){g o=3.5,N=3;3.b=b;3.h=h;3.H=H;g J=9(){8(!N)m;m N.2u.2x(N,2v)};3.2k("3h",1O,3.H);3.W=h.1q()===0?b.1q():h.1q();8(o.1k){g 15={};8(o.y&&D){15={b:$([]),h:h,J:J,G:G,O:o.O||o.1x}}1e{15={b:b,h:h,J:J,G:G,O:o.O||o.1x}}8(!o.1h){o.1h=o.1k}8(!o.1f){o.1f=o.A}o.1k=$.2w(o.1h)?o.1h(15):o.1h;o.A=$.2w(o.1f)?o.1f(15):o.1f;g V=$.4.c.V,A=o.A,B=o.1k;8(!V[B]){V[B]=9(5){3.1r(5,{B:B,A:A||1Z})}}V[B](15)}1e{8(o.y&&D){b.3l()}1e{h.1y();b.1M()}J(13)}h.1I().p(\'1i-1n\',\'t\').p("R","-1").2n();b.1I().p(\'1i-1n\',\'13\').p("R","0").1o()},2u:9(2l){g o=3.5;3.W=2l?0:--3.W;8(3.W)m;8(o.2r){3.b.3b(3.h).j({v:"",C:""})}3.2k(\'3m\',1O,3.H)}});$.2s($.4.c,{3y:"1.7.2",1U:{6:1O,1l:13,1k:\'1r\',O:13,2r:t,y:t,k:"2G",1x:t,w:"> 1B > :2L-2F,> :1C(1B):2E",E:{w:"4-Q-2y-1-e",1g:"4-Q-2y-1-s"},2e:t,2t:9(){m 3.2o.2p()==35.2o.2p()}},V:{1r:9(5,2q){5=$.2s({B:"2h",A:2H},5,2q);8(!5.h.1q()){5.b.1F({v:"1M"},5);m}8(!5.b.1q()){5.h.1F({v:"1y"},5);m}g C=5.b.j(\'C\'),1K,1A={},1D={},2m=["v","3w","3q"],1T;g s=5.b;1T=s[0].2i.1u;s.1u(1p(s.U().1u(),10)-1p(s.j("3A"),10)-1p(s.j("3z"),10)-(1p(s.j("3x"),10)||0)-(1p(s.j("3f"),10)||0));$.1t(2m,9(i,M){1D[M]=\'1y\';g 1S=(\'\'+$.j(5.b[0],M)).3j(/^([\\d+-.]+)(.*)$/);1A[M]={1s:1S[1],25:1S[2]||\'3r\'}});5.b.j({v:0,C:\'1R\'}).1M();5.h.17(":1R").1t(5.J).1W().17(":3g").1F(1D,{3i:9(22,K){8(K.M==\'v\'){1K=(K.22-K.1X)/(K.1W-K.1X)}5.b[0].2i[K.M]=(1K*1A[K.M].1s)+1A[K.M].25},A:5.A,B:5.B,J:9(){8(!5.O){5.b.j("v","")}5.b.j("1u",1T);5.b.j({C:C});5.J()}})},3o:9(5){3.1r(5,{B:5.G?"2K":"2h",A:5.G?2z:2A})},2D:9(5){3.1r(5,{B:"2T",A:1Z})}}})})(38);',62,223,'|||this|ui|options|active||if|function||toShow|accordion|||headers|var|toHide||css|event|addClass|return|state||attr|corner|next||false|element|height|header|find|collapsible|removeClass|duration|easing|overflow|clickedIsActive|icons|content|down|data|keyCode|complete|settings|target|prop|self|autoHeight|length|icon|tabIndex|clicked|maxHeight|parent|animations|running|toggleClass|current|helper||removeAttr|role|true|bind|animOptions|case|filter|all|default|toFocus|selector|widget|reset|else|proxiedDuration|headerSelected|proxied|aria|top|animated|alwaysOpen|index|expanded|focus|parseInt|size|slide|value|each|width|browser|maxPadding|fillSpace|hide|_clickHandler|showProps|li|not|hideProps|Math|animate|max|key|prev|eq|percentDone|_findActive|show|msie|null|currentIndex|_toggle|hidden|parts|originalWidth|defaults|hover|end|start|oldContent|700|newHeader|newContent|now|oldHeader|outerHeight|unit|resize|break|_keydown|contents|_setData|bottom|defOverflow|unbind|navigation|tabindex|children|swing|style|disabled|_trigger|cancel|fxAttrs|blur|href|toLowerCase|additions|clearStyle|extend|navigationFilter|_completed|arguments|isFunction|apply|triangle|1000|200|remove|display|easeslide|even|child|click|300|altKey|prototype|easeOutBounce|first|_init|fillHeight|UL|zoom|tablist|tab|fix|easeinout|span|prependTo|mouseenter|keydown|tabpanel|destroy|removeData|mouseleave|call|ctrlKey|safari|location|nodeName|UP|jQuery|typeof|activate|add|innerHeight|switch|number|borderRightWidth|visible|changestart|step|match|currentTarget|toggle|change|auto|bounceslide|SPACE|paddingBottom|px|LEFT|RIGHT|DOWN|ENTER|paddingTop|borderLeftWidth|version|paddingRight|paddingLeft'.split('|'),0,{}))
diff --git a/template-common/lib/ui/packed/ui.core.packed.js b/template-common/lib/ui/packed/ui.core.packed.js
index 2dbda4f5a..eab7ba37c 100644
--- a/template-common/lib/ui/packed/ui.core.packed.js
+++ b/template-common/lib/ui/packed/ui.core.packed.js
@@ -1,2 +1 @@
-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}('(3(C){C.8={2r:{V:3(E,F,H){6 G=C.8[E].o;1v(6 D 2q H){G.w[D]=G.w[D]||[];G.w[D].2p([F,H[D]])}},1p:3(D,F,E){6 H=D.w[F];5(!H){4}1v(6 G=0;G<H.1e;G++){5(D.a[H[G][0]]){H[G][1].v(D.c,E)}}}},p:{},d:3(D){5(C.8.p[D]){4 C.8.p[D]}6 E=C(\'<2o 2n="8-2m">\').1k(D).d({2l:"2k",12:"-1u",2j:"-1u",2i:"2h"}).2g("1t");C.8.p[D]=!!((!(/2f|2e/).h(E.d("2d"))||(/^[1-9]/).h(E.d("2c"))||(/^[1-9]/).h(E.d("2b"))||!(/1r/).h(E.d("2a"))||!(/29|28\\(0, 0, 0, 0\\)/).h(E.d("27"))));26{C("1t").1s(0).25(E.1s(0))}24(F){}4 C.8.p[D]},23:3(D){C(D).k("j","1i").d("1q","1r")},22:3(D){C(D).k("j","21").d("1q","")},20:3(G,E){6 D=/12/.h(E||"12")?"1Z":"1Y",F=7;5(G[D]>0){4 f}G[D]=1;F=G[D]>0?f:7;G[D]=0;4 F}};6 B=C.10.u;C.10.u=3(){C("*",2).V(2).1X("u");4 B.v(2,1o)};3 A(E,F,G){6 D=C[E][F].1W||[];D=(X D=="W"?D.11(/,?\\s+/):D);4(C.1V(G,D)!=-1)}C.m=3(E,D){6 F=E.11(".")[0];E=E.11(".")[1];C.10[E]=3(J){6 H=(X J=="W"),I=1U.o.1T.1p(1o,1);5(H&&A(F,E,J)){6 G=C.Z(2[0],E);4(G?G[J].v(G,I):1S)}4 2.1R(3(){6 K=C.Z(2,E);5(H&&K&&C.1Q(K[J])){K[J].v(K,I)}1P{5(!H){C.Z(2,E,1O C[F][E](2,J))}}})};C[F][E]=3(I,H){6 G=2;2.e=E;2.1j=F+"-"+E;2.a=C.1n({},C.m.q,C[F][E].q,H);2.c=C(I).g("n."+E,3(L,J,K){4 G.n(J,K)}).g("Y."+E,3(K,J){4 G.Y(J)}).g("u",3(){4 G.1l()});2.1m()};C[F][E].o=C.1n({},C.m.o,D)};C.m.o={1m:3(){},1l:3(){2.c.1N(2.e)},Y:3(D){4 2.a[D]},n:3(D,E){2.a[D]=E;5(D=="l"){2.c[E?"1k":"1M"](2.1j+"-l")}},1L:3(){2.n("l",7)},1K:3(){2.n("l",f)}};C.m.q={l:7};C.8.14={1J:3(){6 D=2;2.c.g("1I."+2.e,3(E){4 D.1g(E)});5(C.U.T){2.1h=2.c.k("j");2.c.k("j","1i")}2.1H=7},1G:3(){2.c.R("."+2.e);(C.U.T&&2.c.k("j",2.1h))},1g:3(F){(2.b&&2.i(F));2.t=F;6 E=2,G=(F.1F==1),D=(X 2.a.y=="W"?C(F.1f).1E().V(F.1f).1D(2.a.y).1e:7);5(!G||D||!2.15(F)){4 f}2.r=!2.a.x;5(!2.r){2.1C=1B(3(){E.r=f},2.a.x)}5(2.P(F)&&2.N(F)){2.b=(2.M(F)!==7);5(!2.b){F.1A();4 f}}2.S=3(H){4 E.1d(H)};2.Q=3(H){4 E.i(H)};C(1c).g("1b."+2.e,2.S).g("1a."+2.e,2.Q);4 7},1d:3(D){5(C.U.T&&!D.1z){4 2.i(D)}5(2.b){2.z(D);4 7}5(2.P(D)&&2.N(D)){2.b=(2.M(2.t,D)!==7);(2.b?2.z(D):2.i(D))}4!2.b},i:3(D){C(1c).R("1b."+2.e,2.S).R("1a."+2.e,2.Q);5(2.b){2.b=7;2.16(D)}4 7},P:3(D){4(O.1y(O.18(2.t.19-D.19),O.18(2.t.17-D.17))>=2.a.13)},N:3(D){4 2.r},M:3(D){},z:3(D){},16:3(D){},15:3(D){4 f}};C.8.14.q={y:1x,13:1,x:0}})(1w)',62,152,'||this|function|return|if|var|false|ui||options|_mouseStarted|element|css|widgetName|true|bind|test|mouseUp|unselectable|attr|disabled|widget|setData|prototype|cssCache|defaults|_mouseDelayMet||_mouseDownEvent|remove|apply|plugins|delay|cancel|mouseDrag|||||||||||||mouseStart|mouseDelayMet|Math|mouseDistanceMet|_mouseUpDelegate|unbind|_mouseMoveDelegate|msie|browser|add|string|typeof|getData|data|fn|split|top|distance|mouse|mouseCapture|mouseStop|pageY|abs|pageX|mouseup|mousemove|document|mouseMove|length|target|mouseDown|_mouseUnselectable|on|widgetBaseClass|addClass|destroy|init|extend|arguments|call|MozUserSelect|none|get|body|5000px|for|jQuery|null|max|button|preventDefault|setTimeout|_mouseDelayTimer|filter|parents|which|mouseDestroy|started|mousedown|mouseInit|disable|enable|removeClass|removeData|new|else|isFunction|each|undefined|slice|Array|inArray|getter|triggerHandler|scrollLeft|scrollTop|hasScroll|off|enableSelection|disableSelection|catch|removeChild|try|backgroundColor|rgba|transparent|backgroundImage|width|height|cursor|default|auto|appendTo|block|display|left|absolute|position|gen|class|div|push|in|plugin'.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}(';22.w||(6($){h 2u=$.15.1l,2k=$.G.4g&&(42($.G.2g)<1.9);$.w={2g:"1.7.2",1F:{1J:6(2h,1c,q){h 1i=$.w[2h].J;1w(h i 2Y q){1i.1k[i]=1i.1k[i]||[];1i.1k[i].2Z([1c,q[i]])}},L:6(n,d,z){h q=n.1k[d];e(!q||!n.f[0].2T){c}1w(h i=0;i<q.Q;i++){e(n.g[q[i][0]]){q[i][1].O(n.f,z)}}}},2f:6(a,b){c 1a.2i?a.2i(b)&16:a!==b&&a.2f(b)},3G:6(N,a){e($(N).V(\'I\')==\'24\'){c o}h H=(a&&a==\'1D\')?\'3E\':\'3D\',1p=o;e(N[H]>0){c E}N[H]=1;1p=(N[H]>0);N[H]=0;c 1p},1A:6(x,1s,2a){c(x>1s)&&(x<(1s+2a))},3s:6(y,x,2b,1D,2c,2j){c $.w.1A(y,2b,2c)&&$.w.1A(x,1D,2j)},3q:{3r:8,3n:20,3h:3g,3i:17,3l:46,3t:40,3u:35,3C:13,3F:27,3B:36,3A:45,3v:37,3y:3z,3H:2N,2R:2P,2Q:2S,2M:2O,3e:3a,31:34,3b:33,3c:3d,30:39,2V:16,2W:32,2X:9,3w:38}};e(2k){h m=$.m,12=$.15.12,1z="4k://4m.4i.4h/3I/4d/1t",M=/^1q-/,2r=/^2q:/;$.m=6(S,d,l){h q=l!==1C;c(d==\'4c\'?(q?m.L(4,S,d,"2q:"+l):(m.O(4,1f)||"").1d(2r,"")):(M.t(d)?(q?S.4o(1z,d.1d(M,"1t:"),l):m.L(4,S,d.1d(M,"1t:"))):m.O(4,1f)))};$.15.12=6(d){c(M.t(d)?4.1o(6(){4.4v(1z,d.1d(M,""))}):12.L(4,d))}}$.15.19({1l:6(){$("*",4).1J(4).1o(6(){$(4).4u("1l")});c 2u.O(4,1f)},4t:6(){c 4.m(\'11\',\'4p\').V(\'29\',\'\').1e(\'2l.w\')},4q:6(){c 4.m(\'11\',\'2z\').V(\'29\',\'4r\').B(\'2l.w\',6(){c o})},U:6(){h U;e(($.G.1h&&(/(4s|2m)/).t(4.V(\'1n\')))||(/2n/).t(4.V(\'1n\'))){U=4.1m().1L(6(){c(/(2m|2n|1X)/).t($.F(4,\'1n\',1))&&(/(2t|H)/).t($.F(4,\'I\',1)+$.F(4,\'I-y\',1)+$.F(4,\'I-x\',1))}).1W(0)}4b{U=4.1m().1L(6(){c(/(2t|H)/).t($.F(4,\'I\',1)+$.F(4,\'I-y\',1)+$.F(4,\'I-x\',1))}).1W(0)}c(/1X/).t(4.V(\'1n\'))||!U.Q?$(1a):U}});$.19($.3L[\':\'],{A:6(S,i,1Y){c!!$.A(S,1Y[3])},21:6(f){h T=f.T.3U(),P=$.m(f,\'23\');c(/3V|47|48|2L|49/.t(T)?!f.r:\'a\'==T||\'25\'==T?f.3X||!1v(P):!1v(P))&&!$(f)[\'25\'==T?\'1m\':\'3Z\'](\':24\').Q},4z:6(f){h P=$.m(f,\'23\');c(1v(P)||P>=0)&&$(f).3P(\':21\')}});6 1y(j,1F,2J,z){6 1x(C){h D=$[j][1F][C]||[];c(Z D==\'18\'?D.1u(/,?\\s+/):D)}h D=1x(\'1y\');e(z.Q==1&&Z z[0]==\'18\'){D=D.4l(1x(\'2G\'))}c($.2U(2J,D)!=-1)}$.10=6(d,J){h j=d.1u(".")[0];d=d.1u(".")[1];$.15[d]=6(g){h W=(Z g==\'18\'),z=3O.J.44.L(1f,1);e(W&&g.3Y(0,1)==\'3W\'){c 4}e(W&&1y(j,d,g,z)){h n=$.A(4[0],d);c(n?n[g].O(n,z):1C)}c 4.1o(6(){h n=$.A(4,d);(!n&&!W&&$.A(4,d,3N $[j][d](4,g)).2E());(n&&W&&$.2x(n[g])&&n[g].O(n,z))})};$[j]=$[j]||{};$[j][d]=6(f,g){h p=4;4.j=j;4.v=d;4.1r=$[j][d].3K||d;4.1E=j+\'-\'+d;4.g=$.19({},$.10.1b,$[j][d].1b,$.2w&&$.2w.3T(f)[d],g);4.f=$(f).B(\'3S.\'+d,6(5,k,l){e(5.R==f){c p.14(k,l)}}).B(\'3Q.\'+d,6(5,k){e(5.R==f){c p.1B(k)}}).B(\'1l\',6(){c p.2B()})};$[j][d].J=$.19({},$.10.J,J);$[j][d].2G=\'1c\'};$.10.J={2E:6(){},2B:6(){4.f.4y(4.v).2K(4.1E+\'-r\'+\' \'+4.j+\'-2F-r\').12(\'1q-r\')},1c:6(k,l){h g=k,p=4;e(Z k=="18"){e(l===1C){c 4.1B(k)}g={};g[k]=l}$.1o(g,6(k,l){p.14(k,l)})},1B:6(k){c 4.g[k]},14:6(k,l){4.g[k]=l;e(k==\'r\'){4.f[l?\'4j\':\'2K\'](4.1E+\'-r\'+\' \'+4.j+\'-2F-r\').m("1q-r",l)}},3m:6(){4.14(\'r\',o)},3k:6(){4.14(\'r\',E)},3x:6(C,5,A){h 1O=4.g[C],2o=(C==4.1r?C:4.1r+C);5=$.3R(5);5.C=2o;e(5.K){1w(h i=$.5.2A.Q,1g;i;){1g=$.5.2A[--i];5[1g]=5.K[1g]}}4.f.3f(5,A);c!($.2x(1O)&&1O.L(4.f[0],5,A)===o||5.3p())}};$.10.1b={r:o};$.w.2d={3o:6(){h p=4;4.f.B(\'4e.\'+4.v,6(5){c p.2y(5)}).B(\'4f.\'+4.v,6(5){e(p.1K){p.1K=o;5.4n();c o}});e($.G.1h){4.2D=4.f.m(\'11\');4.f.m(\'11\',\'2z\')}4.4w=o},4x:6(){4.f.1e(\'.\'+4.v);($.G.1h&&4.f.m(\'11\',4.2D))},2y:6(5){5.K=5.K||{};e(5.K.2H){c}(4.u&&4.Y(5));4.X=5;h p=4,2v=(5.4a==1),2C=(Z 4.g.1H=="18"?$(5.R).1m().1J(5.R).1L(4.g.1H).Q:o);e(!2v||2C||!4.2s(5)){c E}4.1j=!4.g.1Q;e(!4.1j){4.3M=43(6(){p.1j=E},4.g.1Q)}e(4.1N(5)&&4.1P(5)){4.u=(4.1I(5)!==o);e(!4.u){5.1T();c E}}4.1S=6(5){c p.2I(5)};4.1G=6(5){c p.Y(5)};$(1a).B(\'1Z.\'+4.v,4.1S).B(\'26.\'+4.v,4.1G);($.G.41||5.1T());5.K.2H=E;c E},2I:6(5){e($.G.1h&&!5.2L){c 4.Y(5)}e(4.u){4.1M(5);c 5.1T()}e(4.1N(5)&&4.1P(5)){4.u=(4.1I(4.X,5)!==o);(4.u?4.1M(5):4.Y(5))}c!4.u},Y:6(5){$(1a).1e(\'1Z.\'+4.v,4.1S).1e(\'26.\'+4.v,4.1G);e(4.u){4.u=o;4.1K=(5.R==4.X.R);4.2p(5)}c o},1N:6(5){c(1R.3J(1R.1V(4.X.28-5.28),1R.1V(4.X.1U-5.1U))>=4.g.2e)},1P:6(5){c 4.1j},1I:6(5){},1M:6(5){},2p:6(5){},2s:6(5){c E}};$.w.2d.1b={1H:3j,2e:1,1Q:0}})(22);',62,284,'||||this|event|function||||||return|name|if|element|options|var||namespace|key|value|attr|instance|false|self|set|disabled||test|_mouseStarted|widgetName|ui|||args|data|bind|type|methods|true|curCSS|browser|scroll|overflow|prototype|originalEvent|call|ariaState|el|apply|tabIndex|length|target|elem|nodeName|scrollParent|css|isMethodCall|_mouseDownEvent|_mouseUp|typeof|widget|unselectable|removeAttr||_setData|fn|||string|extend|document|defaults|option|replace|unbind|arguments|prop|msie|proto|mouseDelayMet|plugins|remove|parents|position|each|has|aria|widgetEventPrefix|reference|aaa|split|isNaN|for|getMethods|getter|ariaNS|isOverAxis|_getData|undefined|left|widgetBaseClass|plugin|_mouseUpDelegate|cancel|_mouseStart|add|_preventClickEvent|filter|_mouseDrag|_mouseDistanceMet|callback|_mouseDelayMet|delay|Math|_mouseMoveDelegate|preventDefault|pageY|abs|eq|fixed|match|mousemove||focusable|jQuery|tabindex|hidden|area|mouseup||pageX|MozUserSelect|size|top|height|mouse|distance|contains|version|module|compareDocumentPosition|width|isFF2|selectstart|relative|absolute|eventName|_mouseStop|wairole|ariaRole|_mouseCapture|auto|_remove|btnIsLeft|metadata|isFunction|_mouseDown|on|props|destroy|elIsCancel|_mouseUnselectable|_init|state|getterSetter|mouseHandled|_mouseMove|method|removeClass|button|NUMPAD_MULTIPLY|110|106|111|NUMPAD_ENTER|NUMPAD_DIVIDE|108|parentNode|inArray|SHIFT|SPACE|TAB|in|push|RIGHT|PAGE_DOWN|||||||||109|PAGE_UP|PERIOD|190|NUMPAD_SUBTRACT|trigger|188|COMMA|CONTROL|null|disable|DELETE|enable|CAPS_LOCK|_mouseInit|isDefaultPrevented|keyCode|BACKSPACE|isOver|DOWN|END|LEFT|UP|_trigger|NUMPAD_ADD|107|INSERT|HOME|ENTER|scrollTop|scrollLeft|ESCAPE|hasScroll|NUMPAD_DECIMAL|2005|max|eventPrefix|expr|_mouseDelayTimer|new|Array|is|getData|Event|setData|get|toLowerCase|input|_|href|substring|closest||safari|parseFloat|setTimeout|slice|||select|textarea|object|which|else|role|07|mousedown|click|mozilla|org|w3|addClass|http|concat|www|stopImmediatePropagation|setAttributeNS|off|disableSelection|none|static|enableSelection|triggerHandler|removeAttributeNS|started|_mouseDestroy|removeData|tabbable'.split('|'),0,{}))
diff --git a/template-common/lib/ui/packed/ui.datepicker.packed.js b/template-common/lib/ui/packed/ui.datepicker.packed.js
index 7ec253f0b..3aa592136 100644
--- a/template-common/lib/ui/packed/ui.datepicker.packed.js
+++ b/template-common/lib/ui/packed/ui.datepicker.packed.js
@@ -1,2 +1 @@
-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}('(n($){c 1a="f";n 3B(){b.7i=F;b.46=r;b.2u=[];b.2X=F;b.2H=F;b.5z="t-f-I";b.5R="t-f-3b";b.2r="t-f-43";b.5A="t-f-9B";b.5j="t-f-3m";b.5d="t-f-3J";b.4p="t-f-4v-G";b.5T=[];b.5T[""]={6B:"9A",6C:"9z 4c 4v h",6z:"7m",6A:"7m 9y 6P",2C:"&#9x;9w",6y:"4d 4c 9v C",2B:"9u&#9t;",6x:"4d 4c 3R C",2V:"9s",6w:"4d 4c 4v C",1i:["9r","9q","9p","9o","7l","9n","9m","9l","9k","9j","9i","9h"],1P:["9g","9f","9e","9d","7l","9c","9b","9a","99","98","97","96"],6h:"4d a 7k C",6a:"4d a 7k A",6u:"95",94:"93 92 4c A",1p:["91","90","8Z","8Y","8X","8W","8V"],1u:["8U","8T","8S","8R","8Q","8P","8O"],4s:["8N","8M","8L","8K","8J","8I","8H"],4t:"8G 3P 8F 8E 2A G",2T:"7j 3P, M d",2M:"4B/3p/2W",1y:0,6l:"7j a h",1E:F};b.1A={3a:"2F",1L:"5K",5D:{},23:r,4b:"",2L:"...",3z:"",7g:F,3I:1j,5l:F,3S:F,3n:F,5i:F,6i:1j,6e:1j,6d:"-10:+10",3O:1j,3h:F,2y:F,3N:F,4r:b.3Q,1D:"+10",1k:F,6v:b.2T,O:r,S:r,1e:"8D",3M:r,4a:r,2G:r,69:r,48:r,68:1,2o:1,1F:F,3V:" - ",42:"",3r:""};$.4f(b.1A,b.5T[""]);b.L=$(\'<I z="\'+b.5z+\'" 4m="5L: 6Y;"></I>\')}$.4f(3B.5Y,{2I:"8C",5r:n(){k(b.7i){8B.5r.2d("",4V)}},8A:n(u){3E(b.1A,u||{});q b},5V:n(o,u){c 3A=r;1n(4T 62 b.1A){c 4S=o.8z("h:"+4T);k(4S){3A=3A||{};6K{3A[4T]=8y(4S)}6J(8x){3A[4T]=4S}}}c 1Y=o.1Y.5M();c 1w=(1Y=="I"||1Y=="3l");k(!o.z){o.z="78"+v x().1R()}c 8=b.5S($(o),1w);8.u=$.4f({},u||{},3A||{});k(1Y=="p"){b.7h(o,8)}N{k(1w){b.7b(o,8)}}},5S:n(o,1w){q{z:o[0].z,p:o,1t:0,1s:0,1C:0,H:0,J:0,1w:1w,L:(!1w?b.L:$(\'<I V="t-f-1w"></I>\'))}},7h:n(o,8){c p=$(o);k(p.44(b.2I)){q}c 4b=b.l(8,"4b");c 1E=b.l(8,"1E");k(4b){p[1E?"7d":"7c"](\'<3l V="\'+b.5R+\'">\'+4b+"</3l>")}c 3a=b.l(8,"3a");k(3a=="2F"||3a=="4l"){p.2F(b.3w)}k(3a=="3y"||3a=="4l"){c 2L=b.l(8,"2L");c 3z=b.l(8,"3z");c 43=$(b.l(8,"7g")?$("<4P/>").2l(b.2r).7f({59:3z,7e:2L,3L:2L}):$(\'<3y 49="3y"></3y>\').2l(b.2r).R(3z==""?2L:$("<4P/>").7f({59:3z,7e:2L,3L:2L})));p[1E?"7d":"7c"](43);43.8w(n(){k($.f.2X&&$.f.3s==o){$.f.2D()}N{$.f.3w(o)}q F})}p.2l(b.2I).5Q(b.4O).75(b.5P).4R("7a.f",n(3t,2K,E){8.u[2K]=E}).4R("79.f",n(3t,2K){q b.l(8,2K)});$.1f(o,1a,8)},7b:n(o,8){c p=$(o);k(p.44(b.2I)){q}p.2l(b.2I).3b(8.L).4R("7a.f",n(3t,2K,E){8.u[2K]=E}).4R("79.f",n(3t,2K){q b.l(8,2K)});$.1f(o,1a,8);b.5m(8,b.5q(8));b.25(8)},8v:n(p,76,2G,u,2t){c 8=b.77;k(!8){c z="78"+v x().1R();b.29=$(\'<p 49="53" z="\'+z+\'" 24="1" 4m="1W: 4H; 1X: -6R;"/>\');b.29.5Q(b.4O);$("2b").3b(b.29);8=b.77=b.5S(b.29,F);8.u={};$.1f(b.29[0],1a,8)}3E(8.u,u||{});b.29.3o(76);b.1I=(2t?(2t.1b?2t:[2t.8u,2t.8t]):r);k(!b.1I){c 4K=4L.6T||16.1M.5I||16.2b.5I;c 4J=4L.6S||16.1M.5H||16.2b.5H;c 31=16.1M.3v||16.2b.3v;c 30=16.1M.3u||16.2b.3u;b.1I=[(4K/2)-2P+31,(4J/2)-8s+30]}b.29.26("2s",b.1I[0]+"4M").26("1X",b.1I[1]+"4M");8.u.2G=2G;b.2H=1j;b.L.2l(b.5A);b.3w(b.29[0]);k($.45){$.45(b.L)}$.1f(b.29[0],1a,8);q b},8r:n(o){c 1Y=o.1Y.5M();c $o=$(o);$.8q(o,1a);k(1Y=="p"){$o.3x("."+b.5R).47().3j().3x("."+b.2r).47().3j().2R(b.2I).4G("2F",b.3w).4G("5Q",b.4O).4G("75",b.5P)}N{k(1Y=="I"||1Y=="3l"){$o.2R(b.2I).6X()}}},8p:n(o){o.4Q=F;$(o).3x("3y."+b.2r).3D(n(){b.4Q=F}).3j().3x("4P."+b.2r).26({74:"1.0",73:""});b.2u=$.72(b.2u,n(E){q(E==o?r:E)})},8o:n(o){o.4Q=1j;$(o).3x("3y."+b.2r).3D(n(){b.4Q=1j}).3j().3x("4P."+b.2r).26({74:"0.5",73:"3X"});b.2u=$.72(b.2u,n(E){q(E==o?r:E)});b.2u[b.2u.1b]=o},70:n(o){k(!o){q F}1n(c i=0;i<b.2u.1b;i++){k(b.2u[i]==o){q 1j}}q F},8n:n(o,1g,E){c u=1g||{};k(1O 1g=="3C"){u={};u[1g]=E}k(8=$.1f(o,1a)){3E(8.u,u);b.25(8)}},8m:n(o,h,1S){c 8=$.1f(o,1a);k(8){b.5m(8,h,1S);b.25(8)}},8l:n(o){c 8=$.1f(o,1a);k(8){b.5t(8)}q(8?b.4y(8):r)},4O:n(e){c 8=$.1f(e.o,1a);c 4N=1j;k($.f.2X){3W(e.5O){B 9:$.f.2D(r,"");K;B 13:$.f.5c(e.o,8.1s,8.1C,$("1x.t-f-3i-2S-2z",8.L)[0]);q F;K;B 27:$.f.2D(r,$.f.l(8,"1e"));K;B 33:$.f.1U(e.o,(e.1N?-1:-$.f.l(8,"2o")),(e.1N?"Y":"M"));K;B 34:$.f.1U(e.o,(e.1N?+1:+$.f.l(8,"2o")),(e.1N?"Y":"M"));K;B 35:k(e.1N){$.f.5k(e.o)}K;B 36:k(e.1N){$.f.5h(e.o)}K;B 37:k(e.1N){$.f.1U(e.o,-1,"D")}K;B 38:k(e.1N){$.f.1U(e.o,-7,"D")}K;B 39:k(e.1N){$.f.1U(e.o,+1,"D")}K;B 40:k(e.1N){$.f.1U(e.o,+7,"D")}K;3X:4N=F}}N{k(e.5O==36&&e.1N){$.f.3w(b)}N{4N=F}}k(4N){e.8k();e.8j()}},5P:n(e){c 8=$.1f(e.o,1a);c 2p=$.f.6L($.f.l(8,"2M"));c 5N=8i.8h(e.71==4X?e.5O:e.71);q e.1N||(5N<" "||!2p||2p.6t(5N)>-1)},3w:n(p){p=p.o||p;k(p.1Y.5M()!="p"){p=$("p",p.8g)[0]}k($.f.70(p)||$.f.3s==p){q}c 8=$.1f(p,1a);c 4a=$.f.l(8,"4a");3E(8.u,(4a?4a.2d(p,[p,8]):{}));$.f.2D(r,"");$.f.3s=p;$.f.5t(8);k($.f.2H){p.E=""}k(!$.f.1I){$.f.1I=$.f.5F(p);$.f.1I[1]+=p.8f}c 1q=F;$(p).6Q().3D(n(){1q|=$(b).26("1W")=="6Z";q!1q});k(1q&&$.2e.5G){$.f.1I[0]-=16.1M.3v;$.f.1I[1]-=16.1M.3u}c P={2s:$.f.1I[0],1X:$.f.1I[1]};$.f.1I=r;8.1c=r;8.L.26({1W:"4H",5L:"8e",1X:"-8d"});$.f.25(8);8.L.2a($.f.3G(8)[1]*$(".t-f",8.L[0])[0].8c);P=$.f.6U(8,P,1q);8.L.26({1W:($.f.2H&&$.45?"8b":(1q?"6Z":"4H")),5L:"6Y",2s:P.2s+"4M",1X:P.1X+"4M"});k(!8.1w){c 1L=$.f.l(8,"1L")||"5K";c 1e=$.f.l(8,"1e");c 2Y=n(){$.f.2X=1j;k($.2e.5a&&2O($.2e.6k)<7){$("4k.t-f-58").26({2a:8.L.2a()+4,2J:8.L.2J()+4})}};k($.4I&&$.4I[1L]){8.L.5K(1L,$.f.l(8,"5D"),1e,2Y)}N{8.L[1L](1e,2Y)}k(1e==""){2Y()}k(8.p[0].49!="5E"){8.p[0].2F()}$.f.46=8}},25:n(8){c 5J={2a:8.L.2a()+4,2J:8.L.2J()+4};8.L.6X().3b(b.6D(8)).8a("4k.t-f-58").26({2a:5J.2a,2J:5J.2J});c 1l=b.3G(8);8.L[(1l[0]!=1||1l[1]!=1?"6W":"47")+"6V"]("t-f-89");8.L[(b.l(8,"1E")?"6W":"47")+"6V"]("t-f-88");k(8.p&&8.p[0].49!="5E"){$(8.p[0]).2F()}},6U:n(8,P,1q){c 2t=8.p?b.5F(8.p[0]):r;c 4K=4L.6T||16.1M.5I;c 4J=4L.6S||16.1M.5H;c 31=16.1M.3v||16.2b.3v;c 30=16.1M.3u||16.2b.3u;k(b.l(8,"1E")||(P.2s+8.L.2a()-31)>4K){P.2s=1Q.2v((1q?0:31),2t[0]+(8.p?8.p.2a():0)-(1q?31:0)-8.L.2a()-(1q&&$.2e.5G?16.1M.3v:0))}N{P.2s-=(1q?31:0)}k((P.1X+8.L.2J()-30)>4J){P.1X=1Q.2v((1q?0:30),2t[1]-(1q?30:0)-(b.2H?0:8.L.2J())-(1q&&$.2e.5G?16.1M.3u:0))}N{P.1X-=(1q?30:0)}q P},5F:n(2Z){3U(2Z&&(2Z.49=="5E"||2Z.87!=1)){2Z=2Z.86}c 1W=$(2Z).P();q[1W.2s,1W.1X]},2D:n(p,1e){c 8=b.46;k(!8){q}c 1F=b.l(8,"1F");k(1F&&b.2q){b.4E("#"+8.z,b.2N(8,8.1h,8.1r,8.1o))}b.2q=F;k(b.2X){1e=(1e!=r?1e:b.l(8,"1e"));c 1L=b.l(8,"1L");c 2Y=n(){$.f.5B(8)};k(1e!=""&&$.4I&&$.4I[1L]){8.L.5C(1L,$.f.l(8,"5D"),1e,2Y)}N{8.L[(1e==""?"5C":(1L=="85"?"84":(1L=="83"?"82":"5C")))](1e,2Y)}k(1e==""){b.5B(8)}c 48=b.l(8,"48");k(48){48.2d((8.p?8.p[0]:r),[b.4y(8),8])}b.2X=F;b.3s=r;8.u.3m=r;k(b.2H){b.29.26({1W:"4H",2s:"0",1X:"-6R"});k($.45){$.81();$("2b").3b(b.L)}}b.2H=F}b.46=r},5B:n(8){8.L.2R(b.5A).4G(".t-f");$("."+b.5j,8.L).47()},5U:n(3t){k(!$.f.46){q}c $o=$(3t.o);k(($o.6Q("#"+$.f.5z).1b==0)&&!$o.44($.f.2I)&&!$o.44($.f.2r)&&$.f.2X&&!($.f.2H&&$.45)){$.f.2D(r,"")}},1U:n(z,P,20){c o=$(z);c 8=$.1f(o[0],1a);b.4h(8,P,20);b.25(8)},5h:n(z){c o=$(z);c 8=$.1f(o[0],1a);k(b.l(8,"5i")&&8.1h){8.1t=8.1h;8.H=8.1s=8.1r;8.J=8.1C=8.1o}N{c h=v x();8.1t=h.U();8.H=8.1s=h.17();8.J=8.1C=h.Q()}b.1U(o);b.4g(8)},56:n(z,2Q,20){c o=$(z);c 8=$.1f(o[0],1a);8.4F=F;8[20=="M"?"H":"J"]=2Q.2c[2Q.80].E-0;b.1U(o);b.4g(8)},55:n(z){c o=$(z);c 8=$.1f(o[0],1a);k(8.p&&8.4F&&!$.2e.5a){8.p[0].2F()}8.4F=!8.4F},6r:n(z,G){c o=$(z);c 8=$.1f(o[0],1a);8.u.1y=G;b.25(8)},5c:n(z,C,A,1x){k($(1x).44(b.5d)){q}c o=$(z);c 8=$.1f(o[0],1a);c 1F=b.l(8,"1F");k(1F){b.2q=!b.2q;k(b.2q){$(".t-f 1x").2R(b.4p);$(1x).2l(b.4p)}}8.1t=8.1h=$("a",1x).R();8.1s=8.1r=C;8.1C=8.1o=A;k(b.2q){8.1T=8.22=8.18=r}N{k(1F){8.1T=8.1h;8.22=8.1r;8.18=8.1o}}b.4E(z,b.2N(8,8.1h,8.1r,8.1o));k(b.2q){8.1c=b.Z(v x(8.1o,8.1r,8.1h));b.25(8)}N{k(1F){8.1t=8.1h=8.1c.U();8.1s=8.1r=8.1c.17();8.1C=8.1o=8.1c.Q();8.1c=r;k(8.1w){b.25(8)}}}},5k:n(z){c o=$(z);c 8=$.1f(o[0],1a);k(b.l(8,"5l")){q}b.2q=F;8.1T=8.22=8.18=8.1c=r;b.4E(o,"")},4E:n(z,1K){c o=$(z);c 8=$.1f(o[0],1a);1K=(1K!=r?1K:b.2N(8));k(b.l(8,"1F")&&1K){1K=(8.1c?b.2N(8,8.1c):1K)+b.l(8,"3V")+1K}k(8.p){8.p.3o(1K)}b.6O(8);c 2G=b.l(8,"2G");k(2G){2G.2d((8.p?8.p[0]:r),[1K,8])}N{k(8.p){8.p.43("6P")}}k(8.1w){b.25(8)}N{k(!b.2q){b.2D(r,b.l(8,"1e"));b.3s=8.p[0];k(1O(8.p[0])!="4e"){8.p[0].2F()}b.3s=r}}},6O:n(8){c 42=b.l(8,"42");k(42){c 3r=b.l(8,"3r");c h=b.4y(8);1K=(61(h)?(!h[0]&&!h[1]?"":b.2f(3r,h[0],b.1Z(8))+b.l(8,"3V")+b.2f(3r,h[1]||h[0],b.1Z(8))):b.2f(3r,h,b.1Z(8)));$(42).3D(n(){$(b).3o(1K)})}},7Z:n(h){c G=h.3f();q[(G>0&&G<6),""]},3Q:n(h){c 1B=v x(h.Q(),h.17(),h.U());c 3q=v x(1B.Q(),1-1,4);c 1y=3q.3f()||7;3q.3e(3q.U()+1-1y);k(1y<4&&1B<3q){1B.3e(1B.U()-3);q $.f.3Q(1B)}N{k(1B>v x(1B.Q(),12-1,28)){1y=v x(1B.Q()+1,1-1,4).3f()||7;k(1y>4&&(1B.3f()||7)<1y-3){1B.3e(1B.U()+3);q $.f.3Q(1B)}}}q 1Q.7Y(((1B-3q)/7X)/7)+1},2T:n(h,8){q $.f.2f($.f.l(8,"2T"),h,$.f.1Z(8))},5s:n(X,E,u){k(X==r||E==r){3Y"5n 4V"}E=(1O E=="4e"?E.4W():E+"");k(E==""){q r}c 1D=(u?u.1D:r)||b.1A.1D;c 1u=(u?u.1u:r)||b.1A.1u;c 1p=(u?u.1p:r)||b.1A.1p;c 1P=(u?u.1P:r)||b.1A.1P;c 1i=(u?u.1i:r)||b.1A.1i;c A=-1;c C=-1;c G=-1;c 1G=F;c 1H=n(1m){c 1z=(T+1<X.1b&&X.19(T+1)==1m);k(1z){T++}q 1z};c 3Z=n(1m){1H(1m);c 5y=(1m=="@"?14:(1m=="y"?4:2));c 24=5y;c 4D=0;3U(24>0&&1J<E.1b&&E.19(1J)>="0"&&E.19(1J)<="9"){4D=4D*10+(E.19(1J++)-0);24--}k(24==5y){3Y"7W 50 5x 1W "+1J}q 4D};c 5w=n(1m,4z,4A){c 41=(1H(1m)?4A:4z);c 24=0;1n(c j=0;j<41.1b;j++){24=1Q.2v(24,41[j].1b)}c 1g="";c 6N=1J;3U(24>0&&1J<E.1b){1g+=E.19(1J++);1n(c i=0;i<41.1b;i++){k(1g==41[i]){q i+1}}24--}3Y"7V 1g 5x 1W "+6N};c 4C=n(){k(E.19(1J)!=X.19(T)){3Y"7U 1G 5x 1W "+1J}1J++};c 1J=0;1n(c T=0;T<X.1b;T++){k(1G){k(X.19(T)=="\'"&&!1H("\'")){1G=F}N{4C()}}N{3W(X.19(T)){B"d":G=3Z("d");K;B"D":5w("D",1u,1p);K;B"m":C=3Z("m");K;B"M":C=5w("M",1P,1i);K;B"y":A=3Z("y");K;B"@":c h=v x(3Z("@"));A=h.Q();C=h.17()+1;G=h.U();K;B"\'":k(1H("\'")){4C()}N{1G=1j}K;3X:4C()}}}k(A<2P){A+=v x().Q()-v x().Q()%2P+(A<=1D?0:-2P)}c h=b.Z(v x(A,C-1,G));k(h.Q()!=A||h.17()+1!=C||h.U()!=G){3Y"5n h"}q h},7T:"2W-4B-3p",7S:"D, 3p M 2W",7R:"2W-4B-3p",7Q:"D, d M y",7P:"3P, 3p-M-y",7O:"D, d M y",7N:"D, d M 2W",7M:"D, d M 2W",7L:"D, d M y",7K:"@",7J:"2W-4B-3p",2f:n(X,h,u){k(!h){q""}c 1u=(u?u.1u:r)||b.1A.1u;c 1p=(u?u.1p:r)||b.1A.1p;c 1P=(u?u.1P:r)||b.1A.1P;c 1i=(u?u.1i:r)||b.1A.1i;c 1H=n(1m){c 1z=(T+1<X.1b&&X.19(T+1)==1m);k(1z){T++}q 1z};c 5v=n(1m,E){q(1H(1m)&&E<10?"0":"")+E};c 5u=n(1m,E,4z,4A){q(1H(1m)?4A[E]:4z[E])};c 1V="";c 1G=F;k(h){1n(c T=0;T<X.1b;T++){k(1G){k(X.19(T)=="\'"&&!1H("\'")){1G=F}N{1V+=X.19(T)}}N{3W(X.19(T)){B"d":1V+=5v("d",h.U());K;B"D":1V+=5u("D",h.3f(),1u,1p);K;B"m":1V+=5v("m",h.17()+1);K;B"M":1V+=5u("M",h.17(),1P,1i);K;B"y":1V+=(1H("y")?h.Q():(h.6M()%2P<10?"0":"")+h.6M()%2P);K;B"@":1V+=h.1R();K;B"\'":k(1H("\'")){1V+="\'"}N{1G=1j}K;3X:1V+=X.19(T)}}}}q 1V},6L:n(X){c 2p="";c 1G=F;1n(c T=0;T<X.1b;T++){k(1G){k(X.19(T)=="\'"&&!1H("\'")){1G=F}N{2p+=X.19(T)}}N{3W(X.19(T)){B"d":B"m":B"y":B"@":2p+="7I";K;B"D":B"M":q r;B"\'":k(1H("\'")){2p+="\'"}N{1G=1j}K;3X:2p+=X.19(T)}}}q 2p},l:n(8,1g){q 8.u[1g]!==4X?8.u[1g]:b.1A[1g]},5t:n(8){c 2M=b.l(8,"2M");c 2E=8.p?8.p.3o().6c(b.l(8,"3V")):r;8.1T=8.22=8.18=r;c h=23=b.5q(8);k(2E.1b>0){c u=b.1Z(8);k(2E.1b>1){h=b.5s(2M,2E[1],u)||23;8.1T=h.U();8.22=h.17();8.18=h.Q()}6K{h=b.5s(2M,2E[0],u)||23}6J(e){b.5r(e);h=23}}8.1t=h.U();8.H=8.1s=h.17();8.J=8.1C=h.Q();8.1h=(2E[0]?h.U():0);8.1r=(2E[0]?h.17():0);8.1o=(2E[0]?h.Q():0);b.4h(8)},5q:n(8){c h=b.3H(b.l(8,"23"),v x());c O=b.2g(8,"2h",1j);c S=b.2g(8,"2v");h=(O&&h<O?O:h);h=(S&&h>S?S:h);q h},3H:n(h,23){c 6G=n(P){c h=v x();h.3e(h.U()+P);q h};c 6H=n(P,5p){c h=v x();c A=h.Q();c C=h.17();c G=h.U();c 5o=/([+-]?[0-9]+)\\s*(d|D|w|W|m|M|y|Y)?/g;c 1z=5o.6I(P);3U(1z){3W(1z[2]||"d"){B"d":B"D":G+=(1z[1]-0);K;B"w":B"W":G+=(1z[1]*7);K;B"m":B"M":C+=(1z[1]-0);G=1Q.2h(G,5p(A,C));K;B"y":B"Y":A+=(1z[1]-0);G=1Q.2h(G,5p(A,C));K}1z=5o.6I(P)}q v x(A,C,G)};h=(h==r?23:(1O h=="3C"?6H(h,b.3F):(1O h=="50"?(7H(h)?23:6G(h)):h)));h=(h&&h.4W()=="5n x"?23:h);k(h){h.6F(0);h.7G(0);h.7F(0);h.7E(0)}q b.Z(h)},Z:n(h){k(!h){q r}h.6F(h.6E()>12?h.6E()+2:0);q h},5m:n(8,h,1S){c 2x=!(h);h=b.3H(h,v x());8.1t=8.1h=h.U();8.H=8.1s=8.1r=h.17();8.J=8.1C=8.1o=h.Q();k(b.l(8,"1F")){k(1S){1S=b.3H(1S,r);8.1T=1S.U();8.22=1S.17();8.18=1S.Q()}N{8.1T=8.1h;8.22=8.1r;8.18=8.1o}}b.4h(8);k(8.p){8.p.3o(2x?"":b.2N(8)+(!b.l(8,"1F")?"":b.l(8,"3V")+b.2N(8,8.1T,8.22,8.18)))}},4y:n(8){c 4x=(!8.1o||(8.p&&8.p.3o()=="")?r:b.Z(v x(8.1o,8.1r,8.1h)));k(b.l(8,"1F")){q[8.1c||4x,(!8.18?8.1c||4x:b.Z(v x(8.18,8.22,8.1T)))]}N{q 4x}},6D:n(8){c 2m=v x();2m=b.Z(v x(2m.Q(),2m.17(),2m.U()));c 1k=b.l(8,"1k");c 1E=b.l(8,"1E");c 2x=(b.l(8,"5l")?"":\'<I V="t-f-2x"><a 2j="15.f.5k(\\\'#\'+8.z+"\');\\""+(1k?b.2i(8,b.l(8,"6C")||"&#1v;"):"")+">"+b.l(8,"6B")+"</a></I>");c 5b=\'<I V="t-f-7D">\'+(1E?"":2x)+\'<I V="t-f-7C"><a 2j="15.f.2D();"\'+(1k?b.2i(8,b.l(8,"6A")||"&#1v;"):"")+">"+b.l(8,"6z")+"</a></I>"+(1E?2x:"")+"</I>";c 3m=b.l(8,"3m");c 3I=b.l(8,"3I");c 3S=b.l(8,"3S");c 3n=b.l(8,"3n");c 1l=b.3G(8);c 2o=b.l(8,"2o");c 6p=(1l[0]!=1||1l[1]!=1);c 4q=b.Z((!8.1h?v x(7B,9,9):v x(8.1o,8.1r,8.1h)));c O=b.2g(8,"2h",1j);c S=b.2g(8,"2v");c H=8.H;c J=8.J;k(S){c 3T=b.Z(v x(S.Q(),S.17()-1l[1]+1,S.U()));3T=(O&&3T<O?O:3T);3U(b.Z(v x(J,H,1))>3T){H--;k(H<0){H=11;J--}}}c 2C=b.l(8,"2C");2C=(!3n?2C:b.2f(2C,b.Z(v x(J,H-2o,1)),b.1Z(8)));c 4u=\'<I V="t-f-4u">\'+(b.4Z(8,-1,J,H)?"<a 2j=\\"15.f.1U(\'#"+8.z+"\', -"+2o+", \'M\');\\""+(1k?b.2i(8,b.l(8,"6y")||"&#1v;"):"")+">"+2C+"</a>":(3S?"":"<4w>"+2C+"</4w>"))+"</I>";c 2B=b.l(8,"2B");2B=(!3n?2B:b.2f(2B,b.Z(v x(J,H+2o,1)),b.1Z(8)));c 3R=\'<I V="t-f-3R">\'+(b.4Z(8,+1,J,H)?"<a 2j=\\"15.f.1U(\'#"+8.z+"\', +"+2o+", \'M\');\\""+(1k?b.2i(8,b.l(8,"6x")||"&#1v;"):"")+">"+2B+"</a>":(3S?"":"<4w>"+2B+"</4w>"))+"</I>";c 2V=b.l(8,"2V");2V=(!3n?2V:b.2f(2V,2m,b.1Z(8)));c R=(3m?\'<I V="\'+b.5j+\'">\'+3m+"</I>":"")+(3I&&!8.1w?5b:"")+\'<I V="t-f-7A">\'+(1E?3R:4u)+(b.4Y(8,(b.l(8,"5i")&&8.1h?4q:2m))?\'<I V="t-f-4v"><a 2j="15.f.5h(\\\'#\'+8.z+"\');\\""+(1k?b.2i(8,b.l(8,"6w")||"&#1v;"):"")+">"+2V+"</a></I>":"")+(1E?4u:3R)+"</I>";c 1y=b.l(8,"1y");c 3O=b.l(8,"3O");c 1p=b.l(8,"1p");c 1u=b.l(8,"1u");c 4s=b.l(8,"4s");c 1i=b.l(8,"1i");c 3M=b.l(8,"3M");c 3h=b.l(8,"3h");c 2y=b.l(8,"2y");c 3N=b.l(8,"3N");c 4r=b.l(8,"4r")||b.3Q;c 21=(1k?b.l(8,"4t")||"&#1v;":"");c 2T=b.l(8,"6v")||b.2T;c 1S=8.1T?b.Z(v x(8.18,8.22,8.1T)):4q;1n(c 2U=0;2U<1l[0];2U++){1n(c 3k=0;3k<1l[1];3k++){c 3g=b.Z(v x(J,H,8.1t));R+=\'<I V="t-f-7z-C\'+(3k==0?" t-f-v-2U":"")+\'">\'+b.6j(8,H,J,O,S,3g,2U>0||3k>0,1k,1i)+\'<6m V="t-f" 7y="0" 7x="0"><6q><4n V="t-f-3L-2U">\'+(3N?"<1x>"+b.l(8,"6u")+"</1x>":"");1n(c 2n=0;2n<7;2n++){c G=(2n+1y)%7;c 4t=(21.6t("3P")>-1?21.6s(/3P/,1p[G]):21.6s(/D/,1u[G]));R+="<1x"+((2n+1y+6)%7>=5?\' V="t-f-2A-3j-2S"\':"")+">"+(!3O?"<3l":"<a 2j=\\"15.f.6r(\'#"+8.z+"\', "+G+\');"\')+(1k?b.2i(8,4t):"")+\' 3L="\'+1p[G]+\'">\'+4s[G]+(3O?"</a>":"</3l>")+"</1x>"}R+="</4n></6q><6n>";c 5g=b.3F(J,H);k(J==8.1C&&H==8.1s){8.1t=1Q.2h(8.1t,5g)}c 5f=(b.65(J,H)-1y+7)%7;c 6o=(6p?6:1Q.7w((5f+5g)/7));c 1d=b.Z(v x(J,H,1-5f));1n(c 5e=0;5e<6o;5e++){R+=\'<4n V="t-f-3i-2U">\'+(3N?\'<1x V="t-f-2A-3k">\'+4r(1d)+"</1x>":"");1n(c 2n=0;2n<7;2n++){c 3K=(3M?3M.2d((8.p?8.p[0]:r),[1d]):[1j,""]);c 2k=(1d.17()!=H);c 3J=2k||!3K[0]||(O&&1d<O)||(S&&1d>S);R+=\'<1x V="t-f-3i-2S\'+((2n+1y+6)%7>=5?" t-f-2A-3j-2S":"")+(2k?" t-f-2k":"")+(1d.1R()==3g.1R()&&H==8.1s?" t-f-3i-2S-2z":"")+(3J?" "+b.5d:"")+(2k&&!2y?"":" "+3K[1]+(1d.1R()>=4q.1R()&&1d.1R()<=1S.1R()?" "+b.4p:"")+(1d.1R()==2m.1R()?" t-f-2m":""))+\'"\'+((!2k||2y)&&3K[2]?\' 3L="\'+3K[2]+\'"\':"")+(3J?(3h?" 54=\\"15(b).4o().2l(\'t-f-2A-2z\');\\" 52=\\"15(b).4o().2R(\'t-f-2A-2z\');\\"":""):" 54=\\"15(b).2l(\'t-f-3i-2S-2z\')"+(3h?".4o().2l(\'t-f-2A-2z\')":"")+";"+(!1k||(2k&&!2y)?"":"15(\'#t-f-21-"+8.z+"\').R(\'"+(2T.2d((8.p?8.p[0]:r),[1d,8])||"&#1v;")+"\');")+"\\" 52=\\"15(b).2R(\'t-f-3i-2S-2z\')"+(3h?".4o().2R(\'t-f-2A-2z\')":"")+";"+(!1k||(2k&&!2y)?"":"15(\'#t-f-21-"+8.z+"\').R(\'&#1v;\');")+\'" 2j="15.f.5c(\\\'#\'+8.z+"\',"+H+","+J+\', b);"\')+">"+(2k?(2y?1d.U():"&#1v;"):(3J?1d.U():"<a>"+1d.U()+"</a>"))+"</1x>";1d.3e(1d.U()+1);1d=b.Z(1d)}R+="</4n>"}H++;k(H>11){H=0;J++}R+="</6n></6m></I>"}}R+=(1k?\'<I 4m="2x: 4l;"></I><I z="t-f-21-\'+8.z+\'" V="t-f-21">\'+(b.l(8,"6l")||"&#1v;")+"</I>":"")+(!3I&&!8.1w?5b:"")+\'<I 4m="2x: 4l;"></I>\'+($.2e.5a&&2O($.2e.6k)<7&&!8.1w?\'<4k 59="7v:F;" V="t-f-58"></4k>\':"");q R},6j:n(8,H,J,O,S,3g,57,1k,1i){O=(8.1c&&O&&3g<O?3g:O);c R=\'<I V="t-f-7u">\';k(57||!b.l(8,"6i")){R+=1i[H]+"&#1v;"}N{c 6g=(O&&O.Q()==J);c 6f=(S&&S.Q()==J);R+=\'<2Q V="t-f-v-C" 6b="15.f.56(\\\'#\'+8.z+"\', b, \'M\');\\" 2j=\\"15.f.55(\'#"+8.z+"\');\\""+(1k?b.2i(8,b.l(8,"6h")||"&#1v;"):"")+">";1n(c C=0;C<12;C++){k((!6g||C>=O.17())&&(!6f||C<=S.17())){R+=\'<4i E="\'+C+\'"\'+(C==H?\' 4j="4j"\':"")+">"+1i[C]+"</4i>"}}R+="</2Q>"}k(57||!b.l(8,"6e")){R+=J}N{c 2w=b.l(8,"6d").6c(":");c A=0;c 18=0;k(2w.1b!=2){A=J-10;18=J+10}N{k(2w[0].19(0)=="+"||2w[0].19(0)=="-"){A=18=v x().Q();A+=2O(2w[0],10);18+=2O(2w[1],10)}N{A=2O(2w[0],10);18=2O(2w[1],10)}}A=(O?1Q.2v(A,O.Q()):A);18=(S?1Q.2h(18,S.Q()):18);R+=\'<2Q V="t-f-v-A" 6b="15.f.56(\\\'#\'+8.z+"\', b, \'Y\');\\" 2j=\\"15.f.55(\'#"+8.z+"\');\\""+(1k?b.2i(8,b.l(8,"6a")||"&#1v;"):"")+">";1n(;A<=18;A++){R+=\'<4i E="\'+A+\'"\'+(A==J?\' 4j="4j"\':"")+">"+A+"</4i>"}R+="</2Q>"}R+="</I>";q R},2i:n(8,53){q" 54=\\"15(\'#t-f-21-"+8.z+"\').R(\'"+53+"\');\\" 52=\\"15(\'#t-f-21-"+8.z+"\').R(\'&#1v;\');\\""},4h:n(8,P,20){c A=8.J+(20=="Y"?P:0);c C=8.H+(20=="M"?P:0);c G=1Q.2h(8.1t,b.3F(A,C))+(20=="D"?P:0);c h=b.Z(v x(A,C,G));c O=b.2g(8,"2h",1j);c S=b.2g(8,"2v");h=(O&&h<O?O:h);h=(S&&h>S?S:h);8.1t=h.U();8.H=8.1s=h.17();8.J=8.1C=h.Q();k(20=="M"||20=="Y"){b.4g(8)}},4g:n(8){c 51=b.l(8,"69");k(51){51.2d((8.p?8.p[0]:r),[v x(8.1C,8.1s,1),8])}},3G:n(8){c 1l=b.l(8,"68");q(1l==r?[1,1]:(1O 1l=="50"?[1,1l]:1l))},2g:n(8,67,66){c h=b.3H(b.l(8,67+"x"),r);q(!66||!8.1c?h:(!h||8.1c>h?8.1c:h))},3F:n(A,C){q 32-v x(A,C,32).U()},65:n(A,C){q v x(A,C,1).3f()},4Z:n(8,P,64,63){c 1l=b.3G(8);c h=b.Z(v x(64,63+(P<0?P:1l[1]),1));k(P<0){h.3e(b.3F(h.Q(),h.17()))}q b.4Y(8,h)},4Y:n(8,h){c 3d=(!8.1c?r:b.Z(v x(8.1C,8.1s,8.1t)));3d=(3d&&8.1c<3d?8.1c:3d);c O=3d||b.2g(8,"2h");c S=b.2g(8,"2v");q((!O||h>=O)&&(!S||h<=S))},1Z:n(8){c 1D=b.l(8,"1D");1D=(1O 1D!="3C"?1D:v x().Q()%2P+2O(1D,10));q{1D:1D,1u:b.l(8,"1u"),1p:b.l(8,"1p"),1P:b.l(8,"1P"),1i:b.l(8,"1i")}},2N:n(8,G,C,A){k(!G){8.1h=8.1t;8.1r=8.1s;8.1o=8.1C}c h=(G?(1O G=="4e"?G:b.Z(v x(A,C,G))):b.Z(v x(8.1o,8.1r,8.1h)));q b.2f(b.l(8,"2M"),h,b.1Z(8))}});n 3E(o,3c){$.4f(o,3c);1n(c 1g 62 3c){k(3c[1g]==r||3c[1g]==4X){o[1g]=3c[1g]}}q o}n 61(a){q(a&&(($.2e.7t&&1O a=="4e"&&a.1b)||(a.60&&a.60.4W().1m(/\\5Z\\(\\)/))))}$.7s.f=n(2c){c 4U=5Z.5Y.7r.7q(4V,1);k(1O 2c=="3C"&&(2c=="7p"||2c=="U")){q $.f["5X"+2c+"3B"].2d($.f,[b[0]].5W(4U))}q b.3D(n(){1O 2c=="3C"?$.f["5X"+2c+"3B"].2d($.f,[b].5W(4U)):$.f.5V(b,2c)})};$.f=v 3B();$(16).7o(n(){$(16.2b).3b($.f.L).7n($.f.5U)})})(15)',62,596,'||||||||inst|||this|var|||datepicker||date|||if|_get||function|target|input|return|null||ui|settings|new||Date||id|year|case|month||value|false|day|drawMonth|div|drawYear|break|dpDiv||else|minDate|offset|getFullYear|html|maxDate|iFormat|getDate|class||format||_daylightSavingAdjust||||||jQuery|document|getMonth|endYear|charAt|PROP_NAME|length|rangeStart|printDate|duration|data|name|currentDay|monthNames|true|showStatus|numMonths|match|for|currentYear|dayNames|isFixed|currentMonth|selectedMonth|selectedDay|dayNamesShort|xa0|inline|td|firstDay|matches|_defaults|checkDate|selectedYear|shortYearCutoff|isRTL|rangeSelect|literal|lookAhead|_pos|iValue|dateStr|showAnim|documentElement|ctrlKey|typeof|monthNamesShort|Math|getTime|endDate|endDay|_adjustDate|output|position|top|nodeName|_getFormatConfig|period|status|endMonth|defaultDate|size|_updateDatepicker|css|||_dialogInput|width|body|options|apply|browser|formatDate|_getMinMaxDate|min|_addStatus|onclick|otherMonth|addClass|today|dow|stepMonths|chars|_stayOpen|_triggerClass|left|pos|_disabledInputs|max|years|clear|showOtherMonths|over|week|nextText|prevText|_hideDatepicker|dates|focus|onSelect|_inDialog|markerClassName|height|key|buttonText|dateFormat|_formatDate|parseInt|100|select|removeClass|cell|dateStatus|row|currentText|yy|_datepickerShowing|postProcess|obj|scrollY|scrollX|||||||||showOn|append|props|newMinDate|setDate|getDay|selectedDate|highlightWeek|days|end|col|span|prompt|navigationAsDateFormat|val|dd|firstMon|altFormat|_lastInput|event|scrollTop|scrollLeft|_showDatepicker|siblings|button|buttonImage|inlineSettings|Datepicker|string|each|extendRemove|_getDaysInMonth|_getNumberOfMonths|_determineDate|closeAtTop|unselectable|daySettings|title|beforeShowDay|showWeeks|changeFirstDay|DD|iso8601Week|next|hideIfNoPrevNext|maxDraw|while|rangeSeparator|switch|default|throw|getNumber||names|altField|trigger|hasClass|blockUI|_curInst|remove|onClose|type|beforeShow|appendText|the|Show|object|extend|_notifyChange|_adjustInstDate|option|selected|iframe|both|style|tr|parent|_currentClass|currentDate|calculateWeek|dayNamesMin|dayStatus|prev|current|label|startDate|_getDate|shortNames|longNames|mm|checkLiteral|num|_selectDate|_selectingMonthYear|unbind|absolute|effects|browserHeight|browserWidth|window|px|handled|_doKeyDown|img|disabled|bind|attrValue|attrName|otherArgs|arguments|toString|undefined|_isInRange|_canAdjustMonth|number|onChange|onmouseout|text|onmouseover|_clickMonthYear|_selectMonthYear|secondary|cover|src|msie|controls|_selectDay|_unselectableClass|dRow|leadDays|daysInMonth|_gotoToday|gotoCurrent|_promptClass|_clearDate|mandatory|_setDate|Invalid|pattern|getDaysInMonth|_getDefaultDate|log|parseDate|_setDateFromField|formatName|formatNumber|getName|at|origSize|_mainDivId|_dialogClass|_tidyDialog|hide|showOptions|hidden|_findPos|opera|clientHeight|clientWidth|dims|show|display|toLowerCase|chr|keyCode|_doKeyPress|keydown|_appendClass|_newInst|regional|_checkExternalClick|_attachDatepicker|concat|_|prototype|Array|constructor|isArray|in|curMonth|curYear|_getFirstDayOfMonth|checkRange|minMax|numberOfMonths|onChangeMonthYear|yearStatus|onchange|split|yearRange|changeYear|inMaxYear|inMinYear|monthStatus|changeMonth|_generateMonthYearHeader|version|initStatus|table|tbody|numRows|isMultiMonth|thead|_changeFirstDay|replace|indexOf|weekHeader|statusForDate|currentStatus|nextStatus|prevStatus|closeText|closeStatus|clearText|clearStatus|_generateDatepicker|getHours|setHours|offsetNumeric|offsetString|exec|catch|try|_possibleChars|getYear|iInit|_updateAlternate|change|parents|100px|innerHeight|innerWidth|_checkOffset|Class|add|empty|none|fixed|_isDisabledDatepicker|charCode|map|cursor|opacity|keypress|dateText|_dialogInst|dp|getData|setData|_inlineDatepicker|after|before|alt|attr|buttonImageOnly|_connectDatepicker|debug|Select|different|May|Close|mousedown|ready|isDisabled|call|slice|fn|safari|header|javascript|ceil|cellspacing|cellpadding|one|links|9999|close|control|setMilliseconds|setSeconds|setMinutes|isNaN|0123456789|W3C|TIMESTAMP|RSS|RFC_2822|RFC_1123|RFC_1036|RFC_850|RFC_822|ISO_8601|COOKIE|ATOM|Unexpected|Unknown|Missing|86400000|floor|noWeekends|selectedIndex|unblockUI|fadeOut|fadeIn|slideUp|slideDown|nextSibling|nodeType|rtl|multi|find|static|offsetWidth|1000px|block|offsetHeight|parentNode|fromCharCode|String|stopPropagation|preventDefault|_getDateDatepicker|_setDateDatepicker|_changeDatepicker|_disableDatepicker|_enableDatepicker|removeData|_destroyDatepicker|150|pageY|pageX|_dialogDatepicker|click|err|eval|getAttribute|setDefaults|console|hasDatepicker|normal|first|as|Set|Sa|Fr|Th|We|Tu|Mo|Su|Sat|Fri|Thu|Wed|Tue|Mon|Sun|Saturday|Friday|Thursday|Wednesday|Tuesday|Monday|Sunday|of|Week|weekStatus|Wk|Dec|Nov|Oct|Sep|Aug|Jul|Jun|Apr|Mar|Feb|Jan|December|November|October|September|August|July|June|April|March|February|January|Today|x3e|Next|previous|Prev|x3c|without|Erase|Clear|dialog'.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}('(p($){$.3i($.n,{f:{5a:"1.7.2"}});c 1X=\'f\';p 3J(){b.7c=B;b.2W=v;b.4L=B;b.2t=[];b.2X=B;b.2Y=B;b.5p=\'n-f-1h\';b.4T=\'n-f-1j\';b.7x=\'n-f-2c\';b.4V=\'n-f-2n\';b.5y=\'n-f-86\';b.84=\'n-f-2i\';b.5E=\'n-f-4f\';b.5G=\'n-f-7B-N\';b.4M=\'n-f-83-8g-7O\';b.5u=[];b.5u[\'\']={7d:\'7Q\',2d:\'7V\',29:\'7M\',2O:\'7L\',1p:[\'8h\',\'8F\',\'8E\',\'8S\',\'7I\',\'8o\',\'8I\',\'8t\',\'8v\',\'8m\',\'8C\',\'7Z\'],1q:[\'7S\',\'82\',\'81\',\'8M\',\'7I\',\'7P\',\'8D\',\'8P\',\'8u\',\'8j\',\'8i\',\'8l\'],1B:[\'8L\',\'8G\',\'8H\',\'7W\',\'7U\',\'7Y\',\'7R\'],1I:[\'85\',\'87\',\'8n\',\'8q\',\'8w\',\'8s\',\'8B\'],58:[\'8a\',\'8c\',\'8K\',\'8z\',\'7X\',\'8y\',\'8x\'],3h:\'4y/3F/2S\',1o:0,Z:B};b.1t={2U:\'2E\',1U:\'5l\',5h:{},1O:v,3V:\'\',2K:\'...\',3I:\'\',7m:B,3P:B,3D:B,5A:B,3a:B,3e:B,48:B,6C:\'-10:+10\',3r:B,5N:b.56,1E:\'+10\',P:v,T:v,1e:\'8r\',4k:v,4a:v,2H:v,6z:v,45:v,6n:1,4i:0,1Z:1,2P:12,41:\'\',4w:\'\',6K:1l,4A:B};$.3i(b.1t,b.5u[\'\']);b.O=$(\'<1h L="\'+b.5p+\'" R="n-f n-3A n-3A-5J n-50-5I n-1W-1N n-50-4K-8A"></1h>\')}$.3i(3J.74,{21:\'8O\',6a:p(){h(b.7c)8R.6a.2z(\'\',3w)},89:p(z){4j(b.1t,z||{});t b},6L:p(l,z){c 3y=v;1m(c 4v 6Y b.1t){c 4B=l.88(\'k:\'+4v);h(4B){3y=3y||{};5P{3y[4v]=8k(4B)}6b(7w){3y[4v]=4B}}}c 18=l.18.4d();c 1j=(18==\'1h\'||18==\'15\');h(!l.L)l.L=\'6j\'+(++b.5V);c 8=b.5e($(l),1j);8.z=$.3i({},z||{},3y||{});h(18==\'r\'){b.7y(l,8)}Q h(1j){b.6u(l,8)}},5e:p(l,1j){c L=l[0].L.80(/([:\\[\\]\\.])/g,\'\\\\\\\\$1\');t{L:L,r:l,1L:0,1u:0,1z:0,I:0,K:0,1j:1j,O:(!1j?b.O:$(\'<1h R="\'+b.4T+\' n-f n-3A n-3A-5J n-50-5I n-1W-1N"></1h>\'))}},7y:p(l,8){c r=$(l);8.2c=$([]);8.2n=$([]);h(r.2I(b.21))t;c 3V=b.q(8,\'3V\');c Z=b.q(8,\'Z\');h(3V){8.2c=$(\'<15 R="\'+b.7x+\'">\'+3V+\'</15>\');r[Z?\'7A\':\'7J\'](8.2c)}c 2U=b.q(8,\'2U\');h(2U==\'2E\'||2U==\'7n\')r.2E(b.3C);h(2U==\'1H\'||2U==\'7n\'){c 2K=b.q(8,\'2K\');c 3I=b.q(8,\'3I\');8.2n=$(b.q(8,\'7m\')?$(\'<4S/>\').2e(b.4V).7e({5Q:3I,7f:2K,2x:2K}):$(\'<1H 2V="1H"></1H>\').2e(b.4V).1v(3I==\'\'?2K:$(\'<4S/>\').7e({5Q:3I,7f:2K,2x:2K})));r[Z?\'7A\':\'7J\'](8.2n);8.2n.8e(p(){h($.f.2X&&$.f.3B==l)$.f.2m();Q $.f.3C(l);t B})}r.2e(b.21).5q(b.4D).6G(b.5s).3t("6t.f",p(u,2G,G){8.z[2G]=G}).3t("6w.f",p(u,2G){t b.q(8,2G)});$.2o(l,1X,8)},6u:p(l,8){c 5f=$(l);h(5f.2I(b.21))t;5f.2e(b.21).2c(8.O).3t("6t.f",p(u,2G,G){8.z[2G]=G}).3t("6w.f",p(u,2G){t b.q(8,2G)});$.2o(l,1X,8);b.65(8,b.54(8));b.2w(8);b.4F(8)},8p:p(r,72,2H,z,3G){c 8=b.6V;h(!8){c L=\'6j\'+(++b.5V);b.2l=$(\'<r 2V="8N" L="\'+L+\'" 2k="1" 8Q="20: 4U; 1x: -7D;"/>\');b.2l.5q(b.4D);$(\'2r\').2c(b.2l);8=b.6V=b.5e(b.2l,B);8.z={};$.2o(b.2l[0],1X,8)}4j(8.z,z||{});b.2l.2R(72);b.1F=(3G?(3G.1f?3G:[3G.8J,3G.8T]):v);h(!b.1F){c 76=4c.6e||1g.2J.57||1g.2r.57;c 6J=4c.6D||1g.2J.4Y||1g.2r.4Y;c 6T=1g.2J.4l||1g.2r.4l;c 6I=1g.2J.43||1g.2r.43;b.1F=[(76/2)-3d+6T,(6J/2)-7N+6I]}b.2l.1Y(\'1r\',b.1F[0]+\'4z\').1Y(\'1x\',b.1F[1]+\'4z\');8.z.2H=2H;b.2Y=1l;b.O.2e(b.5y);b.3C(b.2l[0]);h($.3Y)$.3Y(b.O);$.2o(b.2l[0],1X,8);t b},7T:p(l){c $l=$(l);c 8=$.2o(l,1X);h(!$l.2I(b.21)){t}c 18=l.18.4d();$.8b(l,1X);h(18==\'r\'){8.2c.5b();8.2n.5b();$l.2B(b.21).4G(\'2E\',b.3C).4G(\'5q\',b.4D).4G(\'6G\',b.5s)}Q h(18==\'1h\'||18==\'15\')$l.2B(b.21).6X()},8d:p(l){c $l=$(l);c 8=$.2o(l,1X);h(!$l.2I(b.21)){t}c 18=l.18.4d();h(18==\'r\'){l.2i=B;8.2n.4J(\'1H\').3Z(p(){b.2i=B}).30().4J(\'4S\').1Y({6M:\'1.0\',6R:\'\'})}Q h(18==\'1h\'||18==\'15\'){c 1j=$l.4r(\'.\'+b.4T);1j.4r().2B(\'n-1y-2i\')}b.2t=$.6O(b.2t,p(G){t(G==l?v:G)})},8f:p(l){c $l=$(l);c 8=$.2o(l,1X);h(!$l.2I(b.21)){t}c 18=l.18.4d();h(18==\'r\'){l.2i=1l;8.2n.4J(\'1H\').3Z(p(){b.2i=1l}).30().4J(\'4S\').1Y({6M:\'0.5\',6R:\'2a\'})}Q h(18==\'1h\'||18==\'15\'){c 1j=$l.4r(\'.\'+b.4T);1j.4r().2e(\'n-1y-2i\')}b.2t=$.6O(b.2t,p(G){t(G==l?v:G)});b.2t[b.2t.1f]=l},3X:p(l){h(!l){t B}1m(c i=0;i<b.2t.1f;i++){h(b.2t[i]==l)t 1l}t B},1s:p(l){5P{t $.2o(l,1X)}6b(7w){3O\'7v 9c 2o 1m b f\'}},6N:p(l,V,G){c 8=b.1s(l);h(3w.1f==2&&1J V==\'3m\'){t(V==\'9Y\'?$.3i({},$.f.1t):(8?(V==\'1N\'?$.3i({},8.z):b.q(8,V)):v))}c z=V||{};h(1J V==\'3m\'){z={};z[V]=G}h(8){h(b.2W==8){b.2m(v)}c k=b.6Q(l);4j(8.z,z);b.6P(l,k);b.2w(8)}},9H:p(l,V,G){b.6N(l,V,G)},9G:p(l){c 8=b.1s(l);h(8){b.2w(8)}},6P:p(l,k,3N){c 8=b.1s(l);h(8){b.65(8,k,3N);b.2w(8);b.4F(8)}},6Q:p(l){c 8=b.1s(l);h(8&&!8.1j)b.5i(8);t(8?b.5K(8):v)},4D:p(u){c 8=$.f.1s(u.l);c 2h=1l;c Z=8.O.9F(\'.n-f-6c\');8.4L=1l;h($.f.2X)3H(u.5v){x 9:$.f.2m(v,\'\');F;x 13:c 5g=$(\'2C.\'+$.f.4M+\', 2C.\'+$.f.5G,8.O);h(5g[0])$.f.5F(u.l,8.1u,8.1z,5g[0]);Q $.f.2m(v,$.f.q(8,\'1e\'));t B;F;x 27:$.f.2m(v,$.f.q(8,\'1e\'));F;x 33:$.f.1K(u.l,(u.1k?-$.f.q(8,\'2P\'):-$.f.q(8,\'1Z\')),\'M\');F;x 34:$.f.1K(u.l,(u.1k?+$.f.q(8,\'2P\'):+$.f.q(8,\'1Z\')),\'M\');F;x 35:h(u.1k||u.1T)$.f.7l(u.l);2h=u.1k||u.1T;F;x 36:h(u.1k||u.1T)$.f.5M(u.l);2h=u.1k||u.1T;F;x 37:h(u.1k||u.1T)$.f.1K(u.l,(Z?+1:-1),\'D\');2h=u.1k||u.1T;h(u.6F.6H)$.f.1K(u.l,(u.1k?-$.f.q(8,\'2P\'):-$.f.q(8,\'1Z\')),\'M\');F;x 38:h(u.1k||u.1T)$.f.1K(u.l,-7,\'D\');2h=u.1k||u.1T;F;x 39:h(u.1k||u.1T)$.f.1K(u.l,(Z?-1:+1),\'D\');2h=u.1k||u.1T;h(u.6F.6H)$.f.1K(u.l,(u.1k?+$.f.q(8,\'2P\'):+$.f.q(8,\'1Z\')),\'M\');F;x 40:h(u.1k||u.1T)$.f.1K(u.l,+7,\'D\');2h=u.1k||u.1T;F;2a:2h=B}Q h(u.5v==36&&u.1k)$.f.3C(b);Q{2h=B}h(2h){u.9D();u.9E()}},5s:p(u){c 8=$.f.1s(u.l);h($.f.q(8,\'6K\')){c 2q=$.f.70($.f.q(8,\'3h\'));c 5d=9J.9K(u.6U==5S?u.5v:u.6U);t u.1k||(5d<\' \'||!2q||2q.42(5d)>-1)}},3C:p(r){r=r.l||r;h(r.18.4d()!=\'r\')r=$(\'r\',r.9Q)[0];h($.f.3X(r)||$.f.3B==r)t;c 8=$.f.1s(r);c 4a=$.f.q(8,\'4a\');4j(8.z,(4a?4a.2z(r,[r,8]):{}));$.f.2m(v,\'\');$.f.3B=r;$.f.5i(8);h($.f.2Y)r.G=\'\';h(!$.f.1F){$.f.1F=$.f.6B(r);$.f.1F[1]+=r.9M}c 2s=B;$(r).5o().3Z(p(){2s|=$(b).1Y(\'20\')==\'71\';t!2s});h(2s&&$.3k.9N){$.f.1F[0]-=1g.2J.4l;$.f.1F[1]-=1g.2J.43}c J={1r:$.f.1F[0],1x:$.f.1F[1]};$.f.1F=v;8.2j=v;8.O.1Y({20:\'4U\',6W:\'9L\',1x:\'-9O\'});$.f.2w(8);J=$.f.6h(8,J,2s);8.O.1Y({20:($.f.2Y&&$.3Y?\'9P\':(2s?\'71\':\'4U\')),6W:\'9R\',1r:J.1r+\'4z\',1x:J.1x+\'4z\'});h(!8.1j){c 1U=$.f.q(8,\'1U\')||\'5l\';c 1e=$.f.q(8,\'1e\');c 2N=p(){$.f.2X=1l;h($.3k.66&&1A($.3k.5a,10)<7)$(\'4I.n-f-60\').1Y({26:8.O.26()+4,3L:8.O.3L()+4})};h($.4E&&$.4E[1U])8.O.5l(1U,$.f.q(8,\'5h\'),1e,2N);Q 8.O[1U](1e,2N);h(1e==\'\')2N();h(8.r[0].2V!=\'4K\')8.r[0].2E();$.f.2W=8}},2w:p(8){c 5m={26:8.O.26()+4,3L:8.O.3L()+4};c 6E=b;8.O.6X().2c(b.7u(8)).4b(\'4I.n-f-60\').1Y({26:5m.26,3L:5m.3L}).30().4b(\'1H, .n-f-2g, .n-f-2f, .n-f-59 2C a\').3t(\'9C\',p(){$(b).2B(\'n-1y-3f\');h(b.52.42(\'n-f-2g\')!=-1)$(b).2B(\'n-f-2g-3f\');h(b.52.42(\'n-f-2f\')!=-1)$(b).2B(\'n-f-2f-3f\')}).3t(\'6k\',p(){h(!6E.3X(8.1j?8.O.9I()[0]:8.r[0])){$(b).5o(\'.n-f-59\').4b(\'a\').2B(\'n-1y-3f\');$(b).2e(\'n-1y-3f\');h(b.52.42(\'n-f-2g\')!=-1)$(b).2e(\'n-f-2g-3f\');h(b.52.42(\'n-f-2f\')!=-1)$(b).2e(\'n-f-2f-3f\')}}).30().4b(\'.\'+b.4M+\' a\').2n(\'6k\').30();c 1c=b.53(8);c 4X=1c[1];c 26=17;h(4X>1){8.O.2e(\'n-f-3T-\'+4X).1Y(\'26\',(26*4X)+\'9T\')}Q{8.O.2B(\'n-f-3T-2 n-f-3T-3 n-f-3T-4\').26(\'\')}8.O[(1c[0]!=1||1c[1]!=1?\'6i\':\'5b\')+\'6g\'](\'n-f-3T\');8.O[(b.q(8,\'Z\')?\'6i\':\'5b\')+\'6g\'](\'n-f-6c\');h(8.r&&8.r[0].2V!=\'4K\'&&8==$.f.2W)$(8.r[0]).2E()},6h:p(8,J,2s){c 4n=8.O.6d();c 4Q=8.O.6f();c 6q=8.r?8.r.6d():0;c 5z=8.r?8.r.6f():0;c 4R=(4c.6e||1g.2J.57||1g.2r.57)+$(1g).4l();c 4N=(4c.6D||1g.2J.4Y||1g.2r.4Y)+$(1g).43();J.1r-=(b.q(8,\'Z\')?(4n-6q):0);J.1r-=(2s&&J.1r==8.r.J().1r)?$(1g).4l():0;J.1x-=(2s&&J.1x==(8.r.J().1x+5z))?$(1g).43():0;J.1r-=(J.1r+4n>4R&&4R>4n)?22.6A(J.1r+4n-4R):0;J.1x-=(J.1x+4Q>4N&&4N>4Q)?22.6A(J.1x+4Q+5z*2-4N):0;t J},6B:p(3b){2Q(3b&&(3b.2V==\'4K\'||3b.9V!=1)){3b=3b.a2}c 20=$(3b).J();t[20.1r,20.1x]},2m:p(r,1e){c 8=b.2W;h(!8||(r&&8!=$.2o(r,1X)))t;h(8.3M)b.51(\'#\'+8.L,b.3W(8,8.1w,8.24,8.1V));8.3M=B;h(b.2X){1e=(1e!=v?1e:b.q(8,\'1e\'));c 1U=b.q(8,\'1U\');c 2N=p(){$.f.5x(8)};h(1e!=\'\'&&$.4E&&$.4E[1U])8.O.5k(1U,$.f.q(8,\'5h\'),1e,2N);Q 8.O[(1e==\'\'?\'5k\':(1U==\'a4\'?\'a3\':(1U==\'a5\'?\'a1\':\'5k\')))](1e,2N);h(1e==\'\')b.5x(8);c 45=b.q(8,\'45\');h(45)45.2z((8.r?8.r[0]:v),[(8.r?8.r.2R():\'\'),8]);b.2X=B;b.3B=v;h(b.2Y){b.2l.1Y({20:\'4U\',1r:\'0\',1x:\'-7D\'});h($.3Y){$.9Z();$(\'2r\').2c(b.O)}}b.2Y=B}b.2W=v},5x:p(8){8.O.2B(b.5y).4G(\'.n-f-59\')},75:p(u){h(!$.f.2W)t;c $l=$(u.l);h(($l.5o(\'#\'+$.f.5p).1f==0)&&!$l.2I($.f.21)&&!$l.2I($.f.4V)&&$.f.2X&&!($.f.2Y&&$.3Y))$.f.2m(v,\'\')},1K:p(L,J,1P){c l=$(L);c 8=b.1s(l[0]);h(b.3X(l[0])){t}b.4H(8,J+(1P==\'M\'?b.q(8,\'4i\'):0),1P);b.2w(8)},5M:p(L){c l=$(L);c 8=b.1s(l[0]);h(b.q(8,\'5A\')&&8.1w){8.1L=8.1w;8.I=8.1u=8.24;8.K=8.1z=8.1V}Q{c k=E C();8.1L=k.16();8.I=8.1u=k.1i();8.K=8.1z=k.U()}b.46(8);b.1K(l)},5Z:p(L,3l,1P){c l=$(L);c 8=b.1s(l[0]);8.4Z=B;8[\'4g\'+(1P==\'M\'?\'7i\':\'7h\')]=8[\'a0\'+(1P==\'M\'?\'7i\':\'7h\')]=1A(3l.23[3l.9U].G,10);b.46(8);b.1K(l)},61:p(L){c l=$(L);c 8=b.1s(l[0]);h(8.r&&8.4Z&&!$.3k.66)8.r[0].2E();8.4Z=!8.4Z},5F:p(L,H,A,2C){c l=$(L);h($(2C).2I(b.5E)||b.3X(l[0])){t}c 8=b.1s(l[0]);8.1L=8.1w=$(\'a\',2C).1v();8.1u=8.24=H;8.1z=8.1V=A;h(8.3M){8.3Q=8.55=8.1S=v}b.51(L,b.3W(8,8.1w,8.24,8.1V));h(8.3M){8.2j=b.1b(E C(8.1V,8.24,8.1w));b.2w(8)}},7l:p(L){c l=$(L);c 8=b.1s(l[0]);8.3M=B;8.3Q=8.55=8.1S=8.2j=v;b.51(l,\'\')},51:p(L,2D){c l=$(L);c 8=b.1s(l[0]);2D=(2D!=v?2D:b.3W(8));h(8.r)8.r.2R(2D);b.4F(8);c 2H=b.q(8,\'2H\');h(2H)2H.2z((8.r?8.r[0]:v),[2D,8]);Q h(8.r)8.r.2n(\'9W\');h(8.1j)b.2w(8);Q h(!8.3M){b.2m(v,b.q(8,\'1e\'));b.3B=8.r[0];h(1J(8.r[0])!=\'4q\')8.r[0].2E();b.3B=v}},4F:p(8){c 41=b.q(8,\'41\');h(41){c 4w=b.q(8,\'4w\')||b.q(8,\'3h\');c k=b.5K(8);2D=b.3x(4w,k,b.3g(8));$(41).3Z(p(){$(b).2R(2D)})}},9X:p(k){c N=k.3u();t[(N>0&&N<6),\'\']},56:p(k){c 25=E C(k.U(),k.1i(),k.16());c 3E=E C(25.U(),1-1,4);c 1o=3E.3u()||7;3E.3S(3E.16()+1-1o);h(1o<4&&25<3E){25.3S(25.16()-3);t $.f.56(25)}Q h(25>E C(25.U(),12-1,28)){1o=E C(25.U()+1,1-1,4).3u()||7;h(1o>4&&(25.3u()||7)<1o-3){t 1}}t 22.9S(((25-3E)/9A)/7)+1},6S:p(X,G,z){h(X==v||G==v)3O\'67 3w\';G=(1J G==\'4q\'?G.5R():G+\'\');h(G==\'\')t v;c 1E=(z?z.1E:v)||b.1t.1E;c 1I=(z?z.1I:v)||b.1t.1I;c 1B=(z?z.1B:v)||b.1t.1B;c 1q=(z?z.1q:v)||b.1t.1q;c 1p=(z?z.1p:v)||b.1t.1p;c A=-1;c H=-1;c N=-1;c 2T=-1;c 1G=B;c 1D=p(1n){c 1C=(S+1<X.1f&&X.1a(S+1)==1n);h(1C)S++;t 1C};c 3v=p(1n){1D(1n);c 5r=(1n==\'@\'?14:(1n==\'y\'?4:(1n==\'o\'?3:2)));c 2k=5r;c 2v=0;2Q(2k>0&&1M<G.1f&&G.1a(1M)>=\'0\'&&G.1a(1M)<=\'9\'){2v=2v*10+1A(G.1a(1M++),10);2k--}h(2k==5r)3O\'7v 63 5n 20 \'+1M;t 2v};c 5t=p(1n,4s,4u){c 4h=(1D(1n)?4u:4s);c 2k=0;1m(c j=0;j<4h.1f;j++)2k=22.3p(2k,4h[j].1f);c V=\'\';c 7z=1M;2Q(2k>0&&1M<G.1f){V+=G.1a(1M++);1m(c i=0;i<4h.1f;i++)h(V==4h[i])t i+1;2k--}3O\'99 V 5n 20 \'+7z};c 4x=p(){h(G.1a(1M)!=X.1a(S))3O\'98 1G 5n 20 \'+1M;1M++};c 1M=0;1m(c S=0;S<X.1f;S++){h(1G)h(X.1a(S)=="\'"&&!1D("\'"))1G=B;Q 4x();Q 3H(X.1a(S)){x\'d\':N=3v(\'d\');F;x\'D\':5t(\'D\',1I,1B);F;x\'o\':2T=3v(\'o\');F;x\'m\':H=3v(\'m\');F;x\'M\':H=5t(\'M\',1q,1p);F;x\'y\':A=3v(\'y\');F;x\'@\':c k=E C(3v(\'@\'));A=k.U();H=k.1i()+1;N=k.16();F;x"\'":h(1D("\'"))4x();Q 1G=1l;F;2a:4x()}}h(A==-1)A=E C().U();Q h(A<3d)A+=E C().U()-E C().U()%3d+(A<=1E?0:-3d);h(2T>-1){H=1;N=2T;97{c 5w=b.3n(A,H-1);h(N<=5w)F;H++;N-=5w}2Q(1l)}c k=b.1b(E C(A,H-1,N));h(k.U()!=A||k.1i()+1!=H||k.16()!=N)3O\'67 k\';t k},96:\'2S-4y-3F\',9a:\'D, 3F M 2S\',9b:\'2S-4y-3F\',9e:\'D, d M y\',9d:\'9B, 3F-M-y\',95:\'D, d M y\',94:\'D, d M 2S\',8Y:\'D, d M 2S\',8X:\'D, d M y\',8W:\'@\',8V:\'2S-4y-3F\',3x:p(X,k,z){h(!k)t\'\';c 1I=(z?z.1I:v)||b.1t.1I;c 1B=(z?z.1B:v)||b.1t.1B;c 1q=(z?z.1q:v)||b.1t.1q;c 1p=(z?z.1p:v)||b.1t.1p;c 1D=p(1n){c 1C=(S+1<X.1f&&X.1a(S+1)==1n);h(1C)S++;t 1C};c 4p=p(1n,G,7F){c 2v=\'\'+G;h(1D(1n))2Q(2v.1f<7F)2v=\'0\'+2v;t 2v};c 5j=p(1n,G,4s,4u){t(1D(1n)?4u[G]:4s[G])};c 1R=\'\';c 1G=B;h(k)1m(c S=0;S<X.1f;S++){h(1G)h(X.1a(S)=="\'"&&!1D("\'"))1G=B;Q 1R+=X.1a(S);Q 3H(X.1a(S)){x\'d\':1R+=4p(\'d\',k.16(),2);F;x\'D\':1R+=5j(\'D\',k.3u(),1I,1B);F;x\'o\':c 2T=k.16();1m(c m=k.1i()-1;m>=0;m--)2T+=b.3n(k.U(),m);1R+=4p(\'o\',2T,3);F;x\'m\':1R+=4p(\'m\',k.1i()+1,2);F;x\'M\':1R+=5j(\'M\',k.1i(),1q,1p);F;x\'y\':1R+=(1D(\'y\')?k.U():(k.6p()%3d<10?\'0\':\'\')+k.6p()%3d);F;x\'@\':1R+=k.1d();F;x"\'":h(1D("\'"))1R+="\'";Q 1G=1l;F;2a:1R+=X.1a(S)}}t 1R},70:p(X){c 2q=\'\';c 1G=B;1m(c S=0;S<X.1f;S++)h(1G)h(X.1a(S)=="\'"&&!1D("\'"))1G=B;Q 2q+=X.1a(S);Q 3H(X.1a(S)){x\'d\':x\'m\':x\'y\':x\'@\':2q+=\'8U\';F;x\'D\':x\'M\':t v;x"\'":h(1D("\'"))2q+="\'";Q 1G=1l;F;2a:2q+=X.1a(S)}t 2q},q:p(8,V){t 8.z[V]!==5S?8.z[V]:b.1t[V]},5i:p(8){c 3h=b.q(8,\'3h\');c 4e=8.r?8.r.2R():v;8.3Q=8.55=8.1S=v;c k=1O=b.54(8);c z=b.3g(8);5P{k=b.6S(3h,4e,z)||1O}6b(u){b.6a(u);k=1O}8.1L=k.16();8.I=8.1u=k.1i();8.K=8.1z=k.U();8.1w=(4e?k.16():0);8.24=(4e?k.1i():0);8.1V=(4e?k.U():0);b.4H(8)},54:p(8){c k=b.5c(b.q(8,\'1O\'),E C());c P=b.2A(8,\'2u\',1l);c T=b.2A(8,\'3p\');k=(P&&k<P?P:k);k=(T&&k>T?T:k);t k},5c:p(k,1O){c 7G=p(J){c k=E C();k.3S(k.16()+J);t k};c 7C=p(J,68){c k=E C();c A=k.U();c H=k.1i();c N=k.16();c 69=/([+-]?[0-9]+)\\s*(d|D|w|W|m|M|y|Y)?/g;c 1C=69.7E(J);2Q(1C){3H(1C[2]||\'d\'){x\'d\':x\'D\':N+=1A(1C[1],10);F;x\'w\':x\'W\':N+=1A(1C[1],10)*7;F;x\'m\':x\'M\':H+=1A(1C[1],10);N=22.2u(N,68(A,H));F;x\'y\':x\'Y\':A+=1A(1C[1],10);N=22.2u(N,68(A,H));F}1C=69.7E(J)}t E C(A,H,N)};k=(k==v?1O:(1J k==\'3m\'?7C(k,b.3n):(1J k==\'63\'?(7b(k)?1O:7G(k)):k)));k=(k&&k.5R()==\'67 C\'?1O:k);h(k){k.7s(0);k.90(0);k.93(0);k.92(0)}t b.1b(k)},1b:p(k){h(!k)t v;k.7s(k.7r()>12?k.7r()+2:0);t k},65:p(8,k,3N){c 7p=!(k);c 7q=8.1u;c 7o=8.1z;k=b.5c(k,E C());8.1L=8.1w=k.16();8.I=8.1u=8.24=k.1i();8.K=8.1z=8.1V=k.U();h(7q!=8.1u||7o!=8.1z)b.46(8);b.4H(8);h(8.r){8.r.2R(7p?\'\':b.3W(8))}},5K:p(8){c 7t=(!8.1V||(8.r&&8.r.2R()==\'\')?v:b.1b(E C(8.1V,8.24,8.1w)));t 7t},7u:p(8){c 2y=E C();2y=b.1b(E C(2y.U(),2y.1i(),2y.16()));c Z=b.q(8,\'Z\');c 4A=b.q(8,\'4A\');c 3P=b.q(8,\'3P\');c 3D=b.q(8,\'3D\');c 1c=b.53(8);c 4i=b.q(8,\'4i\');c 1Z=b.q(8,\'1Z\');c 2P=b.q(8,\'2P\');c 4P=(1c[0]!=1||1c[1]!=1);c 47=b.1b((!8.1w?E C(91,9,9):E C(8.1V,8.24,8.1w)));c P=b.2A(8,\'2u\',1l);c T=b.2A(8,\'3p\');c I=8.I-4i;c K=8.K;h(I<0){I+=12;K--}h(T){c 4o=b.1b(E C(T.U(),T.1i()-1c[1]+1,T.16()));4o=(P&&4o<P?P:4o);2Q(b.1b(E C(K,I,1))>4o){I--;h(I<0){I=11;K--}}}8.I=I;8.K=K;c 2d=b.q(8,\'2d\');2d=(!3D?2d:b.3x(2d,b.1b(E C(K,I-1Z,1)),b.3g(8)));c 2g=(b.5Y(8,-1,K,I)?\'<a R="n-f-2g n-1W-1N" 3c="2b.f.1K(\\\'#\'+8.L+\'\\\', -\'+1Z+\', \\\'M\\\');"\'+\' 2x="\'+2d+\'"><15 R="n-2F n-2F-4t-4C-\'+(Z?\'e\':\'w\')+\'">\'+2d+\'</15></a>\':(3P?\'\':\'<a R="n-f-2g n-1W-1N n-1y-2i" 2x="\'+2d+\'"><15 R="n-2F n-2F-4t-4C-\'+(Z?\'e\':\'w\')+\'">\'+2d+\'</15></a>\'));c 29=b.q(8,\'29\');29=(!3D?29:b.3x(29,b.1b(E C(K,I+1Z,1)),b.3g(8)));c 2f=(b.5Y(8,+1,K,I)?\'<a R="n-f-2f n-1W-1N" 3c="2b.f.1K(\\\'#\'+8.L+\'\\\', +\'+1Z+\', \\\'M\\\');"\'+\' 2x="\'+29+\'"><15 R="n-2F n-2F-4t-4C-\'+(Z?\'w\':\'e\')+\'">\'+29+\'</15></a>\':(3P?\'\':\'<a R="n-f-2f n-1W-1N n-1y-2i" 2x="\'+29+\'"><15 R="n-2F n-2F-4t-4C-\'+(Z?\'w\':\'e\')+\'">\'+29+\'</15></a>\'));c 2O=b.q(8,\'2O\');c 5L=(b.q(8,\'5A\')&&8.1w?47:2y);2O=(!3D?2O:b.3x(2O,5L,b.3g(8)));c 5O=(!8.1j?\'<1H 2V="1H" R="n-f-9f n-1y-2a n-7a-9g n-1W-1N" 3c="2b.f.2m();">\'+b.q(8,\'7d\')+\'</1H>\':\'\');c 6v=(4A)?\'<1h R="n-f-9u n-3A-5J">\'+(Z?5O:\'\')+(b.5X(8,5L)?\'<1H 2V="1H" R="n-f-7B n-1y-2a n-7a-3s n-1W-1N" 3c="2b.f.5M(\\\'#\'+8.L+\'\\\');"\'+\'>\'+2O+\'</1H>\':\'\')+(Z?\'\':5O)+\'</1h>\':\'\';c 1o=1A(b.q(8,\'1o\'),10);1o=(7b(1o)?0:1o);c 1B=b.q(8,\'1B\');c 1I=b.q(8,\'1I\');c 58=b.q(8,\'58\');c 1p=b.q(8,\'1p\');c 1q=b.q(8,\'1q\');c 4k=b.q(8,\'4k\');c 3r=b.q(8,\'3r\');c 5N=b.q(8,\'5N\')||b.56;c 3N=8.3Q?b.1b(E C(8.1S,8.55,8.3Q)):47;c 1O=b.54(8);c 1v=\'\';1m(c 31=0;31<1c[0];31++){c 49=\'\';1m(c 3K=0;3K<1c[1];3K++){c 2M=b.1b(E C(K,I,8.1L));c 2Z=\' n-1W-1N\';c 1Q=\'\';h(4P){1Q+=\'<1h R="n-f-49 n-f-49-\';3H(3K){x 0:1Q+=\'9t\';2Z=\' n-1W-\'+(Z?\'5H\':\'1r\');F;x 1c[1]-1:1Q+=\'9s\';2Z=\' n-1W-\'+(Z?\'1r\':\'5H\');F;2a:1Q+=\'9v\';2Z=\'\';F}1Q+=\'">\'}1Q+=\'<1h R="n-f-7g n-3A-7g n-50-5I\'+2Z+\'">\'+(/1N|1r/.7k(2Z)&&31==0?(Z?2f:2g):\'\')+(/1N|5H/.7k(2Z)&&31==0?(Z?2g:2f):\'\')+b.6r(8,I,K,P,T,2M,31>0||3K>0,1p,1q)+\'</1h><6Z R="n-f-59"><3U>\'+\'<4O>\';c 3U=\'\';1m(c 2p=0;2p<7;2p++){c N=(2p+1o)%7;3U+=\'<7j\'+((2p+1o+6)%7>=5?\' R="n-f-7K-30"\':\'\')+\'>\'+\'<15 2x="\'+1B[N]+\'">\'+58[N]+\'</15></7j>\'}1Q+=3U+\'</4O></3U><44>\';c 5C=b.3n(K,I);h(K==8.1z&&I==8.1u)8.1L=22.2u(8.1L,5C);c 5B=(b.6l(K,I)-1o+7)%7;c 7H=(4P?6:22.9w((5B+5C)/7)); c 19=b.1b(E C(K,I,1-5B));1m(c 5D=0;5D<7H;5D++){1Q+=\'<4O>\';c 44=\'\';1m(c 2p=0;2p<7;2p++){c 4m=(4k?4k.2z((8.r?8.r[0]:v),[19]):[1l,\'\']);c 3q=(19.1i()!=I);c 4f=3q||!4m[0]||(P&&19<P)||(T&&19>T);44+=\'<2C R="\'+((2p+1o+6)%7>=5?\' n-f-7K-30\':\'\')+(3q?\' n-f-9z-H\':\'\')+((19.1d()==2M.1d()&&I==8.1u&&8.4L)||(1O.1d()==19.1d()&&1O.1d()==2M.1d())?\' \'+b.4M:\'\')+(4f?\' \'+b.5E+\' n-1y-2i\':\'\')+(3q&&!3r?\'\':\' \'+4m[1]+(19.1d()>=47.1d()&&19.1d()<=3N.1d()?\' \'+b.5G:\'\')+(19.1d()==2y.1d()?\' n-f-2y\':\'\'))+\'"\'+((!3q||3r)&&4m[2]?\' 2x="\'+4m[2]+\'"\':\'\')+(4f?\'\':\' 3c="2b.f.5F(\\\'#\'+8.L+\'\\\',\'+I+\',\'+K+\', b);t B;"\')+\'>\'+(3q?(3r?19.16():\'&#62;\'):(4f?\'<15 R="n-1y-2a">\'+19.16()+\'</15>\':\'<a R="n-1y-2a\'+(19.1d()==2y.1d()?\' n-1y-9y\':\'\')+(19.1d()>=47.1d()&&19.1d()<=3N.1d()?\' n-1y-9x\':\'\')+\'" 9r="#">\'+19.16()+\'</a>\'))+\'</2C>\';19.3S(19.16()+1);19=b.1b(19)}1Q+=44+\'</4O>\'}I++;h(I>11){I=0;K++}1Q+=\'</44></6Z>\'+(4P?\'</1h>\'+((1c[0]>0&&3K==1c[1]-1)?\'<1h R="n-f-31-F"></1h>\':\'\'):\'\');49+=1Q}1v+=49}1v+=6v+($.3k.66&&1A($.3k.5a,10)<7&&!8.1j?\'<4I 5Q="9q:B;" R="n-f-60" 9k="0"></4I>\':\'\');8.4L=B;t 1v},6r:p(8,I,K,P,T,2M,3s,1p,1q){P=(8.2j&&P&&2M<P?2M:P);c 3a=b.q(8,\'3a\');c 3e=b.q(8,\'3e\');c 48=b.q(8,\'48\');c 1v=\'<1h R="n-f-2x">\';c 3j=\'\';h(3s||!3a)3j+=\'<15 R="n-f-H">\'+1p[I]+\'</15> \';Q{c 6s=(P&&P.U()==K);c 6x=(T&&T.U()==K);3j+=\'<3l R="n-f-H" \'+\'79="2b.f.5Z(\\\'#\'+8.L+\'\\\', b, \\\'M\\\');" \'+\'3c="2b.f.61(\\\'#\'+8.L+\'\\\');"\'+\'>\';1m(c H=0;H<12;H++){h((!6s||H>=P.1i())&&(!6x||H<=T.1i()))3j+=\'<3R G="\'+H+\'"\'+(H==I?\' 4g="4g"\':\'\')+\'>\'+1q[H]+\'</3R>\'}3j+=\'</3l>\'}h(!48)1v+=3j+((3s||3a||3e)&&(!(3a&&3e))?\'&#62;\':\'\');h(3s||!3e)1v+=\'<15 R="n-f-A">\'+K+\'</15>\';Q{c 2L=b.q(8,\'6C\').9j(\':\');c A=0;c 1S=0;h(2L.1f!=2){A=K-10;1S=K+10}Q h(2L[0].1a(0)==\'+\'||2L[0].1a(0)==\'-\'){A=K+1A(2L[0],10);1S=K+1A(2L[1],10)}Q{A=1A(2L[0],10);1S=1A(2L[1],10)}A=(P?22.3p(A,P.U()):A);1S=(T?22.2u(1S,T.U()):1S);1v+=\'<3l R="n-f-A" \'+\'79="2b.f.5Z(\\\'#\'+8.L+\'\\\', b, \\\'Y\\\');" \'+\'3c="2b.f.61(\\\'#\'+8.L+\'\\\');"\'+\'>\';1m(;A<=1S;A++){1v+=\'<3R G="\'+A+\'"\'+(A==K?\' 4g="4g"\':\'\')+\'>\'+A+\'</3R>\'}1v+=\'</3l>\'}h(48)1v+=(3s||3a||3e?\'&#62;\':\'\')+3j;1v+=\'</1h>\';t 1v},4H:p(8,J,1P){c A=8.K+(1P==\'Y\'?J:0);c H=8.I+(1P==\'M\'?J:0);c N=22.2u(8.1L,b.3n(A,H))+(1P==\'D\'?J:0);c k=b.1b(E C(A,H,N));c P=b.2A(8,\'2u\',1l);c T=b.2A(8,\'3p\');k=(P&&k<P?P:k);k=(T&&k>T?T:k);8.1L=k.16();8.I=8.1u=k.1i();8.K=8.1z=k.U();h(1P==\'M\'||1P==\'Y\')b.46(8)},46:p(8){c 64=b.q(8,\'6z\');h(64)64.2z((8.r?8.r[0]:v),[8.1z,8.1u+1,8])},53:p(8){c 1c=b.q(8,\'6n\');t(1c==v?[1,1]:(1J 1c==\'63\'?[1,1c]:1c))},2A:p(8,6o,6m){c k=b.5c(b.q(8,6o+\'C\'),v);t(!6m||!8.2j?k:(!k||8.2j>k?8.2j:k))},3n:p(A,H){t 32-E C(A,H,32).16()},6l:p(A,H){t E C(A,H,1).3u()},5Y:p(8,J,6y,78){c 1c=b.53(8);c k=b.1b(E C(6y,78+(J<0?J:1c[1]),1));h(J<0)k.3S(b.3n(k.U(),k.1i()));t b.5X(8,k)},5X:p(8,k){c 3o=(!8.2j?v:b.1b(E C(8.1z,8.1u,8.1L)));3o=(3o&&8.2j<3o?8.2j:3o);c P=3o||b.2A(8,\'2u\');c T=b.2A(8,\'3p\');t((!P||k>=P)&&(!T||k<=T))},3g:p(8){c 1E=b.q(8,\'1E\');1E=(1J 1E!=\'3m\'?1E:E C().U()%3d+1A(1E,10));t{1E:1E,1I:b.q(8,\'1I\'),1B:b.q(8,\'1B\'),1q:b.q(8,\'1q\'),1p:b.q(8,\'1p\')}},3W:p(8,N,H,A){h(!N){8.1w=8.1L;8.24=8.1u;8.1V=8.1z}c k=(N?(1J N==\'4q\'?N:b.1b(E C(A,H,N))):b.1b(E C(8.1V,8.24,8.1w)));t b.3x(b.q(8,\'3h\'),k,b.3g(8))}});p 4j(l,3z){$.3i(l,3z);1m(c V 6Y 3z)h(3z[V]==v||3z[V]==5S)l[V]=3z[V];t l};p 9i(a){t(a&&(($.3k.9h&&1J a==\'4q\'&&a.1f)||(a.77&&a.77.5R().1n(/\\73\\(\\)/))))};$.9l.f=p(23){h(!$.f.5W){$(1g).9m($.f.75).4b(\'2r\').2c($.f.O);$.f.5W=1l}c 4W=73.74.9p.9o(3w,1);h(1J 23==\'3m\'&&(23==\'9n\'||23==\'16\'))t $.f[\'5T\'+23+\'3J\'].2z($.f,[b[0]].5U(4W));h(23==\'3R\'&&3w.1f==2&&1J 3w[1]==\'3m\')t $.f[\'5T\'+23+\'3J\'].2z($.f,[b[0]].5U(4W));t b.3Z(p(){1J 23==\'3m\'?$.f[\'5T\'+23+\'3J\'].2z($.f,[b].5U(4W)):$.f.6L(b,23)})};$.f=E 3J();$.f.5W=B;$.f.5V=E C().1d();$.f.5a="1.7.2";4c.2b=$})(8Z);',62,626,'||||||||inst|||this|var|||datepicker||if|||date|target||ui||function|_get|input||return|event|null||case||settings|year|false|Date||new|break|value|month|drawMonth|offset|drawYear|id||day|dpDiv|minDate|else|class|iFormat|maxDate|getFullYear|name||format||isRTL||||||span|getDate||nodeName|printDate|charAt|_daylightSavingAdjust|numMonths|getTime|duration|length|document|div|getMonth|inline|ctrlKey|true|for|match|firstDay|monthNames|monthNamesShort|left|_getInst|_defaults|selectedMonth|html|currentDay|top|state|selectedYear|parseInt|dayNames|matches|lookAhead|shortYearCutoff|_pos|literal|button|dayNamesShort|typeof|_adjustDate|selectedDay|iValue|all|defaultDate|period|calender|output|endYear|metaKey|showAnim|currentYear|corner|PROP_NAME|css|stepMonths|position|markerClassName|Math|options|currentMonth|checkDate|width|||nextText|default|DP_jQuery|append|prevText|addClass|next|prev|handled|disabled|rangeStart|size|_dialogInput|_hideDatepicker|trigger|data|dow|chars|body|isFixed|_disabledInputs|min|num|_updateDatepicker|title|today|apply|_getMinMaxDate|removeClass|td|dateStr|focus|icon|key|onSelect|hasClass|documentElement|buttonText|years|selectedDate|postProcess|currentText|stepBigMonths|while|val|yy|doy|showOn|type|_curInst|_datepickerShowing|_inDialog|cornerClass|end|row|||||||||changeMonth|obj|onclick|100|changeYear|hover|_getFormatConfig|dateFormat|extend|monthHtml|browser|select|string|_getDaysInMonth|newMinDate|max|otherMonth|showOtherMonths|secondary|bind|getDay|getNumber|arguments|formatDate|inlineSettings|props|widget|_lastInput|_showDatepicker|navigationAsDateFormat|firstMon|dd|pos|switch|buttonImage|Datepicker|col|height|stayOpen|endDate|throw|hideIfNoPrevNext|endDay|option|setDate|multi|thead|appendText|_formatDate|_isDisabledDatepicker|blockUI|each||altField|indexOf|scrollTop|tbody|onClose|_notifyChange|currentDate|showMonthAfterYear|group|beforeShow|find|window|toLowerCase|dates|unselectable|selected|names|showCurrentAtPos|extendRemove|beforeShowDay|scrollLeft|daySettings|dpWidth|maxDraw|formatNumber|object|children|shortNames|circle|longNames|attrName|altFormat|checkLiteral|mm|px|showButtonPanel|attrValue|triangle|_doKeyDown|effects|_updateAlternate|unbind|_adjustInstDate|iframe|filter|hidden|_keyEvent|_dayOverClass|viewHeight|tr|isMultiMonth|dpHeight|viewWidth|img|_inlineClass|absolute|_triggerClass|otherArgs|cols|clientHeight|_selectingMonthYear|helper|_selectDate|className|_getNumberOfMonths|_getDefaultDate|endMonth|iso8601Week|clientWidth|dayNamesMin|calendar|version|remove|_determineDate|chr|_newInst|divSpan|sel|showOptions|_setDateFromField|formatName|hide|show|dims|at|parents|_mainDivId|keydown|origSize|_doKeyPress|getName|regional|keyCode|dim|_tidyDialog|_dialogClass|inputHeight|gotoCurrent|leadDays|daysInMonth|dRow|_unselectableClass|_selectDay|_currentClass|right|clearfix|content|_getDate|gotoDate|_gotoToday|calculateWeek|controls|try|src|toString|undefined|_|concat|uuid|initialized|_isInRange|_canAdjustMonth|_selectMonthYear|cover|_clickMonthYear|xa0|number|onChange|_setDate|msie|Invalid|getDaysInMonth|pattern|log|catch|rtl|outerWidth|innerWidth|outerHeight|Class|_checkOffset|add|dp|mouseover|_getFirstDayOfMonth|checkRange|numberOfMonths|minMax|getYear|inputWidth|_generateMonthYearHeader|inMinYear|setData|_inlineDatepicker|buttonPanel|getData|inMaxYear|curYear|onChangeMonthYear|abs|_findPos|yearRange|innerHeight|self|originalEvent|keypress|altKey|scrollY|browserHeight|constrainInput|_attachDatepicker|opacity|_optionDatepicker|map|_setDateDatepicker|_getDateDatepicker|cursor|parseDate|scrollX|charCode|_dialogInst|display|empty|in|table|_possibleChars|fixed|dateText|Array|prototype|_checkExternalClick|browserWidth|constructor|curMonth|onchange|priority|isNaN|debug|closeText|attr|alt|header|Year|Month|th|test|_clearDate|buttonImageOnly|both|origYear|clear|origMonth|getHours|setHours|startDate|_generateHTML|Missing|err|_appendClass|_connectDatepicker|iInit|before|current|offsetString|100px|exec|len|offsetNumeric|numRows|May|after|week|Today|Next|150|over|Jun|Done|Saturday|Jan|_destroyDatepicker|Thursday|Prev|Wednesday|Th|Friday|December|replace|Mar|Feb|days|_disableClass|Sun|dialog|Mon|getAttribute|setDefaults|Su|removeData|Mo|_enableDatepicker|click|_disableDatepicker|cell|January|Nov|Oct|eval|Dec|October|Tue|June|_dialogDatepicker|Wed|normal|Fri|August|Sep|September|Thu|Sa|Fr|We|accessible|Sat|November|Jul|March|February|Monday|Tuesday|July|pageX|Tu|Sunday|Apr|text|hasDatepicker|Aug|style|console|April|pageY|0123456789|W3C|TIMESTAMP|RSS|RFC_2822|jQuery|setMinutes|9999|setMilliseconds|setSeconds|RFC_1123|RFC_1036|ATOM|do|Unexpected|Unknown|COOKIE|ISO_8601|instance|RFC_850|RFC_822|close|primary|safari|isArray|split|frameborder|fn|mousedown|isDisabled|call|slice|javascript|href|last|first|buttonpane|middle|ceil|active|highlight|other|86400000|DD|mouseout|preventDefault|stopPropagation|is|_refreshDatepicker|_changeDatepicker|parent|String|fromCharCode|block|offsetHeight|opera|1000px|static|parentNode|none|floor|em|selectedIndex|nodeType|change|noWeekends|defaults|unblockUI|draw|fadeOut|nextSibling|slideUp|slideDown|fadeIn'.split('|'),0,{}))
diff --git a/template-common/lib/ui/packed/ui.dialog.packed.js b/template-common/lib/ui/packed/ui.dialog.packed.js
index f158ee590..cd10d9f1b 100644
--- a/template-common/lib/ui/packed/ui.dialog.packed.js
+++ b/template-common/lib/ui/packed/ui.dialog.packed.js
@@ -1,2 +1 @@
-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}('(5(B){b A={1W:"1z.t",15:"15.t",1V:"1y.t",1A:"1A.i",1e:"1e.i",1B:"1B.i",1d:"1d.i",1U:"1z.i",p:"15.i",1T:"1y.i"};B.2p("6.4",{3o:5(){b J=3,K=3.9,D=2u K.i=="2t"?K.i:"n,e,s,w,3n,3m,3l,3k",E=3.k.y("6-4-1f").2z("<1a/>").2z("<1a/>"),G=(3.2l=E.2x().y("6-4-3j").g({q:"3i",d:"1K%",c:"1K%"})),H=K.1j||E.1Y("1j")||"",C=(3.1i=B(\'<1a 1Z="6-4-16"/>\')).2y(\'<1C 1Z="6-4-1j">\'+H+"</1C>").2y(\'<a 3h="#" 1Z="6-4-16-v"><1C>X</1C></a>\').3g(G),I=(3.f=G.2x()).12(j.x).14().y("6-4").y(K.3f).y(E.1Y("3e")).1O("6-4-1f").g({q:"1F",d:K.d,c:K.c,3d:"3c",1b:K.1b}).1Y("3b",-1).g("3a",0).1H(5(L){h(K.2f){b M=27;(L.1o&&L.1o==M&&J.v())}}).1J(5(){J.1u()}),F=(3.2i=B("<1a/>")).y("6-4-39").g({q:"1F",1h:0}).12(I);3.2k=B(".6-4-16-v",C).1X(5(){B(3).y("6-4-16-v-1X")},5(){B(3).1O("6-4-16-v-1X")}).1J(5(L){L.38()}).1I(5(){J.v();l U});3.1i.37("*").1E(3.1i).W(5(){B.6.36(3)});h(B.1n.t){I.t({2w:".6-4-1f",2v:K.35,34:".6-4-16",1z:5(M,L){J.1u();(K.1W&&K.1W.u(J.k[0],O))},15:5(M,L){(K.15&&K.15.u(J.k[0],O))},1y:5(M,L){(K.1V&&K.1V.u(J.k[0],O));B.6.4.8.p()}});(K.t||I.t("1x"))}h(B.1n.i){I.i({2w:".6-4-1f",2v:K.33,1B:K.1B,1A:K.1A,1d:K.1d,1e:K.1e,1z:5(){(K.1U&&K.1U.u(J.k[0],O))},p:5(M,L){(K.1r&&J.1v.u(J));(K.p&&K.p.u(J.k[0],O))},2r:D,1y:5(M,L){(K.1r&&J.1v.u(J));(K.1T&&K.1T.u(J.k[0],O));B.6.4.8.p()}});(K.i||I.i("1x"))}3.1N(K.1L);3.1s=U;(K.T&&B.1n.T&&I.T());(K.2g&&3.1P())},2o:5(C,D){(A[C]&&3.f.2s(A[C],D));1R(C){m"1L":3.1N(D);o;m"t":3.f.t(D?"2q":"1x");o;m"c":3.f.c(D);o;m"q":3.q(D);o;m"i":(2u D=="2t"&&3.f.2s("2r.i",D));3.f.i(D?"2q":"1x");o;m"1j":B(".6-4-1j",3.1i).2h(D);o;m"d":3.f.d(D);o}B.2p.20.2o.u(3,O)},q:5(H){b D=B(17),E=B(j),F=E.32(),C=E.31(),G=F;h(B.2b(H,["1c","11","1w","1h","Z"])>=0){H=[H=="1w"||H=="Z"?H:"1c",H=="11"||H=="1h"?H:"1Q"]}h(H.1S!=30){H=["1c","1Q"]}h(H[0].1S==2n){C+=H[0]}Q{1R(H[0]){m"Z":C+=0;o;m"1w":C+=D.d()-3.f.d();o;2m:m"1c":C+=(D.d()-3.f.d())/2}}h(H[1].1S==2n){F+=H[1]}Q{1R(H[1]){m"11":F+=0;o;m"1h":F+=D.c()-3.f.c();o;2m:m"1Q":F+=(D.c()-3.f.c())/2}}F=S.R(F,G);3.f.g({11:F,Z:C})},1v:5(){b D=3.2l,G=3.1i,E=3.k,F=N(E.g("19-11"),10)+N(E.g("19-1h"),10),C=N(E.g("19-Z"),10)+N(E.g("19-1w"),10);E.c(D.c()-G.2Z()-F);E.d(D.d()-C)},1P:5(){h(3.1s){l}3.8=3.9.1q?2Y B.6.4.8(3):1g;(3.f.2X().18>0)&&3.f.12("x");3.q(3.9.q);3.f.1M(3.9.1M);3.9.1r&&3.1v();3.1u(r);b C=1g;b D={9:3.9};3.2k.1p();3.k.1t("2W",[C,D],3.9.1P);3.1s=r},1u:5(E){h((3.9.1q&&!E)||(!3.9.2e&&!3.9.1q)){l 3.k.1t("2j",[1g,{9:3.9}],3.9.1p)}b D=3.9.1b,C=3.9;B(".6-4:2V").W(5(){D=S.R(D,N(B(3).g("z-13"),10)||C.1b)});(3.8&&3.8.$1D.g("z-13",++D));3.f.g("z-13",++D);3.k.1t("2j",[1g,{9:3.9}],3.9.1p)},v:5(){(3.8&&3.8.V());3.f.14(3.9.14);b D=1g;b C={9:3.9};3.k.1t("2U",[D,C],3.9.v);B.6.4.8.p();3.1s=U},V:5(){(3.8&&3.8.V());3.f.14();3.k.29(".4").2T("4").1O("6-4-1f").14().12("x");3.f.28()},1N:5(F){b E=3,C=U,D=3.2i;D.2S().14();B.W(F,5(){l!(C=r)});h(C){D.1M();B.W(F,5(G,H){B("<2R/>").2h(G).1I(5(){H.u(E.k[0],O)}).12(D)})}}});B.1k(B.6.4,{2Q:{2g:r,1r:r,T:U,1L:{},2f:r,t:r,c:2P,1e:1K,1d:2O,1q:U,8:{},q:"1c",i:r,2e:r,d:2N,1b:2M},8:5(C){3.$1D=B.6.4.8.2d(C)}});B.1k(B.6.4.8,{P:[],2c:B.2L("1p,1J,2K,1H,2J,1I".2I(","),5(C){l C+".4-8"}).2H(" "),2d:5(D){h(3.P.18===0){2G(5(){B("a, :2a").1G(B.6.4.8.2c,5(){b F=U;b H=B(3).2F(".6-4");h(H.18){b E=B(".6-4-8");h(E.18){b G=N(E.g("z-13"),10);E.W(5(){G=S.R(G,N(B(3).g("z-13"),10))});F=N(H.g("z-13"),10)>G}Q{F=r}}l F})},1);B(j).1G("1H.4-8",5(E){b F=27;(E.1o&&E.1o==F&&D.v())});B(17).1G("p.4-8",B.6.4.8.p)}b C=B("<1a/>").12(j.x).y("6-4-8").g(B.1k({2E:0,19:0,2D:0,q:"1F",11:0,Z:0,d:3.d(),c:3.c()},D.9.8));(D.9.T&&B.1n.T&&C.T());3.P.2C(C);l C},V:5(C){3.P.2B(B.2b(3.P,C),1);h(3.P.18===0){B("a, :2a").1E([j,17]).29(".4-8")}C.28()},c:5(){h(B.1m.24&&B.1m.23<7){b D=S.R(j.1l.26,j.x.26);b C=S.R(j.1l.25,j.x.25);h(D<C){l B(17).c()+"Y"}Q{l D+"Y"}}Q{l B(j).c()+"Y"}},d:5(){h(B.1m.24&&B.1m.23<7){b C=S.R(j.1l.22,j.x.22);b D=S.R(j.1l.21,j.x.21);h(C<D){l B(17).d()+"Y"}Q{l C+"Y"}}Q{l B(j).d()+"Y"}},p:5(){b C=B([]);B.W(B.6.4.8.P,5(){C=C.1E(3)});C.g({d:0,c:0}).g({d:B.6.4.8.d(),c:B.6.4.8.c()})}});B.1k(B.6.4.8.20,{V:5(){B.6.4.8.V(3.$1D)}})})(2A)',62,211,'|||this|dialog|function|ui||overlay|options||var|height|width||uiDialog|css|if|resizable|document|element|return|case||break|resize|position|true||draggable|apply|close||body|addClass|||||||||||||||parseInt|arguments|instances|else|max|Math|bgiframe|false|destroy|each||px|left||top|appendTo|index|hide|drag|titlebar|window|length|margin|div|zIndex|center|minWidth|minHeight|content|null|bottom|uiDialogTitlebar|title|extend|documentElement|browser|fn|keyCode|focus|modal|autoResize|isOpen|triggerHandler|moveToTop|size|right|disable|stop|start|maxHeight|maxWidth|span|el|add|absolute|bind|keydown|click|mousedown|100|buttons|show|createButtons|removeClass|open|middle|switch|constructor|resizeStop|resizeStart|dragStop|dragStart|hover|attr|class|prototype|offsetWidth|scrollWidth|version|msie|offsetHeight|scrollHeight||remove|unbind|input|inArray|events|create|stack|closeOnEscape|autoOpen|text|uiDialogButtonPane|dialogfocus|uiDialogTitlebarClose|uiDialogContainer|default|Number|setData|widget|enable|handles|data|string|typeof|helper|cancel|parent|append|wrap|jQuery|splice|push|padding|borderWidth|parents|setTimeout|join|split|keypress|mouseup|map|1000|300|150|200|defaults|button|empty|removeData|dialogclose|visible|dialogopen|next|new|outerHeight|Array|scrollLeft|scrollTop|resizeHelper|handle|dragHelper|disableSelection|find|stopPropagation|buttonpane|outline|tabIndex|hidden|overflow|className|dialogClass|prependTo|href|relative|container|nw|ne|sw|se|init'.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}('(8($){g 1O={26:"1L.F",16:"16.F",2e:"1H.F",1e:"1e.m",N:"N.m",1o:"1o.m",1n:"1n.m",2f:"1L.m",B:"16.m",2g:"1H.m"},1X=\'4-5 \'+\'4-E \'+\'4-E-H \'+\'4-1F-1K \';$.E("4.5",{3G:8(){3.1z=3.j.D(\'A\');g d=3,6=3.6,A=6.A||3.1z||\'&2G;\',1Q=$.4.5.36(3.j),9=(3.9=$(\'<12/>\')).I(l.T).U().p(1X+6.1r).u({1t:\'3H\',3I:\'3D\',18:6.18}).D(\'3O\',-1).u(\'3f\',0).2p(8(c){(6.2u&&c.W&&c.W==$.4.W.2C&&d.O(c))}).D({2N:\'5\',\'3q-3v\':1Q}).2m(8(c){d.20(C,c)}),3c=3.j.1u().3L(\'A\').p(\'4-5-H \'+\'4-E-H\').I(9),10=(3.10=$(\'<12></12>\')).p(\'4-5-1Z \'+\'4-E-3j \'+\'4-1F-1K \'+\'4-2K-2D\').2M(9),17=$(\'<a 3e="#"/>\').p(\'4-5-1Z-O \'+\'4-1F-1K\').D(\'2N\',\'1G\').14(8(){17.p(\'4-J-14\')},8(){17.X(\'4-J-14\')}).x(8(){17.p(\'4-J-x\')}).2E(8(){17.X(\'4-J-x\')}).2m(8(2W){2W.3t()}).2j(8(c){d.O(c);o C}).I(10),1S=(3.1S=$(\'<2O/>\')).p(\'4-1J \'+\'4-1J-3u\').1R(6.2n).I(17),3s=$(\'<2O/>\').p(\'4-5-A\').D(\'37\',1Q).2J(A).2M(10);10.1h("*").1j(10).3p();(6.F&&$.15.F&&3.2k());(6.m&&$.15.m&&3.2i());3.1U(6.Y);3.1l=C;(6.Z&&$.15.Z&&9.Z());(6.3b&&3.24())},Q:8(){(3.b&&3.b.Q());3.9.U();3.j.2t(\'.5\').3n(\'5\').X(\'4-5-H 4-E-H\').U().I(\'T\');3.9.2s();(3.1z&&3.j.D(\'A\',3.1z))},O:8(c){g d=3;h(C===d.1c(\'3r\',c)){o}(d.b&&d.b.Q());d.9.2t(\'2l.4-5\');(d.6.U?d.9.U(d.6.U,8(){d.1c(\'O\',c)}):d.9.U()&&d.1c(\'O\',c));$.4.5.b.B();d.1l=C;h(d.6.1b){g i=0;$(\'.4-5\').1k(8(){h(3!=d.9[0]){i=M.L(i,$(3).u(\'z-1E\'))}});$.4.5.i=i}},35:8(){o 3.1l},20:8(2Q,c){h((3.6.1b&&!2Q)||(!3.6.34&&!3.6.1b)){o 3.1c(\'x\',c)}h(3.6.18>$.4.5.i){$.4.5.i=3.6.18}(3.b&&3.b.$y.u(\'z-1E\',$.4.5.b.i=++$.4.5.i));g 2R={2d:3.j.D(\'2d\'),28:3.j.D(\'28\')};3.9.u(\'z-1E\',++$.4.5.i);3.j.D(2R);3.1c(\'x\',c)},24:8(){h(3.1l){o}g 6=3.6,9=3.9;3.b=6.1b?3g $.4.5.b(3):1v;(9.3d().1B&&9.I(\'T\'));3.2z();3.2x(6.1t);9.1u(6.1u);3.20(R);(6.1b&&9.1y(\'2l.4-5\',8(c){h(c.W!=$.4.W.3l){o}g 21=$(\':22\',3),11=21.23(\':11\')[0],1D=21.23(\':1D\')[0];h(c.2o==1D&&!c.2V){2w(8(){11.x()},1)}13 h(c.2o==11&&c.2V){2w(8(){1D.x()},1)}}));$([]).1j(9.1h(\'.4-5-H :22:11\')).1j(9.1h(\'.4-5-25 :22:11\')).1j(9).23(\':11\').x();3.1c(\'24\');3.1l=R},1U:8(Y){g d=3,1W=C,1Y=$(\'<12></12>\').p(\'4-5-25 \'+\'4-E-H \'+\'4-2K-2D\');3.9.1h(\'.4-5-25\').2s();(2y Y==\'3R\'&&Y!==1v&&$.1k(Y,8(){o!(1W=R)}));h(1W){$.1k(Y,8(2A,15){$(\'<1G 3V="1G"></1G>\').p(\'4-J-2h \'+\'4-1F-1K\').1R(2A).2j(8(){15.S(d.j[0],P)}).14(8(){$(3).p(\'4-J-14\')},8(){$(3).X(\'4-J-14\')}).x(8(){$(3).p(\'4-J-x\')}).2E(8(){$(3).X(\'4-J-x\')}).I(1Y)});1Y.I(3.9)}},2k:8(){g d=3,6=3.6,27;3.9.F({2S:\'.4-5-H\',3J:\'.4-5-1Z\',3B:\'l\',1L:8(){27=6.f;$(3).f($(3).f()).p("4-5-2H");(6.26&&6.26.S(d.j[0],P))},16:8(){(6.16&&6.16.S(d.j[0],P))},1H:8(){$(3).X("4-5-2H").f(27);(6.2e&&6.2e.S(d.j[0],P));$.4.5.b.B()}})},2i:8(V){V=(V===3C?3.6.m:V);g d=3,6=3.6,39=2y V==\'2B\'?V:\'n,e,s,w,1V,3E,3F,3o\';3.9.m({2S:\'.4-5-H\',3x:3.j,1o:6.1o,1e:6.1e,1n:6.1n,N:6.N,1L:8(){$(3).p("4-5-2Y");(6.2f&&6.2f.S(d.j[0],P))},B:8(){(6.B&&6.B.S(d.j[0],P))},V:39,1H:8(){$(3).X("4-5-2Y");6.f=$(3).f();6.k=$(3).k();(6.2g&&6.2g.S(d.j[0],P));$.4.5.b.B()}}).1h(\'.4-m-1V\').p(\'4-1J 4-1J-3M-3N-1V\')},2x:8(q){g 1p=$(1f),2c=$(l),G=2c.2d(),19=2c.28(),2Z=G;h($.2L(q,[\'1m\',\'1q\',\'29\',\'2b\',\'1N\'])>=0){q=[q==\'29\'||q==\'1N\'?q:\'1m\',q==\'1q\'||q==\'2b\'?q:\'1T\']}h(q.2a!=3k){q=[\'1m\',\'1T\']}h(q[0].2a==38){19+=q[0]}13{1P(q[0]){r\'1N\':19+=0;v;r\'29\':19+=1p.k()-3.9.30();v;2h:r\'1m\':19+=(1p.k()-3.9.30())/2}}h(q[1].2a==38){G+=q[1]}13{1P(q[1]){r\'1q\':G+=0;v;r\'2b\':G+=1p.f()-3.9.31();v;2h:r\'1T\':G+=(1p.f()-3.9.31())/2}}G=M.L(G,2Z);3.9.u({1q:G,1N:19})},3a:8(1x,t){(1O[1x]&&3.9.2T(1O[1x],t));1P(1x){r"Y":3.1U(t);v;r"2n":3.1S.1R(t);v;r"1r":3.9.X(3.6.1r).p(1X+t);v;r"F":(t?3.2k():3.9.F(\'Q\'));v;r"f":3.9.f(t);v;r"1t":3.2x(t);v;r"m":g 9=3.9,1M=3.9.3h(\':2T(m)\');(1M&&!t&&9.m(\'Q\'));(1M&&2y t==\'2B\'&&9.m(\'3U\',\'V\',t));(1M||3.2i(t));v;r"A":$(".4-5-A",3.10).2J(t||\'&2G;\');v;r"k":3.9.k(t);v}$.E.2P.3a.S(3,P)},2z:8(){g 6=3.6;3.j.u({f:0,N:0,k:\'1d\'});g 2v=3.9.u({f:\'1d\',k:6.k}).f();3.j.u({N:M.L(6.N-2v,0),f:6.f==\'1d\'?\'1d\':M.L(6.f-2v,0)})}});$.2r($.4.5,{2q:"1.7.2",3m:{3b:R,Z:C,Y:{},2u:R,2n:\'O\',1r:\'\',F:R,U:1v,f:\'1d\',1e:C,1o:C,N:33,1n:33,1b:C,1t:\'1m\',m:R,1u:1v,34:R,A:\'\',k:3i,18:3W},3P:\'35\',32:0,i:0,36:8($y){o\'4-5-A-\'+($y.D(\'37\')||++3.32)},b:8(5){3.$y=$.4.5.b.2I(5)}});$.2r($.4.5.b,{K:[],i:0,2F:$.3S(\'x,2m,3A,2p,2l,2j\'.3y(\',\'),8(c){o c+\'.5-b\'}).3z(\' \'),2I:8(5){h(3.K.1B===0){2w(8(){h($.4.5.b.K.1B){$(l).1y($.4.5.b.2F,8(c){g 2X=$(c.2o).3T(\'.4-5\').u(\'18\')||0;o(2X>$.4.5.b.i)})}},1);$(l).1y(\'2p.5-b\',8(c){(5.6.2u&&c.W&&c.W==$.4.W.2C&&5.O(c))});$(1f).1y(\'B.5-b\',$.4.5.b.B)}g $y=$(\'<12></12>\').I(l.T).p(\'4-E-b\').u({k:3.k(),f:3.f()});(5.6.Z&&$.15.Z&&$y.Z());3.K.3Q($y);o $y},Q:8($y){3.K.3w($.2L(3.K,$y),1);h(3.K.1B===0){$([l,1f]).2t(\'.5-b\')}$y.2s();g i=0;$.1k(3.K,8(){i=M.L(i,3.u(\'z-1E\'))});3.i=i},f:8(){h($.1A.2U&&$.1A.2q<7){g 1i=M.L(l.1w.1i,l.T.1i);g 1C=M.L(l.1w.1C,l.T.1C);h(1i<1C){o $(1f).f()+\'1a\'}13{o 1i+\'1a\'}}13{o $(l).f()+\'1a\'}},k:8(){h($.1A.2U&&$.1A.2q<7){g 1g=M.L(l.1w.1g,l.T.1g);g 1I=M.L(l.1w.1I,l.T.1I);h(1g<1I){o $(1f).k()+\'1a\'}13{o 1g+\'1a\'}}13{o $(l).k()+\'1a\'}},B:8(){g $1s=$([]);$.1k($.4.5.b.K,8(){$1s=$1s.1j(3)});$1s.u({k:0,f:0}).u({k:$.4.5.b.k(),f:$.4.5.b.f()})}});$.2r($.4.5.b.2P,{Q:8(){$.4.5.b.Q(3.$y)}})})(3K);',62,245,'|||this|ui|dialog|options||function|uiDialog||overlay|event|self||height|var|if|maxZ|element|width|document|resizable||return|addClass|pos|case||value|css|break||focus|el||title|resize|false|attr|widget|draggable|pTop|content|appendTo|state|instances|max|Math|minHeight|close|arguments|destroy|true|apply|body|hide|handles|keyCode|removeClass|buttons|bgiframe|uiDialogTitlebar|first|div|else|hover|fn|drag|uiDialogTitlebarClose|zIndex|pLeft|px|modal|_trigger|auto|maxHeight|window|scrollWidth|find|scrollHeight|add|each|_isOpen|center|minWidth|maxWidth|wnd|top|dialogClass|overlays|position|show|null|documentElement|key|bind|originalTitle|browser|length|offsetHeight|last|index|corner|button|stop|offsetWidth|icon|all|start|isResizable|left|setDataSwitch|switch|titleId|text|uiDialogTitlebarCloseText|middle|_createButtons|se|hasButtons|uiDialogClasses|uiDialogButtonPane|titlebar|moveToTop|tabbables|tabbable|filter|open|buttonpane|dragStart|heightBeforeDrag|scrollLeft|right|constructor|bottom|doc|scrollTop|dragStop|resizeStart|resizeStop|default|_makeResizable|click|_makeDraggable|keypress|mousedown|closeText|target|keydown|version|extend|remove|unbind|closeOnEscape|nonContentHeight|setTimeout|_position|typeof|_size|name|string|ESCAPE|clearfix|blur|events|nbsp|dragging|create|html|helper|inArray|prependTo|role|span|prototype|force|saveScroll|cancel|data|msie|shiftKey|ev|dialogZ|resizing|minTop|outerWidth|outerHeight|uuid|150|stack|isOpen|getTitleId|id|Number|resizeHandles|_setData|autoOpen|uiDialogContent|next|href|outline|new|is|300|header|Array|TAB|defaults|removeData|nw|disableSelection|aria|beforeclose|uiDialogTitle|stopPropagation|closethick|labelledby|splice|alsoResize|split|join|mouseup|containment|undefined|hidden|sw|ne|_init|absolute|overflow|handle|jQuery|removeAttr|grip|diagonal|tabIndex|getter|push|object|map|parents|option|type|1000'.split('|'),0,{}))
diff --git a/template-common/lib/ui/packed/ui.draggable.packed.js b/template-common/lib/ui/packed/ui.draggable.packed.js
index 27e30c770..e2ddd379e 100644
--- a/template-common/lib/ui/packed/ui.draggable.packed.js
+++ b/template-common/lib/ui/packed/ui.draggable.packed.js
@@ -1,2 +1 @@
-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}('(b(A){A.3y("g.i",A.1T({},A.g.3x,{3w:b(){a B=4.9;7(B.d=="27"&&!(/(l|Z|15)/).1k(4.j.e("m"))){4.j.e("m","l")}4.j.2b("g-i");(B.2e&&4.j.2b("g-i-2e"));4.3v()},2g:b(F){a H=4.9;7(4.d||H.2e||A(F.1Q).3u(".g-3t-1L")){n 11}a C=!4.9.1L||!A(4.9.1L,4.j).1A?t:11;A(4.9.1L,4.j).3s("*").3r().1b(b(){7(4==F.1Q){C=t}});7(!C){n 11}7(A.g.1f){A.g.1f.3q=4}4.d=A.3p(H.d)?A(H.d.3o(4.j[0],[F])):(H.d=="1S"?4.j.1S():4.j);7(!4.d.3n("14").1A){4.d.1p((H.1p=="k"?4.j[0].1t:H.1p))}7(4.d[0]!=4.j[0]&&!(/(15|Z)/).1k(4.d.e("m"))){4.d.e("m","Z")}4.S={6:(o(4.j.e("3m"),10)||0),5:(o(4.j.e("3l"),10)||0)};4.z=4.d.e("m");4.8=4.j.8();4.8={5:4.8.5-4.S.5,6:4.8.6-4.S.6};4.8.q={6:F.1q-4.8.6,5:F.1s-4.8.5};4.p=4.d.p();a B=4.p.8();7(4.p[0]==f.14&&A.3k.3j){B={5:0,6:0}}4.8.k={5:B.5+(o(4.p.e("2c"),10)||0),6:B.6+(o(4.p.e("2d"),10)||0)};a E=4.j.m();4.8.l=4.z=="l"?{5:E.5-(o(4.d.e("5"),10)||0)+4.p[0].s,6:E.6-(o(4.d.e("6"),10)||0)+4.p[0].r}:{5:0,6:0};4.1m=4.2a(F);4.w={v:4.d.1W(),u:4.d.1V()};7(H.1a){7(H.1a.6!=1K){4.8.q.6=H.1a.6+4.S.6}7(H.1a.2z!=1K){4.8.q.6=4.w.v-H.1a.2z+4.S.6}7(H.1a.5!=1K){4.8.q.5=H.1a.5+4.S.5}7(H.1a.2y!=1K){4.8.q.5=4.w.u-H.1a.2y+4.S.5}}7(H.h){7(H.h=="k"){H.h=4.d[0].1t}7(H.h=="f"||H.h=="1r"){4.h=[0-4.8.l.6-4.8.k.6,0-4.8.l.5-4.8.k.5,A(H.h=="f"?f:1r).v()-4.8.l.6-4.8.k.6-4.w.v-4.S.6-(o(4.j.e("2x"),10)||0),(A(H.h=="f"?f:1r).u()||f.14.1t.2v)-4.8.l.5-4.8.k.5-4.w.u-4.S.5-(o(4.j.e("2u"),10)||0)]}7(!(/^(f|1r|k)$/).1k(H.h)){a D=A(H.h)[0];a G=A(H.h).8();4.h=[G.6+(o(A(D).e("2d"),10)||0)-4.8.l.6-4.8.k.6,G.5+(o(A(D).e("2c"),10)||0)-4.8.l.5-4.8.k.5,G.6+T.2w(D.3i,D.1Z)-(o(A(D).e("2d"),10)||0)-4.8.l.6-4.8.k.6-4.w.v-4.S.6-(o(4.j.e("2x"),10)||0),G.5+T.2w(D.2v,D.22)-(o(A(D).e("2c"),10)||0)-4.8.l.5-4.8.k.5-4.w.u-4.S.5-(o(4.j.e("2u"),10)||0)]}}4.18("16",F);4.w={v:4.d.1W(),u:4.d.1V()};7(A.g.1f&&!H.2s){A.g.1f.3h(4,F)}4.d.2b("g-i-2r");4.1P(F);n t},W:b(C,D){7(!D){D=4.m}a B=C=="Z"?1:-1;n{5:(D.5+4.8.l.5*B+4.8.k.5*B-(4.z=="15"||(4.z=="Z"&&4.p[0]==f.14)?0:4.p[0].s)*B+(4.z=="15"?A(f).s():0)*B+4.S.5*B),6:(D.6+4.8.l.6*B+4.8.k.6*B-(4.z=="15"||(4.z=="Z"&&4.p[0]==f.14)?0:4.p[0].r)*B+(4.z=="15"?A(f).r():0)*B+4.S.6*B)}},2a:b(E){a F=4.9;a B={5:(E.1s-4.8.q.5-4.8.l.5-4.8.k.5+(4.z=="15"||(4.z=="Z"&&4.p[0]==f.14)?0:4.p[0].s)-(4.z=="15"?A(f).s():0)),6:(E.1q-4.8.q.6-4.8.l.6-4.8.k.6+(4.z=="15"||(4.z=="Z"&&4.p[0]==f.14)?0:4.p[0].r)-(4.z=="15"?A(f).r():0))};7(!4.1m){n B}7(4.h){7(B.6<4.h[0]){B.6=4.h[0]}7(B.5<4.h[1]){B.5=4.h[1]}7(B.6>4.h[2]){B.6=4.h[2]}7(B.5>4.h[3]){B.5=4.h[3]}}7(F.19){a D=4.1m.5+T.2t((B.5-4.1m.5)/F.19[1])*F.19[1];B.5=4.h?(!(D<4.h[1]||D>4.h[3])?D:(!(D<4.h[1])?D-F.19[1]:D+F.19[1])):D;a C=4.1m.6+T.2t((B.6-4.1m.6)/F.19[0])*F.19[0];B.6=4.h?(!(C<4.h[0]||C>4.h[2])?C:(!(C<4.h[0])?C-F.19[0]:C+F.19[0])):C}n B},1P:b(B){4.m=4.2a(B);4.1h=4.W("Z");4.m=4.18("1d",B)||4.m;7(!4.9.1z||4.9.1z!="y"){4.d[0].1v.6=4.m.6+"1I"}7(!4.9.1z||4.9.1z!="x"){4.d[0].1v.5=4.m.5+"1I"}7(A.g.1f){A.g.1f.1d(4,B)}n 11},1O:b(C){a D=11;7(A.g.1f&&!4.9.2s){a D=A.g.1f.3g(4,C)}7((4.9.1g=="3f"&&!D)||(4.9.1g=="3e"&&D)||4.9.1g===t){a B=4;A(4.d).3d(4.1m,o(4.9.1g,10)||3c,b(){B.18("1i",C);B.29()})}1x{4.18("1i",C);4.29()}n 11},29:b(){4.d.2q("g-i-2r");7(4.9.d!="27"&&!4.1w){4.d.1M()}4.d=3b;4.1w=11},3a:{},28:b(B){n{d:4.d,m:4.m,1U:4.1h,9:4.9}},18:b(C,B){A.g.17.2i(4,C,[B,4.28()]);7(C=="1d"){4.1h=4.W("Z")}n 4.j.2j(C=="1d"?C:"1d"+C,[B,4.28()],4.9[C])},39:b(){7(!4.j.V("i")){n}4.j.38("i").37(".i").2q("g-i");4.36()}}));A.1T(A.g.i,{35:{1p:"k",1z:11,34:":33",32:0,31:1,d:"27"}});A.g.17.1c("i","1u",{16:b(D,C){a B=A("14");7(B.e("1u")){C.9.26=B.e("1u")}B.e("1u",C.9.1u)},1i:b(C,B){7(B.9.26){A("14").e("1u",B.9.26)}}});A.g.17.1c("i","U",{16:b(D,C){a B=A(C.d);7(B.e("U")){C.9.25=B.e("U")}B.e("U",C.9.U)},1i:b(C,B){7(B.9.25){A(B.d).e("U",B.9.25)}}});A.g.17.1c("i","1l",{16:b(D,C){a B=A(C.d);7(B.e("1l")){C.9.24=B.e("1l")}B.e("1l",C.9.1l)},1i:b(C,B){7(B.9.24){A(B.d).e("1l",B.9.24)}}});A.g.17.1c("i","1J",{16:b(C,B){A(B.9.1J===t?"30":B.9.1J).1b(b(){A(\'<23 2Z="g-i-1J" 1v="2Y: #2X;"></23>\').e({v:4.1Z+"1I",u:4.22+"1I",m:"Z",1l:"0.2W",U:2V}).e(A(4).8()).1p("14")})},1i:b(C,B){A("23.2U").1b(b(){4.1t.2T(4)})}});A.g.17.1c("i","1y",{16:b(D,C){a E=C.9;a B=A(4).V("i");E.13=E.13||20;E.12=E.12||20;B.Y=b(F){2p{7(/1H|1y/.1k(F.e("1G"))||(/1H|1y/).1k(F.e("1G-y"))){n F}F=F.k()}2o(F[0].1t);n A(f)}(4);B.X=b(F){2p{7(/1H|1y/.1k(F.e("1G"))||(/1H|1y/).1k(F.e("1G-x"))){n F}F=F.k()}2o(F[0].1t);n A(f)}(4);7(B.Y[0]!=f&&B.Y[0].1F!="1E"){B.21=B.Y.8()}7(B.X[0]!=f&&B.X[0].1F!="1E"){B.1Y=B.X.8()}},1d:b(D,C){a E=C.9;a B=A(4).V("i");7(B.Y[0]!=f&&B.Y[0].1F!="1E"){7((B.21.5+B.Y[0].22)-D.1s<E.13){B.Y[0].s=B.Y[0].s+E.12}7(D.1s-B.21.5<E.13){B.Y[0].s=B.Y[0].s-E.12}}1x{7(D.1s-A(f).s()<E.13){A(f).s(A(f).s()-E.12)}7(A(1r).u()-(D.1s-A(f).s())<E.13){A(f).s(A(f).s()+E.12)}}7(B.X[0]!=f&&B.X[0].1F!="1E"){7((B.1Y.6+B.X[0].1Z)-D.1q<E.13){B.X[0].r=B.X[0].r+E.12}7(D.1q-B.1Y.6<E.13){B.X[0].r=B.X[0].r-E.12}}1x{7(D.1q-A(f).r()<E.13){A(f).r(A(f).r()-E.12)}7(A(1r).v()-(D.1q-A(f).r())<E.13){A(f).r(A(f).r()+E.12)}}}});A.g.17.1c("i","1X",{16:b(D,C){a B=A(4).V("i");B.1j=[];A(C.9.1X===t?".g-i":C.9.1X).1b(b(){a F=A(4);a E=F.8();7(4!=B.j[0]){B.1j.2l({2h:4,v:F.1W(),u:F.1V(),5:E.5,6:E.6})}})},1d:b(J,N){a I=A(4).V("i");a L=N.9.2S||20;a D=N.1U.6,C=D+I.w.v,P=N.1U.5,O=P+I.w.u;2R(a H=I.1j.1A-1;H>=0;H--){a E=I.1j[H].6,B=E+I.1j[H].v,R=I.1j[H].5,M=R+I.1j[H].u;7(!((E-L<D&&D<B+L&&R-L<P&&P<M+L)||(E-L<D&&D<B+L&&R-L<O&&O<M+L)||(E-L<C&&C<B+L&&R-L<P&&P<M+L)||(E-L<C&&C<B+L&&R-L<O&&O<M+L))){2Q}7(N.9.2n!="2P"){a K=T.1e(R-O)<=20;a Q=T.1e(M-P)<=20;a G=T.1e(E-C)<=20;a F=T.1e(B-D)<=20;7(K){N.m.5=I.W("l",{5:R-I.w.u,6:0}).5}7(Q){N.m.5=I.W("l",{5:M,6:0}).5}7(G){N.m.6=I.W("l",{5:0,6:E-I.w.v}).6}7(F){N.m.6=I.W("l",{5:0,6:B}).6}}7(N.9.2n!="2O"){a K=T.1e(R-P)<=20;a Q=T.1e(M-O)<=20;a G=T.1e(E-D)<=20;a F=T.1e(B-C)<=20;7(K){N.m.5=I.W("l",{5:R,6:0}).5}7(Q){N.m.5=I.W("l",{5:M-I.w.u,6:0}).5}7(G){N.m.6=I.W("l",{5:0,6:E}).6}7(F){N.m.6=I.W("l",{5:0,6:B-I.w.v}).6}}}}});A.g.17.1c("i","2m",{16:b(D,C){a B=A(4).V("i");B.1D=[];A(C.9.2m).1b(b(){7(A.V(4,"1R")){a E=A.V(4,"1R");B.1D.2l({c:E,2k:E.9.1g});E.2N();E.18("2M",D,B)}})},1i:b(D,C){a B=A(4).V("i");A.1b(B.1D,b(){7(4.c.1o){4.c.1o=0;B.1w=t;4.c.1w=11;7(4.2k){4.c.9.1g=t}4.c.1O(D);4.c.j.2j("2L",[D,A.1T(4.c.g(),{2K:B.j})],4.c.9["2J"]);4.c.9.d=4.c.9.1N}1x{4.c.18("2I",D,B)}})},1d:b(F,E){a D=A(4).V("i"),B=4;a C=b(K){a H=K.6,J=H+K.v,I=K.5,G=I+K.u;n(H<(4.1h.6+4.8.q.6)&&(4.1h.6+4.8.q.6)<J&&I<(4.1h.5+4.8.q.5)&&(4.1h.5+4.8.q.5)<G)};A.1b(D.1D,b(G){7(C.2i(D,4.c.2H)){7(!4.c.1o){4.c.1o=1;4.c.1C=A(B).1S().1p(4.c.j).V("1R-2h",t);4.c.9.1N=4.c.9.d;4.c.9.d=b(){n E.d[0]};F.1Q=4.c.1C[0];4.c.2G(F,t);4.c.2g(F,t,t);4.c.8.q.5=D.8.q.5;4.c.8.q.6=D.8.q.6;4.c.8.k.6-=D.8.k.6-4.c.8.k.6;4.c.8.k.5-=D.8.k.5-4.c.8.k.5;D.18("2F",F)}7(4.c.1C){4.c.1P(F)}}1x{7(4.c.1o){4.c.1o=0;4.c.1w=t;4.c.9.1g=11;4.c.1O(F,t);4.c.9.d=4.c.9.1N;4.c.1C.1M();7(4.c.2f){4.c.2f.1M()}D.18("2E",F)}}})}});A.g.17.1c("i","1n",{16:b(D,B){a C=A.2D(A(B.9.1n.2C)).2B(b(F,E){n(o(A(F).e("U"),10)||B.9.1n.1B)-(o(A(E).e("U"),10)||B.9.1n.1B)});A(C).1b(b(E){4.1v.U=B.9.1n.1B+E});4[0].1v.U=B.9.1n.1B+C.1A}})})(2A)',62,221,'||||this|top|left|if|offset|options|var|function|instance|helper|css|document|ui|containment|draggable|element|parent|relative|position|return|parseInt|offsetParent|click|scrollLeft|scrollTop|true|height|width|helperProportions|||cssPosition|||||||||||||||||||margins|Math|zIndex|data|convertPositionTo|overflowX|overflowY|absolute||false|scrollSpeed|scrollSensitivity|body|fixed|start|plugin|propagate|grid|cursorAt|each|add|drag|abs|ddmanager|revert|positionAbs|stop|snapElements|test|opacity|originalPosition|stack|isOver|appendTo|pageX|window|pageY|parentNode|cursor|style|cancelHelperRemoval|else|scroll|axis|length|min|currentItem|sortables|HTML|tagName|overflow|auto|px|iframeFix|undefined|handle|remove|_helper|mouseStop|mouseDrag|target|sortable|clone|extend|absolutePosition|outerHeight|outerWidth|snap|overflowXOffset|offsetWidth||overflowYOffset|offsetHeight|div|_opacity|_zIndex|_cursor|original|uiHash|clear|generatePosition|addClass|borderTopWidth|borderLeftWidth|disabled|placeholder|mouseStart|item|call|triggerHandler|shouldRevert|push|connectToSortable|snapMode|while|do|removeClass|dragging|dropBehaviour|round|marginBottom|scrollHeight|max|marginRight|bottom|right|jQuery|sort|group|makeArray|fromSortable|toSortable|mouseCapture|containerCache|deactivate|receive|sender|sortreceive|activate|refreshItems|outer|inner|continue|for|snapTolerance|removeChild|DragDropIframeFix|1000|001|fff|background|class|iframe|distance|delay|input|cancel|defaults|mouseDestroy|unbind|removeData|destroy|plugins|null|500|animate|valid|invalid|drop|prepareOffsets|scrollWidth|mozilla|browser|marginTop|marginLeft|parents|apply|isFunction|current|andSelf|find|resizable|is|mouseInit|init|mouse|widget'.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}('(m($){$.2H("9.q",$.1C({},$.9.3U,{3Z:m(){8(4.j.n==\'2v\'&&!(/^(?:r|a|f)/).1T(4.A.s("C")))4.A[0].1D.C=\'F\';(4.j.3c&&4.A.2f("9-q"));(4.j.1O&&4.A.2f("9-q-1O"));4.3I()},3N:m(){8(!4.A.G(\'q\'))E;4.A.4o("q").4h(".q").2L("9-q"+" 9-q-2r"+" 9-q-1O");4.3G()},33:m(c){h o=4.j;8(4.n||o.1O||$(c.2d).4b(\'.9-4f-15\'))E z;4.15=4.35(c);8(!4.15)E z;E K},34:m(c){h o=4.j;4.n=4.2Z(c);4.2e();8($.9.18)$.9.18.44=4;4.2J();4.Q=4.n.s("C");4.u=4.n.u();4.g=4.A.g();4.g={6:4.g.6-4.D.6,5:4.g.5-4.D.5};$.1C(4.g,{w:{5:c.O-4.g.5,6:c.P-4.g.6},I:4.2Q(),F:4.2l()});4.2t=4.2m(c);4.2h=c.O;4.2j=c.P;8(o.2u)4.32(o.2u);8(o.v)4.2O();4.11("1h",c);4.2e();8($.9.18&&!o.2y)$.9.18.31(4,c);4.n.2f("9-q-2r");4.2g(c,K);E K},2g:m(c,2X){4.C=4.2m(c);4.1k=4.12("1b");8(!2X){h 9=4.1I();4.11(\'1w\',c,9);4.C=9.C}8(!4.j.T||4.j.T!="y")4.n[0].1D.5=4.C.5+\'1Z\';8(!4.j.T||4.j.T!="x")4.n[0].1D.6=4.C.6+\'1Z\';8($.9.18)$.9.18.1w(4,c);E z},2F:m(c){h Z=z;8($.9.18&&!4.j.2y)Z=$.9.18.3F(4,c);8(4.Z){Z=4.Z;4.Z=z}8((4.j.1f=="3v"&&!Z)||(4.j.1f=="3q"&&Z)||4.j.1f===K||($.30(4.j.1f)&&4.j.1f.1U(4.A,Z))){h 1P=4;$(4.n).47(4.2t,H(4.j.2U,10),m(){1P.11("1u",c);1P.2a()})}14{4.11("1u",c);4.2a()}E z},35:m(c){h 15=!4.j.15||!$(4.j.15,4.A).25?K:z;$(4.j.15,4.A).3s("*").3t().1i(m(){8(4==c.2d)15=K});E 15},2Z:m(c){h o=4.j;h n=$.30(o.n)?$(o.n.3u(4.A[0],[c])):(o.n==\'2c\'?4.A.2c():4.A);8(!n.3r(\'1l\').25)n.1N((o.1N==\'I\'?4.A[0].22:o.1N));8(n[0]!=4.A[0]&&!(/(19|1b)/).1T(n.s("C")))n.s("C","1b");E n},32:m(1a){8(1a.5!=1Y)4.g.w.5=1a.5+4.D.5;8(1a.39!=1Y)4.g.w.5=4.N.U-1a.39+4.D.5;8(1a.6!=1Y)4.g.w.6=1a.6+4.D.6;8(1a.38!=1Y)4.g.w.6=4.N.S-1a.38+4.D.6},2Q:m(){4.R=4.n.R();h 1L=4.R.g();8(4.Q==\'1b\'&&4.u[0]!=B&&$.9.2n(4.u[0],4.R[0])){1L.5+=4.u.M();1L.6+=4.u.L()}8((4.R[0]==B.1l)||(4.R[0].1M&&4.R[0].1M.3o()==\'2o\'&&$.1R.3p))1L={6:0,5:0};E{6:1L.6+(H(4.R.s("2q"),10)||0),5:1L.5+(H(4.R.s("2b"),10)||0)}},2l:m(){8(4.Q=="F"){h p=4.A.C();E{6:p.6-(H(4.n.s("6"),10)||0)+4.u.L(),5:p.5-(H(4.n.s("5"),10)||0)+4.u.M()}}14{E{6:0,5:0}}},2J:m(){4.D={5:(H(4.A.s("3m"),10)||0),6:(H(4.A.s("3w"),10)||0)}},2e:m(){4.N={U:4.n.2P(),S:4.n.2W()}},2O:m(){h o=4.j;8(o.v==\'I\')o.v=4.n[0].22;8(o.v==\'B\'||o.v==\'1G\')4.v=[0-4.g.F.5-4.g.I.5,0-4.g.F.6-4.g.I.6,$(o.v==\'B\'?B:1G).U()-4.N.U-4.D.5,($(o.v==\'B\'?B:1G).S()||B.1l.22.2R)-4.N.S-4.D.6];8(!(/^(B|1G|I)$/).1T(o.v)&&o.v.2z!=2S){h J=$(o.v)[0];8(!J)E;h 1V=$(o.v).g();h 2k=($(J).s("3D")!=\'3E\');4.v=[1V.5+(H($(J).s("2b"),10)||0)+(H($(J).s("3B"),10)||0)-4.D.5,1V.6+(H($(J).s("2q"),10)||0)+(H($(J).s("3A"),10)||0)-4.D.6,1V.5+(2k?W.2K(J.3x,J.29):J.29)-(H($(J).s("2b"),10)||0)-(H($(J).s("3z"),10)||0)-4.N.U-4.D.5,1V.6+(2k?W.2K(J.2R,J.28):J.28)-(H($(J).s("2q"),10)||0)-(H($(J).s("3j"),10)||0)-4.N.S-4.D.6]}14 8(o.v.2z==2S){4.v=o.v}},12:m(d,1S){8(!1S)1S=4.C;h 1t=d=="1b"?1:-1;h o=4.j,13=4.Q==\'1b\'&&!(4.u[0]!=B&&$.9.2n(4.u[0],4.R[0]))?4.R:4.u,1E=(/(2o|1l)/i).1T(13[0].1M);E{6:(1S.6+4.g.F.6*1t+4.g.I.6*1t-($.1R.1W&&4.Q==\'19\'?0:(4.Q==\'19\'?-4.u.L():(1E?0:13.L()))*1t)),5:(1S.5+4.g.F.5*1t+4.g.I.5*1t-($.1R.1W&&4.Q==\'19\'?0:(4.Q==\'19\'?-4.u.M():1E?0:13.M())*1t))}},2m:m(c){h o=4.j,13=4.Q==\'1b\'&&!(4.u[0]!=B&&$.9.2n(4.u[0],4.R[0]))?4.R:4.u,1E=(/(2o|1l)/i).1T(13[0].1M);8(4.Q==\'F\'&&!(4.u[0]!=B&&4.u[0]!=4.R[0])){4.g.F=4.2l()}h O=c.O;h P=c.P;8(4.2t){8(4.v){8(c.O-4.g.w.5<4.v[0])O=4.v[0]+4.g.w.5;8(c.P-4.g.w.6<4.v[1])P=4.v[1]+4.g.w.6;8(c.O-4.g.w.5>4.v[2])O=4.v[2]+4.g.w.5;8(c.P-4.g.w.6>4.v[3])P=4.v[3]+4.g.w.6}8(o.16){h 6=4.2j+W.2G((P-4.2j)/o.16[1])*o.16[1];P=4.v?(!(6-4.g.w.6<4.v[1]||6-4.g.w.6>4.v[3])?6:(!(6-4.g.w.6<4.v[1])?6-o.16[1]:6+o.16[1])):6;h 5=4.2h+W.2G((O-4.2h)/o.16[0])*o.16[0];O=4.v?(!(5-4.g.w.5<4.v[0]||5-4.g.w.5>4.v[2])?5:(!(5-4.g.w.5<4.v[0])?5-o.16[0]:5+o.16[0])):5}}E{6:(P-4.g.w.6-4.g.F.6-4.g.I.6+($.1R.1W&&4.Q==\'19\'?0:(4.Q==\'19\'?-4.u.L():(1E?0:13.L())))),5:(O-4.g.w.5-4.g.F.5-4.g.I.5+($.1R.1W&&4.Q==\'19\'?0:(4.Q==\'19\'?-4.u.M():1E?0:13.M())))}},2a:m(){4.n.2L("9-q-2r");8(4.n[0]!=4.A[0]&&!4.1J)4.n.2B();4.n=4a;4.1J=z},11:m(27,c,9){9=9||4.1I();$.9.1g.1U(4,27,[c,9]);8(27=="1w")4.1k=4.12("1b");E $.2H.46.11.1U(4,27,c,9)},48:{},1I:m(c){E{n:4.n,C:4.C,49:4.1k,g:4.1k}}}));$.1C($.9.q,{4g:"1.7.2",4q:"1w",4r:{3c:K,1N:"I",T:z,4n:":4m,4i",2p:z,v:z,1x:"2s",2u:z,4k:0,4l:1,16:z,15:z,n:"2v",1K:z,1j:z,45:z,1f:z,2U:3O,3P:"3Q",13:K,1d:20,1c:20,Y:z,2A:"3R",2T:20,1y:z,X:z}});$.9.1g.1m("q","2p",{1h:m(c,9){h e=$(4).G("q"),o=e.j,21=$.1C({},9,{1H:e.A});e.23=[];$(o.2p).1i(m(){h 1e=$.G(4,\'1e\');8(1e&&!1e.j.1O){e.23.2I({k:1e,2N:1e.j.1f});1e.3H();1e.11("3J",c,21)}})},1u:m(c,9){h e=$(4).G("q"),21=$.1C({},9,{1H:e.A});$.1i(e.23,m(){8(4.k.1B){4.k.1B=0;e.1J=K;4.k.1J=z;8(4.2N)4.k.j.1f=K;4.k.2F(c);4.k.j.n=4.k.j.2D;8(e.j.n==\'2v\')4.k.1F.s({6:\'2s\',5:\'2s\'})}14{4.k.1J=z;4.k.11("3L",c,21)}})},1w:m(c,9){h e=$(4).G("q"),1P=4;h 3T=m(o){h 3d=4.g.w.6,3e=4.g.w.5;h 2Y=4.1k.6,3b=4.1k.5;h 3f=o.S,3a=o.U;h 3h=o.6,3g=o.5;E $.9.1B(2Y+3d,3b+3e,3h,3g,3f,3a)};$.1i(e.23,m(i){4.k.1k=e.1k;4.k.N=e.N;4.k.g.w=e.g.w;8(4.k.42(4.k.43)){8(!4.k.1B){4.k.1B=1;4.k.1F=$(1P).2c().1N(4.k.A).G("1e-1H",K);4.k.j.2D=4.k.j.n;4.k.j.n=m(){E 9.n[0]};c.2d=4.k.1F[0];4.k.33(c,K);4.k.34(c,K,K);4.k.g.w.6=e.g.w.6;4.k.g.w.5=e.g.w.5;4.k.g.I.5-=e.g.I.5-4.k.g.I.5;4.k.g.I.6-=e.g.I.6-4.k.g.I.6;e.11("3V",c);e.Z=4.k.A;e.1F=e.A;4.k.3W=e}8(4.k.1F)4.k.2g(c)}14{8(4.k.1B){4.k.1B=0;4.k.1J=K;4.k.j.1f=z;4.k.11(\'3X\',c,4.k.1I(4.k));4.k.2F(c,K);4.k.j.n=4.k.j.2D;4.k.1F.2B();8(4.k.37)4.k.37.2B();e.11("3Y",c);e.Z=z}}})}});$.9.1g.1m("q","1x",{1h:m(c,9){h t=$(\'1l\'),o=$(4).G(\'q\').j;8(t.s("1x"))o.2C=t.s("1x");t.s("1x",o.1x)},1u:m(c,9){h o=$(4).G(\'q\').j;8(o.2C)$(\'1l\').s("1x",o.2C)}});$.9.1g.1m("q","1K",{1h:m(c,9){h o=$(4).G(\'q\').j;$(o.1K===K?"41":o.1K).1i(m(){$(\'<2w 40="9-q-1K" 1D="3S: #3K;"></2w>\').s({U:4.29+"1Z",S:4.28+"1Z",C:"1b",1j:"0.3M",X:4p}).s($(4).g()).1N("1l")})},1u:m(c,9){$("2w.9-q-1K").1i(m(){4.22.4j(4)})}});$.9.1g.1m("q","1j",{1h:m(c,9){h t=$(9.n),o=$(4).G(\'q\').j;8(t.s("1j"))o.2x=t.s("1j");t.s(\'1j\',o.1j)},1u:m(c,9){h o=$(4).G(\'q\').j;8(o.2x)$(9.n).s(\'1j\',o.2x)}});$.9.1g.1m("q","13",{1h:m(c,9){h i=$(4).G("q");8(i.u[0]!=B&&i.u[0].1M!=\'2M\')i.1Q=i.u.g()},1w:m(c,9){h i=$(4).G("q"),o=i.j,17=z;8(i.u[0]!=B&&i.u[0].1M!=\'2M\'){8(!o.T||o.T!=\'x\'){8((i.1Q.6+i.u[0].28)-c.P<o.1d)i.u[0].L=17=i.u[0].L+o.1c;14 8(c.P-i.1Q.6<o.1d)i.u[0].L=17=i.u[0].L-o.1c}8(!o.T||o.T!=\'y\'){8((i.1Q.5+i.u[0].29)-c.O<o.1d)i.u[0].M=17=i.u[0].M+o.1c;14 8(c.O-i.1Q.5<o.1d)i.u[0].M=17=i.u[0].M-o.1c}}14{8(!o.T||o.T!=\'x\'){8(c.P-$(B).L()<o.1d)17=$(B).L($(B).L()-o.1c);14 8($(1G).S()-(c.P-$(B).L())<o.1d)17=$(B).L($(B).L()+o.1c)}8(!o.T||o.T!=\'y\'){8(c.O-$(B).M()<o.1d)17=$(B).M($(B).M()-o.1c);14 8($(1G).U()-(c.O-$(B).M())<o.1d)17=$(B).M($(B).M()+o.1c)}}8(17!==z&&$.9.18&&!o.2y)$.9.18.31(i,c)}});$.9.1g.1m("q","Y",{1h:m(c,9){h i=$(4).G("q"),o=i.j;i.V=[];$(o.Y.2z!=3i?(o.Y.3l||\':G(q)\'):o.Y).1i(m(){h $t=$(4);h $o=$t.g();8(4!=i.A[0])i.V.2I({1H:4,U:$t.2P(),S:$t.2W(),6:$o.6,5:$o.5})})},1w:m(c,9){h e=$(4).G("q"),o=e.j;h d=o.2T;h 1p=9.g.5,1A=1p+e.N.U,1n=9.g.6,1z=1n+e.N.S;3k(h i=e.V.25-1;i>=0;i--){h l=e.V[i].5,r=l+e.V[i].U,t=e.V[i].6,b=t+e.V[i].S;8(!((l-d<1p&&1p<r+d&&t-d<1n&&1n<b+d)||(l-d<1p&&1p<r+d&&t-d<1z&&1z<b+d)||(l-d<1A&&1A<r+d&&t-d<1n&&1n<b+d)||(l-d<1A&&1A<r+d&&t-d<1z&&1z<b+d))){8(e.V[i].26)(e.j.Y.2V&&e.j.Y.2V.1U(e.A,c,$.1C(e.1I(),{36:e.V[i].1H})));e.V[i].26=z;3y}8(o.2A!=\'3C\'){h 1v=W.1o(t-1z)<=d;h 1s=W.1o(b-1n)<=d;h 1q=W.1o(l-1A)<=d;h 1r=W.1o(r-1p)<=d;8(1v)9.C.6=e.12("F",{6:t-e.N.S,5:0}).6-e.D.6;8(1s)9.C.6=e.12("F",{6:b,5:0}).6-e.D.6;8(1q)9.C.5=e.12("F",{6:0,5:l-e.N.U}).5-e.D.5;8(1r)9.C.5=e.12("F",{6:0,5:r}).5-e.D.5}h 2E=(1v||1s||1q||1r);8(o.2A!=\'3n\'){h 1v=W.1o(t-1n)<=d;h 1s=W.1o(b-1z)<=d;h 1q=W.1o(l-1p)<=d;h 1r=W.1o(r-1A)<=d;8(1v)9.C.6=e.12("F",{6:t,5:0}).6-e.D.6;8(1s)9.C.6=e.12("F",{6:b-e.N.S,5:0}).6-e.D.6;8(1q)9.C.5=e.12("F",{6:0,5:l}).5-e.D.5;8(1r)9.C.5=e.12("F",{6:0,5:r-e.N.U}).5-e.D.5}8(!e.V[i].26&&(1v||1s||1q||1r||2E))(e.j.Y.Y&&e.j.Y.Y.1U(e.A,c,$.1C(e.1I(),{36:e.V[i].1H})));e.V[i].26=(1v||1s||1q||1r||2E)}}});$.9.1g.1m("q","1y",{1h:m(c,9){h o=$(4).G("q").j;h 24=$.4c($(o.1y.24)).4e(m(a,b){E(H($(a).s("X"),10)||o.1y.1X)-(H($(b).s("X"),10)||o.1y.1X)});$(24).1i(m(i){4.1D.X=o.1y.1X+i});4[0].1D.X=o.1y.1X+24.25}});$.9.1g.1m("q","X",{1h:m(c,9){h t=$(9.n),o=$(4).G("q").j;8(t.s("X"))o.2i=t.s("X");t.s(\'X\',o.X)},1u:m(c,9){h o=$(4).G("q").j;8(o.2i)$(9.n).s(\'X\',o.2i)}})})(4d);',62,276,'||||this|left|top||if|ui|||event||inst||offset|var||options|instance||function|helper|||draggable||css||scrollParent|containment|click|||false|element|document|position|margins|return|relative|data|parseInt|parent|ce|true|scrollTop|scrollLeft|helperProportions|pageX|pageY|cssPosition|offsetParent|height|axis|width|snapElements|Math|zIndex|snap|dropped||_trigger|_convertPositionTo|scroll|else|handle|grid|scrolled|ddmanager|fixed|obj|absolute|scrollSpeed|scrollSensitivity|sortable|revert|plugin|start|each|opacity|positionAbs|body|add|y1|abs|x1|ls|rs|bs|mod|stop|ts|drag|cursor|stack|y2|x2|isOver|extend|style|scrollIsRootNode|currentItem|window|item|_uiHash|cancelHelperRemoval|iframeFix|po|tagName|appendTo|disabled|self|overflowOffset|browser|pos|test|call|co|safari|min|undefined|px||uiSortable|parentNode|sortables|group|length|snapping|type|offsetHeight|offsetWidth|_clear|borderLeftWidth|clone|target|_cacheHelperProportions|addClass|_mouseDrag|originalPageX|_zIndex|originalPageY|over|_getRelativeOffset|_generatePosition|contains|html|connectToSortable|borderTopWidth|dragging|auto|originalPosition|cursorAt|original|div|_opacity|dropBehaviour|constructor|snapMode|remove|_cursor|_helper|first|_mouseStop|round|widget|push|_cacheMargins|max|removeClass|HTML|shouldRevert|_setContainment|outerWidth|_getParentOffset|scrollHeight|Array|snapTolerance|revertDuration|release|outerHeight|noPropagation|helperTop|_createHelper|isFunction|prepareOffsets|_adjustOffsetFromHelper|_mouseCapture|_mouseStart|_getHandle|snapItem|placeholder|bottom|right|itemWidth|helperLeft|addClasses|dyClick|dxClick|itemHeight|itemLeft|itemTop|String|paddingBottom|for|items|marginLeft|outer|toLowerCase|msie|valid|parents|find|andSelf|apply|invalid|marginTop|scrollWidth|continue|paddingRight|paddingTop|paddingLeft|inner|overflow|hidden|drop|_mouseDestroy|_refreshItems|_mouseInit|activate|fff|deactivate|001|destroy|500|scope|default|both|background|checkPos|mouse|toSortable|fromOutside|out|fromSortable|_init|class|iframe|_intersectsWith|containerCache|current|refreshPositions|prototype|animate|plugins|absolutePosition|null|is|makeArray|jQuery|sort|resizable|version|unbind|option|removeChild|delay|distance|input|cancel|removeData|1000|eventPrefix|defaults'.split('|'),0,{}))
diff --git a/template-common/lib/ui/packed/ui.droppable.packed.js b/template-common/lib/ui/packed/ui.droppable.packed.js
index 717a3f3e6..496e477f0 100644
--- a/template-common/lib/ui/packed/ui.droppable.packed.js
+++ b/template-common/lib/ui/packed/ui.droppable.packed.js
@@ -1,2 +1 @@
-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}('(8(A){A.1P("4.c",{1O:8(){3.5.Z("4-c");3.e=0;3.k=1;9 C=3.6,B=C.g;C=A.13(C,{g:C.g&&C.g.1N==1M?C.g:8(D){a A(D).1L(B)}});3.V={u:3.5[0].1a,t:3.5[0].19};A.4.d.s.1K(3)},1J:{},4:8(B){a{1e:(B.h||B.5),1f:B.1f,l:B.l,1I:B.n,6:3.6,5:3.5}},1H:8(){9 B=A.4.d.s;1c(9 C=0;C<B.10;C++){7(B[C]==3){B.1G(C,1)}}3.5.M("4-c 4-c-r").1F("c").1E(".c")},p:8(C){9 B=A.4.d.v;7(!B||(B.h||B.5)[0]==3.5[0]){a}7(3.6.g.b(3.5,(B.h||B.5))){A.4.m.b(3,"p",[C,3.4(B)]);3.5.R("1D",[C,3.4(B)],3.6.p)}},o:8(C){9 B=A.4.d.v;7(!B||(B.h||B.5)[0]==3.5[0]){a}7(3.6.g.b(3.5,(B.h||B.5))){A.4.m.b(3,"o",[C,3.4(B)]);3.5.R("1C",[C,3.4(B)],3.6.o)}},j:8(D,C){9 B=C||A.4.d.v;7(!B||(B.h||B.5)[0]==3.5[0]){a i}9 E=i;3.5.1B(".4-c").1A(".4-1e-1z").12(8(){9 F=A.16(3,"c");7(F.6.17&&A.4.q(B,A.13(F,{f:F.5.f()}),F.6.U)){E=1d;a i}});7(E){a i}7(3.6.g.b(3.5,(B.h||B.5))){A.4.m.b(3,"j",[D,3.4(B)]);3.5.R("j",[D,3.4(B)],3.6.j);a 1d}a i},O:8(C){9 B=A.4.d.v;A.4.m.b(3,"O",[C,3.4(B)]);7(B){3.5.R("1y",[C,3.4(B)],3.6.O)}},N:8(C){9 B=A.4.d.v;A.4.m.b(3,"N",[C,3.4(B)]);7(B){3.5.R("1x",[C,3.4(B)],3.6.N)}}});A.13(A.4.c,{1w:{r:i,U:"q"}});A.4.q=8(L,F,J){7(!F.f){a i}9 D=(L.n||L.l.x).y,C=D+L.z.u,I=(L.n||L.l.x).w,H=I+L.z.t;9 E=F.f.y,B=E+F.V.u,K=F.f.w,G=K+F.V.t;1v(J){W"1u":a(E<D&&C<B&&K<I&&H<G);Q;W"q":a(E<D+(L.z.u/2)&&C-(L.z.u/2)<B&&K<I+(L.z.t/2)&&H-(L.z.t/2)<G);Q;W"1t":a(E<((L.n||L.l.x).y+(L.Y||L.f.X).y)&&((L.n||L.l.x).y+(L.Y||L.f.X).y)<B&&K<((L.n||L.l.x).w+(L.Y||L.f.X).w)&&((L.n||L.l.x).w+(L.Y||L.f.X).w)<G);Q;W"1s":a((I>=K&&I<=G)||(H>=K&&H<=G)||(I<K&&H>G))&&((D>=E&&D<=B)||(C>=E&&C<=B)||(D<E&&C>B));Q;1r:a i;Q}};A.4.d={v:11,s:[],18:8(D,F){9 B=A.4.d.s;9 E=F?F.1q:11;1c(9 C=0;C<B.10;C++){7(B[C].6.r||(D&&!B[C].6.g.b(B[C].5,(D.h||D.5)))){1b}B[C].P=B[C].5.1p("1o")!="1n";7(!B[C].P){1b}B[C].f=B[C].5.f();B[C].V={u:B[C].5[0].1a,t:B[C].5[0].19};7(E=="1m"||E=="1l"){B[C].O.b(B[C],F)}}},j:8(B,C){9 D=i;A.12(A.4.d.s,8(){7(!3.6){a}7(!3.6.r&&3.P&&A.4.q(B,3,3.6.U)){D=3.j.b(3,C)}7(!3.6.r&&3.P&&3.6.g.b(3.5,(B.h||B.5))){3.k=1;3.e=0;3.N.b(3,C)}});a D},1k:8(B,C){7(B.6.1j){A.4.d.18(B,C)}A.12(A.4.d.s,8(){7(3.6.r||3.15||!3.P){a}9 E=A.4.q(B,3,3.6.U);9 G=!E&&3.e==1?"k":(E&&3.e==0?"e":11);7(!G){a}9 F;7(3.6.17){9 D=3.5.1i(".4-c:1h(0)");7(D.10){F=A.16(D[0],"c");F.15=(G=="e"?1:0)}}7(F&&G=="e"){F["e"]=0;F["k"]=1;F.o.b(F,C)}3[G]=1;3[G=="k"?"e":"k"]=0;3[G=="e"?"p":"o"].b(3,C);7(F&&G=="k"){F["k"]=0;F["e"]=1;F.p.b(F,C)}})}};A.4.m.14("c","T",{O:8(C,B){A(3).Z(B.6.T)},N:8(C,B){A(3).M(B.6.T)},j:8(C,B){A(3).M(B.6.T)}});A.4.m.14("c","S",{p:8(C,B){A(3).Z(B.6.S)},o:8(C,B){A(3).M(B.6.S)},j:8(C,B){A(3).M(B.6.S)}})})(1g)',62,114,'|||this|ui|element|options|if|function|var|return|call|droppable|ddmanager|isover|offset|accept|currentItem|false|drop|isout|position|plugin|positionAbs|out|over|intersect|disabled|droppables|height|width|current|top|absolute|left|helperProportions|||||||||||||removeClass|deactivate|activate|visible|break|triggerHandler|hoverClass|activeClass|tolerance|proportions|case|click|clickOffset|addClass|length|null|each|extend|add|greedyChild|data|greedy|prepareOffsets|offsetHeight|offsetWidth|continue|for|true|draggable|helper|jQuery|eq|parents|refreshPositions|drag|sortactivate|dragstart|none|display|css|type|default|touch|pointer|fit|switch|defaults|dropdeactivate|dropactivate|dragging|not|find|dropout|dropover|unbind|removeData|splice|destroy|absolutePosition|plugins|push|is|Function|constructor|init|widget'.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}('(h($){$.1v("8.g",{1T:h(){a o=3.5,k=o.k;3.u=0;3.y=1;3.5.k=3.5.k&&$.1n(3.5.k)?3.5.k:h(d){f d.1m(k)};3.E={F:3.6[0].1A,z:3.6[0].1z};$.8.n.A[3.5.x]=$.8.n.A[3.5.x]||[];$.8.n.A[3.5.x].1S(3);(3.5.1t&&3.6.1c("8-g"))},1R:h(){a H=$.8.n.A[3.5.x];18(a i=0;i<H.Z;i++)9(H[i]==3)H.1U(i,1);3.6.P("8-g 8-g-V").1V("g").1Y(".g")},1w:h(1k,U){9(1k==\'k\'){3.5.k=U&&$.1n(U)?U:h(d){f d.1m(U)}}1X{$.1v.1Q.1w.1J(3,1I)}},1B:h(e){a 4=$.8.n.N;9(3.5.D)3.6.1c(3.5.D);(4&&3.R(\'1H\',e,3.8(4)))},1C:h(e){a 4=$.8.n.N;9(3.5.D)3.6.P(3.5.D);(4&&3.R(\'1K\',e,3.8(4)))},1f:h(e){a 4=$.8.n.N;9(!4||(4.v||4.6)[0]==3.6[0])f;9(3.5.k.q(3.6[0],(4.v||4.6))){9(3.5.B)3.6.1c(3.5.B);3.R(\'1L\',e,3.8(4))}},15:h(e){a 4=$.8.n.N;9(!4||(4.v||4.6)[0]==3.6[0])f;9(3.5.k.q(3.6[0],(4.v||4.6))){9(3.5.B)3.6.P(3.5.B);3.R(\'1O\',e,3.8(4))}},1G:h(e,1s){a 4=1s||$.8.n.N;9(!4||(4.v||4.6)[0]==3.6[0])f s;a 1e=s;3.6.1y(":W(g)").20(".8-4-1M").1b(h(){a S=$.W(3,\'g\');9(S.5.1h&&$.8.J(4,$.1q(S,{w:S.6.w()}),S.5.Y)){1e=1u;f s}});9(1e)f s;9(3.5.k.q(3.6[0],(4.v||4.6))){9(3.5.D)3.6.P(3.5.D);9(3.5.B)3.6.P(3.5.B);3.R(\'H\',e,3.8(4));f 3.6}f s},8:h(c){f{4:(c.v||c.6),1r:c.1r,M:c.M,2c:c.K,w:c.K}}});$.1q($.8.g,{2e:"1.7.2",29:\'H\',23:{k:\'*\',D:s,1t:1u,1h:s,B:s,x:\'16\',Y:\'J\'}});$.8.J=h(4,g,1p){9(!g.w)f s;a G=(4.K||4.M.10).X,O=G+4.L.F,C=(4.K||4.M.10).11,I=C+4.L.z;a l=g.w.X,r=l+g.E.F,t=g.w.11,b=t+g.E.z;24(1p){12\'28\':f(l<G&&O<r&&t<C&&I<b);Q;12\'J\':f(l<G+(4.L.F/2) &&O-(4.L.F/2)<r &&t<C+(4.L.z/2) &&I-(4.L.z/2)<b); Q;12\'26\':a 1o=((4.K||4.M.10).X+(4.1x||4.w.1j).X),1l=((4.K||4.M.10).11+(4.1x||4.w.1j).11),1d=$.8.1d(1l,1o,t,l,g.E.z,g.E.F);f 1d;Q;12\'2d\':f((C>=t&&C<=b)||(I>=t&&I<=b)||(C<t&&I>b))&&((G>=l&&G<=r)||(O>=l&&O<=r)||(G<l&&O>r));Q;16:f s;Q}};$.8.n={N:1a,A:{\'16\':[]},1E:h(t,e){a m=$.8.n.A[t.5.x];a 1g=e?e.1g:1a;a 19=(t.v||t.6).1y(":W(g)").2a();1F:18(a i=0;i<m.Z;i++){9(m[i].5.V||(t&&!m[i].5.k.q(m[i].6[0],(t.v||t.6))))17;18(a j=0;j<19.Z;j++){9(19[j]==m[i].6[0]){m[i].E.z=0;17 1F}};m[i].T=m[i].6.27("25")!="21";9(!m[i].T)17;m[i].w=m[i].6.w();m[i].E={F:m[i].6[0].1A,z:m[i].6[0].1z};9(1g=="22")m[i].1B.q(m[i],e)}},H:h(4,e){a 13=s;$.1b($.8.n.A[4.5.x],h(){9(!3.5)f;9(!3.5.V&&3.T&&$.8.J(4,3,3.5.Y))13=3.1G.q(3,e);9(!3.5.V&&3.T&&3.5.k.q(3.6[0],(4.v||4.6))){3.y=1;3.u=0;3.1C.q(3,e)}});f 13},1Z:h(4,e){9(4.5.1N)$.8.n.1E(4,e);$.1b($.8.n.A[4.5.x],h(){9(3.5.V||3.1D||!3.T)f;a 1i=$.8.J(4,3,3.5.Y);a c=!1i&&3.u==1?\'y\':(1i&&3.u==0?\'u\':1a);9(!c)f;a p;9(3.5.1h){a 14=3.6.1P(\':W(g):1W(0)\');9(14.Z){p=$.W(14[0],\'g\');p.1D=(c==\'u\'?1:0)}}9(p&&c==\'u\'){p[\'u\']=0;p[\'y\']=1;p.15.q(p,e)}3[c]=1;3[c==\'y\'?\'u\':\'y\']=0;3[c=="u"?"1f":"15"].q(3,e);9(p&&c==\'y\'){p[\'y\']=0;p[\'u\']=1;p.1f.q(p,e)}})}}})(2b);',62,139,'|||this|draggable|options|element||ui|if|var||||event|return|droppable|function|||accept|||ddmanager||parentInstance|call||false||isover|currentItem|offset|scope|isout|height|droppables|hoverClass|y1|activeClass|proportions|width|x1|drop|y2|intersect|positionAbs|helperProportions|position|current|x2|removeClass|break|_trigger|inst|visible|value|disabled|data|left|tolerance|length|absolute|top|case|dropped|parent|_out|default|continue|for|list|null|each|addClass|isOver|childrenIntersection|_over|type|greedy|intersects|click|key|draggableTop|is|isFunction|draggableLeft|toleranceMode|extend|helper|custom|addClasses|true|widget|_setData|clickOffset|find|offsetHeight|offsetWidth|_activate|_deactivate|greedyChild|prepareOffsets|droppablesLoop|_drop|activate|arguments|apply|deactivate|over|dragging|refreshPositions|out|parents|prototype|destroy|push|_init|splice|removeData|eq|else|unbind|drag|not|none|mousedown|defaults|switch|display|pointer|css|fit|eventPrefix|andSelf|jQuery|absolutePosition|touch|version'.split('|'),0,{}))
diff --git a/template-common/lib/ui/packed/ui.resizable.packed.js b/template-common/lib/ui/packed/ui.resizable.packed.js
index ef0ea0c12..f54998ba4 100644
--- a/template-common/lib/ui/packed/ui.resizable.packed.js
+++ b/template-common/lib/ui/packed/ui.resizable.packed.js
@@ -1,2 +1 @@
-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}('(h(A){A.4s("b.c",A.19({},A.b.4r,{4q:h(){f M=4,N=4.m;f Q=4.k.d("g");4.2v=4.k;4.k.1j("b-c").d({g:/20/.q(Q)?"1i":Q});A.19(N,{1N:!!(N.1a),l:N.l||N.12||N.1o?N.l||"4p":1g,1m:N.1m===1v?"b-c-1V-13":N.1m});f H="2E 3m #4o";N.3j={"b-c":{1W:"2d"},"b-c-13":{g:"1D",3o:"#3n",4n:"0.2E"},"b-c-n":{t:"n-o",8:"16",5:"p",1s:"p",2F:H},"b-c-s":{t:"s-o",8:"16",5:"p",1s:"p",2I:H},"b-c-e":{t:"e-o",6:"16",9:"p",1t:"p",2H:H},"b-c-w":{t:"w-o",6:"16",9:"p",1t:"p",2G:H},"b-c-y":{t:"y-o",6:"16",8:"16",2H:H,2I:H},"b-c-x":{t:"x-o",6:"16",8:"16",2I:H,2G:H},"b-c-Z":{t:"Z-o",6:"16",8:"16",2H:H,2F:H},"b-c-z":{t:"z-o",6:"16",8:"16",2G:H,2F:H}};N.2z={"b-c-13":{3o:"#3n",4m:"2E 3m #4l",8:"3l",6:"3l"},"b-c-n":{t:"n-o",9:"p",5:"45%"},"b-c-s":{t:"s-o",1t:"p",5:"45%"},"b-c-e":{t:"e-o",1s:"p",9:"45%"},"b-c-w":{t:"w-o",5:"p",9:"45%"},"b-c-y":{t:"y-o",1s:"p",1t:"p"},"b-c-x":{t:"x-o",5:"p",1t:"p"},"b-c-z":{t:"z-o",5:"p",9:"p"},"b-c-Z":{t:"Z-o",1s:"p",9:"p"}};N.2y=4.k[0].2f;a(N.2y.2x(/4k|1Y|2j|3f|3e|4j/i)){f B=4.k;a(/1i/.q(B.d("g"))&&A.1f.35){B.d({g:"1i",9:"1U",5:"1U"})}B.4i(A(\'<1E 3i="b-2t" 2o="2n: 2m;"></1E>\').d({g:B.d("g"),6:B.1x(),8:B.1w(),9:B.d("9"),5:B.d("5")}));f J=4.k;4.k=4.k.1P();4.k.11("c",4);4.k.d({2D:J.d("2D"),2C:J.d("2C"),2B:J.d("2B"),2A:J.d("2A")});J.d({2D:0,2C:0,2B:0,2A:0});a(A.1f.4h&&N.2V){J.d("o","3k")}N.1h=J.d({g:"20",4g:1,1W:"2d"});4.k.d({2c:J.d("2c")});4.1T()}a(!N.u){N.u=!A(".b-c-13",4.k).1K?"e,s,y":{n:".b-c-n",e:".b-c-e",s:".b-c-s",w:".b-c-w",y:".b-c-y",x:".b-c-x",Z:".b-c-Z",z:".b-c-z"}}a(N.u.3h==3g){N.1C=N.1C||4f;a(N.u=="4e"){N.u="n,e,s,w,y,x,Z,z"}f O=N.u.4d(",");N.u={};f G={13:"g: 1D; 1W: 3k; 2n:2m;",n:"9: 1r; 6:2a%;",e:"1s: 1r; 8:2a%;",s:"1t: 1r; 6:2a%;",w:"5: 1r; 8:2a%;",y:"1t: 1r; 1s: p;",x:"1t: 1r; 5: p;",Z:"9: 1r; 1s: p;",z:"9: 1r; 5: p;"};2s(f R=0;R<O.1K;R++){f S=A.4c(O[R]),L=N.3j,F="b-c-"+S,C=!A.b.d(F)&&!N.1m,P=A.b.d("b-c-1V-13"),T=A.19(L[F],L["b-c-13"]),D=A.19(N.2z[F],!P?N.2z["b-c-13"]:{});f K=/x|y|Z|z/.q(S)?{1C:++N.1C}:{};f I=(C?G[S]:""),E=A([\'<1E 3i="b-c-13 \',F,\'" 2o="\',I,G.13,\'"></1E>\'].2u("")).d(K);N.u[S]=".b-c-"+S;4.k.38(E.d(C?T:{}).d(N.1m?D:{}).1j(N.1m?"b-c-1V-13":"").1j(N.1m))}a(N.1m){4.k.1j("b-c-1V").d(!A.b.d("b-c-1V")?{}:{})}}4.3d=h(Y){Y=Y||4.k;2s(f V 36 N.u){a(N.u[V].3h==3g){N.u[V]=A(N.u[V],4.k).3b()}a(N.2i){N.u[V].d({2M:0})}a(4.k.2r(".b-2t")&&N.2y.2x(/1Y|2j|3f|3e/i)){f W=A(N.u[V],4.k),X=0;X=/x|Z|z|y|n|s/.q(V)?W.1w():W.1x();f U=["4b",/Z|z|n/.q(V)?"4a":/y|x|s/.q(V)?"49":/^e$/.q(V)?"48":"47"].2u("");a(!N.2i){Y.d(U,X)}4.1T()}a(!A(N.u[V]).1K){46}}};4.3d(4.k);N.1G=A(".b-c-13",M.k);a(N.1Q){N.1G.1y(h(U,V){A.b.1Q(V)})}N.1G.44(h(){a(!N.29){a(4.3c){f U=4.3c.2x(/b-c-(y|x|Z|z|n|e|s|w)/i)}M.1u=N.1u=U&&U[1]?U[1]:"y"}});a(N.2U){N.1G.3a();A(M.k).1j("b-c-2w").43(h(){A(4).39("b-c-2w");N.1G.3b()},h(){a(!N.29){A(4).1j("b-c-2w");N.1G.3a()}})}4.42()},41:{},b:h(){r{2v:4.2v,k:4.k,l:4.l,g:4.g,j:4.j,m:4.m,15:4.15,14:4.14}},1M:h(C,B){A.b.1z.40(4,C,[B,4.b()]);a(C!="o"){4.k.2Z(["o",C].2u(""),[B,4.b()],4.m[C])}},3Z:h(){f D=4.k,C=D.3Y(".b-c").1c(0);4.3X();f B=h(E){A(E).39("b-c b-c-37").2J("c").3W(".c").3V(".b-c-13").2p()};B(D);a(D.2r(".b-2t")&&C){D.1P().38(A(C).d({g:D.d("g"),6:D.1x(),8:D.1w(),9:D.d("9"),5:D.d("5")})).3U().2p();B(C)}},3T:h(K){a(4.m.37){r 1b}f J=1b;2s(f H 36 4.m.u){a(A(4.m.u[H])[0]==K.3S){J=1v}}a(!J){r 1b}f C=4.m,B=4.k.g(),D=4.k,I=h(O){r v(O,10)||0},G=A.1f.26&&A.1f.2l<7;C.29=1v;C.2q={9:A(1l).33(),5:A(1l).34()};a(D.2r(".b-3R")||(/1D/).q(D.d("g"))){f M=A.1f.26&&!C.1B&&(/1D/).q(D.d("g"))&&!(/1i/).q(D.1P().d("g"));f L=M?C.2q.9:0,F=M?C.2q.5:0;D.d({g:"1D",9:(B.9+L),5:(B.5+F)})}a(A.1f.35&&/1i/.q(D.d("g"))){D.d({g:"1i",9:"1U",5:"1U"})}4.2W();f N=I(4.l.d("5")),E=I(4.l.d("9"));a(C.1B){N+=A(C.1B).34()||0;E+=A(C.1B).33()||0}4.1k=4.l.1k();4.g={5:N,9:E};4.j=C.l||G?{6:D.1x(),8:D.1w()}:{6:D.6(),8:D.8()};4.15=C.l||G?{6:D.1x(),8:D.1w()}:{6:D.6(),8:D.8()};4.14={5:N,9:E};4.1p={6:D.1x()-D.6(),8:D.1w()-D.8()};4.32={5:K.31,9:K.30};C.1a=(1J C.1a=="2Q")?C.1a:((4.15.8/4.15.6)||1);a(C.2h){A("23").d("t",4.1u+"-o")}4.1M("1H",K);r 1v},3Q:h(I){f D=4.l,C=4.m,J={},M=4,F=4.32,K=4.1u;f N=(I.31-F.5)||0,L=(I.30-F.9)||0;f E=4.1e[K];a(!E){r 1b}f H=E.1n(4,[I,N,L]),G=A.1f.26&&A.1f.2l<7,B=4.1p;a(C.1N||I.1Z){H=4.2Y(H,I)}H=4.2X(H,I);4.1M("o",I);D.d({9:4.g.9+"1q",5:4.g.5+"1q",6:4.j.6+"1q",8:4.j.8+"1q"});a(!C.l&&C.1h){4.1T()}4.2e(H);4.k.2Z("o",[I,4.b()],4.m["o"]);r 1b},3P:h(I){4.m.29=1b;f E=4.m,H=h(M){r v(M,10)||0},K=4;a(E.l){f D=E.1h,B=D&&(/1Y/i).q(D.1c(0).2f),C=B&&A.b.1X(D.1c(0),"5")?0:K.1p.8,G=B?0:K.1p.6;f L={6:(K.j.6-G),8:(K.j.8-C)},F=(v(K.k.d("5"),10)+(K.g.5-K.14.5))||1g,J=(v(K.k.d("9"),10)+(K.g.9-K.14.9))||1g;a(!E.1o){4.k.d(A.19(L,{9:J,5:F}))}a(E.l&&!E.1o){4.1T()}}a(E.2h){A("23").d("t","1U")}4.1M("1I",I);a(E.l){4.l.2p()}r 1b},2e:h(B){f C=4.m;4.1k=4.l.1k();a(B.5){4.g.5=B.5}a(B.9){4.g.9=B.9}a(B.8){4.j.8=B.8}a(B.6){4.j.6=B.6}},2Y:h(D,E){f F=4.m,G=4.g,C=4.j,B=4.1u;a(D.8){D.6=(C.8/F.1a)}18{a(D.6){D.8=(C.6*F.1a)}}a(B=="x"){D.5=G.5+(C.6-D.6);D.9=1g}a(B=="z"){D.9=G.9+(C.8-D.8);D.5=G.5+(C.6-D.6)}r D},2X:h(H,I){f F=4.l,E=4.m,N=E.1N||I.1Z,M=4.1u,P=H.6&&E.28&&E.28<H.6,J=H.8&&E.27&&E.27<H.8,D=H.6&&E.1S&&E.1S>H.6,O=H.8&&E.1R&&E.1R>H.8;a(D){H.6=E.1S}a(O){H.8=E.1R}a(P){H.6=E.28}a(J){H.8=E.27}f C=4.14.5+4.15.6,L=4.g.9+4.j.8;f G=/x|z|w/.q(M),B=/z|Z|n/.q(M);a(D&&G){H.5=C-E.1S}a(P&&G){H.5=C-E.28}a(O&&B){H.9=L-E.1R}a(J&&B){H.9=L-E.27}f K=!H.6&&!H.8;a(K&&!H.5&&H.9){H.9=1g}18{a(K&&!H.9&&H.5){H.5=1g}}r H},1T:h(){f F=4.m;a(!F.1h){r}f D=F.1h,C=4.l||4.k;a(!F.1F){f B=[D.d("3O"),D.d("3N"),D.d("3M"),D.d("3L")],E=[D.d("3K"),D.d("3J"),D.d("3I"),D.d("3H")];F.1F=A.3G(B,h(G,I){f H=v(G,10)||0,J=v(E[I],10)||0;r H+J})}D.d({8:(C.8()-F.1F[0]-F.1F[2])+"1q",6:(C.6()-F.1F[1]-F.1F[3])+"1q"})},2W:h(){f C=4.k,F=4.m;4.2k=C.1k();a(F.l){4.l=4.l||A(\'<1E 2o="2n:2m;"></1E>\');f B=A.1f.26&&A.1f.2l<7,D=(B?1:0),E=(B?2:-1);4.l.1j(F.l).d({6:C.1x()+E,8:C.1w()+E,g:"1D",5:4.2k.5-D+"1q",9:4.2k.9-D+"1q",1C:++F.1C});4.l.2L("23");a(F.1Q){A.b.1Q(4.l.1c(0))}}18{4.l=C}},1e:{e:h(D,C,B){r{6:4.15.6+C}},w:h(F,C,B){f G=4.m,D=4.15,E=4.14;r{5:E.5+C,6:D.6-C}},n:h(F,C,B){f G=4.m,D=4.15,E=4.14;r{9:E.9+B,8:D.8-B}},s:h(D,C,B){r{8:4.15.8+B}},y:h(D,C,B){r A.19(4.1e.s.1n(4,24),4.1e.e.1n(4,[D,C,B]))},x:h(D,C,B){r A.19(4.1e.s.1n(4,24),4.1e.w.1n(4,[D,C,B]))},Z:h(D,C,B){r A.19(4.1e.n.1n(4,24),4.1e.e.1n(4,[D,C,B]))},z:h(D,C,B){r A.19(4.1e.n.1n(4,24),4.1e.w.1n(4,[D,C,B]))}}}));A.19(A.b.c,{3F:{3E:":2j",3D:1,3C:0,2V:1v,2i:1b,1S:10,1R:10,1a:1b,1Q:1v,2h:1v,2U:1b,1m:1b}});A.b.1z.1L("c","1B",{1H:h(I,K){f E=K.m,M=A(4).11("c"),G=M.k;f C=E.1B,F=(C 3B A)?C.1c(0):(/1P/.q(C))?G.1P().1c(0):C;a(!F){r}M.2g=A(F);a(/1l/.q(C)||C==1l){M.1O={5:0,9:0};M.21={5:0,9:0};M.1A={k:A(1l),5:0,9:0,6:A(1l).6(),8:A(1l).8()||1l.23.3A.2T}}18{M.1O=A(F).1k();M.21=A(F).g();M.22={8:A(F).2R(),6:A(F).2S()};f J=M.1O,B=M.22.8,H=M.22.6,D=(A.b.1X(F,"5")?F.3z:H),L=(A.b.1X(F)?F.2T:B);M.1A={k:F,5:J.5,9:J.9,6:D,8:L}}},o:h(H,K){f E=K.m,N=A(4).11("c"),C=N.22,J=N.1O,G=N.j,I=N.g,L=E.1N||H.1Z,B={9:0,5:0},D=N.2g;a(D[0]!=1l&&/20/.q(D.d("g"))){B=N.21}a(I.5<(E.l?J.5:B.5)){N.j.6=N.j.6+(E.l?(N.g.5-J.5):(N.g.5-B.5));a(L){N.j.8=N.j.6*E.1a}N.g.5=E.l?J.5:B.5}a(I.9<(E.l?J.9:0)){N.j.8=N.j.8+(E.l?(N.g.9-J.9):N.g.9);a(L){N.j.6=N.j.8/E.1a}N.g.9=E.l?J.9:0}f F=(E.l?N.1k.5-J.5:(N.g.5-B.5))+N.1p.6,M=(E.l?N.1k.9-J.9:N.g.9)+N.1p.8;a(F+N.j.6>=N.1A.6){N.j.6=N.1A.6-F;a(L){N.j.8=N.j.6*E.1a}}a(M+N.j.8>=N.1A.8){N.j.8=N.1A.8-M;a(L){N.j.6=N.j.8/E.1a}}},1I:h(G,J){f C=J.m,L=A(4).11("c"),H=L.g,I=L.1O,B=L.21,D=L.2g;f E=A(L.l),M=E.1k(),K=E.2S(),F=E.2R();a(C.l&&!C.1o&&/1i/.q(D.d("g"))){A(4).d({5:(M.5-I.5),9:(M.9-I.9),6:K,8:F})}a(C.l&&!C.1o&&/20/.q(D.d("g"))){A(4).d({5:B.5+(M.5-I.5),9:B.9+(M.9-I.9),6:K,8:F})}}});A.b.1z.1L("c","1d",{o:h(H,J){f D=J.m,L=A(4).11("c"),G=L.j,E=L.15,F=L.14,K=L.1u,I=D.1N||H.1Z;D.1d=1J D.1d=="2Q"?[D.1d,D.1d]:D.1d;f C=2P.2O((G.6-E.6)/(D.1d[0]||1))*(D.1d[0]||1),B=2P.2O((G.8-E.8)/(D.1d[1]||1))*(D.1d[1]||1);a(/^(y|s|e)$/.q(K)){L.j.6=E.6+C;L.j.8=E.8+B}18{a(/^(Z)$/.q(K)){L.j.6=E.6+C;L.j.8=E.8+B;L.g.9=F.9-B}18{a(/^(x)$/.q(K)){L.j.6=E.6+C;L.j.8=E.8+B;L.g.5=F.5-C}18{L.j.6=E.6+C;L.j.8=E.8+B;L.g.9=F.9-B;L.g.5=F.5-C}}}}});A.b.1z.1L("c","1o",{1I:h(I,K){f F=K.m,L=A(4).11("c");f E=F.1h,B=E&&(/1Y/i).q(E.1c(0).2f),C=B&&A.b.1X(E.1c(0),"5")?0:L.1p.8,H=B?0:L.1p.6;f D={6:(L.j.6-H),8:(L.j.8-C)},G=(v(L.k.d("5"),10)+(L.g.5-L.14.5))||1g,J=(v(L.k.d("9"),10)+(L.g.9-L.14.9))||1g;L.k.1o(A.19(D,J&&G?{9:J,5:G}:{}),{3y:F.3x||"3w",3v:F.3u||"3t",3s:h(){f M={6:v(L.k.d("6"),10),8:v(L.k.d("8"),10),9:v(L.k.d("9"),10),5:v(L.k.d("5"),10)};a(E){E.d({6:M.6,8:M.8})}L.2e(M);L.1M("1o",I)}})}});A.b.1z.1L("c","12",{1H:h(E,D){f F=D.m,B=A(4).11("c"),G=F.1h,C=B.j;a(!G){B.12=B.k.2N()}18{B.12=G.2N()}B.12.d({2M:0.25,1W:"2d",g:"1i",8:C.8,6:C.6,2c:0,5:0,9:0}).1j("b-c-12").1j(1J F.12=="3r"?F.12:"");B.12.2L(B.l)},o:h(D,C){f E=C.m,B=A(4).11("c"),F=E.1h;a(B.12){B.12.d({g:"1i",8:B.j.8,6:B.j.6})}},1I:h(D,C){f E=C.m,B=A(4).11("c"),F=E.1h;a(B.12&&B.l){B.l.1c(0).3q(B.12.1c(0))}}});A.b.1z.1L("c","17",{1H:h(E,C){f F=C.m,B=A(4).11("c"),D=h(G){A(G).1y(h(){A(4).11("c-2b",{6:v(A(4).6(),10),8:v(A(4).8(),10),5:v(A(4).d("5"),10),9:v(A(4).d("9"),10)})})};a(1J(F.17)=="2K"){a(F.17.1K){F.17=F.17[0];D(F.17)}18{A.1y(F.17,h(G,H){D(G)})}}18{D(F.17)}},o:h(F,E){f G=E.m,C=A(4).11("c"),D=C.15,I=C.14;f H={8:(C.j.8-D.8)||0,6:(C.j.6-D.6)||0,9:(C.g.9-I.9)||0,5:(C.g.5-I.5)||0},B=h(J,K){A(J).1y(h(){f N=A(4).11("c-2b"),M={},L=K&&K.1K?K:["6","8","9","5"];A.1y(L||["6","8","9","5"],h(O,Q){f P=(N[Q]||0)+(H[Q]||0);a(P&&P>=0){M[Q]=P||1g}});A(4).d(M)})};a(1J(G.17)=="2K"){A.1y(G.17,h(J,K){B(J,K)})}18{B(G.17)}},1I:h(C,B){A(4).2J("c-2b-1H")}})})(3p)',62,277,'||||this|left|width||height|top|if|ui|resizable|css||var|position|function||size|element|helper|options||resize|0px|test|return||cursor|handles|parseInt||sw|se|nw||||||||||||||||||||||||||ne||data|ghost|handle|originalPosition|originalSize|4px|alsoResize|else|extend|aspectRatio|false|get|grid|_change|browser|null|proportionallyResize|relative|addClass|offset|document|knobHandles|apply|animate|sizeDiff|px|0pt|right|bottom|axis|true|outerHeight|outerWidth|each|plugin|parentData|containment|zIndex|absolute|div|borderDif|_handles|start|stop|typeof|length|add|propagate|_aspectRatio|containerOffset|parent|disableSelection|minHeight|minWidth|_proportionallyResize|auto|knob|display|hasScroll|textarea|shiftKey|static|containerPosition|containerSize|body|arguments||msie|maxHeight|maxWidth|resizing|100|alsoresize|margin|block|_updateCache|nodeName|containerElement|preserveCursor|transparent|input|elementOffset|version|hidden|overflow|style|remove|documentScroll|is|for|wrapper|join|originalElement|autohide|match|_nodeName|knobTheme|marginBottom|marginRight|marginTop|marginLeft|1px|borderTop|borderLeft|borderRight|borderBottom|removeData|object|appendTo|opacity|clone|round|Math|number|innerHeight|innerWidth|scrollHeight|autoHide|preventDefault|_renderProxy|_respectSize|_updateRatio|triggerHandler|pageY|pageX|originalMousePosition|scrollTop|scrollLeft|opera|in|disabled|append|removeClass|hide|show|className|_renderAxis|button|select|String|constructor|class|defaultTheme|none|8px|solid|F2F2F2|background|jQuery|removeChild|string|step|swing|animateEasing|easing|slow|animateDuration|duration|scrollWidth|parentNode|instanceof|delay|distance|cancel|defaults|map|paddingLeft|paddingBottom|paddingRight|paddingTop|borderLeftWidth|borderBottomWidth|borderRightWidth|borderTopWidth|mouseStop|mouseDrag|draggable|target|mouseStart|end|find|unbind|mouseDestroy|children|destroy|call|plugins|mouseInit|hover|mouseover||continue|Left|Right|Bottom|Top|padding|trim|split|all|1000|zoom|safari|wrap|img|canvas|808080|border|fontSize|DEDEDE|proxy|init|mouse|widget'.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}('(t($){$.3W("m.r",$.1e({},$.m.4M,{4T:t(){k 5=4,o=4.B;4.l.1p("m-r");$.1e(4,{1S:!!(o.S),S:o.S,D:4.l,1o:[],E:o.z||o.Q||o.1l?o.z||\'m-r-z\':12});f(4.l[0].2r.2M(/4k|2q|2C|3D|3B|4h/i)){f(/15/.A(4.l.j(\'q\'))&&$.1c.2e)4.l.j({q:\'15\',d:\'1n\',6:\'1n\'});4.l.4c($(\'<1E 3q="m-1k" 1r="34: 2c;"></1E>\').j({q:4.l.j(\'q\'),8:4.l.1j(),9:4.l.1m(),d:4.l.j(\'d\'),6:4.l.j(\'6\')}));4.l=4.l.21().g("r",4.l.g(\'r\'));4.2E=1U;4.l.j({2s:4.D.j("2s"),2Z:4.D.j("2Z"),2y:4.D.j("2y"),2B:4.D.j("2B")});4.D.j({2s:0,2Z:0,2y:0,2B:0});4.3K=4.D.j(\'T\');4.D.j(\'T\',\'4q\');4.1o.4w(4.D.j({q:\'30\',4u:1,3y:\'3x\'}));4.D.j({2W:4.D.j(\'2W\')});4.1Q()}4.H=o.H||(!$(\'.m-r-U\',4.l).X?"e,s,M":{n:\'.m-r-n\',e:\'.m-r-e\',s:\'.m-r-s\',w:\'.m-r-w\',M:\'.m-r-M\',11:\'.m-r-11\',1b:\'.m-r-1b\',Z:\'.m-r-Z\'});f(4.H.3w==3z){f(4.H==\'4m\')4.H=\'n,e,s,w,M,11,1b,Z\';k n=4.H.4S(",");4.H={};2l(k i=0;i<n.X;i++){k U=$.4W(n[i]),32=\'m-r-\'+U;k F=$(\'<1E 3q="m-r-U \'+32+\'"></1E>\');f(/11|M|1b|Z/.A(U))F.j({1I:++o.1I});f(\'M\'==U){F.1p(\'m-3Q m-3Q-3U-3V-M\')};4.H[U]=\'.m-r-\'+U;4.l.3R(F)}}4.3m=t(20){20=20||4.l;2l(k i 3H 4.H){f(4.H[i].3w==3z)4.H[i]=$(4.H[i],4.l).3F();f(4.2E&&4.D[0].2r.2M(/2q|2C|3D|3B/i)){k F=$(4.H[i],4.l),2I=0;2I=/11|1b|Z|M|n|s/.A(i)?F.1m():F.1j();k 3t=[\'2m\',/1b|Z|n/.A(i)?\'3s\':/M|11|s/.A(i)?\'3j\':/^e$/.A(i)?\'3o\':\'3n\'].46("");20.j(3t,2I);4.1Q()}f(!$(4.H[i]).X)3a}};4.3m(4.l);4.1T=$(\'.m-r-U\',4.l).3f();4.1T.47(t(){f(!5.1u){f(4.3k)k F=4.3k.2M(/m-r-(M|11|1b|Z|n|e|s|w)/i);5.F=F&&F[1]?F[1]:\'M\'}});f(o.3O){4.1T.3i();$(4.l).1p("m-r-2H").43(t(){$(4).2t("m-r-2H");5.1T.3F()},t(){f(!5.1u){$(4).1p("m-r-2H");5.1T.3i()}})}4.44()},45:t(){4.48();k 2x=t(1a){$(1a).2t("m-r m-r-3L m-r-1u").3M("r").3Z(".r").49(\'.m-r-U\').2V()};f(4.2E){2x(4.l);k 1k=4.l;1k.21().3R(4.D.j({q:1k.j(\'q\'),8:1k.1j(),9:1k.1m(),d:1k.j(\'d\'),6:1k.j(\'6\')})).3S().2V()}4.D.j(\'T\',4.3K);2x(4.D)},3T:t(u){k U=N;2l(k i 3H 4.H){f($(4.H[i])[0]==u.20)U=1U}C 4.B.3L||!!U},3X:t(u){k o=4.B,31=4.l.q(),y=4.l;4.1u=1U;4.3Y={d:$(1h).39(),6:$(1h).3e()};f(y.3d(\'.m-42\')||(/1Z/).A(y.j(\'q\'))){y.j({q:\'1Z\',d:31.d,6:31.6})}f($.1c.2e&&(/15/).A(y.j(\'q\')))y.j({q:\'15\',d:\'1n\',6:\'1n\'});4.36();k 24=2f(4.z.j(\'6\')),22=2f(4.z.j(\'d\'));f(o.1F){24+=$(o.1F).3e()||0;22+=$(o.1F).39()||0}4.R=4.z.R();4.q={6:24,d:22};4.x=4.E?{8:y.1j(),9:y.1m()}:{8:y.8(),9:y.9()};4.V=4.E?{8:y.1j(),9:y.1m()}:{8:y.8(),9:y.9()};4.W={6:24,d:22};4.17={8:y.1j()-y.8(),9:y.1m()-y.9()};4.3g={6:u.3h,d:u.3b};4.S=(1K o.S==\'3G\')?o.S:((4.V.8/4.V.9)||1);k 1H=$(\'.m-r-\'+4.F).j(\'1H\');$(\'2b\').j(\'1H\',1H==\'1n\'?4.F+\'-T\':1H);y.1p("m-r-1u");4.1J("1v",u);C 1U},41:t(u){k y=4.z,o=4.B,40={},5=4,2A=4.3g,a=4.F;k I=(u.3h-2A.6)||0,G=(u.3b-2A.d)||0;k 2v=4.18[a];f(!2v)C N;k g=2v.1g(4,[u,I,G]),28=$.1c.2G&&$.1c.2z<7,4X=4.17;f(4.1S||u.2a)g=4.3c(g,u);g=4.35(g,u);4.1J("T",u);y.j({d:4.q.d+"1A",6:4.q.6+"1A",8:4.x.8+"1A",9:4.x.9+"1A"});f(!4.E&&4.1o.X)4.1Q();4.2U(g);4.38(\'T\',u,4.m());C N},4H:t(u){4.1u=N;k o=4.B,5=4;f(4.E){k 14=4.1o,1D=14.X&&(/2q/i).A(14[0].2r),29=1D&&$.m.2j(14[0],\'6\')?0:5.17.9,2n=1D?0:5.17.8;k s={8:(5.x.8-2n),9:(5.x.9-29)},6=(J(5.l.j(\'6\'),10)+(5.q.6-5.W.6))||12,d=(J(5.l.j(\'d\'),10)+(5.q.d-5.W.d))||12;f(!o.1l)4.l.j($.1e(s,{d:d,6:6}));5.z.9(5.x.9);5.z.8(5.x.8);f(4.E&&!o.1l)4.1Q()}$(\'2b\').j(\'1H\',\'1n\');4.l.2t("m-r-1u");4.1J("1X",u);f(4.E)4.z.2V();C N},2U:t(g){k o=4.B;4.R=4.z.R();f(1d(g.6))4.q.6=g.6;f(1d(g.d))4.q.d=g.d;f(1d(g.9))4.x.9=g.9;f(1d(g.8))4.x.8=g.8},3c:t(g,u){k o=4.B,2i=4.q,1y=4.x,a=4.F;f(g.9)g.8=(1y.9*4.S);19 f(g.8)g.9=(1y.8/4.S);f(a==\'11\'){g.6=2i.6+(1y.8-g.8);g.d=12}f(a==\'Z\'){g.d=2i.d+(1y.9-g.9);g.6=2i.6+(1y.8-g.8)}C g},35:t(g,u){k y=4.z,o=4.B,1z=4.1S||u.2a,a=4.F,2S=1d(g.8)&&o.1P&&(o.1P<g.8),2N=1d(g.9)&&o.1O&&(o.1O<g.9),2R=1d(g.8)&&o.1R&&(o.1R>g.8),2O=1d(g.9)&&o.1N&&(o.1N>g.9);f(2R)g.8=o.1R;f(2O)g.9=o.1N;f(2S)g.8=o.1P;f(2N)g.9=o.1O;k 2T=4.W.6+4.V.8,2J=4.q.d+4.x.9;k 1M=/11|Z|w/.A(a),1L=/Z|1b|n/.A(a);f(2R&&1M)g.6=2T-o.1R;f(2S&&1M)g.6=2T-o.1P;f(2O&&1L)g.d=2J-o.1N;f(2N&&1L)g.d=2J-o.1O;k 2K=!g.8&&!g.9;f(2K&&!g.6&&g.d)g.d=12;19 f(2K&&!g.d&&g.6)g.6=12;C g},1Q:t(){k o=4.B;f(!4.1o.X)C;k l=4.z||4.l;2l(k i=0;i<4.1o.X;i++){k 16=4.1o[i];f(!4.1C){k b=[16.j(\'4I\'),16.j(\'4J\'),16.j(\'4K\'),16.j(\'4G\')],p=[16.j(\'4F\'),16.j(\'4B\'),16.j(\'4A\'),16.j(\'4C\')];4.1C=$.4D(b,t(v,i){k 33=J(v,10)||0,2m=J(p[i],10)||0;C 33+2m})}f($.1c.2G&&!(!($(l).3d(\':2c\')||$(l).4E(\':2c\').X)))3a;16.j({9:(l.9()-4.1C[0]-4.1C[2])||0,8:(l.8()-4.1C[1]-4.1C[3])||0})}},36:t(){k y=4.l,o=4.B;4.2w=y.R();f(4.E){4.z=4.z||$(\'<1E 1r="34:2c;"></1E>\');k 28=$.1c.2G&&$.1c.2z<7,2F=(28?1:0),2D=(28?2:-1);4.z.1p(4.E).j({8:4.l.1j()+2D,9:4.l.1m()+2D,q:\'1Z\',6:4.2w.6-2F+\'1A\',d:4.2w.d-2F+\'1A\',1I:++o.1I});4.z.3v("2b").3f()}19{4.z=4.l}},18:{e:t(u,I,G){C{8:4.V.8+I}},w:t(u,I,G){k o=4.B,13=4.V,2o=4.W;C{6:2o.6+I,8:13.8-I}},n:t(u,I,G){k o=4.B,13=4.V,2o=4.W;C{d:2o.d+G,9:13.9-G}},s:t(u,I,G){C{9:4.V.9+G}},M:t(u,I,G){C $.1e(4.18.s.1g(4,2k),4.18.e.1g(4,[u,I,G]))},11:t(u,I,G){C $.1e(4.18.s.1g(4,2k),4.18.w.1g(4,[u,I,G]))},1b:t(u,I,G){C $.1e(4.18.n.1g(4,2k),4.18.e.1g(4,[u,I,G]))},Z:t(u,I,G){C $.1e(4.18.n.1g(4,2k),4.18.w.1g(4,[u,I,G]))}},1J:t(n,u){$.m.1B.4U(4,n,[u,4.m()]);(n!="T"&&4.38(n,u,4.m()))},4V:{},m:t(){C{D:4.D,l:4.l,z:4.z,q:4.q,x:4.x,V:4.V,W:4.W}}}));$.1e($.m.r,{2z:"1.7.2",4R:"T",4a:{P:N,1l:N,3I:"4O",3p:"4P",S:N,3O:N,4Q:":2C,4z",1F:N,4y:0,4i:1,Q:N,Y:N,H:"e,s,M",z:N,1O:12,1P:12,1N:10,1R:10,1I:4j}});$.m.1B.1Y("r","P",{1v:t(u,m){k 5=$(4).g("r"),o=5.B;23=t(1a){$(1a).1x(t(){$(4).g("r-2Y",{8:J($(4).8(),10),9:J($(4).9(),10),6:J($(4).j(\'6\'),10),d:J($(4).j(\'d\'),10)})})};f(1K(o.P)==\'3J\'&&!o.P.3r){f(o.P.X){o.P=o.P[0];23(o.P)}19{$.1x(o.P,t(1a,c){23(1a)})}}19{23(o.P)}},T:t(u,m){k 5=$(4).g("r"),o=5.B,O=5.V,1q=5.W;k 3P={9:(5.x.9-O.9)||0,8:(5.x.8-O.8)||0,d:(5.q.d-1q.d)||0,6:(5.q.6-1q.6)||0},2u=t(1a,c){$(1a).1x(t(){k y=$(4),1v=$(4).g("r-2Y"),1r={},j=c&&c.X?c:[\'8\',\'9\',\'d\',\'6\'];$.1x(j||[\'8\',\'9\',\'d\',\'6\'],t(i,27){k 26=(1v[27]||0)+(3P[27]||0);f(26&&26>=0)1r[27]=26||12});f(/15/.A(y.j(\'q\'))&&$.1c.2e){5.2L=1U;y.j({q:\'1Z\',d:\'1n\',6:\'1n\'})}y.j(1r)})};f(1K(o.P)==\'3J\'&&!o.P.4l){$.1x(o.P,t(1a,c){2u(1a,c)})}19{2u(o.P)}},1X:t(u,m){k 5=$(4).g("r");f(5.2L&&$.1c.2e){5.2L=N;y.j({q:\'15\'})}$(4).3M("r-2Y-1v")}});$.m.1B.1Y("r","1l",{1X:t(u,m){k 5=$(4).g("r"),o=5.B;k 14=5.1o,1D=14.X&&(/2q/i).A(14[0].2r),29=1D&&$.m.2j(14[0],\'6\')?0:5.17.9,2n=1D?0:5.17.8;k 1r={8:(5.x.8-2n),9:(5.x.9-29)},6=(J(5.l.j(\'6\'),10)+(5.q.6-5.W.6))||12,d=(J(5.l.j(\'d\'),10)+(5.q.d-5.W.d))||12;5.l.1l($.1e(1r,d&&6?{d:d,6:6}:{}),{4b:o.3I,4d:o.3p,4e:t(){k g={8:J(5.l.j(\'8\'),10),9:J(5.l.j(\'9\'),10),d:J(5.l.j(\'d\'),10),6:J(5.l.j(\'6\'),10)};f(14&&14.X)$(14[0]).j({8:g.8,9:g.9});5.2U(g);5.1J("T",u)}})}});$.m.1B.1Y("r","1F",{1v:t(u,m){k 5=$(4).g("r"),o=5.B,y=5.l;k 1s=o.1F,L=(1s 4f $)?1s.1G(0):(/21/.A(1s))?y.21().1G(0):1s;f(!L)C;5.1W=$(L);f(/1h/.A(1s)||1s==1h){5.1V={6:0,d:0};5.2Q={6:0,d:0};5.1i={l:$(1h),6:0,d:0,8:$(1h).8(),9:$(1h).9()||1h.2b.3r.3u}}19{k l=$(L),p=[];$(["3s","3o","3n","3j"]).1x(t(i,3l){p[i]=2f(l.j("2m"+3l))});5.1V=l.R();5.2Q=l.q();5.2d={9:(l.4n()-p[3]),8:(l.4v()-p[1])};k K=5.1V,1L=5.2d.9,1M=5.2d.8,8=($.m.2j(L,"6")?L.4x:1M),9=($.m.2j(L)?L.3u:1L);5.1i={l:L,6:K.6,d:K.d,8:8,9:9}}},T:t(u,m){k 5=$(4).g("r"),o=5.B,4t=5.2d,K=5.1V,13=5.x,2h=5.q,1z=5.1S||u.2a,1f={d:0,6:0},L=5.1W;f(L[0]!=1h&&(/30/).A(L.j(\'q\')))1f=K;f(2h.6<(5.E?K.6:0)){5.x.8=5.x.8+(5.E?(5.q.6-K.6):(5.q.6-1f.6));f(1z)5.x.9=5.x.8/o.S;5.q.6=o.z?K.6:0}f(2h.d<(5.E?K.d:0)){5.x.9=5.x.9+(5.E?(5.q.d-K.d):5.q.d);f(1z)5.x.8=5.x.9*o.S;5.q.d=5.E?K.d:0}5.R.6=5.1i.6+5.q.6;5.R.d=5.1i.d+5.q.d;k 2g=2p.3C((5.E?5.R.6-1f.6:(5.R.6-1f.6))+5.17.8),2P=2p.3C((5.E?5.R.d-1f.d:(5.R.d-K.d))+5.17.9);k 3E=5.1W.1G(0)==5.l.21().1G(0),3A=/15|1Z/.A(5.1W.j(\'q\'));f(3E&&3A)2g-=5.1i.6;f(2g+5.x.8>=5.1i.8){5.x.8=5.1i.8-2g;f(1z)5.x.9=5.x.8/5.S}f(2P+5.x.9>=5.1i.9){5.x.9=5.1i.9-2P;f(1z)5.x.8=5.x.9*5.S}},1X:t(u,m){k 5=$(4).g("r"),o=5.B,2h=5.q,K=5.1V,1f=5.2Q,L=5.1W;k z=$(5.z),2X=z.R(),w=z.1j()-5.17.8,h=z.1m()-5.17.9;f(5.E&&!o.1l&&(/15/).A(L.j(\'q\')))$(4).j({6:2X.6-1f.6-K.6,8:w,9:h});f(5.E&&!o.1l&&(/30/).A(L.j(\'q\')))$(4).j({6:2X.6-1f.6-K.6,8:w,9:h})}});$.m.1B.1Y("r","Q",{1v:t(u,m){k 5=$(4).g("r"),o=5.B,13=5.x;5.Q=5.D.4r();5.Q.j({4N:.25,3y:\'3x\',q:\'15\',9:13.9,8:13.8,2W:0,6:0,d:0}).1p(\'m-r-Q\').1p(1K o.Q==\'4p\'?o.Q:\'\');5.Q.3v(5.z)},T:t(u,m){k 5=$(4).g("r"),o=5.B;f(5.Q)5.Q.j({q:\'15\',9:5.x.9,8:5.x.8})},1X:t(u,m){k 5=$(4).g("r"),o=5.B;f(5.Q&&5.z)5.z.1G(0).4o(5.Q.1G(0))}});$.m.1B.1Y("r","Y",{T:t(u,m){k 5=$(4).g("r"),o=5.B,13=5.x,O=5.V,1q=5.W,a=5.F,4s=o.1S||u.2a;o.Y=1K o.Y=="3G"?[o.Y,o.Y]:o.Y;k 1w=2p.3N((13.8-O.8)/(o.Y[0]||1))*(o.Y[0]||1),1t=2p.3N((13.9-O.9)/(o.Y[1]||1))*(o.Y[1]||1);f(/^(M|s|e)$/.A(a)){5.x.8=O.8+1w;5.x.9=O.9+1t}19 f(/^(1b)$/.A(a)){5.x.8=O.8+1w;5.x.9=O.9+1t;5.q.d=1q.d-1t}19 f(/^(11)$/.A(a)){5.x.8=O.8+1w;5.x.9=O.9+1t;5.q.6=1q.6-1w}19{5.x.8=O.8+1w;5.x.9=O.9+1t;5.q.d=1q.d-1t;5.q.6=1q.6-1w}}});k 2f=t(v){C J(v,10)||0};k 1d=t(37){C!4L(J(37,10))}})(4g);',62,308,'||||this|self|left||width|height||||top||if|data|||css|var|element|ui||||position|resizable||function|event|||size|el|helper|test|options|return|originalElement|_helper|axis|dy|handles|dx|parseInt|co|ce|se|false|os|alsoResize|ghost|offset|aspectRatio|resize|handle|originalSize|originalPosition|length|grid|nw||sw|null|cs|pr|relative|prel|sizeDiff|_change|else|exp|ne|browser|isNumber|extend|cop|apply|document|parentData|outerWidth|wrapper|animate|outerHeight|auto|_proportionallyResizeElements|addClass|op|style|oc|oy|resizing|start|ox|each|csize|pRatio|px|plugin|borderDif|ista|div|containment|get|cursor|zIndex|_propagate|typeof|ch|cw|minHeight|maxHeight|maxWidth|_proportionallyResize|minWidth|_aspectRatio|_handles|true|containerOffset|containerElement|stop|add|absolute|target|parent|curtop|_store|curleft||sum|prop|ie6|soffseth|shiftKey|body|hidden|containerSize|opera|num|woset|cp|cpos|hasScroll|arguments|for|padding|soffsetw|sp|Math|textarea|nodeName|marginLeft|removeClass|_alsoResize|trigger|elementOffset|_destroy|marginRight|version|smp|marginBottom|input|pxyoffset|elementIsWrapper|ie6offset|msie|autohide|padWrapper|dh|isNotwh|_revertToRelativePosition|match|ismaxh|isminh|hoset|containerPosition|isminw|ismaxw|dw|_updateCache|remove|margin|ho|alsoresize|marginTop|static|iniPos|hname|border|overflow|_respectSize|_renderProxy|value|_trigger|scrollTop|continue|pageY|_updateRatio|is|scrollLeft|disableSelection|originalMousePosition|pageX|hide|Bottom|className|name|_renderAxis|Left|Right|animateEasing|class|parentNode|Top|padPos|scrollHeight|appendTo|constructor|block|display|String|isOffsetRelative|button|abs|select|isParent|show|number|in|animateDuration|object|originalResizeStyle|disabled|removeData|round|autoHide|delta|icon|append|end|_mouseCapture|gripsmall|diagonal|widget|_mouseStart|documentScroll|unbind|props|_mouseDrag|draggable|hover|_mouseInit|destroy|join|mouseover|_mouseDestroy|find|defaults|duration|wrap|easing|step|instanceof|jQuery|img|distance|1000|canvas|nodeType|all|innerHeight|removeChild|string|none|clone|ratio|ps|zoom|innerWidth|push|scrollWidth|delay|option|paddingBottom|paddingRight|paddingLeft|map|parents|paddingTop|borderLeftWidth|_mouseStop|borderTopWidth|borderRightWidth|borderBottomWidth|isNaN|mouse|opacity|slow|swing|cancel|eventPrefix|split|_init|call|plugins|trim|csdif'.split('|'),0,{}))
diff --git a/template-common/lib/ui/packed/ui.selectable.packed.js b/template-common/lib/ui/packed/ui.selectable.packed.js
index 04aa12886..a397c5184 100644
--- a/template-common/lib/ui/packed/ui.selectable.packed.js
+++ b/template-common/lib/ui/packed/ui.selectable.packed.js
@@ -1,2 +1 @@
-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}('(d(A){A.1M("4.5",A.V({},A.4.1L,{1K:d(){8 B=2;2.3.h("4-5");2.v=b;8 C;2.Q=d(){C=A(B.9.q,B.3[0]);C.o(d(){8 D=A(2);8 E=D.1J();A.n(2,"5-m",{3:2,$3:D,k:E.k,j:E.j,L:E.k+D.N(),y:E.j+D.M(),i:b,a:D.R("4-a"),c:D.R("4-c"),6:D.R("4-6")})})};2.Q();2.s=C.h("4-1I");2.1H();2.p=A(1G.1F("1E")).O({1D:"1C 1B 1A"})},1z:d(){7(2.9.t){2.1y()}r{2.1x()}},1w:d(){2.3.f("4-5 4-5-t").1v("5").1u(".5");2.1t()},1s:d(E){8 C=2;2.P=[E.Y,E.X];7(2.9.t){l}8 D=2.9;2.s=A(D.q,2.3[0]);2.3.g("1r",[E,{"5":2.3[0],"9":D}],D.1q);A("U").1p(2.p);2.p.O({"z-1o":1n,"1m":"1l","k":E.1k,"j":E.1j,"N":0,"M":0});7(D.T){2.Q()}2.s.q(".4-a").o(d(){8 F=A.n(2,"5-m");F.i=e;7(!E.x){F.$3.f("4-a");F.a=b;F.$3.h("4-6");F.6=e;C.3.g("w",[E,{5:C.3[0],6:F.3,9:D}],D.6)}});8 B=b;A(E.1i).1h().1g().o(d(){7(A.n(2,"5-m")){B=e}});l 2.9.1f?!B:e},1e:d(I){8 C=2;2.v=e;7(2.9.t){l}8 E=2.9;8 D=2.P[0],H=2.P[1],B=I.Y,G=I.X;7(D>B){8 F=B;B=D;D=F}7(H>G){8 F=G;G=H;H=F}2.p.O({k:D,j:H,N:B-D,M:G-H});2.s.o(d(){8 J=A.n(2,"5-m");7(!J||J.3==C.3[0]){l}8 K=b;7(E.u=="S"){K=(!(J.k>B||J.L<D||J.j>G||J.y<H))}r{7(E.u=="1d"){K=(J.k>D&&J.L<B&&J.j>H&&J.y<G)}}7(K){7(J.a){J.$3.f("4-a");J.a=b}7(J.6){J.$3.f("4-6");J.6=b}7(!J.c){J.$3.h("4-c");J.c=e;C.3.g("1c",[I,{5:C.3[0],c:J.3,9:E}],E.c)}}r{7(J.c){7(I.x&&J.i){J.$3.f("4-c");J.c=b;J.$3.h("4-a");J.a=e}r{J.$3.f("4-c");J.c=b;7(J.i){J.$3.h("4-6");J.6=e}C.3.g("w",[I,{5:C.3[0],6:J.3,9:E}],E.6)}}7(J.a){7(!I.x&&!J.i){J.$3.f("4-a");J.a=b;J.$3.h("4-6");J.6=e;C.3.g("w",[I,{5:C.3[0],6:J.3,9:E}],E.6)}}}});l b},1b:d(D){8 B=2;2.v=b;8 C=2.9;A(".4-6",2.3[0]).o(d(){8 E=A.n(2,"5-m");E.$3.f("4-6");E.6=b;E.i=b;B.3.g("1a",[D,{5:B.3[0],W:E.3,9:C}],C.W)});A(".4-c",2.3[0]).o(d(){8 E=A.n(2,"5-m");E.$3.f("4-c").h("4-a");E.c=b;E.a=e;E.i=e;B.3.g("19",[D,{5:B.3[0],a:E.3,9:C}],C.a)});2.3.g("18",[D,{5:B.3[0],9:2.9}],2.9.17);2.p.16();l b}}));A.V(A.4.5,{15:{14:1,13:0,12:":11",10:"U",T:e,q:"*",u:"S"}})})(Z)',62,111,'||this|element|ui|selectable|unselecting|if|var|options|selected|false|selecting|function|true|removeClass|triggerHandler|addClass|startselected|top|left|return|item|data|each|helper|filter|else|selectees|disabled|tolerance|dragged|selectableunselecting|ctrlKey|bottom|||||||||||||right|height|width|css|opos|refresh|hasClass|touch|autoRefresh|body|extend|unselected|pageY|pageX|jQuery|appendTo|input|cancel|delay|distance|defaults|remove|stop|selectablestop|selectableselected|selectableunselected|mouseStop|selectableselecting|fit|mouseDrag|keyboard|andSelf|parents|target|clientY|clientX|absolute|position|100|index|append|start|selectablestart|mouseStart|mouseDestroy|unbind|removeData|destroy|disable|enable|toggle|black|dotted|1px|border|div|createElement|document|mouseInit|selectee|offset|init|mouse|widget'.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}('(i($){$.12("6.f",$.W({},$.6.19,{1j:i(){b g=4;4.5.l("6-f");4.O=e;b o;4.L=i(){o=$(g.h.D,g.5[0]);o.v(i(){b $4=$(4);b B=$4.1c();$.w(4,"f-x",{5:4,$5:$4,q:B.q,s:B.s,P:B.q+$4.1a(),F:B.s+$4.1g(),r:e,d:$4.H(\'6-d\'),a:$4.H(\'6-a\'),8:$4.H(\'6-8\')})})};4.L();4.o=o.l("6-3");4.1k();4.A=$(1f.1d(\'1h\')).K({1l:\'1b 1i 11\'}).l("6-f-A")},10:i(){4.5.k("6-f 6-f-M").Z("f").13(".f");4.18()},17:i(9){b g=4;4.N=[9.V,9.T];c(4.h.M)y;b h=4.h;4.o=$(h.D,4.5[0]);4.m("16",9);$(h.U).15(4.A);4.A.K({"z-1e":1q,"1A":"1z","q":9.1y,"s":9.1C,"S":0,"X":0});c(h.R){4.L()}4.o.D(\'.6-d\').v(i(){b 3=$.w(4,"f-x");3.r=j;c(!9.I){3.$5.k(\'6-d\');3.d=e;3.$5.l(\'6-8\');3.8=j;g.m("8",9,{8:3.5})}});$(9.1E).1G().1F().v(i(){b 3=$.w(4,"f-x");c(3){3.$5.k("6-8").l(\'6-a\');3.8=e;3.a=j;3.d=j;g.m("a",9,{a:3.5});y e}})},1m:i(9){b g=4;4.O=j;c(4.h.M)y;b h=4.h;b n=4.N[0],p=4.N[1],t=9.V,u=9.T;c(n>t){b E=t;t=n;n=E}c(p>u){b E=u;u=p;p=E}4.A.K({q:n,s:p,S:t-n,X:u-p});4.o.v(i(){b 3=$.w(4,"f-x");c(!3||3.5==g.5[0])y;b C=e;c(h.J==\'Q\'){C=(!(3.q>t||3.P<n||3.s>u||3.F<p))}G c(h.J==\'1w\'){C=(3.q>n&&3.P<t&&3.s>p&&3.F<u)}c(C){c(3.d){3.$5.k(\'6-d\');3.d=e}c(3.8){3.$5.k(\'6-8\');3.8=e}c(!3.a){3.$5.l(\'6-a\');3.a=j;g.m("a",9,{a:3.5})}}G{c(3.a){c(9.I&&3.r){3.$5.k(\'6-a\');3.a=e;3.$5.l(\'6-d\');3.d=j}G{3.$5.k(\'6-a\');3.a=e;c(3.r){3.$5.l(\'6-8\');3.8=j}g.m("8",9,{8:3.5})}}c(3.d){c(!9.I&&!3.r){3.$5.k(\'6-d\');3.d=e;3.$5.l(\'6-8\');3.8=j;g.m("8",9,{8:3.5})}}}});y e},1v:i(9){b g=4;4.O=e;b h=4.h;$(\'.6-8\',4.5[0]).v(i(){b 3=$.w(4,"f-x");3.$5.k(\'6-8\');3.8=e;3.r=e;g.m("Y",9,{Y:3.5})});$(\'.6-a\',4.5[0]).v(i(){b 3=$.w(4,"f-x");3.$5.k(\'6-a\').l(\'6-d\');3.a=e;3.d=j;3.r=j;g.m("d",9,{d:3.5})});4.m("14",9);4.A.1x();y e}}));$.W($.6.f,{1r:"1.7.2",1D:{U:\'1B\',R:j,1t:":1u,1s",1o:0,1p:0,D:\'*\',J:\'Q\'}})})(1n);',62,105,'|||selectee|this|element|ui||unselecting|event|selecting|var|if|selected|false|selectable|self|options|function|true|removeClass|addClass|_trigger|x1|selectees|y1|left|startselected|top|x2|y2|each|data|item|return||helper|pos|hit|filter|tmp|bottom|else|hasClass|metaKey|tolerance|css|refresh|disabled|opos|dragged|right|touch|autoRefresh|width|pageY|appendTo|pageX|extend|height|unselected|removeData|destroy|black|widget|unbind|stop|append|start|_mouseStart|_mouseDestroy|mouse|outerWidth|1px|offset|createElement|index|document|outerHeight|div|dotted|_init|_mouseInit|border|_mouseDrag|jQuery|delay|distance|100|version|option|cancel|input|_mouseStop|fit|remove|clientX|absolute|position|body|clientY|defaults|target|andSelf|parents'.split('|'),0,{}))
diff --git a/template-common/lib/ui/packed/ui.slider.packed.js b/template-common/lib/ui/packed/ui.slider.packed.js
index 727d0285c..9d269f0c1 100644
--- a/template-common/lib/ui/packed/ui.slider.packed.js
+++ b/template-common/lib/ui/packed/ui.slider.packed.js
@@ -1,2 +1 @@
-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.25.1C=A.25.1C||6(B){c 3.18(6(){A(3).2J(B).2I(0).2H(3).1s()})};A.24("j.m",{2G:{},j:6(B){c{8:3.8,9:3.7,n:3.8.l!="2F"||!3.8.l?p.t(3.n(i,3.8.l=="w"?"y":"x")):{x:p.t(3.n(i,"x")),y:p.t(3.n(i,"y"))},1h:3.1K()}},M:6(C,B){A.j.2E.1k(3,C,[B,3.j()]);3.d.2D(C=="1a"?C:"1a"+C,[B,3.j()],3.8[C])},2C:6(){3.d.1R("j-m j-m-1r").2B("m").2A(".m");4(3.9&&3.9.11){3.9.1C("a");3.9.18(6(){A(3).U("P").2z()})}3.1B&&3.1B.1s()},23:6(B,C){A.24.22.23.1Z(3,2y);4(/k|s|X/.Q(B)){3.1y()}4(B=="1h"){C?3.9.11==2&&3.1u():3.1L()}},2x:6(){h B=3;3.d.1i("j-m");3.1y();3.9=A(3.8.9,3.d);4(!3.9.11){B.9=B.1B=A(B.8.1g||[0]).2w(6(){h D=A("<1t/>").1i("j-m-9").1M(B.d);4(3.1A){D.2v("1A",3.1A)}c D[0]})}h C=6(D){3.d=A(D);3.d.U("P",3);3.8=B.8;3.d.19("20",6(){4(B.7){3.1j(B.7)}B.O(3,1)});3.2u()};A.1W(C.22,A.j.P,{2t:6(D){c B.12.1k(B,D,3.d[0])},2s:6(D){c B.Z.1k(B,D,3.d[0])},2r:6(D){c B.1p.1k(B,D,3.d[0])},2q:6(){c N},1Y:6(D){3.2p(D)}});A(3.9).18(6(){2o C(3)}).2n(\'<a 2m="2l:2k(0)" 2j="2i:21;2h:21;"></a>\').1S().19("O",6(D){B.O(3.1z)}).19("1j",6(D){B.1j(3.1z)}).19("1x",6(D){4(!B.8.2g){B.1x(D.2f,3.1z)}});3.d.19("20.m",6(D){B.1P.1Z(B,[D]);B.7.U("P").1Y(D);B.1f=B.1f+1});A.18(3.8.1g||[],6(D,E){B.16(E.12,D,N)});4(!V(3.8.1X)){3.16(3.8.1X,0,N)}3.R=A(3.9[0]);4(3.9.11==2&&3.8.1h){3.1u()}},1y:6(){h B=3.d[0],C=3.8;3.S={J:3.d.1n(),z:3.d.1m()};A.1W(C,{l:C.l||(B.1N<B.1O?"w":"1l"),s:!V(b(C.s,10))?{x:b(C.s,10),y:b(C.s,10)}:({x:C.s&&C.s.x||1V,y:C.s&&C.s.y||1V}),k:!V(b(C.k,10))?{x:b(C.k,10),y:b(C.k,10)}:({x:C.k&&C.k.x||0,y:C.k&&C.k.y||0})});C.T={x:C.s.x-C.k.x,y:C.s.y-C.k.y};C.f={x:C.f&&C.f.x||b(C.f,10)||(C.X?C.T.x/(C.X.x||b(C.X,10)||C.T.x):0),y:C.f&&C.f.y||b(C.f,10)||(C.X?C.T.y/(C.X.y||b(C.X,10)||C.T.y):0)}},1x:6(C,B){4(/(1w|1v|1U|1T)/.Q(C)){3.16({x:/(1w|1U)/.Q(C)?(C==1w?"-":"+")+"="+3.17("x"):0,y:/(1v|1T)/.Q(C)?(C==1v?"-":"+")+"="+3.17("y"):0},B)}},O:6(B,C){3.7=A(B).1i("j-m-9-1Q");4(C){3.7.1S()[0].O()}},1j:6(B){A(B).1R("j-m-9-1Q");4(3.7&&3.7[0]==B){3.R=3.7;3.7=i}},1P:6(C){h D=[C.1d,C.1e];h B=Y;3.9.18(6(){4(3==C.2e){B=N}});4(B||3.8.1r||!(3.7||3.R)){c}4(!3.7&&3.R){3.O(3.R,N)}3.K=3.d.K();3.16({y:3.v(C.1e-3.K.e-3.7[0].1O/2,"y"),x:3.v(C.1d-3.K.g-3.7[0].1N/2,"x")},i,!3.8.1D)},1u:6(){4(3.u){c}3.u=A("<1t></1t>").1i("j-m-1h").o({2d:"2c"}).1M(3.d);3.1c()},1L:6(){3.u.1s();3.u=i},1c:6(){h C=3.8.l=="w"?"e":"g";h B=3.8.l=="w"?"z":"J";3.u.o(C,(b(A(3.9[0]).o(C),10)||0)+3.W(0,3.8.l=="w"?"y":"x")/2);3.u.o(B,(b(A(3.9[1]).o(C),10)||0)-(b(A(3.9[0]).o(C),10)||0))},1K:6(){c 3.u?3.v(b(3.u.o(3.8.l=="w"?"z":"J"),10),3.8.l=="w"?"y":"x"):i},1J:6(){c 3.9.2b(3.7[0])},n:6(D,B){4(3.9.11==1){3.7=3.9}4(!B){B=3.8.l=="w"?"y":"x"}h C=A(D!=r&&D!==i?3.9[D]||D:3.7);4(C.U("P").1b){c b(C.U("P").1b[B],10)}15{c b(((b(C.o(B=="x"?"g":"e"),10)/(3.S[B=="x"?"J":"z"]-3.W(D,B)))*3.8.T[B])+3.8.k[B],10)}},v:6(C,B){c 3.8.k[B]+(C/(3.S[B=="x"?"J":"z"]-3.W(i,B)))*3.8.T[B]},q:6(C,B){c((C-3.8.k[B])/3.8.T[B])*(3.S[B=="x"?"J":"z"]-3.W(i,B))},13:6(D,B){4(3.u){4(3.7[0]==3.9[0]&&D>=3.q(3.n(1),B)){D=3.q(3.n(1,B)-3.17(B),B)}4(3.7[0]==3.9[1]&&D<=3.q(3.n(0),B)){D=3.q(3.n(0,B)+3.17(B),B)}}4(3.8.1g){h C=3.8.1g[3.1J()];4(D<3.q(C.k,B)){D=3.q(C.k,B)}15{4(D>3.q(C.s,B)){D=3.q(C.s,B)}}}c D},14:6(C,B){4(C>=3.S[B=="x"?"J":"z"]-3.W(i,B)){C=3.S[B=="x"?"J":"z"]-3.W(i,B)}4(C<=0){C=0}c C},W:6(C,B){c A(C!=r&&C!==i?3.9[C]:3.7)[0]["K"+(B=="x"?"2a":"29")]},17:6(B){c 3.8.f[B]||1},12:6(C,B){h D=3.8;4(D.1r){c Y}3.S={J:3.d.1n(),z:3.d.1m()};4(!3.7){3.O(3.R,N)}3.K=3.d.K();3.1q=3.7.K();3.1o={e:C.1e-3.1q.e,g:C.1d-3.1q.g};3.1f=3.n();3.M("12",C);3.1p(C,B);c N},Z:6(B){3.M("Z",B);4(3.1f!=3.n()){3.M("1E",B)}3.O(3.7,N);c Y},1p:6(E,D){h F=3.8;h B={e:E.1e-3.K.e-3.1o.e,g:E.1d-3.K.g-3.1o.g};4(!3.7){3.O(3.R,N)}B.g=3.14(B.g,"x");B.e=3.14(B.e,"y");4(F.f.x){h C=3.v(B.g,"x");C=p.t(C/F.f.x)*F.f.x;B.g=3.q(C,"x")}4(F.f.y){h C=3.v(B.e,"y");C=p.t(C/F.f.y)*F.f.y;B.e=3.q(C,"y")}B.g=3.13(B.g,"x");B.e=3.13(B.e,"y");4(F.l!="w"){3.7.o({g:B.g})}4(F.l!="1l"){3.7.o({e:B.e})}3.7.U("P").1b={x:p.t(3.v(B.g,"x"))||0,y:p.t(3.v(B.e,"y"))||0};4(3.u){3.1c()}3.M("1a",E);c Y},16:6(F,E,G){h H=3.8;3.S={J:3.d.1n(),z:3.d.1m()};4(E==r&&!3.7&&3.9.11!=1){c Y}4(E==r&&!3.7){E=0}4(E!=r){3.7=3.R=A(3.9[E]||E)}4(F.x!==r&&F.y!==r){h B=F.x,I=F.y}15{h B=F,I=F}4(B!==r&&B.1I!=1H){h D=/^\\-\\=/.Q(B),C=/^\\+\\=/.Q(B);4(D||C){B=3.n(i,"x")+b(B.1G(D?"=":"+=",""),10)}15{B=V(b(B,10))?r:b(B,10)}}4(I!==r&&I.1I!=1H){h D=/^\\-\\=/.Q(I),C=/^\\+\\=/.Q(I);4(D||C){I=3.n(i,"y")+b(I.1G(D?"=":"+=",""),10)}15{I=V(b(I,10))?r:b(I,10)}}4(H.l!="w"&&B!==r){4(H.f.x){B=p.t(B/H.f.x)*H.f.x}B=3.q(B,"x");B=3.14(B,"x");B=3.13(B,"x");H.L?3.7.Z().L({g:B},(p.1F(b(3.7.o("g"))-B))*(!V(b(H.L))?H.L:5)):3.7.o({g:B})}4(H.l!="1l"&&I!==r){4(H.f.y){I=p.t(I/H.f.y)*H.f.y}I=3.q(I,"y");I=3.14(I,"y");I=3.13(I,"y");H.L?3.7.Z().L({e:I},(p.1F(b(3.7.o("e"))-I))*(!V(b(H.L))?H.L:5)):3.7.o({e:I})}4(3.u){3.1c()}3.7.U("P").1b={x:p.t(3.v(B,"x"))||0,y:p.t(3.v(I,"y"))||0};4(!G){3.M("12",i);3.M("Z",i);3.M("1E",i);3.M("1a",i)}}});A.j.m.28="n";A.j.m.27={9:".j-m-9",1D:1,L:Y}})(26)',62,170,'|||this|if||function|currentHandle|options|handle||parseInt|return|element|top|stepping|left|var|null|ui|min|axis|slider|value|css|Math|translateValue|undefined|max|round|rangeElement|convertValue|vertical|||height||||||||||width|offset|animate|propagate|true|focus|mouse|test|previousHandle|actualSize|realMax|data|isNaN|handleSize|steps|false|stop||length|start|translateRange|translateLimits|else|moveTo|oneStep|each|bind|slide|sliderValue|updateRange|pageX|pageY|firstValue|handles|range|addClass|blur|call|horizontal|outerHeight|outerWidth|clickOffset|drag|handleOffset|disabled|remove|div|createRange|38|37|keydown|initBoundaries|firstChild|id|generated|unwrap|distance|change|abs|replace|Number|constructor|handleIndex|getRange|removeRange|appendTo|offsetWidth|offsetHeight|click|active|removeClass|parent|40|39|100|extend|startValue|trigger|apply|mousedown|none|prototype|setData|widget|fn|jQuery|defaults|getter|Height|Width|index|absolute|position|target|keyCode|noKeyboard|border|outline|style|void|javascript|href|wrap|new|mouseDown|mouseCapture|mouseDrag|mouseStop|mouseStart|mouseInit|attr|map|init|arguments|mouseDestroy|unbind|removeData|destroy|triggerHandler|plugin|both|plugins|after|eq|parents'.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}('(g($){$.V("4.l",$.21({},$.4.2x,{2w:g(){b e=3,o=3.d;3.1b=v;3.Y=Z;3.1Q();3.2z();3.D.E("4-l"+" 4-l-"+3.s+" 4-V"+" 4-V-22"+" 4-1L-1I");3.h=$([]);8(o.h){8(o.h===N){3.h=$(\'<1s></1s>\');8(!o.6)o.6=[3.u(),3.u()];8(o.6.q&&o.6.q!=2){o.6=[o.6[0],o.6[0]]}}H{3.h=$(\'<1s></1s>\')}3.h.1K(3.D).E("4-l-h");8(o.h=="11"||o.h=="1c"){3.h.E("4-l-h-"+o.h)}3.h.E("4-V-2K")}8($(".4-l-r",3.D).q==0)$(\'<a 23="#"></a>\').1K(3.D).E("4-l-r");8(o.6&&o.6.q){2T($(".4-l-r",3.D).q<o.6.q)$(\'<a 23="#"></a>\').1K(3.D).E("4-l-r")}3.n=$(".4-l-r",3.D).E("4-A-2o"+" 4-1L-1I");3.r=3.n.2f(0);3.n.2W(3.h).1W("a").2s(g(c){c.2t()}).1o(g(){8(!o.L){$(3).E(\'4-A-1o\')}},g(){$(3).O(\'4-A-1o\')}).T(g(){8(!o.L){$(".4-l .4-A-T").O(\'4-A-T\');$(3).E(\'4-A-T\')}H{$(3).1S()}}).1S(g(){$(3).O(\'4-A-T\')});3.n.1U(g(i){$(3).1x("9.4-l-r",i)});3.n.2m(g(c){b 1D=N;b 9=$(3).1x("9.4-l-r");8(e.d.L)m;1P(c.w){t $.4.w.2b:t $.4.w.26:t $.4.w.28:t $.4.w.1V:t $.4.w.2c:t $.4.w.29:1D=v;8(!e.1b){e.1b=N;$(3).E("4-A-1n");e.1B(c,9)}S}b W,p,J=e.1Y();8(e.d.6&&e.d.6.q){W=p=e.6(9)}H{W=p=e.k()}1P(c.w){t $.4.w.2b:p=e.u();S;t $.4.w.26:p=e.G();S;t $.4.w.28:t $.4.w.1V:8(W==e.G())m;p=W+J;S;t $.4.w.2c:t $.4.w.29:8(W==e.u())m;p=W-J;S}e.1p(c,9,p);m 1D}).2p(g(c){b 9=$(3).1x("9.4-l-r");8(e.1b){e.1T(c,9);e.18(c,9);e.1b=v;$(3).O("4-A-1n")}});3.1f()},2l:g(){3.n.20();3.h.20();3.D.O("4-l"+" 4-l-I"+" 4-l-U"+" 4-l-L"+" 4-V"+" 4-V-22"+" 4-1L-1I").2r("l").2u(".l");3.2k()},2e:g(c){b o=3.d;8(o.L)m v;3.1E={12:3.D.2g(),15:3.D.2i()};3.1C=3.D.17();b R={x:c.1J,y:c.1M};b M=3.1k(R);b 1v=3.G()-3.u()+1,K;b e=3,9;3.n.1U(g(i){b 1H=2h.2j(M-e.6(i));8(1v>1H){1v=1H;K=$(3);9=i}});8(o.h==N&&3.6(1)==o.11){K=$(3.n[++9])}3.1B(c,9);e.Y=9;K.E("4-A-1n").T();b 17=K.17();b 25=!$(c.2n).2V().2P().2Q(\'.4-l-r\');3.13=25?{Q:0,1h:0}:{Q:c.1J-17.Q-(K.12()/2),1h:c.1M-17.1h-(K.15()/2)-(1G(K.z(\'2N\'),10)||0)-(1G(K.z(\'2L\'),10)||0)+(1G(K.z(\'2M\'),10)||0)};M=3.1k(R);3.1p(c,9,M);m N},2S:g(c){m N},2Y:g(c){b R={x:c.1J,y:c.1M};b M=3.1k(R);3.1p(c,3.Y,M);m v},2X:g(c){3.n.O("4-A-1n");3.1T(c,3.Y);3.18(c,3.Y);3.Y=Z;3.13=Z;m v},1Q:g(){3.s=3.d.s==\'U\'?\'U\':\'I\'},1k:g(R){b 1m,1r;8(\'I\'==3.s){1m=3.1E.12;1r=R.x-3.1C.Q-(3.13?3.13.Q:0)}H{1m=3.1E.15;1r=R.y-3.1C.1h-(3.13?3.13.1h:0)}b P=(1r/1m);8(P>1)P=1;8(P<0)P=0;8(\'U\'==3.s)P=1-P;b 2d=3.G()-3.u(),1y=P*2d,1O=1y%3.d.J,M=3.u()+1y-1O;8(1O>(3.d.J/2))M+=3.d.J;m 2A(M.2B(5))},1B:g(c,9){b F={r:3.n[9],k:3.k()};8(3.d.6&&3.d.6.q){F.k=3.6(9);F.6=3.6()}3.1g("2y",c,F)},1p:g(c,9,p){b r=3.n[9];8(3.d.6&&3.d.6.q){b 1e=3.6(9?0:1);8((3.d.6.q==2&&3.d.h===N)&&((9==0&&p>1e)||(9==1&&p<1e))){p=1e}8(p!=3.6(9)){b 1N=3.6();1N[9]=p;b 1q=3.1g("1F",c,{r:3.n[9],k:p,6:1N});b 1e=3.6(9?0:1);8(1q!==v){3.6(9,p,(c.2a==\'27\'&&3.d.f),N)}}}H{8(p!=3.k()){b 1q=3.1g("1F",c,{r:3.n[9],k:p});8(1q!==v){3.1l(\'k\',p,(c.2a==\'27\'&&3.d.f))}}}},1T:g(c,9){b F={r:3.n[9],k:3.k()};8(3.d.6&&3.d.6.q){F.k=3.6(9);F.6=3.6()}3.1g("X",c,F)},18:g(c,9){b F={r:3.n[9],k:3.k()};8(3.d.6&&3.d.6.q){F.k=3.6(9);F.6=3.6()}3.1g("2D",c,F)},k:g(1t){8(19.q){3.1l("k",1t);3.18(Z,0)}m 3.1Z()},6:g(9,1t,1a,1X){8(19.q>1){3.d.6[9]=1t;3.1f(1a);8(!1X)3.18(Z,9)}8(19.q){8(3.d.6&&3.d.6.q){m 3.1R(9)}H{m 3.k()}}H{m 3.1R()}},1l:g(24,k,1a){$.V.2G.1l.2E(3,19);1P(24){t\'L\':8(k){3.n.1W(".4-A-T").1S();3.n.O("4-A-1o");3.n.2R("L","L")}H{3.n.2F("L")}t\'s\':3.1Q();3.D.O("4-l-I 4-l-U").E("4-l-"+3.s);3.1f(1a);S;t\'k\':3.1f(1a);S}},1Y:g(){b J=3.d.J;m J},1Z:g(){b C=3.d.k;8(C<3.u())C=3.u();8(C>3.G())C=3.G();m C},1R:g(9){8(19.q){b C=3.d.6[9];8(C<3.u())C=3.u();8(C>3.G())C=3.G();m C}H{m 3.d.6}},u:g(){b 16=3.d.11;m 16},G:g(){b 1j=3.d.1c;m 1j},1f:g(f){b 1i=3.d.h,o=3.d,e=3;8(3.d.6&&3.d.6.q){b 2I,2C;3.n.1U(g(i,j){b B=(e.6(i)-e.u())/(e.G()-e.u())*1d;b 14={};14[e.s==\'I\'?\'Q\':\'1z\']=B+\'%\';$(3).X(1,1)[f?\'f\':\'z\'](14,o.f);8(e.d.h===N){8(e.s==\'I\'){(i==0)&&e.h.X(1,1)[f?\'f\':\'z\']({Q:B+\'%\'},o.f);(i==1)&&e.h[f?\'f\':\'z\']({12:(B-1A)+\'%\'},{1u:v,1w:o.f})}H{(i==0)&&e.h.X(1,1)[f?\'f\':\'z\']({1z:(B)+\'%\'},o.f);(i==1)&&e.h[f?\'f\':\'z\']({15:(B-1A)+\'%\'},{1u:v,1w:o.f})}}1A=B})}H{b k=3.k(),16=3.u(),1j=3.G(),B=1j!=16?(k-16)/(1j-16)*1d:0;b 14={};14[e.s==\'I\'?\'Q\':\'1z\']=B+\'%\';3.r.X(1,1)[f?\'f\':\'z\'](14,o.f);(1i=="11")&&(3.s=="I")&&3.h.X(1,1)[f?\'f\':\'z\']({12:B+\'%\'},o.f);(1i=="1c")&&(3.s=="I")&&3.h[f?\'f\':\'z\']({12:(1d-B)+\'%\'},{1u:v,1w:o.f});(1i=="11")&&(3.s=="U")&&3.h.X(1,1)[f?\'f\':\'z\']({15:B+\'%\'},o.f);(1i=="1c")&&(3.s=="U")&&3.h[f?\'f\':\'z\']({15:(1d-B)+\'%\'},{1u:v,1w:o.f})}}}));$.21($.4.l,{2J:"k 6",2U:"1.7.2",2v:"1F",2O:{f:v,2q:0,1v:0,1c:1d,11:0,s:\'I\',h:v,J:1,k:0,6:Z}})})(2H);',62,185,'|||this|ui||values||if|index||var|event|options|self|animate|function|range|||value|slider|return|handles||newVal|length|handle|orientation|case|_valueMin|false|keyCode|||css|state|valPercent|val|element|addClass|uiHash|_valueMax|else|horizontal|step|closestHandle|disabled|normValue|true|removeClass|percentMouse|left|position|break|focus|vertical|widget|curVal|stop|_handleIndex|null||min|width|_clickOffset|_set|height|valueMin|offset|_change|arguments|animated|_keySliding|max|100|otherVal|_refreshValue|_trigger|top|oRange|valueMax|_normValueFromMouse|_setData|pixelTotal|active|hover|_slide|allowed|pixelMouse|div|newValue|queue|distance|duration|data|valueMouse|bottom|lastValPercent|_start|elementOffset|ret|elementSize|slide|parseInt|thisDistance|all|pageX|appendTo|corner|pageY|newValues|valueMouseModStep|switch|_detectOrientation|_values|blur|_stop|each|RIGHT|filter|noPropagation|_step|_value|remove|extend|content|href|key|mouseOverHandle|END|mousedown|UP|LEFT|type|HOME|DOWN|valueTotal|_mouseCapture|eq|outerWidth|Math|outerHeight|abs|_mouseDestroy|destroy|keydown|target|default|keyup|delay|removeData|click|preventDefault|unbind|eventPrefix|_init|mouse|start|_mouseInit|parseFloat|toFixed|vp1|change|apply|removeAttr|prototype|jQuery|vp0|getter|header|borderBottomWidth|marginTop|borderTopWidth|defaults|andSelf|is|attr|_mouseStart|while|version|parents|add|_mouseStop|_mouseDrag'.split('|'),0,{}))
diff --git a/template-common/lib/ui/packed/ui.sortable.packed.js b/template-common/lib/ui/packed/ui.sortable.packed.js
index 9ccec8ab1..668e8803d 100644
--- a/template-common/lib/ui/packed/ui.sortable.packed.js
+++ b/template-common/lib/ui/packed/ui.sortable.packed.js
@@ -1,2 +1 @@
-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}('(b(B){b A(E,D){9 C=B.2Y.3Z&&B.2Y.3Y<3X;5(E.2X&&!C){d E.2X(D)}5(E.2W){d!!(E.2W(D)&16)}1T(D=D.1d){5(D==E){d V}}d w}B.3W("j.p",B.2j({},B.j.3V,{3U:b(){9 C=4.8;4.Q={};4.g.2a("j-p");4.2P();4.14=4.c.z?(/6|28/).1e(4.c[0].t.f("3T")):w;5(!(/(2V|1m|3S)/).1e(4.g.f("O"))){4.g.f("O","2V")}4.a=4.g.a();4.3R()},3Q:{},j:b(C){d{l:(C||4)["l"],r:(C||4)["r"]||B([]),O:(C||4)["O"],3P:(C||4)["18"],8:4.8,g:4.g,t:(C||4)["i"],3O:C?C.g:P}},v:b(F,E,C,D){B.j.1b.Y(4,F,[E,4.j(C)]);5(!D){4.g.2t(F=="1a"?F:"1a"+F,[E,4.j(C)],4.8[F])}},2i:b(E){9 C=(B.1N(4.8.c)?4.8.c.Y(4.g):B(4.8.c,4.g)).21(".j-p-l");9 D=[];E=E||{};C.1x(b(){9 F=(B(4).2S(E.3N||"2R")||"").3M(E.2T||(/(.+)[-=3L](.+)/));5(F){D.1y((E.2U||F[1])+"[]="+(E.2U&&E.2T?F[1]:F[2]))}});d D.3K("&")},2h:b(C){9 D=(B.1N(4.8.c)?4.8.c.Y(4.g):B(4.8.c,4.g)).21(".j-p-l");9 E=[];D.1x(b(){E.1y(B(4).2S(C||"2R"))});d E},2J:b(J){9 E=4.18.6,D=E+4.s.n,I=4.18.7,H=I+4.s.o;9 F=J.6,C=F+J.n,K=J.7,G=K+J.o;5(4.8.1r=="2Q"||4.8.3J||(4.8.1r=="1X"&&4.s[4.14?"n":"o"]>J[4.14?"n":"o"])){d(I+4.a.q.7>K&&I+4.a.q.7<G&&E+4.a.q.6>F&&E+4.a.q.6<C)}X{d(F<E+(4.s.n/2)&&D-(4.s.n/2)<C&&K<I+(4.s.o/2)&&H-(4.s.o/2)<G)}},2w:b(J){9 E=4.18.6,D=E+4.s.n,I=4.18.7,H=I+4.s.o;9 F=J.6,C=F+J.n,K=J.7,G=K+J.o;5(4.8.1r=="2Q"||(4.8.1r=="1X"&&4.s[4.14?"n":"o"]>J[4.14?"n":"o"])){5(!(I+4.a.q.7>K&&I+4.a.q.7<G&&E+4.a.q.6>F&&E+4.a.q.6<C)){d w}5(4.14){5(E+4.a.q.6>F&&E+4.a.q.6<F+J.n/2){d 2}5(E+4.a.q.6>F+J.n/2&&E+4.a.q.6<C){d 1}}X{5(I+4.a.q.7>K&&I+4.a.q.7<K+J.o/2){d 2}5(I+4.a.q.7>K+J.o/2&&I+4.a.q.7<G){d 1}}}X{5(!(F<E+(4.s.n/2)&&D-(4.s.n/2)<C&&K<I+(4.s.o/2)&&H-(4.s.o/2)<G)){d w}5(4.14){5(D>F&&E<F){d 2}5(E<C&&D>C){d 1}}X{5(H>K&&I<K){d 1}5(I<G&&H>G){d 2}}}d w},2P:b(){4.2b();4.1G()},2b:b(){4.c=[];4.e=[4];9 D=4.c;9 C=4;9 F=[[B.1N(4.8.c)?4.8.c.Y(4.g,P,{8:4.8,t:4.i}):B(4.8.c,4.g),4]];5(4.8.2e){R(9 G=4.8.2e.z-1;G>=0;G--){9 I=B(4.8.2e[G]);R(9 E=I.z-1;E>=0;E--){9 H=B.19(I[E],"p");5(H&&!H.8.2c){F.1y([B.1N(H.8.c)?H.8.c.Y(H.g):B(H.8.c,H.g),H]);4.e.1y(H)}}}}R(9 G=F.z-1;G>=0;G--){F[G][0].1x(b(){B.19(4,"p-t",F[G][1]);D.1y({t:B(4),2O:F[G][1],n:0,o:0,6:0,7:0})})}},1G:b(D){5(4.u){9 C=4.u.a();4.a.m={7:C.7+4.1v.7,6:C.6+4.1v.6}}R(9 F=4.c.z-1;F>=0;F--){5(4.c[F].2O!=4.1w&&4.1w&&4.c[F].t[0]!=4.i[0]){1I}9 E=4.8.2N?B(4.8.2N,4.c[F].t):4.c[F].t;5(!D){4.c[F].n=E[0].1Q;4.c[F].o=E[0].1S}9 G=E.a();4.c[F].6=G.6;4.c[F].7=G.7}5(4.8.2d&&4.8.2d.2M){4.8.2d.2M.Y(4)}X{R(9 F=4.e.z-1;F>=0;F--){9 G=4.e[F].g.a();4.e[F].Q.6=G.6;4.e[F].Q.7=G.7;4.e[F].Q.n=4.e[F].g.1L();4.e[F].Q.o=4.e[F].g.1K()}}},3I:b(){4.g.3H("j-p j-p-2c").2L("p").3G(".p");4.3F();R(9 C=4.c.z-1;C>=0;C--){4.c[C].t.2L("p-t")}},29:b(E){9 C=E||4,F=C.8;5(F.r.3E==3D){9 D=F.r;F.r={g:b(){d B("<2K></2K>").2a(D)[0]},1s:b(G,H){H.f(G.a()).f({n:G.1L(),o:G.1K()})}}}C.r=B(F.r.g.Y(C.g,C.i)).1D("U").f({O:"1m"});F.r.1s.Y(C.g,C.i,C.r)},2u:b(F){R(9 D=4.e.z-1;D>=0;D--){5(4.2J(4.e[D].Q)){5(!4.e[D].Q.1h){5(4.1w!=4.e[D]){9 I=3C;9 H=P;9 E=4.18[4.e[D].14?"6":"7"];R(9 C=4.c.z-1;C>=0;C--){5(!A(4.e[D].g[0],4.c[C].t[0])){1I}9 G=4.c[C][4.e[D].14?"6":"7"];5(1n.2I(G-E)<I){I=1n.2I(G-E);H=4.c[C]}}5(!H&&!4.8.2g){1I}5(4.r){4.r.1E()}5(4.e[D].8.r){4.e[D].29(4)}X{4.r=P}4.1w=4.e[D];H?4.1H(F,H,P,V):4.1H(F,P,4.e[D].g,V);4.v("23",F);4.e[D].v("23",F,4)}4.e[D].v("1h",F,4);4.e[D].Q.1h=1}}X{5(4.e[D].Q.1h){4.e[D].v("2m",F,4);4.e[D].Q.1h=0}}}},3B:b(G,F){5(4.8.2c||4.8.2v=="3A"){d w}4.2b();9 E=P,D=4,C=B(G.1M).2G().1x(b(){5(B.19(4,"p-t")==D){E=B(4);d w}});5(B.19(G.1M,"p-t")==D){E=B(G.1M)}5(!E){d w}5(4.8.2H&&!F){9 H=w;B(4.8.2H,E).3z("*").3y().1x(b(){5(4==G.1M){H=V}});5(!H){d w}}4.i=E;d V},3x:b(H,F,C){9 J=4.8;4.1w=4;4.1G();4.l=3w J.l=="b"?B(J.l.3v(4.g[0],[H,4.i])):4.i.1Y();5(!4.l.2G("U").z){B(J.1D!="m"?J.1D:4.i[0].1d)[0].2s(4.l[0])}4.l.f({O:"1m",1F:"3u"}).2a("j-p-l");4.W={6:(L(4.i.f("3t"),10)||0),7:(L(4.i.f("3s"),10)||0)};4.a=4.i.a();4.a={7:4.a.7-4.W.7,6:4.a.6-4.W.6};4.a.q={6:H.1i-4.a.6,7:H.1j-4.a.7};4.u=4.l.u();9 D=4.u.a();4.1v={7:(L(4.u.f("26"),10)||0),6:(L(4.u.f("27"),10)||0)};4.a.m={7:D.7+4.1v.7,6:D.6+4.1v.6};4.15=4.25(H);4.1Z={1t:4.i.1t()[0],m:4.i.m()[0]};4.s={n:4.l.1L(),o:4.l.1K()};5(J.r){4.29()}4.v("1p",H);4.s={n:4.l.1L(),o:4.l.1K()};5(J.13){5(J.13.6!=1J){4.a.q.6=J.13.6}5(J.13.28!=1J){4.a.q.6=4.s.n-J.13.28}5(J.13.7!=1J){4.a.q.7=J.13.7}5(J.13.2F!=1J){4.a.q.7=4.s.o-J.13.2F}}5(J.k){5(J.k=="m"){J.k=4.l[0].1d}5(J.k=="h"||J.k=="1c"){4.k=[0-4.a.m.6,0-4.a.m.7,B(J.k=="h"?h:1c).n()-4.a.m.6-4.s.n-4.W.6-(L(4.g.f("2E"),10)||0),(B(J.k=="h"?h:1c).o()||h.U.1d.2C)-4.a.m.7-4.s.o-4.W.7-(L(4.g.f("2B"),10)||0)]}5(!(/^(h|1c|m)$/).1e(J.k)){9 G=B(J.k)[0];9 I=B(J.k).a();4.k=[I.6+(L(B(G).f("27"),10)||0)-4.a.m.6,I.7+(L(B(G).f("26"),10)||0)-4.a.m.7,I.6+1n.2D(G.3r,G.1Q)-(L(B(G).f("27"),10)||0)-4.a.m.6-4.s.n-4.W.6-(L(4.i.f("2E"),10)||0),I.7+1n.2D(G.2C,G.1S)-(L(B(G).f("26"),10)||0)-4.a.m.7-4.s.o-4.W.7-(L(4.i.f("2B"),10)||0)]}}5(4.8.r!="1Y"){4.i.f("2k","3q")}5(!C){R(9 E=4.e.z-1;E>=0;E--){4.e[E].v("3p",H,4)}}5(B.j.17){B.j.17.3o=4}5(B.j.17&&!J.2p){B.j.17.3n(4,H)}4.2l=V;4.2z(H);d V},24:b(D,E){5(!E){E=4.O}9 C=D=="1m"?1:-1;d{7:(E.7+4.a.m.7*C-(4.u[0]==h.U?0:4.u[0].N)*C+4.W.7*C),6:(E.6+4.a.m.6*C-(4.u[0]==h.U?0:4.u[0].M)*C+4.W.6*C)}},25:b(F){9 G=4.8;9 C={7:(F.1j-4.a.q.7-4.a.m.7+(4.u[0]==h.U?0:4.u[0].N)),6:(F.1i-4.a.q.6-4.a.m.6+(4.u[0]==h.U?0:4.u[0].M))};5(!4.15){d C}5(4.k){5(C.6<4.k[0]){C.6=4.k[0]}5(C.7<4.k[1]){C.7=4.k[1]}5(C.6>4.k[2]){C.6=4.k[2]}5(C.7>4.k[3]){C.7=4.k[3]}}5(G.12){9 E=4.15.7+1n.2A((C.7-4.15.7)/G.12[1])*G.12[1];C.7=4.k?(!(E<4.k[1]||E>4.k[3])?E:(!(E<4.k[1])?E-G.12[1]:E+G.12[1])):E;9 D=4.15.6+1n.2A((C.6-4.15.6)/G.12[0])*G.12[0];C.6=4.k?(!(D<4.k[0]||D>4.k[2])?D:(!(D<4.k[0])?D-G.12[0]:D+G.12[0])):D}d C},2z:b(D){4.O=4.25(D);4.18=4.24("1m");B.j.1b.Y(4,"1a",[D,4.j()]);4.18=4.24("1m");4.l[0].2y.6=4.O.6+"2x";4.l[0].2y.7=4.O.7+"2x";R(9 C=4.c.z-1;C>=0;C--){9 E=4.2w(4.c[C]);5(!E){1I}5(4.c[C].t[0]!=4.i[0]&&4.i[E==1?"3m":"1t"]()[0]!=4.c[C].t[0]&&!A(4.i[0],4.c[C].t[0])&&(4.8.2v=="3l-3k"?!A(4.g[0],4.c[C].t[0]):V)){4.2r=E==1?"2q":"3j";4.1H(D,4.c[C]);4.v("23",D);3i}}4.2u(D);5(B.j.17){B.j.17.3h(4,D)}4.g.2t("1a",[D,4.j()],4.8["1a"]);d w},1H:b(H,G,D,F){D?D[0].2s(4.i[0]):G.t[0].1d.3g(4.i[0],(4.2r=="2q"?G.t[0]:G.t[0].3f));4.1u=4.1u?++4.1u:1;9 E=4,C=4.1u;1c.3e(b(){5(C==E.1u){E.1G(!F)}},0);5(4.8.r){4.8.r.1s.Y(4.g,4.i,4.r)}},3d:b(E,D){5(B.j.17&&!4.8.2p){B.j.17.3c(4,E)}5(4.8.22){9 C=4;9 F=C.i.a();5(C.r){C.r.2o({1f:"3b"},(L(4.8.22,10)||2n)-3a)}B(4.l).2o({6:F.6-4.a.m.6-C.W.6+(4.u[0]==h.U?0:4.u[0].M),7:F.7-4.a.m.7-C.W.7+(4.u[0]==h.U?0:4.u[0].N)},L(4.8.22,10)||2n,b(){C.1F(E)})}X{4.1F(E,D)}d w},1F:b(E,D){5(4.1Z.1t!=4.i.1t().21(".j-p-l")[0]||4.1Z.m!=4.i.m()[0]){4.v("1s",E,P,D)}5(!A(4.g[0],4.i[0])){4.v("1E",E,P,D);R(9 C=4.e.z-1;C>=0;C--){5(A(4.e[C].g[0],4.i[0])){4.e[C].v("1s",E,4,D);4.e[C].v("39",E,4,D)}}}R(9 C=4.e.z-1;C>=0;C--){4.e[C].v("38",E,4,D);5(4.e[C].Q.1h){4.e[C].v("2m",E,4);4.e[C].Q.1h=0}}4.2l=w;5(4.37){4.v("1q",E,P,D);d w}B(4.i).f("2k","");5(4.r){4.r.1E()}4.l.1E();4.l=P;4.v("1q",E,P,D);d V}}));B.2j(B.j.p,{36:"2i 2h",35:{l:"1Y",1r:"1X",34:1,33:0,1k:V,11:20,Z:20,32:":31",c:"> *",1g:30,2g:V,1D:"m"}});B.j.1b.1o("p","1l",{1p:b(E,D){9 C=B("U");5(C.f("1l")){D.8.1W=C.f("1l")}C.f("1l",D.8.1l)},1q:b(D,C){5(C.8.1W){B("U").f("1l",C.8.1W)}}});B.j.1b.1o("p","1g",{1p:b(E,D){9 C=D.l;5(C.f("1g")){D.8.1V=C.f("1g")}C.f("1g",D.8.1g)},1q:b(D,C){5(C.8.1V){B(C.l).f("1g",C.8.1V)}}});B.j.1b.1o("p","1f",{1p:b(E,D){9 C=D.l;5(C.f("1f")){D.8.1U=C.f("1f")}C.f("1f",D.8.1f)},1q:b(D,C){5(C.8.1U){B(C.l).f("1f",C.8.1U)}}});B.j.1b.1o("p","1k",{1p:b(E,D){9 F=D.8;9 C=B(4).19("p");C.T=b(G){2f{5(/1C|1k/.1e(G.f("1B"))||(/1C|1k/).1e(G.f("1B-y"))){d G}G=G.m()}1T(G[0].1d);d B(h)}(C.i);C.S=b(G){2f{5(/1C|1k/.1e(G.f("1B"))||(/1C|1k/).1e(G.f("1B-x"))){d G}G=G.m()}1T(G[0].1d);d B(h)}(C.i);5(C.T[0]!=h&&C.T[0].1A!="1z"){C.1R=C.T.a()}5(C.S[0]!=h&&C.S[0].1A!="1z"){C.1P=C.S.a()}},1a:b(E,D){9 F=D.8;9 C=B(4).19("p");5(C.T[0]!=h&&C.T[0].1A!="1z"){5((C.1R.7+C.T[0].1S)-E.1j<F.11){C.T[0].N=C.T[0].N+F.Z}5(E.1j-C.1R.7<F.11){C.T[0].N=C.T[0].N-F.Z}}X{5(E.1j-B(h).N()<F.11){B(h).N(B(h).N()-F.Z)}5(B(1c).o()-(E.1j-B(h).N())<F.11){B(h).N(B(h).N()+F.Z)}}5(C.S[0]!=h&&C.S[0].1A!="1z"){5((C.1P.6+C.S[0].1Q)-E.1i<F.11){C.S[0].M=C.S[0].M+F.Z}5(E.1i-C.1P.6<F.11){C.S[0].M=C.S[0].M-F.Z}}X{5(E.1i-B(h).M()<F.11){B(h).M(B(h).M()-F.Z)}5(B(1c).n()-(E.1i-B(h).M())<F.11){B(h).M(B(h).M()+F.Z)}}}});B.j.1b.1o("p","1O",{1a:b(E,D){9 C=B(4).19("p");5(D.8.1O=="y"){C.O.6=C.15.6}5(D.8.1O=="x"){C.O.7=C.15.7}}})})(2Z)',62,248,'||||this|if|left|top|options|var|offset|function|items|return|containers|css|element|document|currentItem|ui|containment|helper|parent|width|height|sortable|click|placeholder|helperProportions|item|offsetParent|propagate|false|||length||||||||||||parseInt|scrollLeft|scrollTop|position|null|containerCache|for|overflowX|overflowY|body|true|margins|else|call|scrollSpeed||scrollSensitivity|grid|cursorAt|floating|originalPosition||ddmanager|positionAbs|data|sort|plugin|window|parentNode|test|opacity|zIndex|over|pageX|pageY|scroll|cursor|absolute|Math|add|start|stop|tolerance|update|prev|counter|offsetParentBorders|currentContainer|each|push|HTML|tagName|overflow|auto|appendTo|remove|clear|refreshPositions|rearrange|continue|undefined|outerHeight|outerWidth|target|isFunction|axis|overflowXOffset|offsetWidth|overflowYOffset|offsetHeight|while|_opacity|_zIndex|_cursor|guess|clone|domPosition||not|revert|change|convertPositionTo|generatePosition|borderTopWidth|borderLeftWidth|right|createPlaceholder|addClass|refreshItems|disabled|custom|connectWith|do|dropOnEmpty|toArray|serialize|extend|visibility|dragging|out|500|animate|dropBehaviour|down|direction|appendChild|triggerHandler|contactContainers|type|intersectsWithEdge|px|style|mouseDrag|round|marginBottom|scrollHeight|max|marginRight|bottom|parents|handle|abs|intersectsWith|div|removeData|refreshContainers|toleranceElement|instance|refresh|pointer|id|attr|expression|key|relative|compareDocumentPosition|contains|browser|jQuery|1000|input|cancel|delay|distance|defaults|getter|cancelHelperRemoval|deactivate|receive|50|hide|drop|mouseStop|setTimeout|nextSibling|insertBefore|drag|break|up|dynamic|semi|next|prepareOffsets|current|activate|hidden|scrollWidth|marginTop|marginLeft|both|apply|typeof|mouseStart|andSelf|find|static|mouseCapture|10000|String|constructor|mouseDestroy|unbind|removeClass|destroy|forcePointerForContainers|join|_|match|attribute|sender|absolutePosition|plugins|mouseInit|fixed|float|init|mouse|widget|522|version|safari'.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}('(k($){$.4f("z.N",$.2a({},$.z.4r,{4J:k(){6 o=4.n;4.12={};4.J.2N("z-N");4.3t();4.1t=4.u.K?(/8|1K/).29(4.u[0].g.v(\'4A\')):B;4.f=4.J.f();4.4z()},4w:k(){4.J.2h("z-N z-N-2g").3T("N").4E(".N");4.4F();O(6 i=4.u.K-1;i>=0;i--)4.u[i].g.3T("N-g")},4G:k(9,2n){5(4.2k){w B}5(4.n.2g||4.n.3R==\'3L\')w B;4.38(9);6 h=17,q=4,4H=$(9.28).48().1S(k(){5($.1I(4,\'N-g\')==q){h=$(4);w B}});5($.1I(9.28,\'N-g\')==q)h=$(9.28);5(!h)w B;5(4.n.2J&&!2n){6 2S=B;$(4.n.2J,h).3s("*").4N().1S(k(){5(4==9.28)2S=16});5(!2S)w B}4.h=h;4.3v();w 16},4m:k(9,2n,3S){6 o=4.n,q=4;4.1J=4;4.2i();4.m=4.45(9);4.2D();4.4g();4.A=4.m.A();4.f=4.h.f();4.f={e:4.f.e-4.V.e,8:4.f.8-4.V.8};4.m.v("1c","1B");4.14=4.m.v("1c");$.2a(4.f,{E:{8:9.Z-4.f.8,e:9.X-4.f.e},P:4.2H(),1i:4.35()});4.3Z=4.2t(9);4.3c=9.Z;4.34=9.X;5(o.2R)4.44(o.2R);4.1M={1z:4.h.1z()[0],P:4.h.P()[0]};5(4.m[0]!=4.h[0]){4.h.4p()}4.3B();5(o.C)4.4e();5(o.1D){5($(\'1e\').v("1D"))4.39=$(\'1e\').v("1D");$(\'1e\').v("1D",o.1D)}5(o.1w){5(4.m.v("1w"))4.2P=4.m.v("1w");4.m.v("1w",o.1w)}5(o.1v){5(4.m.v("1v"))4.2f=4.m.v("1v");4.m.v("1v",o.1v)}5(4.A[0]!=D&&4.A[0].1H!=\'3W\')4.1T=4.A.f();4.L("4q",9,4.M());5(!4.4o)4.2D();5(!3S){O(6 i=4.s.K-1;i>=0;i--){4.s[i].L("4n",9,q.M(4))}}5($.z.1h)$.z.1h.4l=4;5($.z.1h&&!o.2F)$.z.1h.3Y(4,9);4.2e=16;4.m.2N("z-N-m");4.3U(9);w 16},3U:k(9){4.1c=4.2t(9);4.Y=4.2s("1B");5(!4.1O){4.1O=4.Y}5(4.n.1j){6 o=4.n,1k=B;5(4.A[0]!=D&&4.A[0].1H!=\'3W\'){5((4.1T.e+4.A[0].2z)-9.X<o.1m)4.A[0].T=1k=4.A[0].T+o.1n;11 5(9.X-4.1T.e<o.1m)4.A[0].T=1k=4.A[0].T-o.1n;5((4.1T.8+4.A[0].2L)-9.Z<o.1m)4.A[0].S=1k=4.A[0].S+o.1n;11 5(9.Z-4.1T.8<o.1m)4.A[0].S=1k=4.A[0].S-o.1n}11{5(9.X-$(D).T()<o.1m)1k=$(D).T($(D).T()-o.1n);11 5($(1A).H()-(9.X-$(D).T())<o.1m)1k=$(D).T($(D).T()+o.1n);5(9.Z-$(D).S()<o.1m)1k=$(D).S($(D).S()-o.1n);11 5($(1A).I()-(9.Z-$(D).S())<o.1m)1k=$(D).S($(D).S()+o.1n)}5(1k!==B&&$.z.1h&&!o.2F)$.z.1h.3Y(4,9)}4.Y=4.2s("1B");5(!4.n.1W||4.n.1W!="y")4.m[0].1s.8=4.1c.8+\'40\';5(!4.n.1W||4.n.1W!="x")4.m[0].1s.e=4.1c.e+\'40\';O(6 i=4.u.K-1;i>=0;i--){6 g=4.u[i],1P=g.g[0],2b=4.3E(g);5(!2b)26;5(1P!=4.h[0]&&4.F[2b==1?"4s":"1z"]()[0]!=1P&&!$.z.1p(4.F[0],1P)&&(4.n.3R==\'4M-4L\'?!$.z.1p(4.J[0],1P):16)){4.3O=2b==1?"1G":"2q";5(4.n.2d=="2B"||4.3q(g)){4.25(9,g)}11{3N}4.L("32",9,4.M());3N}}4.3i(9);5($.z.1h)$.z.1h.4D(4,9);4.L(\'3u\',9,4.M());4.1O=4.Y;w B},4C:k(9,1d){5(!9)w;5($.z.1h&&!4.n.2F)$.z.1h.4v(4,9);5(4.n.2X){6 q=4;6 1a=q.F.f();q.2k=16;$(4.m).4u({8:1a.8-4.f.P.8-q.V.8+(4.Q[0]==D.1e?0:4.Q[0].S),e:1a.e-4.f.P.e-q.V.e+(4.Q[0]==D.1e?0:4.Q[0].T)},R(4.n.2X,10)||4t,k(){q.2U(9)})}11{4.2U(9,1d)}w B},2u:k(){6 q=4;5(4.2e){4.4I();5(4.n.m=="2W")4.h.v(4.1y).2h("z-N-m");11 4.h.43();O(6 i=4.s.K-1;i>=0;i--){4.s[i].L("4h",17,q.M(4));5(4.s[i].12.1b){4.s[i].L("36",17,q.M(4));4.s[i].12.1b=0}}}5(4.F[0].1l)4.F[0].1l.4j(4.F[0]);5(4.n.m!="2W"&&4.m&&4.m[0].1l)4.m.2M();$.2a(4,{m:17,2e:B,2k:B,31:17});5(4.1M.1z){$(4.1M.1z).3g(4.h)}11{$(4.1M.P).4B(4.h)}w 16},4c:k(o){6 u=4.30(o&&o.27);6 2E=[];o=o||{};$(u).1S(k(){6 1Y=($(o.g||4).3r(o.3G||\'3k\')||\'\').4y(o.3f||(/(.+)[-=4x](.+)/));5(1Y)2E.W((o.3m||1Y[1]+\'[]\')+\'=\'+(o.3m&&o.3f?1Y[1]:1Y[2]))});w 2E.4K(\'&\')},47:k(o){6 u=4.30(o&&o.27);6 2y=[];o=o||{};u.1S(k(){2y.W($(o.g||4).3r(o.3G||\'3k\')||\'\')});w 2y},3j:k(g){6 1Q=4.Y.8,3o=1Q+4.13.I,1Z=4.Y.e,3l=1Z+4.13.H;6 l=g.8,r=l+g.I,t=g.e,b=t+g.H;6 3b=4.f.E.e,2v=4.f.E.8;6 2j=(1Z+3b)>t&&(1Z+3b)<b&&(1Q+2v)>l&&(1Q+2v)<r;5(4.n.2d=="2B"||4.n.4R||(4.n.2d!="2B"&&4.13[4.1t?\'I\':\'H\']>g[4.1t?\'I\':\'H\'])){w 2j}11{w(l<1Q+(4.13.I/2) &&3o-(4.13.I/2)<r &&t<1Z+(4.13.H/2) &&3l-(4.13.H/2)<b); }},3E:k(g){6 3n=$.z.2m(4.Y.e+4.f.E.e,g.e,g.H),3w=$.z.2m(4.Y.8+4.f.E.8,g.8,g.I),2j=3n&&3w,1q=4.2Q(),1u=4.3d();5(!2j)w B;w 4.1t?(((1u&&1u=="1K")||1q=="1G")?2:1):(1q&&(1q=="1G"?2:1))},3q:k(g){6 2Z=$.z.2m(4.Y.e+4.f.E.e,g.e+(g.H/2),g.H),2V=$.z.2m(4.Y.8+4.f.E.8,g.8+(g.I/2),g.I),1q=4.2Q(),1u=4.3d();5(4.1t&&1u){w((1u=="1K"&&2V)||(1u=="8"&&!2V))}11{w 1q&&((1q=="1G"&&2Z)||(1q=="2q"&&!2Z))}},2Q:k(){6 1F=4.Y.e-4.1O.e;w 1F!=0&&(1F>0?"1G":"2q")},3d:k(){6 1F=4.Y.8-4.1O.8;w 1F!=0&&(1F>0?"1K":"8")},3t:k(9){4.38(9);4.2i()},33:k(){6 n=4.n;w n.15.3z==3A?[n.15]:n.15},30:k(27){6 q=4;6 u=[];6 1f=[];6 15=4.33();5(15&&27){O(6 i=15.K-1;i>=0;i--){6 1a=$(15[i]);O(6 j=1a.K-1;j>=0;j--){6 G=$.1I(1a[j],\'N\');5(G&&G!=4&&!G.n.2g){1f.W([$.23(G.n.u)?G.n.u.19(G.J):$(G.n.u,G.J).2p(".z-N-m"),G])}}}}1f.W([$.23(4.n.u)?4.n.u.19(4.J,17,{n:4.n,g:4.h}):$(4.n.u,4.J).2p(".z-N-m"),4]);O(6 i=1f.K-1;i>=0;i--){1f[i][0].1S(k(){u.W(4)})};w $(u)},3v:k(){6 3a=4.h.3s(":1I(N-g)");O(6 i=0;i<4.u.K;i++){O(6 j=0;j<3a.K;j++){5(3a[j]==4.u[i].g[0])4.u.5f(i,1)}}},38:k(9){4.u=[];4.s=[4];6 u=4.u;6 q=4;6 1f=[[$.23(4.n.u)?4.n.u.19(4.J[0],9,{g:4.h}):$(4.n.u,4.J),4]];6 15=4.33();5(15){O(6 i=15.K-1;i>=0;i--){6 1a=$(15[i]);O(6 j=1a.K-1;j>=0;j--){6 G=$.1I(1a[j],\'N\');5(G&&G!=4&&!G.n.2g){1f.W([$.23(G.n.u)?G.n.u.19(G.J[0],9,{g:4.h}):$(G.n.u,G.J),G]);4.s.W(G)}}}}O(6 i=1f.K-1;i>=0;i--){6 2o=1f[i][1];6 2w=1f[i][0];O(6 j=0,3p=2w.K;j<3p;j++){6 g=$(2w[j]);g.1I(\'N-g\',2o);u.W({g:g,3x:2o,I:0,H:0,8:0,e:0})}}},2i:k(3F){5(4.Q&&4.m){4.f.P=4.2H()}O(6 i=4.u.K-1;i>=0;i--){6 g=4.u[i];5(g.3x!=4.1J&&4.1J&&g.g[0]!=4.h[0])26;6 t=4.n.3D?$(4.n.3D,g.g):g.g;5(!3F){g.I=t.2C();g.H=t.2A()}6 p=t.f();g.8=p.8;g.e=p.e};5(4.n.2I&&4.n.2I.3C){4.n.2I.3C.19(4)}11{O(6 i=4.s.K-1;i>=0;i--){6 p=4.s[i].J.f();4.s[i].12.8=p.8;4.s[i].12.e=p.e;4.s[i].12.I=4.s[i].J.2C();4.s[i].12.H=4.s[i].J.2A()}}},3B:k(3y){6 q=3y||4,o=q.n;5(!o.F||o.F.3z==3A){6 21=o.F;o.F={J:k(){6 2G=$(D.5c(q.h[0].59)).2N(21||q.h[0].21+" z-N-F").2h("z-N-m")[0];5(!21)2G.1s.5a="46";w 2G},22:k(5h,p){5(21&&!o.4k)w;5(!p.H()){p.H(q.h.5g()-R(q.h.v(\'3H\')||0,10)-R(q.h.v(\'3J\')||0,10))};5(!p.I()){p.I(q.h.5m()-R(q.h.v(\'42\')||0,10)-R(q.h.v(\'3P\')||0,10))}}}}q.F=$(o.F.J.19(q.J,q.h));q.h.3g(q.F);o.F.22(q,q.F)},3i:k(9){O(6 i=4.s.K-1;i>=0;i--){5(4.3j(4.s[i].12)){5(!4.s[i].12.1b){5(4.1J!=4.s[i]){6 37=5o;6 1X=17;6 3e=4.Y[4.s[i].1t?\'8\':\'e\'];O(6 j=4.u.K-1;j>=0;j--){5(!$.z.1p(4.s[i].J[0],4.u[j].g[0]))26;6 1a=4.u[j][4.s[i].1t?\'8\':\'e\'];5(1N.3h(1a-3e)<37){37=1N.3h(1a-3e);1X=4.u[j]}}5(!1X&&!4.n.3Q)26;4.1J=4.s[i];1X?4.25(9,1X,17,16):4.25(9,17,4.s[i].J,16);4.L("32",9,4.M());4.s[i].L("32",9,4.M(4));4.n.F.22(4.1J,4.F)}4.s[i].L("1b",9,4.M(4));4.s[i].12.1b=1}}11{5(4.s[i].12.1b){4.s[i].L("36",9,4.M(4));4.s[i].12.1b=0}}}},45:k(9){6 o=4.n;6 m=$.23(o.m)?$(o.m.3K(4.J[0],[9,4.h])):(o.m==\'4a\'?4.h.4a():4.h);5(!m.48(\'1e\').K)$(o.2r!=\'P\'?o.2r:4.h[0].1l)[0].3V(m[0]);5(m[0]==4.h[0])4.1y={I:4.h[0].1s.I,H:4.h[0].1s.H,1c:4.h.v("1c"),e:4.h.v("e"),8:4.h.v("8")};5(m[0].1s.I==\'\'||o.2Y)m.I(4.h.I());5(m[0].1s.H==\'\'||o.2Y)m.H(4.h.H());w m},44:k(1o){5(1o.8!=2c)4.f.E.8=1o.8+4.V.8;5(1o.1K!=2c)4.f.E.8=4.13.I-1o.1K+4.V.8;5(1o.e!=2c)4.f.E.e=1o.e+4.V.e;5(1o.4i!=2c)4.f.E.e=4.13.H-1o.4i+4.V.e},2H:k(){4.Q=4.m.Q();6 1L=4.Q.f();5(4.14==\'1B\'&&4.A[0]!=D&&$.z.1p(4.A[0],4.Q[0])){1L.8+=4.A.S();1L.e+=4.A.T()}5((4.Q[0]==D.1e)||(4.Q[0].1H&&4.Q[0].1H.5n()==\'2O\'&&$.1U.5i))1L={e:0,8:0};w{e:1L.e+(R(4.Q.v("2x"),10)||0),8:1L.8+(R(4.Q.v("2K"),10)||0)}},35:k(){5(4.14=="1i"){6 p=4.h.1c();w{e:p.e-(R(4.m.v("e"),10)||0)+4.A.T(),8:p.8-(R(4.m.v("8"),10)||0)+4.A.S()}}11{w{e:0,8:0}}},4g:k(){4.V={8:(R(4.h.v("5k"),10)||0),e:(R(4.h.v("4O"),10)||0)}},2D:k(){4.13={I:4.m.2C(),H:4.m.2A()}},4e:k(){6 o=4.n;5(o.C==\'P\')o.C=4.m[0].1l;5(o.C==\'D\'||o.C==\'1A\')4.C=[0-4.f.1i.8-4.f.P.8,0-4.f.1i.e-4.f.P.e,$(o.C==\'D\'?D:1A).I()-4.13.I-4.V.8,($(o.C==\'D\'?D:1A).H()||D.1e.1l.3I)-4.13.H-4.V.e];5(!(/^(D|1A|P)$/).29(o.C)){6 U=$(o.C)[0];6 1V=$(o.C).f();6 1b=($(U).v("5b")!=\'46\');4.C=[1V.8+(R($(U).v("2K"),10)||0)+(R($(U).v("42"),10)||0)-4.V.8,1V.e+(R($(U).v("2x"),10)||0)+(R($(U).v("3H"),10)||0)-4.V.e,1V.8+(1b?1N.3M(U.58,U.2L):U.2L)-(R($(U).v("2K"),10)||0)-(R($(U).v("3P"),10)||0)-4.13.I-4.V.8,1V.e+(1b?1N.3M(U.3I,U.2z):U.2z)-(R($(U).v("2x"),10)||0)-(R($(U).v("3J"),10)||0)-4.13.H-4.V.e]}},2s:k(d,1R){5(!1R)1R=4.1c;6 1C=d=="1B"?1:-1;6 o=4.n,1j=4.14==\'1B\'&&!(4.A[0]!=D&&$.z.1p(4.A[0],4.Q[0]))?4.Q:4.A,1E=(/(2O|1e)/i).29(1j[0].1H);w{e:(1R.e+4.f.1i.e*1C+4.f.P.e*1C-($.1U.24&&4.14==\'1r\'?0:(4.14==\'1r\'?-4.A.T():(1E?0:1j.T()))*1C)),8:(1R.8+4.f.1i.8*1C+4.f.P.8*1C-($.1U.24&&4.14==\'1r\'?0:(4.14==\'1r\'?-4.A.S():1E?0:1j.S())*1C))}},2t:k(9){6 o=4.n,1j=4.14==\'1B\'&&!(4.A[0]!=D&&$.z.1p(4.A[0],4.Q[0]))?4.Q:4.A,1E=(/(2O|1e)/i).29(1j[0].1H);5(4.14==\'1i\'&&!(4.A[0]!=D&&4.A[0]!=4.Q[0])){4.f.1i=4.35()}6 Z=9.Z;6 X=9.X;5(4.3Z){5(4.C){5(9.Z-4.f.E.8<4.C[0])Z=4.C[0]+4.f.E.8;5(9.X-4.f.E.e<4.C[1])X=4.C[1]+4.f.E.e;5(9.Z-4.f.E.8>4.C[2])Z=4.C[2]+4.f.E.8;5(9.X-4.f.E.e>4.C[3])X=4.C[3]+4.f.E.e}5(o.1g){6 e=4.34+1N.41((X-4.34)/o.1g[1])*o.1g[1];X=4.C?(!(e-4.f.E.e<4.C[1]||e-4.f.E.e>4.C[3])?e:(!(e-4.f.E.e<4.C[1])?e-o.1g[1]:e+o.1g[1])):e;6 8=4.3c+1N.41((Z-4.3c)/o.1g[0])*o.1g[0];Z=4.C?(!(8-4.f.E.8<4.C[0]||8-4.f.E.8>4.C[2])?8:(!(8-4.f.E.8<4.C[0])?8-o.1g[0]:8+o.1g[0])):8}}w{e:(X-4.f.E.e-4.f.1i.e-4.f.P.e+($.1U.24&&4.14==\'1r\'?0:(4.14==\'1r\'?-4.A.T():(1E?0:1j.T())))),8:(Z-4.f.E.8-4.f.1i.8-4.f.P.8+($.1U.24&&4.14==\'1r\'?0:(4.14==\'1r\'?-4.A.S():1E?0:1j.S())))}},25:k(9,i,a,3X){a?a[0].3V(4.F[0]):i.g[0].1l.55(4.F[0],(4.3O==\'1G\'?i.g[0]:i.g[0].56));4.1x=4.1x?++4.1x:1;6 q=4,1x=4.1x;1A.53(k(){5(1x==q.1x)q.2i(!3X)},0)},2U:k(9,1d){4.2k=B;6 18=[],q=4;5(!4.31&&4.h[0].1l)4.F.52(4.h);4.31=17;5(4.m[0]==4.h[0]){O(6 i 4Z 4.1y){5(4.1y[i]==\'2T\'||4.1y[i]==\'3L\')4.1y[i]=\'\'}4.h.v(4.1y).2h("z-N-m")}11{4.h.43()}5(4.2l&&!1d)18.W(k(9){4.L("4d",9,4.M(4.2l))});5((4.2l||4.1M.1z!=4.h.1z().2p(".z-N-m")[0]||4.1M.P!=4.h.P()[0])&&!1d)18.W(k(9){4.L("22",9,4.M())});5(!$.z.1p(4.J[0],4.h[0])){5(!1d)18.W(k(9){4.L("2M",9,4.M())});O(6 i=4.s.K-1;i>=0;i--){5($.z.1p(4.s[i].J[0],4.h[0])&&!1d){18.W((k(c){w k(9){c.L("4d",9,4.M(4))}}).19(4,4.s[i]));18.W((k(c){w k(9){c.L("22",9,4.M(4))}}).19(4,4.s[i]))}}};O(6 i=4.s.K-1;i>=0;i--){5(!1d)18.W((k(c){w k(9){c.L("4h",9,4.M(4))}}).19(4,4.s[i]));5(4.s[i].12.1b){18.W((k(c){w k(9){c.L("36",9,4.M(4))}}).19(4,4.s[i]));4.s[i].12.1b=0}}5(4.39)$(\'1e\').v("1D",4.39);5(4.2P)4.m.v("1w",4.2P);5(4.2f)4.m.v("1v",4.2f==\'2T\'?\'\':4.2f);4.2e=B;5(4.51){5(!1d){4.L("49",9,4.M());O(6 i=0;i<18.K;i++){18[i].19(4,9)};4.L("4b",9,4.M())}w B}5(!1d)4.L("49",9,4.M());4.F[0].1l.4j(4.F[0]);5(4.m[0]!=4.h[0])4.m.2M();4.m=17;5(!1d){O(6 i=0;i<18.K;i++){18[i].19(4,9)};4.L("4b",9,4.M())}4.2l=B;w 16},L:k(){5($.4f.57.L.3K(4,50)===B){4.2u()}},M:k(G){6 q=G||4;w{m:q.m,F:q.F||$([]),1c:q.1c,4X:q.Y,f:q.Y,g:q.h,4W:G?G.J:17}}}));$.2a($.z.N,{5p:"4c 47",5d:"1.7.2",5e:"3u",5l:{2r:"P",1W:B,2u:":5j,4S",15:B,C:B,1D:\'2T\',2R:B,4Y:0,54:1,3Q:16,4k:B,2Y:B,1g:B,2J:B,m:"2W",u:\'> *\',1w:B,F:B,2X:B,1j:16,1m:20,1n:20,4Q:"4P",2d:"4T",1v:4U}})})(4V);',62,336,'||||this|if|var||left|event|||||top|offset|item|currentItem|||function||helper|options|||self||containers||items|css|return|||ui|scrollParent|false|containment|document|click|placeholder|inst|height|width|element|length|_trigger|_uiHash|sortable|for|parent|offsetParent|parseInt|scrollLeft|scrollTop|ce|margins|push|pageY|positionAbs|pageX||else|containerCache|helperProportions|cssPosition|connectWith|true|null|delayedTriggers|call|cur|over|position|noPropagation|body|queries|grid|ddmanager|relative|scroll|scrolled|parentNode|scrollSensitivity|scrollSpeed|obj|contains|verticalDirection|fixed|style|floating|horizontalDirection|zIndex|opacity|counter|_storedCSS|prev|window|absolute|mod|cursor|scrollIsRootNode|delta|down|tagName|data|currentContainer|right|po|domPosition|Math|lastPositionAbs|itemElement|x1|pos|each|overflowOffset|browser|co|axis|itemWithLeastDistance|res|y1||className|update|isFunction|safari|_rearrange|continue|connected|target|test|extend|intersection|undefined|tolerance|dragging|_storedZIndex|disabled|removeClass|refreshPositions|isOverElement|reverting|fromOutside|isOverAxis|overrideHandle|targetData|not|up|appendTo|_convertPositionTo|_generatePosition|cancel|dxClick|_queries|borderTopWidth|ret|offsetHeight|outerHeight|pointer|outerWidth|_cacheHelperProportions|str|dropBehaviour|el|_getParentOffset|custom|handle|borderLeftWidth|offsetWidth|remove|addClass|html|_storedOpacity|_getDragVerticalDirection|cursorAt|validHandle|auto|_clear|isOverRightHalf|original|revert|forceHelperSize|isOverBottomHalf|_getItemsAsjQuery|_noFinalSort|change|_connectWith|originalPageY|_getRelativeOffset|out|dist|_refreshItems|_storedCursor|list|dyClick|originalPageX|_getDragHorizontalDirection|base|expression|after|abs|_contactContainers|_intersectsWith|id|y2|key|isOverElementHeight|x2|queriesLength|_intersectsWithSides|attr|find|refresh|sort|_removeCurrentsFromItems|isOverElementWidth|instance|that|constructor|String|_createPlaceholder|refreshContainers|toleranceElement|_intersectsWithPointer|fast|attribute|paddingTop|scrollHeight|paddingBottom|apply|static|max|break|direction|paddingRight|dropOnEmpty|type|noActivation|removeData|_mouseDrag|appendChild|HTML|hardRefresh|prepareOffsets|originalPosition|px|round|paddingLeft|show|_adjustOffsetFromHelper|_createHelper|hidden|toArray|parents|beforeStop|clone|stop|serialize|receive|_setContainment|widget|_cacheMargins|deactivate|bottom|removeChild|forcePlaceholderSize|current|_mouseStart|activate|_preserveHelperProportions|hide|start|mouse|next|500|animate|drop|destroy|_|match|_mouseInit|float|prepend|_mouseStop|drag|unbind|_mouseDestroy|_mouseCapture|nodes|_mouseUp|_init|join|dynamic|semi|andSelf|marginTop|default|scope|forcePointerForContainers|option|intersect|1000|jQuery|sender|absolutePosition|delay|in|arguments|cancelHelperRemoval|before|setTimeout|distance|insertBefore|nextSibling|prototype|scrollWidth|nodeName|visibility|overflow|createElement|version|eventPrefix|splice|innerHeight|container|msie|input|marginLeft|defaults|innerWidth|toLowerCase|10000|getter'.split('|'),0,{}))
diff --git a/template-common/lib/ui/packed/ui.tabs.packed.js b/template-common/lib/ui/packed/ui.tabs.packed.js
index 137270e23..20da11c44 100644
--- a/template-common/lib/ui/packed/ui.tabs.packed.js
+++ b/template-common/lib/ui/packed/ui.tabs.packed.js
@@ -1,2 +1 @@
-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}('(4(A){A.3g("8.3",{3f:4(){2.c.t+=".3";2.1f(1d)},3e:4(B,C){5((/^7/).26(B)){2.17(C)}m{2.c[B]=C;2.1f()}},j:4(){d 2.$3.j},1G:4(B){d B.2b&&B.2b.14(/\\s/g,"2a").14(/[^A-3d-3c-9\\-2a:\\.]/g,"")||2.c.1S+A.f(B)},8:4(C,B){d{c:2.c,3b:C,1O:B,V:2.$3.V(C)}},1f:4(O){2.$i=A("1j:3a(a[n])",2.h);2.$3=2.$i.1t(4(){d A("a",2)[0]});2.$b=A([]);6 P=2,D=2.c;2.$3.X(4(R,Q){5(Q.v&&Q.v.14("#","")){P.$b=P.$b.1c(Q.v)}m{5(A(Q).13("n")!="#"){A.f(Q,"n.3",Q.n);A.f(Q,"p.3",Q.n);6 T=P.1G(Q);Q.n="#"+T;6 S=A("#"+T);5(!S.j){S=A(D.1z).13("1g",T).l(D.19).39(P.$b[R-1]||P.h);S.f("1b.3",1d)}P.$b=P.$b.1c(S)}m{D.e.1Y(R+1)}}});5(O){2.h.l(D.1y);2.$b.X(4(){6 Q=A(2);Q.l(D.19)});5(D.7===1q){5(1L.v){2.$3.X(4(S,Q){5(Q.v==1L.v){D.7=S;5(A.Y.1h||A.Y.38){6 R=A(1L.v),T=R.13("1g");R.13("1g","");1B(4(){R.13("1g",T)},37)}36(0,0);d o}})}m{5(D.11){6 J=35(A.11("8-3"+A.f(P.h)),10);5(J&&P.$3[J]){D.7=J}}m{5(P.$i.U("."+D.k).j){D.7=P.$i.V(P.$i.U("."+D.k)[0])}}}}D.7=D.7===w||D.7!==1q?D.7:0;D.e=A.34(D.e.33(A.1t(2.$i.U("."+D.W),4(R,Q){d P.$i.V(R)}))).1X();5(A.1s(D.7,D.e)!=-1){D.e.32(A.1s(D.7,D.e),1)}2.$b.l(D.x);2.$i.q(D.k);5(D.7!==w){2.$b.r(D.7).1I().q(D.x);2.$i.r(D.7).l(D.k);6 K=4(){A(P.h).z("1v",[P.u("1v"),P.8(P.$3[D.7],P.$b[D.7])],D.1I)};5(A.f(2.$3[D.7],"p.3")){2.p(D.7,K)}m{K()}}A(31).16("30",4(){P.$3.15(".3");P.$i=P.$3=P.$b=w})}2Z(6 G=0,N;N=2.$i[G];G++){A(N)[A.1s(G,D.e)!=-1&&!A(N).12(D.k)?"l":"q"](D.W)}5(D.y===o){2.$3.1n("y.3")}6 C,I,B={"2Y-2X":0,1K:1},E="2W";5(D.Z&&D.Z.2V==2U){C=D.Z[0]||B,I=D.Z[1]||B}m{C=I=D.Z||B}6 H={1r:"",2T:"",2S:""};5(!A.Y.1h){H.1J=""}4 M(R,Q,S){Q.29(C,C.1K||E,4(){Q.l(D.x).1e(H);5(A.Y.1h&&C.1J){Q[0].28.U=""}5(S){L(R,S,Q)}})}4 L(R,S,Q){5(I===B){S.1e("1r","1F")}S.29(I,I.1K||E,4(){S.q(D.x).1e(H);5(A.Y.1h&&I.1J){S[0].28.U=""}A(P.h).z("1v",[P.u("1v"),P.8(R,S[0])],D.1I)})}4 F(R,T,Q,S){T.l(D.k).2R().q(D.k);M(R,Q,S)}2.$3.15(".3").16(D.t,4(){6 T=A(2).2Q("1j:r(0)"),Q=P.$b.U(":2P"),S=A(2.v);5((T.12(D.k)&&!D.1i)||T.12(D.W)||A(2).12(D.18)||A(P.h).z("27",[P.u("27"),P.8(2,S[0])],D.17)===o){2.1u();d o}P.c.7=P.$3.V(2);5(D.1i){5(T.12(D.k)){P.c.7=w;T.q(D.k);P.$b.1H();M(2,Q);2.1u();d o}m{5(!Q.j){P.$b.1H();6 R=2;P.p(P.$3.V(2),4(){T.l(D.k).l(D.1x);L(R,S)});2.1u();d o}}}5(D.11){A.11("8-3"+A.f(P.h),P.c.7,D.11)}P.$b.1H();5(S.j){6 R=2;P.p(P.$3.V(2),Q.j?4(){F(R,T,Q,S)}:4(){T.l(D.k);L(R,S)})}m{2O"1M 2N 2M: 2L 2K 2J."}5(A.Y.1h){2.1u()}d o});5(!(/^1A/).26(D.t)){2.$3.16("1A.3",4(){d o})}},1c:4(E,D,C){5(C==1q){C=2.$3.j}6 G=2.c;6 I=A(G.1R.14(/#\\{n\\}/g,E).14(/#\\{1k\\}/g,D));I.f("1b.3",1d);6 H=E.2I("#")==0?E.14("#",""):2.1G(A("a:2H-2G",I)[0]);6 F=A("#"+H);5(!F.j){F=A(G.1z).13("1g",H).l(G.x).f("1b.3",1d)}F.l(G.19);5(C>=2.$i.j){I.25(2.h);F.25(2.h[0].2F)}m{I.24(2.$i[C]);F.24(2.$b[C])}G.e=A.1t(G.e,4(K,J){d K>=C?++K:K});2.1f();5(2.$3.j==1){I.l(G.k);F.q(G.x);6 B=A.f(2.$3[0],"p.3");5(B){2.p(C,B)}}2.h.z("23",[2.u("23"),2.8(2.$3[C],2.$b[C])],G.1c)},1a:4(B){6 D=2.c,E=2.$i.r(B).1a(),C=2.$b.r(B).1a();5(E.12(D.k)&&2.$3.j>1){2.17(B+(B+1<2.$3.j?1:-1))}D.e=A.1t(A.21(D.e,4(G,F){d G!=B}),4(G,F){d G>=B?--G:G});2.1f();2.h.z("22",[2.u("22"),2.8(E.1E("a")[0],C[0])],D.1a)},1Z:4(B){6 C=2.c;5(A.1s(B,C.e)==-1){d}6 D=2.$i.r(B).q(C.W);5(A.Y.2E){D.1e("1r","2D-1F");1B(4(){D.1e("1r","1F")},0)}C.e=A.21(C.e,4(F,E){d F!=B});2.h.z("20",[2.u("20"),2.8(2.$3[B],2.$b[B])],C.1Z)},1V:4(C){6 B=2,D=2.c;5(C!=D.7){2.$i.r(C).l(D.W);D.e.1Y(C);D.e.1X();2.h.z("1W",[2.u("1W"),2.8(2.$3[C],2.$b[C])],D.1V)}},17:4(B){5(2C B=="2B"){B=2.$3.V(2.$3.U("[n$="+B+"]")[0])}2.$3.r(B).2A(2.c.t)},p:4(G,K){6 L=2,D=2.c,E=2.$3.r(G),J=E[0],H=K==1q||K===o,B=E.f("p.3");K=K||4(){};5(!B||!H&&A.f(J,"y.3")){K();d}6 M=4(N){6 O=A(N),P=O.1E("*:2z");d P.j&&P.2y(":2x(2w)")&&P||O};6 C=4(){L.$3.U("."+D.18).q(D.18).X(4(){5(D.1m){M(2).2v().1p(M(2).f("1k.3"))}});L.1o=w};5(D.1m){6 I=M(J).1p();M(J).2u("<1D></1D>").1E("1D").f("1k.3",I).1p(D.1m)}6 F=A.1N({},D.1l,{1T:B,1C:4(O,N){A(J.v).1p(O);C();5(D.y){A.f(J,"y.3",1d)}A(L.h).z("1U",[L.u("1U"),L.8(L.$3[G],L.$b[G])],D.p);D.1l.1C&&D.1l.1C(O,N);K()}});5(2.1o){2.1o.2t();C()}E.l(D.18);1B(4(){L.1o=A.2s(F)},0)},1T:4(C,B){2.$3.r(C).1n("y.3").f("p.3",B)},1b:4(){6 B=2.c;2.h.15(".3").q(B.1y).1n("3");2.$3.X(4(){6 C=A.f(2,"n.3");5(C){2.n=C}6 D=A(2).15(".3");A.X(["n","p","y"],4(E,F){D.1n(F+".3")})});2.$i.1c(2.$b).X(4(){5(A.f(2,"1b.3")){A(2).1a()}m{A(2).q([B.k,B.1x,B.W,B.19,B.x].2r(" "))}})},u:4(B){d A.t.2q({2p:B,2o:2.h[0]})}});A.8.3.2n={1i:o,t:"1A",e:[],11:w,1m:"2m&#2l;",y:o,1S:"8-3-",1l:{},Z:w,1R:\'<1j><a n="#{n}"><1Q>#{1k}</1Q></a></1j>\',1z:"<1P></1P>",1y:"8-3-2k",k:"8-3-7",1x:"8-3-1i",W:"8-3-e",19:"8-3-1O",x:"8-3-2j",18:"8-3-2i"};A.8.3.2h="j";A.1N(A.8.3.2g,{1w:w,2f:4(C,F){F=F||o;6 B=2,E=2.c.7;4 G(){B.1w=2e(4(){E=++E<B.$3.j?E:0;B.17(E)},C)}4 D(H){5(!H||H.2d){2c(B.1w)}}5(C){G();5(!F){2.$3.16(2.c.t,D)}m{2.$3.16(2.c.t,4(){D();E=B.c.7;G()})}}m{D();2.$3.15(2.c.t,D)}}})})(1M)',62,203,'||this|tabs|function|if|var|selected|ui|||panels|options|return|disabled|data||element|lis|length|selectedClass|addClass|else|href|false|load|removeClass|eq||event|fakeEvent|hash|null|hideClass|cache|triggerHandler|||||||||||||||||||||filter|index|disabledClass|each|browser|fx||cookie|hasClass|attr|replace|unbind|bind|select|loadingClass|panelClass|remove|destroy|add|true|css|tabify|id|msie|unselect|li|label|ajaxOptions|spinner|removeData|xhr|html|undefined|display|inArray|map|blur|tabsshow|rotation|unselectClass|navClass|panelTemplate|click|setTimeout|success|em|find|block|tabId|stop|show|opacity|duration|location|jQuery|extend|panel|div|span|tabTemplate|idPrefix|url|tabsload|disable|tabsdisable|sort|push|enable|tabsenable|grep|tabsremove|tabsadd|insertBefore|appendTo|test|tabsselect|style|animate|_|title|clearInterval|clientX|setInterval|rotate|prototype|getter|loading|hide|nav|8230|Loading|defaults|target|type|fix|join|ajax|abort|wrapInner|parent|img|not|is|last|trigger|string|typeof|inline|safari|parentNode|child|first|indexOf|identifier|fragment|Mismatching|Tabs|UI|throw|visible|parents|siblings|height|overflow|Array|constructor|normal|width|min|for|unload|window|splice|concat|unique|parseInt|scrollTo|500|opera|insertAfter|has|tab|z0|Za|setData|init|widget'.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}('(8($){$.J("4.5",{2W:8(){b(3.x.1J!==1O){3.x.Q=3.x.1J}3.1q(1e)},2X:8(1C,1m){b(1C==\'d\'){b(3.x.Q&&1m==3.x.d){z}3.1l(1m)}I{3.x[1C]=1m;b(1C==\'1J\'){3.x.Q=1m}3.1q()}},1Q:8(a){z a.29&&a.29.14(/\\s/g,\'26\').14(/[^A-2V-2U-9\\-26:\\.]/g,\'\')||3.x.2s+$.H(a)},1s:8(11){z 11.14(/:/g,\'\\\\:\')},16:8(){j B=3.B||(3.B=3.x.B.2S||\'4-5-\'+$.H(3.12[0]));z $.B.2T(y,[B].2h($.2Y(2Z)))},K:8(1G,u){z{1G:1G,u:u,c:3.f.c(1G)}},22:8(){3.k.V(\'.4-h-1B\').D(\'4-h-1B\').2n(\'1a:H(Y.5)\').1f(8(){j G=$(3);G.1u(G.H(\'Y.5\')).1n(\'Y.5\')})},1q:8(28){3.12=3.C.35(\'33:32\');3.k=$(\'l:30(a[m])\',3.12);3.f=3.k.1z(8(){z $(\'a\',3)[0]});3.w=$([]);j 6=3,o=3.x;j 24=/^#.+/;3.f.1f(8(i,a){j m=$(a).1R(\'m\');j 1D=m.2a(\'#\')[0],1U;b(1D&&(1D===1L.31().2a(\'#\')[0]||(1U=$(\'2P\')[0])&&1D===1U.m)){m=a.11;a.m=m}b(24.2J(m)){6.w=6.w.19(6.1s(m))}I b(m!=\'#\'){$.H(a,\'m.5\',m);$.H(a,\'R.5\',m.14(/#.*$/,\'\'));j T=6.1Q(a);a.m=\'#\'+T;j $u=$(\'#\'+T);b(!$u.F){$u=$(o.1T).1R(\'T\',T).v(\'4-5-u 4-J-1h 4-M-1t\').2F(6.w[i-1]||6.12);$u.H(\'1o.5\',1e)}6.w=6.w.19($u)}I{o.p.2y(i)}});b(28){3.C.v(\'4-5 4-J 4-J-1h 4-M-1w\');3.12.v(\'4-5-2b 4-1x-2j 4-1x-2c 4-J-2d 4-M-1w\');3.k.v(\'4-h-15 4-M-1P\');3.w.v(\'4-5-u 4-J-1h 4-M-1t\');b(o.d===1O){b(1L.11){3.f.1f(8(i,a){b(a.11==1L.11){o.d=i;z O}})}b(1X o.d!=\'2l\'&&o.B){o.d=2Q(6.16(),10)}b(1X o.d!=\'2l\'&&3.k.V(\'.4-5-d\').F){o.d=3.k.c(3.k.V(\'.4-5-d\'))}o.d=o.d||0}I b(o.d===y){o.d=-1}o.d=((o.d>=0&&3.f[o.d])||o.d<0)?o.d:0;o.p=$.2O(o.p.2h($.1z(3.k.V(\'.4-h-p\'),8(n,i){z 6.k.c(n)}))).2r();b($.1y(o.d,o.p)!=-1){o.p.2N($.1y(o.d,o.p),1)}3.w.v(\'4-5-q\');3.k.D(\'4-5-d 4-h-Z\');b(o.d>=0&&3.f.F){3.w.N(o.d).D(\'4-5-q\');3.k.N(o.d).v(\'4-5-d 4-h-Z\');6.C.13("5",8(){6.P(\'E\',y,6.K(6.f[o.d],6.w[o.d]))});3.R(o.d)}$(2L).S(\'37\',8(){6.k.19(6.f).1c(\'.5\');6.k=6.f=6.w=y})}I{o.d=3.k.c(3.k.V(\'.4-5-d\'))}3.C[o.Q?\'v\':\'D\'](\'4-5-Q\');b(o.B){3.16(o.d,o.B)}2M(j i=0,l;(l=3.k[i]);i++){$(l)[$.1y(i,o.p)!=-1&&!$(l).1g(\'4-5-d\')?\'v\':\'D\'](\'4-h-p\')}b(o.U===O){3.f.1n(\'U.5\')}3.k.19(3.f).1c(\'.5\');b(o.1d!=\'2g\'){j 1N=8(h,G){b(G.36(\':27(.4-h-p)\')){G.v(\'4-h-\'+h)}};j 1I=8(h,G){G.D(\'4-h-\'+h)};3.k.S(\'2g.5\',8(){1N(\'1K\',$(3))});3.k.S(\'3q.5\',8(){1I(\'1K\',$(3))});3.f.S(\'1A.5\',8(){1N(\'1A\',$(3).1r(\'l\'))});3.f.S(\'1j.5\',8(){1I(\'1A\',$(3).1r(\'l\'))})}j 18,1b;b(o.X){b($.3o(o.X)){18=o.X[0];1b=o.X[1]}I{18=1b=o.X}}8 21($G,X){$G.3m({3n:\'\'});b($.2e.25&&X.3t){$G[0].3s.3u(\'V\')}}j 23=1b?8(W,$E){$(W).1r(\'l\').D(\'4-h-15\').v(\'4-5-d 4-h-Z\');$E.q().D(\'4-5-q\').2i(1b,1b.2k||\'2m\',8(){21($E,1b);6.P(\'E\',y,6.K(W,$E[0]))})}:8(W,$E){$(W).1r(\'l\').D(\'4-h-15\').v(\'4-5-d 4-h-Z\');$E.D(\'4-5-q\');6.P(\'E\',y,6.K(W,$E[0]))};j 1Z=18?8(W,$q){$q.2i(18,18.2k||\'2m\',8(){6.k.D(\'4-5-d 4-h-Z\').v(\'4-h-15\');$q.v(\'4-5-q\');21($q,18);6.C.1i("5")})}:8(W,$q,$E){6.k.D(\'4-5-d 4-h-Z\').v(\'4-h-15\');$q.v(\'4-5-q\');6.C.1i("5")};3.f.S(o.1d+\'.5\',8(){j G=3,$l=$(3).1r(\'l\'),$q=6.w.V(\':27(.4-5-q)\'),$E=$(6.1s(3.11));b(($l.1g(\'4-5-d\')&&!o.Q)||$l.1g(\'4-h-p\')||$l.1g(\'4-h-1B\')||6.P(\'1l\',y,6.K(3,$E[0]))===O){3.1j();z O}o.d=6.f.c(3);6.1k();b(o.Q){b($l.1g(\'4-5-d\')){o.d=-1;b(o.B){6.16(o.d,o.B)}6.C.13("5",8(){1Z(G,$q)}).1i("5");3.1j();z O}I b(!$q.F){b(o.B){6.16(o.d,o.B)}6.C.13("5",8(){23(G,$E)});6.R(6.f.c(3));3.1j();z O}}b(o.B){6.16(o.d,o.B)}b($E.F){b($q.F){6.C.13("5",8(){1Z(G,$q)})}6.C.13("5",8(){23(G,$E)});6.R(6.f.c(3))}I{3a\'2E 38 39: 3d 3e 3j.\'}b($.2e.25){3.1j()}});3.f.S(\'2o.5\',8(){z O})},1o:8(){j o=3.x;3.1k();3.C.1c(\'.5\').D(\'4-5 4-J 4-J-1h 4-M-1w 4-5-Q\').1n(\'5\');3.12.D(\'4-5-2b 4-1x-2j 4-1x-2c 4-J-2d 4-M-1w\');3.f.1f(8(){j m=$.H(3,\'m.5\');b(m){3.m=m}j $3=$(3).1c(\'.5\');$.1f([\'m\',\'R\',\'U\'],8(i,2f){$3.1n(2f+\'.5\')})});3.k.1c(\'.5\').19(3.w).1f(8(){b($.H(3,\'1o.5\')){$(3).1p()}I{$(3).D([\'4-h-15\',\'4-M-1P\',\'4-5-d\',\'4-h-Z\',\'4-h-1K\',\'4-h-1A\',\'4-h-p\',\'4-5-u\',\'4-J-1h\',\'4-M-1t\',\'4-5-q\'].2K(\' \'))}});b(o.B){3.16(y,o.B)}},19:8(L,Y,c){b(c===1O){c=3.f.F}j 6=3,o=3.x,$l=$(o.2x.14(/#\\{m\\}/g,L).14(/#\\{Y\\}/g,Y)),T=!L.3p(\'#\')?L.14(\'#\',\'\'):3.1Q($(\'a\',$l)[0]);$l.v(\'4-h-15 4-M-1P\').H(\'1o.5\',1e);j $u=$(\'#\'+T);b(!$u.F){$u=$(o.1T).1R(\'T\',T).H(\'1o.5\',1e)}$u.v(\'4-5-u 4-J-1h 4-M-1t 4-5-q\');b(c>=3.k.F){$l.2B(3.12);$u.2B(3.12[0].2R)}I{$l.2D(3.k[c]);$u.2D(3.w[c])}o.p=$.1z(o.p,8(n,i){z n>=c?++n:n});3.1q();b(3.f.F==1){$l.v(\'4-5-d 4-h-Z\');$u.D(\'4-5-q\');3.C.13("5",8(){6.P(\'E\',y,6.K(6.f[0],6.w[0]))});3.R(0)}3.P(\'19\',y,3.K(3.f[c],3.w[c]))},1p:8(c){j o=3.x,$l=3.k.N(c).1p(),$u=3.w.N(c).1p();b($l.1g(\'4-5-d\')&&3.f.F>1){3.1l(c+(c+1<3.f.F?1:-1))}o.p=$.1z($.2A(o.p,8(n,i){z n!=c}),8(n,i){z n>=c?--n:n});3.1q();3.P(\'1p\',y,3.K($l.2n(\'a\')[0],$u[0]))},2C:8(c){j o=3.x;b($.1y(c,o.p)==-1){z}3.k.N(c).D(\'4-h-p\');o.p=$.2A(o.p,8(n,i){z n!=c});3.P(\'2C\',y,3.K(3.f[c],3.w[c]))},2q:8(c){j 6=3,o=3.x;b(c!=o.d){3.k.N(c).v(\'4-h-p\');o.p.2y(c);o.p.2r();3.P(\'2q\',y,3.K(3.f[c],3.w[c]))}},1l:8(c){b(1X c==\'3g\'){c=3.f.c(3.f.V(\'[m$=\'+c+\']\'))}I b(c===y){c=-1}b(c==-1&&3.x.Q){c=3.x.d}3.f.N(c).3f(3.x.1d+\'.5\')},R:8(c){j 6=3,o=3.x,a=3.f.N(c)[0],L=$.H(a,\'R.5\');3.1k();b(!L||3.C.13("5").F!==0&&$.H(a,\'U.5\')){3.C.1i("5");z}3.k.N(c).v(\'4-h-1B\');b(o.1M){j 1a=$(\'1a\',a);1a.H(\'Y.5\',1a.1u()).1u(o.1M)}3.1F=$.3h($.1V({},o.20,{L:L,2p:8(r,s){$(6.1s(a.11)).1u(r);6.22();b(o.U){$.H(a,\'U.5\',1e)}6.P(\'R\',y,6.K(6.f[c],6.w[c]));3i{o.20.2p(r,s)}3l(e){}6.C.1i("5")}}))},1k:8(){3.C.13([]);3.w.1v(O,1e);b(3.1F){3.1F.1k();1W 3.1F}3.22()},L:8(c,L){3.f.N(c).1n(\'U.5\').H(\'R.5\',L)},F:8(){z 3.f.F}});$.1V($.4.5,{3c:\'1.7.2\',3k:\'F\',3v:{20:y,U:O,B:y,Q:O,p:[],1d:\'2o\',X:y,2s:\'4-5-\',1T:\'<2z></2z>\',1M:\'<2t>3r&#3b;</2t>\',2x:\'<l><a m="#{m}"><1a>#{Y}</1a></a></l>\'}});$.1V($.4.5.2I,{1E:y,17:8(1S,2w){j 6=3,o=3.x;j 17=6.1Y||(6.1Y=8(e){2v(6.1E);6.1E=2G(8(){j t=o.d;6.1l(++t<6.f.F?t:0)},1S);b(e){e.2H()}});j 1v=6.1H||(6.1H=!2w?8(e){b(e.34){6.17(y)}}:8(e){t=o.d;17()});b(1S){3.C.S(\'2u\',17);3.f.S(o.1d+\'.5\',1v);17()}I{2v(6.1E);3.C.1c(\'2u\',17);3.f.1c(o.1d+\'.5\',1v);1W 3.1Y;1W 3.1H}}})})(2E);',62,218,'|||this|ui|tabs|self||function|||if|index|selected||anchors||state||var|lis|li|href|||disabled|hide||||panel|addClass|panels|options|null|return||cookie|element|removeClass|show|length|el|data|else|widget|_ui|url|corner|eq|false|_trigger|collapsible|load|bind|id|cache|filter|clicked|fx|label|active||hash|list|queue|replace|default|_cookie|rotate|hideFx|add|span|showFx|unbind|event|true|each|hasClass|content|dequeue|blur|abort|select|value|removeData|destroy|remove|_tabify|closest|_sanitizeSelector|bottom|html|stop|all|helper|inArray|map|focus|processing|key|hrefBase|rotation|xhr|tab|_unrotate|removeState|deselectable|hover|location|spinner|addState|undefined|top|_tabId|attr|ms|panelTemplate|baseEl|extend|delete|typeof|_rotate|hideTab|ajaxOptions|resetStyle|_cleanup|showTab|fragmentId|msie|_|not|init|title|split|nav|clearfix|header|browser|prefix|mouseover|concat|animate|reset|duration|number|normal|find|click|success|disable|sort|idPrefix|em|tabsshow|clearTimeout|continuing|tabTemplate|push|div|grep|appendTo|enable|insertBefore|jQuery|insertAfter|setTimeout|stopPropagation|prototype|test|join|window|for|splice|unique|base|parseInt|parentNode|name|apply|z0|Za|_init|_setData|makeArray|arguments|has|toString|first|ul|clientX|children|is|unload|UI|Tabs|throw|8230|version|Mismatching|fragment|trigger|string|ajax|try|identifier|getter|catch|css|display|isArray|indexOf|mouseout|Loading|style|opacity|removeAttribute|defaults'.split('|'),0,{}))
diff --git a/template-common/lib/ui/theme/ui.datepicker.css b/template-common/lib/ui/theme/ui.datepicker.css
index eb41d0a16..567f8c97b 100644
--- a/template-common/lib/ui/theme/ui.datepicker.css
+++ b/template-common/lib/ui/theme/ui.datepicker.css
@@ -1,206 +1,54 @@
-/* $Id */
-/* Main Style Sheet for jQuery UI date picker */
-#ui-datepicker-div, .ui-datepicker-inline {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 14px;
- padding: 0;
- margin: 0;
- background: #ddd;
- width: 185px;
-}
-#ui-datepicker-div {
- display: none;
- border: 1px solid #777;
- z-index: 100; /*must have*/
-}
-.ui-datepicker-inline {
- float: left;
- display: block;
- border: 0;
-}
-.ui-datepicker-rtl {
- direction: rtl;
-}
-.ui-datepicker-dialog {
- padding: 5px !important;
- border: 4px ridge #ddd !important;
-}
-.ui-datepicker-disabled {
- position: absolute;
- z-index: 100;
- background-color: white;
- opacity: 0.5;
-}
-button.ui-datepicker-trigger {
- width: 25px;
-}
-img.ui-datepicker-trigger {
- margin: 2px;
- vertical-align: middle;
-}
-.ui-datepicker-prompt {
- float: left;
- padding: 2px;
- background: #ddd;
- color: #000;
-}
-* html .ui-datepicker-prompt {
- width: 185px;
-}
-.ui-datepicker-control, .ui-datepicker-links, .ui-datepicker-header, .ui-datepicker {
- clear: both;
- float: left;
- width: 100%;
- color: #fff;
-}
-.ui-datepicker-control {
- background: #400;
- padding: 2px 0px;
-}
-.ui-datepicker-links {
- background: #000;
- padding: 2px 0px;
-}
-.ui-datepicker-control, .ui-datepicker-links {
- font-weight: bold;
- font-size: 80%;
-}
-.ui-datepicker-links label { /* disabled links */
- padding: 2px 5px;
- color: #888;
-}
-.ui-datepicker-clear, .ui-datepicker-prev {
- float: left;
- width: 34%;
-}
-.ui-datepicker-rtl .ui-datepicker-clear, .ui-datepicker-rtl .ui-datepicker-prev {
- float: right;
- text-align: right;
-}
-.ui-datepicker-current {
- float: left;
- width: 30%;
- text-align: center;
-}
-.ui-datepicker-close, .ui-datepicker-next {
- float: right;
- width: 34%;
- text-align: right;
-}
-.ui-datepicker-rtl .ui-datepicker-close, .ui-datepicker-rtl .ui-datepicker-next {
- float: left;
- text-align: left;
-}
-.ui-datepicker-header {
- padding: 1px 0 3px;
- background: #333;
- text-align: center;
- font-weight: bold;
- height: 1.3em;
-}
-.ui-datepicker-header select {
- background: #333;
- color: #fff;
- border: 0px;
- font-weight: bold;
-}
-.ui-datepicker {
- background: #ccc;
- text-align: center;
- font-size: 100%;
-}
-.ui-datepicker a {
- display: block;
- width: 100%;
-}
-.ui-datepicker-title-row {
- background: #777;
-}
-.ui-datepicker-days-row {
- background: #eee;
- color: #666;
-}
-.ui-datepicker-week-col {
- background: #777;
- color: #fff;
-}
-.ui-datepicker-days-cell {
- color: #000;
- border: 1px solid #ddd;
-}
-.ui-datepicker-days-cell a{
- display: block;
-}
-.ui-datepicker-week-end-cell {
- background: #ddd;
-}
-.ui-datepicker-title-row .ui-datepicker-week-end-cell {
- background: #777;
-}
-.ui-datepicker-days-cell-over {
- background: #fff;
- border: 1px solid #777;
-}
-.ui-datepicker-unselectable {
- color: #888;
-}
-.ui-datepicker-today {
- background: #fcc !important;
-}
-.ui-datepicker-current-day {
- background: #999 !important;
-}
-.ui-datepicker-status {
- background: #ddd;
- width: 100%;
- font-size: 80%;
- text-align: center;
-}
+/* Datepicker
+----------------------------------*/
+.ui-datepicker { width: 17em; padding: .2em .2em 0; }
+.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
+.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
+.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
+.ui-datepicker .ui-datepicker-prev { left:2px; }
+.ui-datepicker .ui-datepicker-next { right:2px; }
+.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
+.ui-datepicker .ui-datepicker-next-hover { right:1px; }
+.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
+.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
+.ui-datepicker .ui-datepicker-title select { float:left; font-size:1em; margin:1px 0; }
+.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
+.ui-datepicker select.ui-datepicker-month,
+.ui-datepicker select.ui-datepicker-year { width: 49%;}
+.ui-datepicker .ui-datepicker-title select.ui-datepicker-year { float: right; }
+.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
+.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
+.ui-datepicker td { border: 0; padding: 1px; }
+.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
+.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
+.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
+.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
-/* ________ Datepicker Links _______
+/* with multiple calendars */
+.ui-datepicker.ui-datepicker-multi { width:auto; }
+.ui-datepicker-multi .ui-datepicker-group { float:left; }
+.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
+.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
+.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
+.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
+.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
+.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
+.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
+.ui-datepicker-row-break { clear:both; width:100%; }
-** Reset link properties and then override them with !important */
-#ui-datepicker-div a, .ui-datepicker-inline a {
- cursor: pointer;
- margin: 0;
- padding: 0;
- background: none;
- color: #000;
-}
-.ui-datepicker-inline .ui-datepicker-links a {
- padding: 0 5px !important;
-}
-.ui-datepicker-control a, .ui-datepicker-links a {
- padding: 2px 5px !important;
- color: #eee !important;
-}
-.ui-datepicker-title-row a {
- color: #eee !important;
-}
-.ui-datepicker-control a:hover {
- background: #fdd !important;
- color: #333 !important;
-}
-.ui-datepicker-links a:hover, .ui-datepicker-title-row a:hover {
- background: #ddd !important;
- color: #333 !important;
-}
-
-/* ___________ MULTIPLE MONTHS _________*/
-
-.ui-datepicker-multi .ui-datepicker {
- border: 1px solid #777;
-}
-.ui-datepicker-one-month {
- float: left;
- width: 185px;
-}
-.ui-datepicker-new-row {
- clear: left;
-}
-
-/* ___________ IE6 IFRAME FIX ________ */
+/* RTL support */
+.ui-datepicker-rtl { direction: rtl; }
+.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
+.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
+.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
+.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
+.ui-datepicker-rtl .ui-datepicker-group { float:right; }
+.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
+.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
+/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
.ui-datepicker-cover {
display: none; /*sorry for IE5*/
display/**/: block; /*sorry for IE5*/
@@ -211,4 +59,4 @@ img.ui-datepicker-trigger {
left: -4px; /*must have*/
width: 200px; /*must have*/
height: 200px; /*must have*/
-}
+} \ No newline at end of file
diff --git a/template-common/lib/ui/ui.accordion.js b/template-common/lib/ui/ui.accordion.js
index 2cf014b8e..e469c3a61 100644
--- a/template-common/lib/ui/ui.accordion.js
+++ b/template-common/lib/ui/ui.accordion.js
@@ -1,7 +1,7 @@
/*
- * jQuery UI Accordion
- *
- * Copyright (c) 2007, 2008 Jörn Zaefferer
+ * jQuery UI Accordion 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
@@ -13,229 +13,389 @@
(function($) {
$.widget("ui.accordion", {
- init: function() {
- var options = this.options;
-
- if ( options.navigation ) {
- var current = this.element.find("a").filter(options.navigationFilter);
+
+ _init: function() {
+
+ var o = this.options, self = this;
+ this.running = 0;
+
+ // if the user set the alwaysOpen option on init
+ // then we need to set the collapsible option
+ // if they set both on init, collapsible will take priority
+ if (o.collapsible == $.ui.accordion.defaults.collapsible &&
+ o.alwaysOpen != $.ui.accordion.defaults.alwaysOpen) {
+ o.collapsible = !o.alwaysOpen;
+ }
+
+ if ( o.navigation ) {
+ var current = this.element.find("a").filter(o.navigationFilter);
if ( current.length ) {
- if ( current.filter(options.header).length ) {
- options.active = current;
+ if ( current.filter(o.header).length ) {
+ this.active = current;
} else {
- options.active = current.parent().parent().prev();
- current.addClass("current");
+ this.active = current.parent().parent().prev();
+ current.addClass("ui-accordion-content-active");
}
}
}
+
+ this.element.addClass("ui-accordion ui-widget ui-helper-reset");
- // calculate active if not specified, using the first header
- options.headers = this.element.find(options.header);
- options.active = findActive(options.headers, options.active);
-
- // IE7-/Win - Extra vertical space in Lists fixed
+ // in lack of child-selectors in CSS we need to mark top-LIs in a UL-accordion for some IE-fix
+ if (this.element[0].nodeName == "UL") {
+ this.element.children("li").addClass("ui-accordion-li-fix");
+ }
+
+ this.headers = this.element.find(o.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all")
+ .bind("mouseenter.accordion", function(){ $(this).addClass('ui-state-hover'); })
+ .bind("mouseleave.accordion", function(){ $(this).removeClass('ui-state-hover'); })
+ .bind("focus.accordion", function(){ $(this).addClass('ui-state-focus'); })
+ .bind("blur.accordion", function(){ $(this).removeClass('ui-state-focus'); });
+
+ this.headers
+ .next()
+ .addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");
+
+ this.active = this._findActive(this.active || o.active).toggleClass("ui-state-default").toggleClass("ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");
+ this.active.next().addClass('ui-accordion-content-active');
+
+ //Append icon elements
+ $("<span/>").addClass("ui-icon " + o.icons.header).prependTo(this.headers);
+ this.active.find(".ui-icon").toggleClass(o.icons.header).toggleClass(o.icons.headerSelected);
+
+ // IE7-/Win - Extra vertical space in lists fixed
if ($.browser.msie) {
this.element.find('a').css('zoom', '1');
}
-
- if (!this.element.hasClass("ui-accordion")) {
- this.element.addClass("ui-accordion");
- $("<span class='ui-accordion-left'/>").insertBefore(options.headers);
- $("<span class='ui-accordion-right'/>").appendTo(options.headers);
- options.headers.addClass("ui-accordion-header").attr("tabindex", "0");
+
+ this.resize();
+
+ //ARIA
+ this.element.attr('role','tablist');
+
+ this.headers
+ .attr('role','tab')
+ .bind('keydown', function(event) { return self._keydown(event); })
+ .next()
+ .attr('role','tabpanel');
+
+ this.headers
+ .not(this.active || "")
+ .attr('aria-expanded','false')
+ .attr("tabIndex", "-1")
+ .next()
+ .hide();
+
+ // make sure at least one header is in the tab order
+ if (!this.active.length) {
+ this.headers.eq(0).attr('tabIndex','0');
+ } else {
+ this.active
+ .attr('aria-expanded','true')
+ .attr('tabIndex', '0');
}
-
- var maxHeight;
- if ( options.fillSpace ) {
+
+ // only need links in taborder for Safari
+ if (!$.browser.safari)
+ this.headers.find('a').attr('tabIndex','-1');
+
+ if (o.event) {
+ this.headers.bind((o.event) + ".accordion", function(event) { return self._clickHandler.call(self, event, this); });
+ }
+
+ },
+
+ destroy: function() {
+ var o = this.options;
+
+ this.element
+ .removeClass("ui-accordion ui-widget ui-helper-reset")
+ .removeAttr("role")
+ .unbind('.accordion')
+ .removeData('accordion');
+
+ this.headers
+ .unbind(".accordion")
+ .removeClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-corner-top")
+ .removeAttr("role").removeAttr("aria-expanded").removeAttr("tabindex");
+
+ this.headers.find("a").removeAttr("tabindex");
+ this.headers.children(".ui-icon").remove();
+ var contents = this.headers.next().css("display", "").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active");
+ if (o.autoHeight || o.fillHeight) {
+ contents.css("height", "");
+ }
+ },
+
+ _setData: function(key, value) {
+ if(key == 'alwaysOpen') { key = 'collapsible'; value = !value; }
+ $.widget.prototype._setData.apply(this, arguments);
+ },
+
+ _keydown: function(event) {
+
+ var o = this.options, keyCode = $.ui.keyCode;
+
+ if (o.disabled || event.altKey || event.ctrlKey)
+ return;
+
+ var length = this.headers.length;
+ var currentIndex = this.headers.index(event.target);
+ var toFocus = false;
+
+ switch(event.keyCode) {
+ case keyCode.RIGHT:
+ case keyCode.DOWN:
+ toFocus = this.headers[(currentIndex + 1) % length];
+ break;
+ case keyCode.LEFT:
+ case keyCode.UP:
+ toFocus = this.headers[(currentIndex - 1 + length) % length];
+ break;
+ case keyCode.SPACE:
+ case keyCode.ENTER:
+ return this._clickHandler({ target: event.target }, event.target);
+ }
+
+ if (toFocus) {
+ $(event.target).attr('tabIndex','-1');
+ $(toFocus).attr('tabIndex','0');
+ toFocus.focus();
+ return false;
+ }
+
+ return true;
+
+ },
+
+ resize: function() {
+
+ var o = this.options, maxHeight;
+
+ if (o.fillSpace) {
+
+ if($.browser.msie) { var defOverflow = this.element.parent().css('overflow'); this.element.parent().css('overflow', 'hidden'); }
maxHeight = this.element.parent().height();
- options.headers.each(function() {
+ if($.browser.msie) { this.element.parent().css('overflow', defOverflow); }
+
+ this.headers.each(function() {
maxHeight -= $(this).outerHeight();
});
+
var maxPadding = 0;
- options.headers.next().each(function() {
+ this.headers.next().each(function() {
maxPadding = Math.max(maxPadding, $(this).innerHeight() - $(this).height());
- }).height(maxHeight - maxPadding);
- } else if ( options.autoHeight ) {
+ }).height(Math.max(0, maxHeight - maxPadding))
+ .css('overflow', 'auto');
+
+ } else if ( o.autoHeight ) {
maxHeight = 0;
- options.headers.next().each(function() {
+ this.headers.next().each(function() {
maxHeight = Math.max(maxHeight, $(this).outerHeight());
}).height(maxHeight);
}
-
- options.headers
- .not(options.active || "")
- .next()
- .hide();
- options.active.parent().andSelf().addClass(options.selectedClass);
-
- if (options.event) {
- this.element.bind((options.event) + ".accordion", clickHandler);
- }
+
},
+
activate: function(index) {
// call clickHandler with custom event
- clickHandler.call(this.element[0], {
- target: findActive( this.options.headers, index )[0]
- });
+ var active = this._findActive(index)[0];
+ this._clickHandler({ target: active }, active);
},
- destroy: function() {
- this.options.headers.next().css("display", "");
- if ( this.options.fillSpace || this.options.autoHeight ) {
- this.options.headers.next().css("height", "");
+
+ _findActive: function(selector) {
+ return selector
+ ? typeof selector == "number"
+ ? this.headers.filter(":eq(" + selector + ")")
+ : this.headers.not(this.headers.not(selector))
+ : selector === false
+ ? $([])
+ : this.headers.filter(":eq(0)");
+ },
+
+ _clickHandler: function(event, target) {
+
+ var o = this.options;
+ if (o.disabled) return false;
+
+ // called only when using activate(false) to close all parts programmatically
+ if (!event.target && o.collapsible) {
+ this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all")
+ .find(".ui-icon").removeClass(o.icons.headerSelected).addClass(o.icons.header);
+ this.active.next().addClass('ui-accordion-content-active');
+ var toHide = this.active.next(),
+ data = {
+ options: o,
+ newHeader: $([]),
+ oldHeader: o.active,
+ newContent: $([]),
+ oldContent: toHide
+ },
+ toShow = (this.active = $([]));
+ this._toggle(toShow, toHide, data);
+ return false;
}
- $.removeData(this.element[0], "accordion");
- this.element.removeClass("ui-accordion").unbind(".accordion");
- }
-});
-function scopeCallback(callback, scope) {
- return function() {
- return callback.apply(scope, arguments);
- };
-};
+ // get the click target
+ var clicked = $(event.currentTarget || target);
+ var clickedIsActive = clicked[0] == this.active[0];
-function completed(cancel) {
- // if removed while animated data can be empty
- if (!$.data(this, "accordion")) {
- return;
- }
-
- var instance = $.data(this, "accordion");
- var options = instance.options;
- options.running = cancel ? 0 : --options.running;
- if ( options.running ) {
- return;
- }
- if ( options.clearStyle ) {
- options.toShow.add(options.toHide).css({
- height: "",
- overflow: ""
- });
- }
- $(this).triggerHandler("accordionchange", [$.event.fix({type: 'accordionchange', target: instance.element[0]}), options.data], options.change);
-}
-
-function toggle(toShow, toHide, data, clickedActive, down) {
- var options = $.data(this, "accordion").options;
- options.toShow = toShow;
- options.toHide = toHide;
- options.data = data;
- var complete = scopeCallback(completed, this);
-
- // count elements to animate
- options.running = toHide.size() === 0 ? toShow.size() : toHide.size();
-
- if ( options.animated ) {
- if ( !options.alwaysOpen && clickedActive ) {
- $.ui.accordion.animations[options.animated]({
- toShow: jQuery([]),
- toHide: toHide,
- complete: complete,
- down: down,
- autoHeight: options.autoHeight
- });
- } else {
- $.ui.accordion.animations[options.animated]({
- toShow: toShow,
- toHide: toHide,
- complete: complete,
- down: down,
- autoHeight: options.autoHeight
- });
+ // if animations are still active, or the active header is the target, ignore click
+ if (this.running || (!o.collapsible && clickedIsActive)) {
+ return false;
}
- } else {
- if ( !options.alwaysOpen && clickedActive ) {
- toShow.toggle();
- } else {
- toHide.hide();
- toShow.show();
+
+ // switch classes
+ this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all")
+ .find(".ui-icon").removeClass(o.icons.headerSelected).addClass(o.icons.header);
+ this.active.next().addClass('ui-accordion-content-active');
+ if (!clickedIsActive) {
+ clicked.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top")
+ .find(".ui-icon").removeClass(o.icons.header).addClass(o.icons.headerSelected);
+ clicked.next().addClass('ui-accordion-content-active');
}
- complete(true);
- }
-}
-function clickHandler(event) {
- var options = $.data(this, "accordion").options;
- if (options.disabled) {
- return false;
- }
-
- // called only when using activate(false) to close all parts programmatically
- if ( !event.target && !options.alwaysOpen ) {
- options.active.parent().andSelf().toggleClass(options.selectedClass);
- var toHide = options.active.next(),
+ // find elements to show and hide
+ var toShow = clicked.next(),
+ toHide = this.active.next(),
data = {
- options: options,
- newHeader: jQuery([]),
- oldHeader: options.active,
- newContent: jQuery([]),
- oldContent: toHide
+ options: o,
+ newHeader: clickedIsActive && o.collapsible ? $([]) : clicked,
+ oldHeader: this.active,
+ newContent: clickedIsActive && o.collapsible ? $([]) : toShow.find('> *'),
+ oldContent: toHide.find('> *')
},
- toShow = (options.active = $([]));
- toggle.call(this, toShow, toHide, data );
- return false;
- }
- // get the click target
- var clicked = $(event.target);
-
- // due to the event delegation model, we have to check if one
- // of the parent elements is our actual header, and find that
- // otherwise stick with the initial target
- clicked = $( clicked.parents(options.header)[0] || clicked );
-
- var clickedActive = clicked[0] == options.active[0];
-
- // if animations are still active, or the active header is the target, ignore click
- if (options.running || (options.alwaysOpen && clickedActive)) {
+ down = this.headers.index( this.active[0] ) > this.headers.index( clicked[0] );
+
+ this.active = clickedIsActive ? $([]) : clicked;
+ this._toggle(toShow, toHide, data, clickedIsActive, down);
+
return false;
+
+ },
+
+ _toggle: function(toShow, toHide, data, clickedIsActive, down) {
+
+ var o = this.options, self = this;
+
+ this.toShow = toShow;
+ this.toHide = toHide;
+ this.data = data;
+
+ var complete = function() { if(!self) return; return self._completed.apply(self, arguments); };
+
+ // trigger changestart event
+ this._trigger("changestart", null, this.data);
+
+ // count elements to animate
+ this.running = toHide.size() === 0 ? toShow.size() : toHide.size();
+
+ if (o.animated) {
+
+ var animOptions = {};
+
+ if ( o.collapsible && clickedIsActive ) {
+ animOptions = {
+ toShow: $([]),
+ toHide: toHide,
+ complete: complete,
+ down: down,
+ autoHeight: o.autoHeight || o.fillSpace
+ };
+ } else {
+ animOptions = {
+ toShow: toShow,
+ toHide: toHide,
+ complete: complete,
+ down: down,
+ autoHeight: o.autoHeight || o.fillSpace
+ };
+ }
+
+ if (!o.proxied) {
+ o.proxied = o.animated;
+ }
+
+ if (!o.proxiedDuration) {
+ o.proxiedDuration = o.duration;
+ }
+
+ o.animated = $.isFunction(o.proxied) ?
+ o.proxied(animOptions) : o.proxied;
+
+ o.duration = $.isFunction(o.proxiedDuration) ?
+ o.proxiedDuration(animOptions) : o.proxiedDuration;
+
+ var animations = $.ui.accordion.animations,
+ duration = o.duration,
+ easing = o.animated;
+
+ if (!animations[easing]) {
+ animations[easing] = function(options) {
+ this.slide(options, {
+ easing: easing,
+ duration: duration || 700
+ });
+ };
+ }
+
+ animations[easing](animOptions);
+
+ } else {
+
+ if (o.collapsible && clickedIsActive) {
+ toShow.toggle();
+ } else {
+ toHide.hide();
+ toShow.show();
+ }
+
+ complete(true);
+
+ }
+
+ toHide.prev().attr('aria-expanded','false').attr("tabIndex", "-1").blur();
+ toShow.prev().attr('aria-expanded','true').attr("tabIndex", "0").focus();
+
+ },
+
+ _completed: function(cancel) {
+
+ var o = this.options;
+
+ this.running = cancel ? 0 : --this.running;
+ if (this.running) return;
+
+ if (o.clearStyle) {
+ this.toShow.add(this.toHide).css({
+ height: "",
+ overflow: ""
+ });
+ }
+
+ this._trigger('change', null, this.data);
}
- if (!clicked.is(options.header)) {
- return;
- }
-
- // switch classes
- options.active.parent().andSelf().toggleClass(options.selectedClass);
- if ( !clickedActive ) {
- clicked.parent().andSelf().addClass(options.selectedClass);
- }
-
- // find elements to show and hide
- var toShow = clicked.next(),
- toHide = options.active.next(),
- //data = [clicked, options.active, toShow, toHide],
- data = {
- options: options,
- newHeader: clicked,
- oldHeader: options.active,
- newContent: toShow,
- oldContent: toHide
- },
- down = options.headers.index( options.active[0] ) > options.headers.index( clicked[0] );
-
- options.active = clickedActive ? $([]) : clicked;
- toggle.call(this, toShow, toHide, data, clickedActive, down );
-
- return false;
-};
-
-function findActive(headers, selector) {
- return selector != undefined
- ? typeof selector == "number"
- ? headers.filter(":eq(" + selector + ")")
- : headers.not(headers.not(selector))
- : selector === false
- ? $([])
- : headers.filter(":eq(0)");
-}
+
+});
+
$.extend($.ui.accordion, {
+ version: "1.7.2",
defaults: {
- selectedClass: "selected",
- alwaysOpen: true,
+ active: null,
+ alwaysOpen: true, //deprecated, use collapsible
animated: 'slide',
- event: "click",
- header: "a",
autoHeight: true,
- running: 0,
+ clearStyle: false,
+ collapsible: false,
+ event: "click",
+ fillSpace: false,
+ header: "> li > :first-child,> :not(li):even",
+ icons: {
+ header: "ui-icon-triangle-1-e",
+ headerSelected: "ui-icon-triangle-1-s"
+ },
+ navigation: false,
navigationFilter: function() {
return this.href.toLowerCase() == location.href.toLowerCase();
}
@@ -250,31 +410,58 @@ $.extend($.ui.accordion, {
options.toShow.animate({height: "show"}, options);
return;
}
- var hideHeight = options.toHide.height(),
- showHeight = options.toShow.height(),
- difference = showHeight / hideHeight;
+ if ( !options.toShow.size() ) {
+ options.toHide.animate({height: "hide"}, options);
+ return;
+ }
+ var overflow = options.toShow.css('overflow'),
+ percentDone,
+ showProps = {},
+ hideProps = {},
+ fxAttrs = [ "height", "paddingTop", "paddingBottom" ],
+ originalWidth;
+ // fix width before calculating height of hidden element
+ var s = options.toShow;
+ originalWidth = s[0].style.width;
+ s.width( parseInt(s.parent().width(),10) - parseInt(s.css("paddingLeft"),10) - parseInt(s.css("paddingRight"),10) - (parseInt(s.css("borderLeftWidth"),10) || 0) - (parseInt(s.css("borderRightWidth"),10) || 0) );
+
+ $.each(fxAttrs, function(i, prop) {
+ hideProps[prop] = 'hide';
+
+ var parts = ('' + $.css(options.toShow[0], prop)).match(/^([\d+-.]+)(.*)$/);
+ showProps[prop] = {
+ value: parts[1],
+ unit: parts[2] || 'px'
+ };
+ });
options.toShow.css({ height: 0, overflow: 'hidden' }).show();
- options.toHide.filter(":hidden").each(options.complete).end().filter(":visible").animate({height:"hide"},{
- step: function(now) {
- var current = (hideHeight - now) * difference;
- if ($.browser.msie || $.browser.opera) {
- current = Math.ceil(current);
+ options.toHide.filter(":hidden").each(options.complete).end().filter(":visible").animate(hideProps,{
+ step: function(now, settings) {
+ // only calculate the percent when animating height
+ // IE gets very inconsistent results when animating elements
+ // with small values, which is common for padding
+ if (settings.prop == 'height') {
+ percentDone = (settings.now - settings.start) / (settings.end - settings.start);
}
- options.toShow.height( current );
+
+ options.toShow[0].style[settings.prop] =
+ (percentDone * showProps[settings.prop].value) + showProps[settings.prop].unit;
},
duration: options.duration,
easing: options.easing,
complete: function() {
if ( !options.autoHeight ) {
- options.toShow.css("height", "auto");
+ options.toShow.css("height", "");
}
+ options.toShow.css("width", originalWidth);
+ options.toShow.css({overflow: overflow});
options.complete();
}
});
},
bounceslide: function(options) {
this.slide(options, {
- easing: options.down ? "bounceout" : "swing",
+ easing: options.down ? "easeOutBounce" : "swing",
duration: options.down ? 1000 : 200
});
},
@@ -287,9 +474,4 @@ $.extend($.ui.accordion, {
}
});
-// deprecated, use accordion("activate", index) instead
-$.fn.activate = function(index) {
- return this.accordion("activate", index);
-};
-
})(jQuery);
diff --git a/template-common/lib/ui/ui.core.js b/template-common/lib/ui/ui.core.js
index 0b4ee1c36..5493e0aeb 100644
--- a/template-common/lib/ui/ui.core.js
+++ b/template-common/lib/ui/ui.core.js
@@ -1,15 +1,22 @@
-/*
- * jQuery UI 1.5.3
+/*
+ * jQuery UI 1.7.2
*
- * Copyright (c) 2008 Paul Bakaus (ui.jquery.com)
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
* http://docs.jquery.com/UI
*/
-;(function($) {
+;jQuery.ui || (function($) {
+var _remove = $.fn.remove,
+ isFF2 = $.browser.mozilla && (parseFloat($.browser.version) < 1.9);
+
+//Helper functions and ui object
$.ui = {
+ version: "1.7.2",
+
+ // $.ui.plugin is deprecated. Use the proxy pattern instead.
plugin: {
add: function(module, option, set) {
var proto = $.ui[module].prototype;
@@ -20,137 +27,338 @@ $.ui = {
},
call: function(instance, name, args) {
var set = instance.plugins[name];
- if(!set) { return; }
-
+ if(!set || !instance.element[0].parentNode) { return; }
+
for (var i = 0; i < set.length; i++) {
if (instance.options[set[i][0]]) {
set[i][1].apply(instance.element, args);
}
}
- }
+ }
},
- cssCache: {},
- css: function(name) {
- if ($.ui.cssCache[name]) { return $.ui.cssCache[name]; }
- var tmp = $('<div class="ui-gen">').addClass(name).css({position:'absolute', top:'-5000px', left:'-5000px', display:'block'}).appendTo('body');
-
- //if (!$.browser.safari)
- //tmp.appendTo('body');
-
- //Opera and Safari set width and height to 0px instead of auto
- //Safari returns rgba(0,0,0,0) when bgcolor is not set
- $.ui.cssCache[name] = !!(
- (!(/auto|default/).test(tmp.css('cursor')) || (/^[1-9]/).test(tmp.css('height')) || (/^[1-9]/).test(tmp.css('width')) ||
- !(/none/).test(tmp.css('backgroundImage')) || !(/transparent|rgba\(0, 0, 0, 0\)/).test(tmp.css('backgroundColor')))
- );
- try { $('body').get(0).removeChild(tmp.get(0)); } catch(e){}
- return $.ui.cssCache[name];
+
+ contains: function(a, b) {
+ return document.compareDocumentPosition
+ ? a.compareDocumentPosition(b) & 16
+ : a !== b && a.contains(b);
},
- disableSelection: function(el) {
- $(el).attr('unselectable', 'on').css('MozUserSelect', 'none');
+
+ hasScroll: function(el, a) {
+
+ //If overflow is hidden, the element might have extra content, but the user wants to hide it
+ if ($(el).css('overflow') == 'hidden') { return false; }
+
+ var scroll = (a && a == 'left') ? 'scrollLeft' : 'scrollTop',
+ has = false;
+
+ if (el[scroll] > 0) { return true; }
+
+ // TODO: determine which cases actually cause this to happen
+ // if the element doesn't have the scroll set, see if it's possible to
+ // set the scroll
+ el[scroll] = 1;
+ has = (el[scroll] > 0);
+ el[scroll] = 0;
+ return has;
},
- enableSelection: function(el) {
- $(el).attr('unselectable', 'off').css('MozUserSelect', '');
+
+ isOverAxis: function(x, reference, size) {
+ //Determines when x coordinate is over "b" element axis
+ return (x > reference) && (x < (reference + size));
},
- hasScroll: function(e, a) {
- var scroll = /top/.test(a||"top") ? 'scrollTop' : 'scrollLeft', has = false;
- if (e[scroll] > 0) return true; e[scroll] = 1;
- has = e[scroll] > 0 ? true : false; e[scroll] = 0;
- return has;
+
+ isOver: function(y, x, top, left, height, width) {
+ //Determines when x, y coordinates is over "b" element
+ return $.ui.isOverAxis(y, top, height) && $.ui.isOverAxis(x, left, width);
+ },
+
+ keyCode: {
+ BACKSPACE: 8,
+ CAPS_LOCK: 20,
+ COMMA: 188,
+ CONTROL: 17,
+ DELETE: 46,
+ DOWN: 40,
+ END: 35,
+ ENTER: 13,
+ ESCAPE: 27,
+ HOME: 36,
+ INSERT: 45,
+ LEFT: 37,
+ NUMPAD_ADD: 107,
+ NUMPAD_DECIMAL: 110,
+ NUMPAD_DIVIDE: 111,
+ NUMPAD_ENTER: 108,
+ NUMPAD_MULTIPLY: 106,
+ NUMPAD_SUBTRACT: 109,
+ PAGE_DOWN: 34,
+ PAGE_UP: 33,
+ PERIOD: 190,
+ RIGHT: 39,
+ SHIFT: 16,
+ SPACE: 32,
+ TAB: 9,
+ UP: 38
}
};
+// WAI-ARIA normalization
+if (isFF2) {
+ var attr = $.attr,
+ removeAttr = $.fn.removeAttr,
+ ariaNS = "http://www.w3.org/2005/07/aaa",
+ ariaState = /^aria-/,
+ ariaRole = /^wairole:/;
-/** jQuery core modifications and additions **/
+ $.attr = function(elem, name, value) {
+ var set = value !== undefined;
+
+ return (name == 'role'
+ ? (set
+ ? attr.call(this, elem, name, "wairole:" + value)
+ : (attr.apply(this, arguments) || "").replace(ariaRole, ""))
+ : (ariaState.test(name)
+ ? (set
+ ? elem.setAttributeNS(ariaNS,
+ name.replace(ariaState, "aaa:"), value)
+ : attr.call(this, elem, name.replace(ariaState, "aaa:")))
+ : attr.apply(this, arguments)));
+ };
+
+ $.fn.removeAttr = function(name) {
+ return (ariaState.test(name)
+ ? this.each(function() {
+ this.removeAttributeNS(ariaNS, name.replace(ariaState, ""));
+ }) : removeAttr.call(this, name));
+ };
+}
+
+//jQuery plugins
+$.fn.extend({
+ remove: function() {
+ // Safari has a native remove event which actually removes DOM elements,
+ // so we have to use triggerHandler instead of trigger (#3037).
+ $("*", this).add(this).each(function() {
+ $(this).triggerHandler("remove");
+ });
+ return _remove.apply(this, arguments );
+ },
+
+ enableSelection: function() {
+ return this
+ .attr('unselectable', 'off')
+ .css('MozUserSelect', '')
+ .unbind('selectstart.ui');
+ },
+
+ disableSelection: function() {
+ return this
+ .attr('unselectable', 'on')
+ .css('MozUserSelect', 'none')
+ .bind('selectstart.ui', function() { return false; });
+ },
+
+ scrollParent: function() {
+ var scrollParent;
+ if(($.browser.msie && (/(static|relative)/).test(this.css('position'))) || (/absolute/).test(this.css('position'))) {
+ scrollParent = this.parents().filter(function() {
+ return (/(relative|absolute|fixed)/).test($.curCSS(this,'position',1)) && (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));
+ }).eq(0);
+ } else {
+ scrollParent = this.parents().filter(function() {
+ return (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));
+ }).eq(0);
+ }
+
+ return (/fixed/).test(this.css('position')) || !scrollParent.length ? $(document) : scrollParent;
+ }
+});
+
+
+//Additional selectors
+$.extend($.expr[':'], {
+ data: function(elem, i, match) {
+ return !!$.data(elem, match[3]);
+ },
+
+ focusable: function(element) {
+ var nodeName = element.nodeName.toLowerCase(),
+ tabIndex = $.attr(element, 'tabindex');
+ return (/input|select|textarea|button|object/.test(nodeName)
+ ? !element.disabled
+ : 'a' == nodeName || 'area' == nodeName
+ ? element.href || !isNaN(tabIndex)
+ : !isNaN(tabIndex))
+ // the element and all of its ancestors must be visible
+ // the browser may report that the area is hidden
+ && !$(element)['area' == nodeName ? 'parents' : 'closest'](':hidden').length;
+ },
+
+ tabbable: function(element) {
+ var tabIndex = $.attr(element, 'tabindex');
+ return (isNaN(tabIndex) || tabIndex >= 0) && $(element).is(':focusable');
+ }
+});
-var _remove = $.fn.remove;
-$.fn.remove = function() {
- $("*", this).add(this).triggerHandler("remove");
- return _remove.apply(this, arguments );
-};
// $.widget is a factory to create jQuery plugins
// taking some boilerplate code out of the plugin code
-// created by Scott González and Jörn Zaefferer
-function getter(namespace, plugin, method) {
- var methods = $[namespace][plugin].getter || [];
- methods = (typeof methods == "string" ? methods.split(/,?\s+/) : methods);
+function getter(namespace, plugin, method, args) {
+ function getMethods(type) {
+ var methods = $[namespace][plugin][type] || [];
+ return (typeof methods == 'string' ? methods.split(/,?\s+/) : methods);
+ }
+
+ var methods = getMethods('getter');
+ if (args.length == 1 && typeof args[0] == 'string') {
+ methods = methods.concat(getMethods('getterSetter'));
+ }
return ($.inArray(method, methods) != -1);
}
$.widget = function(name, prototype) {
var namespace = name.split(".")[0];
name = name.split(".")[1];
-
+
// create plugin method
$.fn[name] = function(options) {
var isMethodCall = (typeof options == 'string'),
args = Array.prototype.slice.call(arguments, 1);
-
- if (isMethodCall && getter(namespace, name, options)) {
+
+ // prevent calls to internal methods
+ if (isMethodCall && options.substring(0, 1) == '_') {
+ return this;
+ }
+
+ // handle getter methods
+ if (isMethodCall && getter(namespace, name, options, args)) {
var instance = $.data(this[0], name);
return (instance ? instance[options].apply(instance, args)
: undefined);
}
-
+
+ // handle initialization and non-getter methods
return this.each(function() {
var instance = $.data(this, name);
- if (isMethodCall && instance && $.isFunction(instance[options])) {
- instance[options].apply(instance, args);
- } else if (!isMethodCall) {
- $.data(this, name, new $[namespace][name](this, options));
- }
+
+ // constructor
+ (!instance && !isMethodCall &&
+ $.data(this, name, new $[namespace][name](this, options))._init());
+
+ // method call
+ (instance && isMethodCall && $.isFunction(instance[options]) &&
+ instance[options].apply(instance, args));
});
};
-
+
// create widget constructor
+ $[namespace] = $[namespace] || {};
$[namespace][name] = function(element, options) {
var self = this;
-
+
+ this.namespace = namespace;
this.widgetName = name;
+ this.widgetEventPrefix = $[namespace][name].eventPrefix || name;
this.widgetBaseClass = namespace + '-' + name;
-
- this.options = $.extend({}, $.widget.defaults, $[namespace][name].defaults, options);
+
+ this.options = $.extend({},
+ $.widget.defaults,
+ $[namespace][name].defaults,
+ $.metadata && $.metadata.get(element)[name],
+ options);
+
this.element = $(element)
- .bind('setData.' + name, function(e, key, value) {
- return self.setData(key, value);
+ .bind('setData.' + name, function(event, key, value) {
+ if (event.target == element) {
+ return self._setData(key, value);
+ }
})
- .bind('getData.' + name, function(e, key) {
- return self.getData(key);
+ .bind('getData.' + name, function(event, key) {
+ if (event.target == element) {
+ return self._getData(key);
+ }
})
.bind('remove', function() {
return self.destroy();
});
- this.init();
};
-
+
// add widget prototype
$[namespace][name].prototype = $.extend({}, $.widget.prototype, prototype);
+
+ // TODO: merge getter and getterSetter properties from widget prototype
+ // and plugin prototype
+ $[namespace][name].getterSetter = 'option';
};
$.widget.prototype = {
- init: function() {},
+ _init: function() {},
destroy: function() {
- this.element.removeData(this.widgetName);
+ this.element.removeData(this.widgetName)
+ .removeClass(this.widgetBaseClass + '-disabled' + ' ' + this.namespace + '-state-disabled')
+ .removeAttr('aria-disabled');
+ },
+
+ option: function(key, value) {
+ var options = key,
+ self = this;
+
+ if (typeof key == "string") {
+ if (value === undefined) {
+ return this._getData(key);
+ }
+ options = {};
+ options[key] = value;
+ }
+
+ $.each(options, function(key, value) {
+ self._setData(key, value);
+ });
},
-
- getData: function(key) {
+ _getData: function(key) {
return this.options[key];
},
- setData: function(key, value) {
+ _setData: function(key, value) {
this.options[key] = value;
-
+
if (key == 'disabled') {
- this.element[value ? 'addClass' : 'removeClass'](
- this.widgetBaseClass + '-disabled');
+ this.element
+ [value ? 'addClass' : 'removeClass'](
+ this.widgetBaseClass + '-disabled' + ' ' +
+ this.namespace + '-state-disabled')
+ .attr("aria-disabled", value);
}
},
-
+
enable: function() {
- this.setData('disabled', false);
+ this._setData('disabled', false);
},
disable: function() {
- this.setData('disabled', true);
+ this._setData('disabled', true);
+ },
+
+ _trigger: function(type, event, data) {
+ var callback = this.options[type],
+ eventName = (type == this.widgetEventPrefix
+ ? type : this.widgetEventPrefix + type);
+
+ event = $.Event(event);
+ event.type = eventName;
+
+ // copy original event properties over to the new event
+ // this would happen if we could call $.event.fix instead of $.Event
+ // but we don't have a way to force an event to be fixed multiple times
+ if (event.originalEvent) {
+ for (var i = $.event.props.length, prop; i;) {
+ prop = $.event.props[--i];
+ event[prop] = event.originalEvent[prop];
+ }
+ }
+
+ this.element.trigger(event, data);
+
+ return !($.isFunction(callback) && callback.call(this.element[0], event, data) === false
+ || event.isDefaultPrevented());
}
};
@@ -162,124 +370,144 @@ $.widget.defaults = {
/** Mouse Interaction Plugin **/
$.ui.mouse = {
- mouseInit: function() {
+ _mouseInit: function() {
var self = this;
-
- this.element.bind('mousedown.'+this.widgetName, function(e) {
- return self.mouseDown(e);
- });
-
+
+ this.element
+ .bind('mousedown.'+this.widgetName, function(event) {
+ return self._mouseDown(event);
+ })
+ .bind('click.'+this.widgetName, function(event) {
+ if(self._preventClickEvent) {
+ self._preventClickEvent = false;
+ event.stopImmediatePropagation();
+ return false;
+ }
+ });
+
// Prevent text selection in IE
if ($.browser.msie) {
this._mouseUnselectable = this.element.attr('unselectable');
this.element.attr('unselectable', 'on');
}
-
+
this.started = false;
},
-
+
// TODO: make sure destroying one instance of mouse doesn't mess with
// other instances of mouse
- mouseDestroy: function() {
+ _mouseDestroy: function() {
this.element.unbind('.'+this.widgetName);
-
+
// Restore text selection in IE
($.browser.msie
&& this.element.attr('unselectable', this._mouseUnselectable));
},
-
- mouseDown: function(e) {
+
+ _mouseDown: function(event) {
+ // don't let more than one widget handle mouseStart
+ // TODO: figure out why we have to use originalEvent
+ event.originalEvent = event.originalEvent || {};
+ if (event.originalEvent.mouseHandled) { return; }
+
// we may have missed mouseup (out of window)
- (this._mouseStarted && this.mouseUp(e));
-
- this._mouseDownEvent = e;
-
+ (this._mouseStarted && this._mouseUp(event));
+
+ this._mouseDownEvent = event;
+
var self = this,
- btnIsLeft = (e.which == 1),
- elIsCancel = (typeof this.options.cancel == "string" ? $(e.target).parents().add(e.target).filter(this.options.cancel).length : false);
- if (!btnIsLeft || elIsCancel || !this.mouseCapture(e)) {
+ btnIsLeft = (event.which == 1),
+ elIsCancel = (typeof this.options.cancel == "string" ? $(event.target).parents().add(event.target).filter(this.options.cancel).length : false);
+ if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
return true;
}
-
- this._mouseDelayMet = !this.options.delay;
- if (!this._mouseDelayMet) {
+
+ this.mouseDelayMet = !this.options.delay;
+ if (!this.mouseDelayMet) {
this._mouseDelayTimer = setTimeout(function() {
- self._mouseDelayMet = true;
+ self.mouseDelayMet = true;
}, this.options.delay);
}
-
- if (this.mouseDistanceMet(e) && this.mouseDelayMet(e)) {
- this._mouseStarted = (this.mouseStart(e) !== false);
+
+ if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
+ this._mouseStarted = (this._mouseStart(event) !== false);
if (!this._mouseStarted) {
- e.preventDefault();
+ event.preventDefault();
return true;
}
}
-
+
// these delegates are required to keep context
- this._mouseMoveDelegate = function(e) {
- return self.mouseMove(e);
+ this._mouseMoveDelegate = function(event) {
+ return self._mouseMove(event);
};
- this._mouseUpDelegate = function(e) {
- return self.mouseUp(e);
+ this._mouseUpDelegate = function(event) {
+ return self._mouseUp(event);
};
$(document)
.bind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
.bind('mouseup.'+this.widgetName, this._mouseUpDelegate);
-
- return false;
+
+ // preventDefault() is used to prevent the selection of text here -
+ // however, in Safari, this causes select boxes not to be selectable
+ // anymore, so this fix is needed
+ ($.browser.safari || event.preventDefault());
+
+ event.originalEvent.mouseHandled = true;
+ return true;
},
-
- mouseMove: function(e) {
+
+ _mouseMove: function(event) {
// IE mouseup check - mouseup happened when mouse was out of window
- if ($.browser.msie && !e.button) {
- return this.mouseUp(e);
+ if ($.browser.msie && !event.button) {
+ return this._mouseUp(event);
}
-
+
if (this._mouseStarted) {
- this.mouseDrag(e);
- return false;
+ this._mouseDrag(event);
+ return event.preventDefault();
}
-
- if (this.mouseDistanceMet(e) && this.mouseDelayMet(e)) {
+
+ if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
this._mouseStarted =
- (this.mouseStart(this._mouseDownEvent, e) !== false);
- (this._mouseStarted ? this.mouseDrag(e) : this.mouseUp(e));
+ (this._mouseStart(this._mouseDownEvent, event) !== false);
+ (this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event));
}
-
+
return !this._mouseStarted;
},
-
- mouseUp: function(e) {
+
+ _mouseUp: function(event) {
$(document)
.unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
.unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);
-
+
if (this._mouseStarted) {
this._mouseStarted = false;
- this.mouseStop(e);
+ this._preventClickEvent = (event.target == this._mouseDownEvent.target);
+ this._mouseStop(event);
}
-
+
return false;
},
-
- mouseDistanceMet: function(e) {
+
+ _mouseDistanceMet: function(event) {
return (Math.max(
- Math.abs(this._mouseDownEvent.pageX - e.pageX),
- Math.abs(this._mouseDownEvent.pageY - e.pageY)
+ Math.abs(this._mouseDownEvent.pageX - event.pageX),
+ Math.abs(this._mouseDownEvent.pageY - event.pageY)
) >= this.options.distance
);
},
-
- mouseDelayMet: function(e) {
- return this._mouseDelayMet;
+
+ _mouseDelayMet: function(event) {
+ return this.mouseDelayMet;
},
-
+
// These are placeholder methods, to be overriden by extending plugin
- mouseStart: function(e) {},
- mouseDrag: function(e) {},
- mouseStop: function(e) {},
- mouseCapture: function(e) { return true; }
+ _mouseStart: function(event) {},
+ _mouseDrag: function(event) {},
+ _mouseStop: function(event) {},
+ _mouseCapture: function(event) { return true; }
};
$.ui.mouse.defaults = {
diff --git a/template-common/lib/ui/ui.datepicker.js b/template-common/lib/ui/ui.datepicker.js
index 877e19b52..0ce166efd 100644
--- a/template-common/lib/ui/ui.datepicker.js
+++ b/template-common/lib/ui/ui.datepicker.js
@@ -1,20 +1,20 @@
/*
- * jQuery UI Datepicker
+ * jQuery UI Datepicker 1.7.2
*
- * Copyright (c) 2006, 2007, 2008 Marc Grabanski
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
- *
+ *
* http://docs.jquery.com/UI/Datepicker
*
* Depends:
* ui.core.js
- *
- * Marc Grabanski (m@marcgrabanski.com) and Keith Wood (kbwood@virginbroadband.com.au).
*/
-
+
(function($) { // hide the namespace
+$.extend($.ui, { datepicker: { version: "1.7.2" } });
+
var PROP_NAME = 'datepicker';
/* Date picker manager.
@@ -25,43 +25,33 @@ var PROP_NAME = 'datepicker';
function Datepicker() {
this.debug = false; // Change this to true to start debugging
this._curInst = null; // The current instance in use
+ this._keyEvent = false; // If the last event was a key event
this._disabledInputs = []; // List of date picker inputs that have been disabled
this._datepickerShowing = false; // True if the popup picker is showing , false if not
this._inDialog = false; // True if showing within a "dialog", false if not
this._mainDivId = 'ui-datepicker-div'; // The ID of the main datepicker division
+ this._inlineClass = 'ui-datepicker-inline'; // The name of the inline marker class
this._appendClass = 'ui-datepicker-append'; // The name of the append marker class
this._triggerClass = 'ui-datepicker-trigger'; // The name of the trigger marker class
this._dialogClass = 'ui-datepicker-dialog'; // The name of the dialog marker class
- this._promptClass = 'ui-datepicker-prompt'; // The name of the dialog prompt marker class
+ this._disableClass = 'ui-datepicker-disabled'; // The name of the disabled covering marker class
this._unselectableClass = 'ui-datepicker-unselectable'; // The name of the unselectable cell marker class
this._currentClass = 'ui-datepicker-current-day'; // The name of the current day marker class
+ this._dayOverClass = 'ui-datepicker-days-cell-over'; // The name of the day hover marker class
this.regional = []; // Available regional settings, indexed by language code
this.regional[''] = { // Default regional settings
- clearText: 'Clear', // Display text for clear link
- clearStatus: 'Erase the current date', // Status text for clear link
- closeText: 'Close', // Display text for close link
- closeStatus: 'Close without change', // Status text for close link
- prevText: '&#x3c;Prev', // Display text for previous month link
- prevStatus: 'Show the previous month', // Status text for previous month link
- nextText: 'Next&#x3e;', // Display text for next month link
- nextStatus: 'Show the next month', // Status text for next month link
+ closeText: 'Done', // Display text for close link
+ prevText: 'Prev', // Display text for previous month link
+ nextText: 'Next', // Display text for next month link
currentText: 'Today', // Display text for current month link
- currentStatus: 'Show the current month', // Status text for current month link
monthNames: ['January','February','March','April','May','June',
'July','August','September','October','November','December'], // Names of months for drop-down and formatting
monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], // For formatting
- monthStatus: 'Show a different month', // Status text for selecting a month
- yearStatus: 'Show a different year', // Status text for selecting a year
- weekHeader: 'Wk', // Header for the week of the year column
- weekStatus: 'Week of the year', // Status text for the week of the year column
dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], // For formatting
dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], // For formatting
dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'], // Column headings for days starting at Sunday
- dayStatus: 'Set DD as first week day', // Status text for the day of the week selection
- dateStatus: 'Select DD, M d', // Status text for the date selection
dateFormat: 'mm/dd/yy', // See format options on parseDate
firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ...
- initStatus: 'Select a date', // Initial Status text on opening
isRTL: false // True if right-to-left language, false if left-to-right
};
this._defaults = { // Global defaults for all the date picker instances
@@ -75,34 +65,26 @@ function Datepicker() {
buttonText: '...', // Text for trigger button
buttonImage: '', // URL for trigger button image
buttonImageOnly: false, // True if the image appears alone, false if it appears on a button
- closeAtTop: true, // True to have the clear/close at the top,
- // false to have them at the bottom
- mandatory: false, // True to hide the Clear link, false to include it
hideIfNoPrevNext: false, // True to hide next/previous month links
// if not applicable, false to just disable them
navigationAsDateFormat: false, // True if date formatting applied to prev/today/next links
gotoCurrent: false, // True if today link goes back to current selection instead
- changeMonth: true, // True if month can be selected directly, false if only prev/next
- changeYear: true, // True if year can be selected directly, false if only prev/next
+ changeMonth: false, // True if month can be selected directly, false if only prev/next
+ changeYear: false, // True if year can be selected directly, false if only prev/next
+ showMonthAfterYear: false, // True if the year select precedes month, false for month then year
yearRange: '-10:+10', // Range of years to display in drop-down,
// either relative to current year (-nn:+nn) or absolute (nnnn:nnnn)
- changeFirstDay: true, // True to click on day name to change, false to remain as set
- highlightWeek: false, // True to highlight the selected week
showOtherMonths: false, // True to show dates in other months, false to leave blank
- showWeeks: false, // True to show week of the year, false to omit
calculateWeek: this.iso8601Week, // How to calculate the week of the year,
// takes a Date and returns the number of the week for it
shortYearCutoff: '+10', // Short year values < this are in the current century,
- // > this are in the previous century,
+ // > this are in the previous century,
// string value starting with '+' for current year + value
- showStatus: false, // True to show status bar at bottom, false to not show it
- statusForDate: this.dateStatus, // Function to provide status text for a date -
- // takes date and instance as parameters, returns display text
minDate: null, // The earliest selectable date, or null for no limit
maxDate: null, // The latest selectable date, or null for no limit
duration: 'normal', // Duration of display/closure
beforeShowDay: null, // Function that takes a date and returns an array with
- // [0] = true if selectable, false if not, [1] = custom CSS class name(s) or '',
+ // [0] = true if selectable, false if not, [1] = custom CSS class name(s) or '',
// [2] = cell title (optional), e.g. $.datepicker.noWeekends
beforeShow: null, // Function that takes an input field and
// returns a set of custom settings for the date picker
@@ -110,14 +92,16 @@ function Datepicker() {
onChangeMonthYear: null, // Define a callback function when the month or year is changed
onClose: null, // Define a callback function when the datepicker is closed
numberOfMonths: 1, // Number of months to show at a time
+ showCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0)
stepMonths: 1, // Number of months to step back/forward
- rangeSelect: false, // Allows for selecting a date range on one date picker
- rangeSeparator: ' - ', // Text between two dates in a range
+ stepBigMonths: 12, // Number of months to step back/forward for the big links
altField: '', // Selector for an alternate field to store selected dates into
- altFormat: '' // The date format to use for the alternate field
+ altFormat: '', // The date format to use for the alternate field
+ constrainInput: true, // The input is constrained by the current date format
+ showButtonPanel: false // True to show button panel, false to not show it
};
$.extend(this._defaults, this.regional['']);
- this.dpDiv = $('<div id="' + this._mainDivId + '" style="display: none;"></div>');
+ this.dpDiv = $('<div id="' + this._mainDivId + '" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible"></div>');
}
$.extend(Datepicker.prototype, {
@@ -129,8 +113,8 @@ $.extend(Datepicker.prototype, {
if (this.debug)
console.log.apply('', arguments);
},
-
- /* Override the default settings for all instances of the date picker.
+
+ /* Override the default settings for all instances of the date picker.
@param settings object - the new settings to use as defaults (anonymous object)
@return the manager object */
setDefaults: function(settings) {
@@ -144,7 +128,7 @@ $.extend(Datepicker.prototype, {
_attachDatepicker: function(target, settings) {
// check for settings on the control itself - in namespace 'date:'
var inlineSettings = null;
- for (attrName in this._defaults) {
+ for (var attrName in this._defaults) {
var attrValue = target.getAttribute('date:' + attrName);
if (attrValue) {
inlineSettings = inlineSettings || {};
@@ -158,9 +142,9 @@ $.extend(Datepicker.prototype, {
var nodeName = target.nodeName.toLowerCase();
var inline = (nodeName == 'div' || nodeName == 'span');
if (!target.id)
- target.id = 'dp' + new Date().getTime();
+ target.id = 'dp' + (++this.uuid);
var inst = this._newInst($(target), inline);
- inst.settings = $.extend({}, settings || {}, inlineSettings || {});
+ inst.settings = $.extend({}, settings || {}, inlineSettings || {});
if (nodeName == 'input') {
this._connectDatepicker(target, inst);
} else if (inline) {
@@ -170,37 +154,42 @@ $.extend(Datepicker.prototype, {
/* Create a new instance object. */
_newInst: function(target, inline) {
- return {id: target[0].id, input: target, // associated target
+ var id = target[0].id.replace(/([:\[\]\.])/g, '\\\\$1'); // escape jQuery meta chars
+ return {id: id, input: target, // associated target
selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection
drawMonth: 0, drawYear: 0, // month being drawn
inline: inline, // is datepicker inline or not
dpDiv: (!inline ? this.dpDiv : // presentation div
- $('<div class="ui-datepicker-inline"></div>'))};
+ $('<div class="' + this._inlineClass + ' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))};
},
/* Attach the date picker to an input field. */
_connectDatepicker: function(target, inst) {
var input = $(target);
+ inst.append = $([]);
+ inst.trigger = $([]);
if (input.hasClass(this.markerClassName))
return;
var appendText = this._get(inst, 'appendText');
var isRTL = this._get(inst, 'isRTL');
- if (appendText)
- input[isRTL ? 'before' : 'after']('<span class="' + this._appendClass + '">' + appendText + '</span>');
+ if (appendText) {
+ inst.append = $('<span class="' + this._appendClass + '">' + appendText + '</span>');
+ input[isRTL ? 'before' : 'after'](inst.append);
+ }
var showOn = this._get(inst, 'showOn');
if (showOn == 'focus' || showOn == 'both') // pop-up date picker when in the marked field
input.focus(this._showDatepicker);
if (showOn == 'button' || showOn == 'both') { // pop-up date picker when button clicked
var buttonText = this._get(inst, 'buttonText');
var buttonImage = this._get(inst, 'buttonImage');
- var trigger = $(this._get(inst, 'buttonImageOnly') ?
+ inst.trigger = $(this._get(inst, 'buttonImageOnly') ?
$('<img/>').addClass(this._triggerClass).
attr({ src: buttonImage, alt: buttonText, title: buttonText }) :
$('<button type="button"></button>').addClass(this._triggerClass).
html(buttonImage == '' ? buttonText : $('<img/>').attr(
{ src:buttonImage, alt:buttonText, title:buttonText })));
- input[isRTL ? 'before' : 'after'](trigger);
- trigger.click(function() {
+ input[isRTL ? 'before' : 'after'](inst.trigger);
+ inst.trigger.click(function() {
if ($.datepicker._datepickerShowing && $.datepicker._lastInput == target)
$.datepicker._hideDatepicker();
else
@@ -219,10 +208,10 @@ $.extend(Datepicker.prototype, {
/* Attach an inline date picker to a div. */
_inlineDatepicker: function(target, inst) {
- var input = $(target);
- if (input.hasClass(this.markerClassName))
+ var divSpan = $(target);
+ if (divSpan.hasClass(this.markerClassName))
return;
- input.addClass(this.markerClassName).append(inst.dpDiv).
+ divSpan.addClass(this.markerClassName).append(inst.dpDiv).
bind("setData.datepicker", function(event, key, value){
inst.settings[key] = value;
}).bind("getData.datepicker", function(event, key){
@@ -231,6 +220,7 @@ $.extend(Datepicker.prototype, {
$.data(target, PROP_NAME, inst);
this._setDate(inst, this._getDefaultDate(inst));
this._updateDatepicker(inst);
+ this._updateAlternate(inst);
},
/* Pop-up the date picker in a "dialog" box.
@@ -245,7 +235,7 @@ $.extend(Datepicker.prototype, {
_dialogDatepicker: function(input, dateText, onSelect, settings, pos) {
var inst = this._dialogInst; // internal instance
if (!inst) {
- var id = 'dp' + new Date().getTime();
+ var id = 'dp' + (++this.uuid);
this._dialogInput = $('<input type="text" id="' + id +
'" size="1" style="position: absolute; top: -100px;"/>');
this._dialogInput.keydown(this._doKeyDown);
@@ -282,13 +272,17 @@ $.extend(Datepicker.prototype, {
/* Detach a datepicker from its control.
@param target element - the target input field or division or span */
_destroyDatepicker: function(target) {
- var nodeName = target.nodeName.toLowerCase();
var $target = $(target);
+ var inst = $.data(target, PROP_NAME);
+ if (!$target.hasClass(this.markerClassName)) {
+ return;
+ }
+ var nodeName = target.nodeName.toLowerCase();
$.removeData(target, PROP_NAME);
if (nodeName == 'input') {
- $target.siblings('.' + this._appendClass).remove().end().
- siblings('.' + this._triggerClass).remove().end().
- removeClass(this.markerClassName).
+ inst.append.remove();
+ inst.trigger.remove();
+ $target.removeClass(this.markerClassName).
unbind('focus', this._showDatepicker).
unbind('keydown', this._doKeyDown).
unbind('keypress', this._doKeyPress);
@@ -299,9 +293,22 @@ $.extend(Datepicker.prototype, {
/* Enable the date picker to a jQuery selection.
@param target element - the target input field or division or span */
_enableDatepicker: function(target) {
- target.disabled = false;
- $(target).siblings('button.' + this._triggerClass).each(function() { this.disabled = false; }).end().
- siblings('img.' + this._triggerClass).css({opacity: '1.0', cursor: ''});
+ var $target = $(target);
+ var inst = $.data(target, PROP_NAME);
+ if (!$target.hasClass(this.markerClassName)) {
+ return;
+ }
+ var nodeName = target.nodeName.toLowerCase();
+ if (nodeName == 'input') {
+ target.disabled = false;
+ inst.trigger.filter('button').
+ each(function() { this.disabled = false; }).end().
+ filter('img').css({opacity: '1.0', cursor: ''});
+ }
+ else if (nodeName == 'div' || nodeName == 'span') {
+ var inline = $target.children('.' + this._inlineClass);
+ inline.children().removeClass('ui-state-disabled');
+ }
this._disabledInputs = $.map(this._disabledInputs,
function(value) { return (value == target ? null : value); }); // delete entry
},
@@ -309,9 +316,22 @@ $.extend(Datepicker.prototype, {
/* Disable the date picker to a jQuery selection.
@param target element - the target input field or division or span */
_disableDatepicker: function(target) {
- target.disabled = true;
- $(target).siblings('button.' + this._triggerClass).each(function() { this.disabled = true; }).end().
- siblings('img.' + this._triggerClass).css({opacity: '0.5', cursor: 'default'});
+ var $target = $(target);
+ var inst = $.data(target, PROP_NAME);
+ if (!$target.hasClass(this.markerClassName)) {
+ return;
+ }
+ var nodeName = target.nodeName.toLowerCase();
+ if (nodeName == 'input') {
+ target.disabled = true;
+ inst.trigger.filter('button').
+ each(function() { this.disabled = true; }).end().
+ filter('img').css({opacity: '0.5', cursor: 'default'});
+ }
+ else if (nodeName == 'div' || nodeName == 'span') {
+ var inline = $target.children('.' + this._inlineClass);
+ inline.children().addClass('ui-state-disabled');
+ }
this._disabledInputs = $.map(this._disabledInputs,
function(value) { return (value == target ? null : value); }); // delete entry
this._disabledInputs[this._disabledInputs.length] = target;
@@ -321,8 +341,9 @@ $.extend(Datepicker.prototype, {
@param target element - the target input field or division or span
@return boolean - true if disabled, false if enabled */
_isDisabledDatepicker: function(target) {
- if (!target)
+ if (!target) {
return false;
+ }
for (var i = 0; i < this._disabledInputs.length; i++) {
if (this._disabledInputs[i] == target)
return true;
@@ -330,19 +351,60 @@ $.extend(Datepicker.prototype, {
return false;
},
- /* Update the settings for a date picker attached to an input field or division.
+ /* Retrieve the instance data for the target control.
+ @param target element - the target input field or division or span
+ @return object - the associated instance data
+ @throws error if a jQuery problem getting data */
+ _getInst: function(target) {
+ try {
+ return $.data(target, PROP_NAME);
+ }
+ catch (err) {
+ throw 'Missing instance data for this datepicker';
+ }
+ },
+
+ /* Update or retrieve the settings for a date picker attached to an input field or division.
@param target element - the target input field or division or span
@param name object - the new settings to update or
- string - the name of the setting to change or
- @param value any - the new value for the setting (omit if above is an object) */
- _changeDatepicker: function(target, name, value) {
+ string - the name of the setting to change or retrieve,
+ when retrieving also 'all' for all instance settings or
+ 'defaults' for all global defaults
+ @param value any - the new value for the setting
+ (omit if above is an object or to retrieve a value) */
+ _optionDatepicker: function(target, name, value) {
+ var inst = this._getInst(target);
+ if (arguments.length == 2 && typeof name == 'string') {
+ return (name == 'defaults' ? $.extend({}, $.datepicker._defaults) :
+ (inst ? (name == 'all' ? $.extend({}, inst.settings) :
+ this._get(inst, name)) : null));
+ }
var settings = name || {};
if (typeof name == 'string') {
settings = {};
settings[name] = value;
}
- if (inst = $.data(target, PROP_NAME)) {
+ if (inst) {
+ if (this._curInst == inst) {
+ this._hideDatepicker(null);
+ }
+ var date = this._getDateDatepicker(target);
extendRemove(inst.settings, settings);
+ this._setDateDatepicker(target, date);
+ this._updateDatepicker(inst);
+ }
+ },
+
+ // change method deprecated
+ _changeDatepicker: function(target, name, value) {
+ this._optionDatepicker(target, name, value);
+ },
+
+ /* Redraw the date picker attached to an input field or division.
+ @param target element - the target input field or division or span */
+ _refreshDatepicker: function(target) {
+ var inst = this._getInst(target);
+ if (inst) {
this._updateDatepicker(inst);
}
},
@@ -352,10 +414,11 @@ $.extend(Datepicker.prototype, {
@param date Date - the new date
@param endDate Date - the new end date for a range (optional) */
_setDateDatepicker: function(target, date, endDate) {
- var inst = $.data(target, PROP_NAME);
+ var inst = this._getInst(target);
if (inst) {
this._setDate(inst, date, endDate);
this._updateDatepicker(inst);
+ this._updateAlternate(inst);
}
},
@@ -364,62 +427,89 @@ $.extend(Datepicker.prototype, {
@return Date - the current date or
Date[2] - the current dates for a range */
_getDateDatepicker: function(target) {
- var inst = $.data(target, PROP_NAME);
- if (inst)
- this._setDateFromField(inst);
+ var inst = this._getInst(target);
+ if (inst && !inst.inline)
+ this._setDateFromField(inst);
return (inst ? this._getDate(inst) : null);
},
/* Handle keystrokes. */
- _doKeyDown: function(e) {
- var inst = $.data(e.target, PROP_NAME);
+ _doKeyDown: function(event) {
+ var inst = $.datepicker._getInst(event.target);
var handled = true;
+ var isRTL = inst.dpDiv.is('.ui-datepicker-rtl');
+ inst._keyEvent = true;
if ($.datepicker._datepickerShowing)
- switch (e.keyCode) {
+ switch (event.keyCode) {
case 9: $.datepicker._hideDatepicker(null, '');
break; // hide on tab out
- case 13: $.datepicker._selectDay(e.target, inst.selectedMonth, inst.selectedYear,
- $('td.ui-datepicker-days-cell-over', inst.dpDiv)[0]);
+ case 13: var sel = $('td.' + $.datepicker._dayOverClass +
+ ', td.' + $.datepicker._currentClass, inst.dpDiv);
+ if (sel[0])
+ $.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0]);
+ else
+ $.datepicker._hideDatepicker(null, $.datepicker._get(inst, 'duration'));
return false; // don't submit the form
break; // select the value on enter
case 27: $.datepicker._hideDatepicker(null, $.datepicker._get(inst, 'duration'));
break; // hide on escape
- case 33: $.datepicker._adjustDate(e.target, (e.ctrlKey ? -1 :
- -$.datepicker._get(inst, 'stepMonths')), (e.ctrlKey ? 'Y' : 'M'));
+ case 33: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
+ -$.datepicker._get(inst, 'stepBigMonths') :
+ -$.datepicker._get(inst, 'stepMonths')), 'M');
break; // previous month/year on page up/+ ctrl
- case 34: $.datepicker._adjustDate(e.target, (e.ctrlKey ? +1 :
- +$.datepicker._get(inst, 'stepMonths')), (e.ctrlKey ? 'Y' : 'M'));
+ case 34: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
+ +$.datepicker._get(inst, 'stepBigMonths') :
+ +$.datepicker._get(inst, 'stepMonths')), 'M');
break; // next month/year on page down/+ ctrl
- case 35: if (e.ctrlKey) $.datepicker._clearDate(e.target);
- break; // clear on ctrl+end
- case 36: if (e.ctrlKey) $.datepicker._gotoToday(e.target);
- break; // current on ctrl+home
- case 37: if (e.ctrlKey) $.datepicker._adjustDate(e.target, -1, 'D');
- break; // -1 day on ctrl+left
- case 38: if (e.ctrlKey) $.datepicker._adjustDate(e.target, -7, 'D');
- break; // -1 week on ctrl+up
- case 39: if (e.ctrlKey) $.datepicker._adjustDate(e.target, +1, 'D');
- break; // +1 day on ctrl+right
- case 40: if (e.ctrlKey) $.datepicker._adjustDate(e.target, +7, 'D');
- break; // +1 week on ctrl+down
+ case 35: if (event.ctrlKey || event.metaKey) $.datepicker._clearDate(event.target);
+ handled = event.ctrlKey || event.metaKey;
+ break; // clear on ctrl or command +end
+ case 36: if (event.ctrlKey || event.metaKey) $.datepicker._gotoToday(event.target);
+ handled = event.ctrlKey || event.metaKey;
+ break; // current on ctrl or command +home
+ case 37: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, (isRTL ? +1 : -1), 'D');
+ handled = event.ctrlKey || event.metaKey;
+ // -1 day on ctrl or command +left
+ if (event.originalEvent.altKey) $.datepicker._adjustDate(event.target, (event.ctrlKey ?
+ -$.datepicker._get(inst, 'stepBigMonths') :
+ -$.datepicker._get(inst, 'stepMonths')), 'M');
+ // next month/year on alt +left on Mac
+ break;
+ case 38: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, -7, 'D');
+ handled = event.ctrlKey || event.metaKey;
+ break; // -1 week on ctrl or command +up
+ case 39: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, (isRTL ? -1 : +1), 'D');
+ handled = event.ctrlKey || event.metaKey;
+ // +1 day on ctrl or command +right
+ if (event.originalEvent.altKey) $.datepicker._adjustDate(event.target, (event.ctrlKey ?
+ +$.datepicker._get(inst, 'stepBigMonths') :
+ +$.datepicker._get(inst, 'stepMonths')), 'M');
+ // next month/year on alt +right
+ break;
+ case 40: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, +7, 'D');
+ handled = event.ctrlKey || event.metaKey;
+ break; // +1 week on ctrl or command +down
default: handled = false;
}
- else if (e.keyCode == 36 && e.ctrlKey) // display the date picker on ctrl+home
+ else if (event.keyCode == 36 && event.ctrlKey) // display the date picker on ctrl+home
$.datepicker._showDatepicker(this);
- else
+ else {
handled = false;
+ }
if (handled) {
- e.preventDefault();
- e.stopPropagation();
+ event.preventDefault();
+ event.stopPropagation();
}
},
/* Filter entered characters - based on date format. */
- _doKeyPress: function(e) {
- var inst = $.data(e.target, PROP_NAME);
- var chars = $.datepicker._possibleChars($.datepicker._get(inst, 'dateFormat'));
- var chr = String.fromCharCode(e.charCode == undefined ? e.keyCode : e.charCode);
- return e.ctrlKey || (chr < ' ' || !chars || chars.indexOf(chr) > -1);
+ _doKeyPress: function(event) {
+ var inst = $.datepicker._getInst(event.target);
+ if ($.datepicker._get(inst, 'constrainInput')) {
+ var chars = $.datepicker._possibleChars($.datepicker._get(inst, 'dateFormat'));
+ var chr = String.fromCharCode(event.charCode == undefined ? event.keyCode : event.charCode);
+ return event.ctrlKey || (chr < ' ' || !chars || chars.indexOf(chr) > -1);
+ }
},
/* Pop-up the date picker for a given input field.
@@ -431,7 +521,7 @@ $.extend(Datepicker.prototype, {
input = $('input', input.parentNode)[0];
if ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput == input) // already here
return;
- var inst = $.data(input, PROP_NAME);
+ var inst = $.datepicker._getInst(input);
var beforeShow = $.datepicker._get(inst, 'beforeShow');
extendRemove(inst.settings, (beforeShow ? beforeShow.apply(input, [input, inst]) : {}));
$.datepicker._hideDatepicker(null, '');
@@ -459,8 +549,6 @@ $.extend(Datepicker.prototype, {
inst.dpDiv.css({position: 'absolute', display: 'block', top: '-1000px'});
$.datepicker._updateDatepicker(inst);
// fix width for dynamic number of date pickers
- inst.dpDiv.width($.datepicker._getNumberOfMonths(inst)[1] *
- $('.ui-datepicker', inst.dpDiv[0])[0].offsetWidth);
// and adjust position before showing
offset = $.datepicker._checkOffset(inst, offset, isFixed);
inst.dpDiv.css({position: ($.datepicker._inDialog && $.blockUI ?
@@ -471,7 +559,7 @@ $.extend(Datepicker.prototype, {
var duration = $.datepicker._get(inst, 'duration');
var postProcess = function() {
$.datepicker._datepickerShowing = true;
- if ($.browser.msie && parseInt($.browser.version) < 7) // fix IE < 7 select problems
+ if ($.browser.msie && parseInt($.browser.version,10) < 7) // fix IE < 7 select problems
$('iframe.ui-datepicker-cover').css({width: inst.dpDiv.width() + 4,
height: inst.dpDiv.height() + 4});
};
@@ -491,42 +579,65 @@ $.extend(Datepicker.prototype, {
_updateDatepicker: function(inst) {
var dims = {width: inst.dpDiv.width() + 4,
height: inst.dpDiv.height() + 4};
- inst.dpDiv.empty().append(this._generateDatepicker(inst)).
- find('iframe.ui-datepicker-cover').
- css({width: dims.width, height: dims.height});
+ var self = this;
+ inst.dpDiv.empty().append(this._generateHTML(inst))
+ .find('iframe.ui-datepicker-cover').
+ css({width: dims.width, height: dims.height})
+ .end()
+ .find('button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a')
+ .bind('mouseout', function(){
+ $(this).removeClass('ui-state-hover');
+ if(this.className.indexOf('ui-datepicker-prev') != -1) $(this).removeClass('ui-datepicker-prev-hover');
+ if(this.className.indexOf('ui-datepicker-next') != -1) $(this).removeClass('ui-datepicker-next-hover');
+ })
+ .bind('mouseover', function(){
+ if (!self._isDisabledDatepicker( inst.inline ? inst.dpDiv.parent()[0] : inst.input[0])) {
+ $(this).parents('.ui-datepicker-calendar').find('a').removeClass('ui-state-hover');
+ $(this).addClass('ui-state-hover');
+ if(this.className.indexOf('ui-datepicker-prev') != -1) $(this).addClass('ui-datepicker-prev-hover');
+ if(this.className.indexOf('ui-datepicker-next') != -1) $(this).addClass('ui-datepicker-next-hover');
+ }
+ })
+ .end()
+ .find('.' + this._dayOverClass + ' a')
+ .trigger('mouseover')
+ .end();
var numMonths = this._getNumberOfMonths(inst);
+ var cols = numMonths[1];
+ var width = 17;
+ if (cols > 1) {
+ inst.dpDiv.addClass('ui-datepicker-multi-' + cols).css('width', (width * cols) + 'em');
+ } else {
+ inst.dpDiv.removeClass('ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4').width('');
+ }
inst.dpDiv[(numMonths[0] != 1 || numMonths[1] != 1 ? 'add' : 'remove') +
'Class']('ui-datepicker-multi');
inst.dpDiv[(this._get(inst, 'isRTL') ? 'add' : 'remove') +
'Class']('ui-datepicker-rtl');
- if (inst.input && inst.input[0].type != 'hidden')
+ if (inst.input && inst.input[0].type != 'hidden' && inst == $.datepicker._curInst)
$(inst.input[0]).focus();
},
/* Check positioning to remain on screen. */
_checkOffset: function(inst, offset, isFixed) {
- var pos = inst.input ? this._findPos(inst.input[0]) : null;
- var browserWidth = window.innerWidth || document.documentElement.clientWidth;
- var browserHeight = window.innerHeight || document.documentElement.clientHeight;
- var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
- var scrollY = document.documentElement.scrollTop || document.body.scrollTop;
- // reposition date picker horizontally if outside the browser window
- if (this._get(inst, 'isRTL') || (offset.left + inst.dpDiv.width() - scrollX) > browserWidth)
- offset.left = Math.max((isFixed ? 0 : scrollX),
- pos[0] + (inst.input ? inst.input.width() : 0) - (isFixed ? scrollX : 0) - inst.dpDiv.width() -
- (isFixed && $.browser.opera ? document.documentElement.scrollLeft : 0));
- else
- offset.left -= (isFixed ? scrollX : 0);
- // reposition date picker vertically if outside the browser window
- if ((offset.top + inst.dpDiv.height() - scrollY) > browserHeight)
- offset.top = Math.max((isFixed ? 0 : scrollY),
- pos[1] - (isFixed ? scrollY : 0) - (this._inDialog ? 0 : inst.dpDiv.height()) -
- (isFixed && $.browser.opera ? document.documentElement.scrollTop : 0));
- else
- offset.top -= (isFixed ? scrollY : 0);
+ var dpWidth = inst.dpDiv.outerWidth();
+ var dpHeight = inst.dpDiv.outerHeight();
+ var inputWidth = inst.input ? inst.input.outerWidth() : 0;
+ var inputHeight = inst.input ? inst.input.outerHeight() : 0;
+ var viewWidth = (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) + $(document).scrollLeft();
+ var viewHeight = (window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight) + $(document).scrollTop();
+
+ offset.left -= (this._get(inst, 'isRTL') ? (dpWidth - inputWidth) : 0);
+ offset.left -= (isFixed && offset.left == inst.input.offset().left) ? $(document).scrollLeft() : 0;
+ offset.top -= (isFixed && offset.top == (inst.input.offset().top + inputHeight)) ? $(document).scrollTop() : 0;
+
+ // now check if datepicker is showing outside window viewport - move to a better place if so.
+ offset.left -= (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ? Math.abs(offset.left + dpWidth - viewWidth) : 0;
+ offset.top -= (offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ? Math.abs(offset.top + dpHeight + inputHeight*2 - viewHeight) : 0;
+
return offset;
},
-
+
/* Find an object's position on the screen. */
_findPos: function(obj) {
while (obj && (obj.type == 'hidden' || obj.nodeType != 1)) {
@@ -541,13 +652,12 @@ $.extend(Datepicker.prototype, {
@param duration string - the duration over which to close the date picker */
_hideDatepicker: function(input, duration) {
var inst = this._curInst;
- if (!inst)
+ if (!inst || (input && inst != $.data(input, PROP_NAME)))
return;
- var rangeSelect = this._get(inst, 'rangeSelect');
- if (rangeSelect && this._stayOpen)
+ if (inst.stayOpen)
this._selectDate('#' + inst.id, this._formatDate(inst,
inst.currentDay, inst.currentMonth, inst.currentYear));
- this._stayOpen = false;
+ inst.stayOpen = false;
if (this._datepickerShowing) {
duration = (duration != null ? duration : this._get(inst, 'duration'));
var showAnim = this._get(inst, 'showAnim');
@@ -565,10 +675,9 @@ $.extend(Datepicker.prototype, {
var onClose = this._get(inst, 'onClose');
if (onClose)
onClose.apply((inst.input ? inst.input[0] : null),
- [this._getDate(inst), inst]); // trigger custom callback
+ [(inst.input ? inst.input.val() : ''), inst]); // trigger custom callback
this._datepickerShowing = false;
this._lastInput = null;
- inst.settings.prompt = null;
if (this._inDialog) {
this._dialogInput.css({ position: 'absolute', left: '0', top: '-100px' });
if ($.blockUI) {
@@ -583,8 +692,7 @@ $.extend(Datepicker.prototype, {
/* Tidy up after a dialog display. */
_tidyDialog: function(inst) {
- inst.dpDiv.removeClass(this._dialogClass).unbind('.ui-datepicker');
- $('.' + this._promptClass, inst.dpDiv).remove();
+ inst.dpDiv.removeClass(this._dialogClass).unbind('.ui-datepicker-calendar');
},
/* Close date picker if clicked elsewhere. */
@@ -602,15 +710,20 @@ $.extend(Datepicker.prototype, {
/* Adjust one of the date sub-fields. */
_adjustDate: function(id, offset, period) {
var target = $(id);
- var inst = $.data(target[0], PROP_NAME);
- this._adjustInstDate(inst, offset, period);
+ var inst = this._getInst(target[0]);
+ if (this._isDisabledDatepicker(target[0])) {
+ return;
+ }
+ this._adjustInstDate(inst, offset +
+ (period == 'M' ? this._get(inst, 'showCurrentAtPos') : 0), // undo positioning
+ period);
this._updateDatepicker(inst);
},
/* Action for current link. */
_gotoToday: function(id) {
var target = $(id);
- var inst = $.data(target[0], PROP_NAME);
+ var inst = this._getInst(target[0]);
if (this._get(inst, 'gotoCurrent') && inst.currentDay) {
inst.selectedDay = inst.currentDay;
inst.drawMonth = inst.selectedMonth = inst.currentMonth;
@@ -622,87 +735,58 @@ $.extend(Datepicker.prototype, {
inst.drawMonth = inst.selectedMonth = date.getMonth();
inst.drawYear = inst.selectedYear = date.getFullYear();
}
- this._adjustDate(target);
this._notifyChange(inst);
+ this._adjustDate(target);
},
/* Action for selecting a new month/year. */
_selectMonthYear: function(id, select, period) {
var target = $(id);
- var inst = $.data(target[0], PROP_NAME);
+ var inst = this._getInst(target[0]);
inst._selectingMonthYear = false;
- inst[period == 'M' ? 'drawMonth' : 'drawYear'] =
- select.options[select.selectedIndex].value - 0;
- this._adjustDate(target);
+ inst['selected' + (period == 'M' ? 'Month' : 'Year')] =
+ inst['draw' + (period == 'M' ? 'Month' : 'Year')] =
+ parseInt(select.options[select.selectedIndex].value,10);
this._notifyChange(inst);
+ this._adjustDate(target);
},
/* Restore input focus after not changing month/year. */
_clickMonthYear: function(id) {
var target = $(id);
- var inst = $.data(target[0], PROP_NAME);
+ var inst = this._getInst(target[0]);
if (inst.input && inst._selectingMonthYear && !$.browser.msie)
inst.input[0].focus();
inst._selectingMonthYear = !inst._selectingMonthYear;
},
- /* Action for changing the first week day. */
- _changeFirstDay: function(id, day) {
- var target = $(id);
- var inst = $.data(target[0], PROP_NAME);
- inst.settings.firstDay = day;
- this._updateDatepicker(inst);
- },
-
/* Action for selecting a day. */
_selectDay: function(id, month, year, td) {
- if ($(td).hasClass(this._unselectableClass))
- return;
var target = $(id);
- var inst = $.data(target[0], PROP_NAME);
- var rangeSelect = this._get(inst, 'rangeSelect');
- if (rangeSelect) {
- this._stayOpen = !this._stayOpen;
- if (this._stayOpen) {
- $('.ui-datepicker td').removeClass(this._currentClass);
- $(td).addClass(this._currentClass);
- }
+ if ($(td).hasClass(this._unselectableClass) || this._isDisabledDatepicker(target[0])) {
+ return;
}
+ var inst = this._getInst(target[0]);
inst.selectedDay = inst.currentDay = $('a', td).html();
inst.selectedMonth = inst.currentMonth = month;
inst.selectedYear = inst.currentYear = year;
- if (this._stayOpen) {
+ if (inst.stayOpen) {
inst.endDay = inst.endMonth = inst.endYear = null;
}
- else if (rangeSelect) {
- inst.endDay = inst.currentDay;
- inst.endMonth = inst.currentMonth;
- inst.endYear = inst.currentYear;
- }
this._selectDate(id, this._formatDate(inst,
inst.currentDay, inst.currentMonth, inst.currentYear));
- if (this._stayOpen) {
+ if (inst.stayOpen) {
inst.rangeStart = this._daylightSavingAdjust(
new Date(inst.currentYear, inst.currentMonth, inst.currentDay));
this._updateDatepicker(inst);
}
- else if (rangeSelect) {
- inst.selectedDay = inst.currentDay = inst.rangeStart.getDate();
- inst.selectedMonth = inst.currentMonth = inst.rangeStart.getMonth();
- inst.selectedYear = inst.currentYear = inst.rangeStart.getFullYear();
- inst.rangeStart = null;
- if (inst.inline)
- this._updateDatepicker(inst);
- }
},
/* Erase the input field and hide the date picker. */
_clearDate: function(id) {
var target = $(id);
- var inst = $.data(target[0], PROP_NAME);
- if (this._get(inst, 'mandatory'))
- return;
- this._stayOpen = false;
+ var inst = this._getInst(target[0]);
+ inst.stayOpen = false;
inst.endDay = inst.endMonth = inst.endYear = inst.rangeStart = null;
this._selectDate(target, '');
},
@@ -710,11 +794,8 @@ $.extend(Datepicker.prototype, {
/* Update the input field with the selected date. */
_selectDate: function(id, dateStr) {
var target = $(id);
- var inst = $.data(target[0], PROP_NAME);
+ var inst = this._getInst(target[0]);
dateStr = (dateStr != null ? dateStr : this._formatDate(inst));
- if (this._get(inst, 'rangeSelect') && dateStr)
- dateStr = (inst.rangeStart ? this._formatDate(inst, inst.rangeStart) :
- dateStr) + this._get(inst, 'rangeSeparator') + dateStr;
if (inst.input)
inst.input.val(dateStr);
this._updateAlternate(inst);
@@ -725,7 +806,7 @@ $.extend(Datepicker.prototype, {
inst.input.trigger('change'); // fire the change event
if (inst.inline)
this._updateDatepicker(inst);
- else if (!this._stayOpen) {
+ else if (!inst.stayOpen) {
this._hideDatepicker(null, this._get(inst, 'duration'));
this._lastInput = inst.input[0];
if (typeof(inst.input[0]) != 'object')
@@ -733,18 +814,14 @@ $.extend(Datepicker.prototype, {
this._lastInput = null;
}
},
-
+
/* Update any alternate field to synchronise with the main field. */
_updateAlternate: function(inst) {
var altField = this._get(inst, 'altField');
if (altField) { // update alternate field too
- var altFormat = this._get(inst, 'altFormat');
+ var altFormat = this._get(inst, 'altFormat') || this._get(inst, 'dateFormat');
var date = this._getDate(inst);
- dateStr = (isArray(date) ? (!date[0] && !date[1] ? '' :
- this.formatDate(altFormat, date[0], this._getFormatConfig(inst)) +
- this._get(inst, 'rangeSeparator') + this.formatDate(
- altFormat, date[1] || date[0], this._getFormatConfig(inst))) :
- this.formatDate(altFormat, date, this._getFormatConfig(inst)));
+ dateStr = this.formatDate(altFormat, date, this._getFormatConfig(inst));
$(altField).each(function() { $(this).val(dateStr); });
}
},
@@ -756,7 +833,7 @@ $.extend(Datepicker.prototype, {
var day = date.getDay();
return [(day > 0 && day < 6), ''];
},
-
+
/* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition.
@param date Date - the date to get the week for
@return number - the number of the week within the year that contains this date */
@@ -771,21 +848,11 @@ $.extend(Datepicker.prototype, {
} else if (checkDate > new Date(checkDate.getFullYear(), 12 - 1, 28)) { // Check last three days in year
firstDay = new Date(checkDate.getFullYear() + 1, 1 - 1, 4).getDay() || 7;
if (firstDay > 4 && (checkDate.getDay() || 7) < firstDay - 3) { // Adjust if necessary
- checkDate.setDate(checkDate.getDate() + 3); // Generate for next year
- return $.datepicker.iso8601Week(checkDate);
+ return 1;
}
}
return Math.floor(((checkDate - firstMon) / 86400000) / 7) + 1; // Weeks to given date
},
-
- /* Provide status text for a particular date.
- @param date the date to get the status for
- @param inst the current datepicker instance
- @return the status display text for this date */
- dateStatus: function(date, inst) {
- return $.datepicker.formatDate($.datepicker._get(inst, 'dateStatus'),
- date, $.datepicker._getFormatConfig(inst));
- },
/* Parse a string value into a date object.
See formatDate below for the possible formats.
@@ -813,23 +880,24 @@ $.extend(Datepicker.prototype, {
var year = -1;
var month = -1;
var day = -1;
+ var doy = -1;
var literal = false;
// Check whether a format character is doubled
var lookAhead = function(match) {
var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
if (matches)
iFormat++;
- return matches;
+ return matches;
};
// Extract a number from the string value
var getNumber = function(match) {
lookAhead(match);
- var origSize = (match == '@' ? 14 : (match == 'y' ? 4 : 2));
+ var origSize = (match == '@' ? 14 : (match == 'y' ? 4 : (match == 'o' ? 3 : 2)));
var size = origSize;
var num = 0;
while (size > 0 && iValue < value.length &&
value.charAt(iValue) >= '0' && value.charAt(iValue) <= '9') {
- num = num * 10 + (value.charAt(iValue++) - 0);
+ num = num * 10 + parseInt(value.charAt(iValue++),10);
size--;
}
if (size == origSize)
@@ -871,14 +939,17 @@ $.extend(Datepicker.prototype, {
case 'd':
day = getNumber('d');
break;
- case 'D':
+ case 'D':
getName('D', dayNamesShort, dayNames);
break;
- case 'm':
+ case 'o':
+ doy = getNumber('o');
+ break;
+ case 'm':
month = getNumber('m');
break;
case 'M':
- month = getName('M', monthNamesShort, monthNames);
+ month = getName('M', monthNamesShort, monthNames);
break;
case 'y':
year = getNumber('y');
@@ -899,9 +970,22 @@ $.extend(Datepicker.prototype, {
checkLiteral();
}
}
- if (year < 100)
+ if (year == -1)
+ year = new Date().getFullYear();
+ else if (year < 100)
year += new Date().getFullYear() - new Date().getFullYear() % 100 +
(year <= shortYearCutoff ? 0 : -100);
+ if (doy > -1) {
+ month = 1;
+ day = doy;
+ do {
+ var dim = this._getDaysInMonth(year, month - 1);
+ if (day <= dim)
+ break;
+ month++;
+ day -= dim;
+ } while (true);
+ }
var date = this._daylightSavingAdjust(new Date(year, month - 1, day));
if (date.getFullYear() != year || date.getMonth() + 1 != month || date.getDate() != day)
throw 'Invalid date'; // E.g. 31/02/*
@@ -925,6 +1009,8 @@ $.extend(Datepicker.prototype, {
The format can be combinations of the following:
d - day of month (no leading zero)
dd - day of month (two digit)
+ o - day of year (no leading zeros)
+ oo - day of year (three digit)
D - day name short
DD - day name long
m - month of year (no leading zero)
@@ -957,11 +1043,15 @@ $.extend(Datepicker.prototype, {
var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
if (matches)
iFormat++;
- return matches;
+ return matches;
};
// Format a number, with leading zero if necessary
- var formatNumber = function(match, value) {
- return (lookAhead(match) && value < 10 ? '0' : '') + value;
+ var formatNumber = function(match, value, len) {
+ var num = '' + value;
+ if (lookAhead(match))
+ while (num.length < len)
+ num = '0' + num;
+ return num;
};
// Format a name, short or long as requested
var formatName = function(match, value, shortNames, longNames) {
@@ -979,23 +1069,29 @@ $.extend(Datepicker.prototype, {
else
switch (format.charAt(iFormat)) {
case 'd':
- output += formatNumber('d', date.getDate());
+ output += formatNumber('d', date.getDate(), 2);
break;
- case 'D':
+ case 'D':
output += formatName('D', date.getDay(), dayNamesShort, dayNames);
break;
- case 'm':
- output += formatNumber('m', date.getMonth() + 1);
+ case 'o':
+ var doy = date.getDate();
+ for (var m = date.getMonth() - 1; m >= 0; m--)
+ doy += this._getDaysInMonth(date.getFullYear(), m);
+ output += formatNumber('o', doy, 3);
+ break;
+ case 'm':
+ output += formatNumber('m', date.getMonth() + 1, 2);
break;
case 'M':
- output += formatName('M', date.getMonth(), monthNamesShort, monthNames);
+ output += formatName('M', date.getMonth(), monthNamesShort, monthNames);
break;
case 'y':
- output += (lookAhead('y') ? date.getFullYear() :
+ output += (lookAhead('y') ? date.getFullYear() :
(date.getYear() % 100 < 10 ? '0' : '') + date.getYear() % 100);
break;
case '@':
- output += date.getTime();
+ output += date.getTime();
break;
case "'":
if (lookAhead("'"))
@@ -1023,7 +1119,7 @@ $.extend(Datepicker.prototype, {
else
switch (format.charAt(iFormat)) {
case 'd': case 'm': case 'y': case '@':
- chars += '0123456789';
+ chars += '0123456789';
break;
case 'D': case 'M':
return null; // Accept anything
@@ -1048,33 +1144,25 @@ $.extend(Datepicker.prototype, {
/* Parse existing date and initialise date picker. */
_setDateFromField: function(inst) {
var dateFormat = this._get(inst, 'dateFormat');
- var dates = inst.input ? inst.input.val().split(this._get(inst, 'rangeSeparator')) : null;
+ var dates = inst.input ? inst.input.val() : null;
inst.endDay = inst.endMonth = inst.endYear = null;
var date = defaultDate = this._getDefaultDate(inst);
- if (dates.length > 0) {
- var settings = this._getFormatConfig(inst);
- if (dates.length > 1) {
- date = this.parseDate(dateFormat, dates[1], settings) || defaultDate;
- inst.endDay = date.getDate();
- inst.endMonth = date.getMonth();
- inst.endYear = date.getFullYear();
- }
- try {
- date = this.parseDate(dateFormat, dates[0], settings) || defaultDate;
- } catch (e) {
- this.log(e);
- date = defaultDate;
- }
+ var settings = this._getFormatConfig(inst);
+ try {
+ date = this.parseDate(dateFormat, dates, settings) || defaultDate;
+ } catch (event) {
+ this.log(event);
+ date = defaultDate;
}
inst.selectedDay = date.getDate();
inst.drawMonth = inst.selectedMonth = date.getMonth();
inst.drawYear = inst.selectedYear = date.getFullYear();
- inst.currentDay = (dates[0] ? date.getDate() : 0);
- inst.currentMonth = (dates[0] ? date.getMonth() : 0);
- inst.currentYear = (dates[0] ? date.getFullYear() : 0);
+ inst.currentDay = (dates ? date.getDate() : 0);
+ inst.currentMonth = (dates ? date.getMonth() : 0);
+ inst.currentYear = (dates ? date.getFullYear() : 0);
this._adjustInstDate(inst);
},
-
+
/* Retrieve the default date shown on opening. */
_getDefaultDate: function(inst) {
var date = this._determineDate(this._get(inst, 'defaultDate'), new Date());
@@ -1102,15 +1190,15 @@ $.extend(Datepicker.prototype, {
while (matches) {
switch (matches[2] || 'd') {
case 'd' : case 'D' :
- day += (matches[1] - 0); break;
+ day += parseInt(matches[1],10); break;
case 'w' : case 'W' :
- day += (matches[1] * 7); break;
+ day += parseInt(matches[1],10) * 7; break;
case 'm' : case 'M' :
- month += (matches[1] - 0);
+ month += parseInt(matches[1],10);
day = Math.min(day, getDaysInMonth(year, month));
break;
case 'y': case 'Y' :
- year += (matches[1] - 0);
+ year += parseInt(matches[1],10);
day = Math.min(day, getDaysInMonth(year, month));
break;
}
@@ -1133,7 +1221,7 @@ $.extend(Datepicker.prototype, {
/* Handle switch to/from daylight saving.
Hours may be non-zero on daylight saving cut-over:
- > 12 when midnight changeover, but then cannot generate
+ > 12 when midnight changeover, but then cannot generate
midnight datetime, so jump to 1AM, otherwise reset.
@param date (Date) the date to check
@return (Date) the corrected date */
@@ -1146,27 +1234,18 @@ $.extend(Datepicker.prototype, {
/* Set the date(s) directly. */
_setDate: function(inst, date, endDate) {
var clear = !(date);
+ var origMonth = inst.selectedMonth;
+ var origYear = inst.selectedYear;
date = this._determineDate(date, new Date());
inst.selectedDay = inst.currentDay = date.getDate();
inst.drawMonth = inst.selectedMonth = inst.currentMonth = date.getMonth();
inst.drawYear = inst.selectedYear = inst.currentYear = date.getFullYear();
- if (this._get(inst, 'rangeSelect')) {
- if (endDate) {
- endDate = this._determineDate(endDate, null);
- inst.endDay = endDate.getDate();
- inst.endMonth = endDate.getMonth();
- inst.endYear = endDate.getFullYear();
- } else {
- inst.endDay = inst.currentDay;
- inst.endMonth = inst.currentMonth;
- inst.endYear = inst.currentYear;
- }
- }
+ if (origMonth != inst.selectedMonth || origYear != inst.selectedYear)
+ this._notifyChange(inst);
this._adjustInstDate(inst);
- if (inst.input)
- inst.input.val(clear ? '' : this._formatDate(inst) +
- (!this._get(inst, 'rangeSelect') ? '' : this._get(inst, 'rangeSeparator') +
- this._formatDate(inst, inst.endDay, inst.endMonth, inst.endYear)));
+ if (inst.input) {
+ inst.input.val(clear ? '' : this._formatDate(inst));
+ }
},
/* Retrieve the date(s) directly. */
@@ -1174,43 +1253,33 @@ $.extend(Datepicker.prototype, {
var startDate = (!inst.currentYear || (inst.input && inst.input.val() == '') ? null :
this._daylightSavingAdjust(new Date(
inst.currentYear, inst.currentMonth, inst.currentDay)));
- if (this._get(inst, 'rangeSelect')) {
- return [inst.rangeStart || startDate,
- (!inst.endYear ? inst.rangeStart || startDate :
- this._daylightSavingAdjust(new Date(inst.endYear, inst.endMonth, inst.endDay)))];
- } else
return startDate;
},
/* Generate the HTML for the current state of the date picker. */
- _generateDatepicker: function(inst) {
+ _generateHTML: function(inst) {
var today = new Date();
today = this._daylightSavingAdjust(
new Date(today.getFullYear(), today.getMonth(), today.getDate())); // clear time
- var showStatus = this._get(inst, 'showStatus');
var isRTL = this._get(inst, 'isRTL');
- // build the date picker HTML
- var clear = (this._get(inst, 'mandatory') ? '' :
- '<div class="ui-datepicker-clear"><a onclick="jQuery.datepicker._clearDate(\'#' + inst.id + '\');"' +
- (showStatus ? this._addStatus(inst, this._get(inst, 'clearStatus') || '&#xa0;') : '') + '>' +
- this._get(inst, 'clearText') + '</a></div>');
- var controls = '<div class="ui-datepicker-control">' + (isRTL ? '' : clear) +
- '<div class="ui-datepicker-close"><a onclick="jQuery.datepicker._hideDatepicker();"' +
- (showStatus ? this._addStatus(inst, this._get(inst, 'closeStatus') || '&#xa0;') : '') + '>' +
- this._get(inst, 'closeText') + '</a></div>' + (isRTL ? clear : '') + '</div>';
- var prompt = this._get(inst, 'prompt');
- var closeAtTop = this._get(inst, 'closeAtTop');
+ var showButtonPanel = this._get(inst, 'showButtonPanel');
var hideIfNoPrevNext = this._get(inst, 'hideIfNoPrevNext');
var navigationAsDateFormat = this._get(inst, 'navigationAsDateFormat');
var numMonths = this._getNumberOfMonths(inst);
+ var showCurrentAtPos = this._get(inst, 'showCurrentAtPos');
var stepMonths = this._get(inst, 'stepMonths');
+ var stepBigMonths = this._get(inst, 'stepBigMonths');
var isMultiMonth = (numMonths[0] != 1 || numMonths[1] != 1);
var currentDate = this._daylightSavingAdjust((!inst.currentDay ? new Date(9999, 9, 9) :
new Date(inst.currentYear, inst.currentMonth, inst.currentDay)));
var minDate = this._getMinMaxDate(inst, 'min', true);
var maxDate = this._getMinMaxDate(inst, 'max');
- var drawMonth = inst.drawMonth;
+ var drawMonth = inst.drawMonth - showCurrentAtPos;
var drawYear = inst.drawYear;
+ if (drawMonth < 0) {
+ drawMonth += 12;
+ drawYear--;
+ }
if (maxDate) {
var maxDraw = this._daylightSavingAdjust(new Date(maxDate.getFullYear(),
maxDate.getMonth() - numMonths[1] + 1, maxDate.getDate()));
@@ -1223,69 +1292,75 @@ $.extend(Datepicker.prototype, {
}
}
}
- // controls and links
+ inst.drawMonth = drawMonth;
+ inst.drawYear = drawYear;
var prevText = this._get(inst, 'prevText');
prevText = (!navigationAsDateFormat ? prevText : this.formatDate(prevText,
this._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths, 1)),
this._getFormatConfig(inst)));
- var prev = '<div class="ui-datepicker-prev">' + (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ?
- '<a onclick="jQuery.datepicker._adjustDate(\'#' + inst.id + '\', -' + stepMonths + ', \'M\');"' +
- (showStatus ? this._addStatus(inst, this._get(inst, 'prevStatus') || '&#xa0;') : '') + '>' + prevText + '</a>' :
- (hideIfNoPrevNext ? '' : '<label>' + prevText + '</label>')) + '</div>';
+ var prev = (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ?
+ '<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery.datepicker._adjustDate(\'#' + inst.id + '\', -' + stepMonths + ', \'M\');"' +
+ ' title="' + prevText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'e' : 'w') + '">' + prevText + '</span></a>' :
+ (hideIfNoPrevNext ? '' : '<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+ prevText +'"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'e' : 'w') + '">' + prevText + '</span></a>'));
var nextText = this._get(inst, 'nextText');
nextText = (!navigationAsDateFormat ? nextText : this.formatDate(nextText,
this._daylightSavingAdjust(new Date(drawYear, drawMonth + stepMonths, 1)),
this._getFormatConfig(inst)));
- var next = '<div class="ui-datepicker-next">' + (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ?
- '<a onclick="jQuery.datepicker._adjustDate(\'#' + inst.id + '\', +' + stepMonths + ', \'M\');"' +
- (showStatus ? this._addStatus(inst, this._get(inst, 'nextStatus') || '&#xa0;') : '') + '>' + nextText + '</a>' :
- (hideIfNoPrevNext ? '' : '<label>' + nextText + '</label>')) + '</div>';
+ var next = (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ?
+ '<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery.datepicker._adjustDate(\'#' + inst.id + '\', +' + stepMonths + ', \'M\');"' +
+ ' title="' + nextText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'w' : 'e') + '">' + nextText + '</span></a>' :
+ (hideIfNoPrevNext ? '' : '<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+ nextText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'w' : 'e') + '">' + nextText + '</span></a>'));
var currentText = this._get(inst, 'currentText');
- currentText = (!navigationAsDateFormat ? currentText: this.formatDate(
- currentText, today, this._getFormatConfig(inst)));
- var html = (prompt ? '<div class="' + this._promptClass + '">' + prompt + '</div>' : '') +
- (closeAtTop && !inst.inline ? controls : '') +
- '<div class="ui-datepicker-links">' + (isRTL ? next : prev) +
- (this._isInRange(inst, (this._get(inst, 'gotoCurrent') && inst.currentDay ?
- currentDate : today)) ? '<div class="ui-datepicker-current">' +
- '<a onclick="jQuery.datepicker._gotoToday(\'#' + inst.id + '\');"' +
- (showStatus ? this._addStatus(inst, this._get(inst, 'currentStatus') || '&#xa0;') : '') + '>' +
- currentText + '</a></div>' : '') + (isRTL ? prev : next) + '</div>';
- var firstDay = this._get(inst, 'firstDay');
- var changeFirstDay = this._get(inst, 'changeFirstDay');
+ var gotoDate = (this._get(inst, 'gotoCurrent') && inst.currentDay ? currentDate : today);
+ currentText = (!navigationAsDateFormat ? currentText :
+ this.formatDate(currentText, gotoDate, this._getFormatConfig(inst)));
+ var controls = (!inst.inline ? '<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery.datepicker._hideDatepicker();">' + this._get(inst, 'closeText') + '</button>' : '');
+ var buttonPanel = (showButtonPanel) ? '<div class="ui-datepicker-buttonpane ui-widget-content">' + (isRTL ? controls : '') +
+ (this._isInRange(inst, gotoDate) ? '<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery.datepicker._gotoToday(\'#' + inst.id + '\');"' +
+ '>' + currentText + '</button>' : '') + (isRTL ? '' : controls) + '</div>' : '';
+ var firstDay = parseInt(this._get(inst, 'firstDay'),10);
+ firstDay = (isNaN(firstDay) ? 0 : firstDay);
var dayNames = this._get(inst, 'dayNames');
var dayNamesShort = this._get(inst, 'dayNamesShort');
var dayNamesMin = this._get(inst, 'dayNamesMin');
var monthNames = this._get(inst, 'monthNames');
+ var monthNamesShort = this._get(inst, 'monthNamesShort');
var beforeShowDay = this._get(inst, 'beforeShowDay');
- var highlightWeek = this._get(inst, 'highlightWeek');
var showOtherMonths = this._get(inst, 'showOtherMonths');
- var showWeeks = this._get(inst, 'showWeeks');
var calculateWeek = this._get(inst, 'calculateWeek') || this.iso8601Week;
- var status = (showStatus ? this._get(inst, 'dayStatus') || '&#xa0;' : '');
- var dateStatus = this._get(inst, 'statusForDate') || this.dateStatus;
var endDate = inst.endDay ? this._daylightSavingAdjust(
new Date(inst.endYear, inst.endMonth, inst.endDay)) : currentDate;
- for (var row = 0; row < numMonths[0]; row++)
+ var defaultDate = this._getDefaultDate(inst);
+ var html = '';
+ for (var row = 0; row < numMonths[0]; row++) {
+ var group = '';
for (var col = 0; col < numMonths[1]; col++) {
var selectedDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, inst.selectedDay));
- html += '<div class="ui-datepicker-one-month' + (col == 0 ? ' ui-datepicker-new-row' : '') + '">' +
+ var cornerClass = ' ui-corner-all';
+ var calender = '';
+ if (isMultiMonth) {
+ calender += '<div class="ui-datepicker-group ui-datepicker-group-';
+ switch (col) {
+ case 0: calender += 'first'; cornerClass = ' ui-corner-' + (isRTL ? 'right' : 'left'); break;
+ case numMonths[1]-1: calender += 'last'; cornerClass = ' ui-corner-' + (isRTL ? 'left' : 'right'); break;
+ default: calender += 'middle'; cornerClass = ''; break;
+ }
+ calender += '">';
+ }
+ calender += '<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix' + cornerClass + '">' +
+ (/all|left/.test(cornerClass) && row == 0 ? (isRTL ? next : prev) : '') +
+ (/all|right/.test(cornerClass) && row == 0 ? (isRTL ? prev : next) : '') +
this._generateMonthYearHeader(inst, drawMonth, drawYear, minDate, maxDate,
- selectedDate, row > 0 || col > 0, showStatus, monthNames) + // draw month headers
- '<table class="ui-datepicker" cellpadding="0" cellspacing="0"><thead>' +
- '<tr class="ui-datepicker-title-row">' +
- (showWeeks ? '<td>' + this._get(inst, 'weekHeader') + '</td>' : '');
+ selectedDate, row > 0 || col > 0, monthNames, monthNamesShort) + // draw month headers
+ '</div><table class="ui-datepicker-calendar"><thead>' +
+ '<tr>';
+ var thead = '';
for (var dow = 0; dow < 7; dow++) { // days of the week
var day = (dow + firstDay) % 7;
- var dayStatus = (status.indexOf('DD') > -1 ? status.replace(/DD/, dayNames[day]) :
- status.replace(/D/, dayNamesShort[day]));
- html += '<td' + ((dow + firstDay + 6) % 7 >= 5 ? ' class="ui-datepicker-week-end-cell"' : '') + '>' +
- (!changeFirstDay ? '<span' :
- '<a onclick="jQuery.datepicker._changeFirstDay(\'#' + inst.id + '\', ' + day + ');"') +
- (showStatus ? this._addStatus(inst, dayStatus) : '') + ' title="' + dayNames[day] + '">' +
- dayNamesMin[day] + (changeFirstDay ? '</a>' : '</span>') + '</td>';
+ thead += '<th' + ((dow + firstDay + 6) % 7 >= 5 ? ' class="ui-datepicker-week-end"' : '') + '>' +
+ '<span title="' + dayNames[day] + '">' + dayNamesMin[day] + '</span></th>';
}
- html += '</tr></thead><tbody>';
+ calender += thead + '</tr></thead><tbody>';
var daysInMonth = this._getDaysInMonth(drawYear, drawMonth);
if (drawYear == inst.selectedYear && drawMonth == inst.selectedMonth)
inst.selectedDay = Math.min(inst.selectedDay, daysInMonth);
@@ -1293,87 +1368,90 @@ $.extend(Datepicker.prototype, {
var numRows = (isMultiMonth ? 6 : Math.ceil((leadDays + daysInMonth) / 7)); // calculate the number of rows to generate
var printDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays));
for (var dRow = 0; dRow < numRows; dRow++) { // create date picker rows
- html += '<tr class="ui-datepicker-days-row">' +
- (showWeeks ? '<td class="ui-datepicker-week-col">' + calculateWeek(printDate) + '</td>' : '');
+ calender += '<tr>';
+ var tbody = '';
for (var dow = 0; dow < 7; dow++) { // create date picker days
var daySettings = (beforeShowDay ?
beforeShowDay.apply((inst.input ? inst.input[0] : null), [printDate]) : [true, '']);
var otherMonth = (printDate.getMonth() != drawMonth);
var unselectable = otherMonth || !daySettings[0] ||
(minDate && printDate < minDate) || (maxDate && printDate > maxDate);
- html += '<td class="ui-datepicker-days-cell' +
- ((dow + firstDay + 6) % 7 >= 5 ? ' ui-datepicker-week-end-cell' : '') + // highlight weekends
- (otherMonth ? ' ui-datepicker-otherMonth' : '') + // highlight days from other months
- (printDate.getTime() == selectedDate.getTime() && drawMonth == inst.selectedMonth ?
- ' ui-datepicker-days-cell-over' : '') + // highlight selected day
- (unselectable ? ' ' + this._unselectableClass : '') + // highlight unselectable days
+ tbody += '<td class="' +
+ ((dow + firstDay + 6) % 7 >= 5 ? ' ui-datepicker-week-end' : '') + // highlight weekends
+ (otherMonth ? ' ui-datepicker-other-month' : '') + // highlight days from other months
+ ((printDate.getTime() == selectedDate.getTime() && drawMonth == inst.selectedMonth && inst._keyEvent) || // user pressed key
+ (defaultDate.getTime() == printDate.getTime() && defaultDate.getTime() == selectedDate.getTime()) ?
+ // or defaultDate is current printedDate and defaultDate is selectedDate
+ ' ' + this._dayOverClass : '') + // highlight selected day
+ (unselectable ? ' ' + this._unselectableClass + ' ui-state-disabled': '') + // highlight unselectable days
(otherMonth && !showOtherMonths ? '' : ' ' + daySettings[1] + // highlight custom dates
- (printDate.getTime() >= currentDate.getTime() && printDate.getTime() <= endDate.getTime() ? // in current range
+ (printDate.getTime() >= currentDate.getTime() && printDate.getTime() <= endDate.getTime() ? // in current range
' ' + this._currentClass : '') + // highlight selected day
(printDate.getTime() == today.getTime() ? ' ui-datepicker-today' : '')) + '"' + // highlight today (if different)
((!otherMonth || showOtherMonths) && daySettings[2] ? ' title="' + daySettings[2] + '"' : '') + // cell title
- (unselectable ? (highlightWeek ? ' onmouseover="jQuery(this).parent().addClass(\'ui-datepicker-week-over\');"' + // highlight selection week
- ' onmouseout="jQuery(this).parent().removeClass(\'ui-datepicker-week-over\');"' : '') : // unhighlight selection week
- ' onmouseover="jQuery(this).addClass(\'ui-datepicker-days-cell-over\')' + // highlight selection
- (highlightWeek ? '.parent().addClass(\'ui-datepicker-week-over\')' : '') + ';' + // highlight selection week
- (!showStatus || (otherMonth && !showOtherMonths) ? '' : 'jQuery(\'#ui-datepicker-status-' +
- inst.id + '\').html(\'' + (dateStatus.apply((inst.input ? inst.input[0] : null),
- [printDate, inst]) || '&#xa0;') +'\');') + '"' +
- ' onmouseout="jQuery(this).removeClass(\'ui-datepicker-days-cell-over\')' + // unhighlight selection
- (highlightWeek ? '.parent().removeClass(\'ui-datepicker-week-over\')' : '') + ';' + // unhighlight selection week
- (!showStatus || (otherMonth && !showOtherMonths) ? '' : 'jQuery(\'#ui-datepicker-status-' +
- inst.id + '\').html(\'&#xa0;\');') + '" onclick="jQuery.datepicker._selectDay(\'#' +
- inst.id + '\',' + drawMonth + ',' + drawYear + ', this);"') + '>' + // actions
+ (unselectable ? '' : ' onclick="DP_jQuery.datepicker._selectDay(\'#' +
+ inst.id + '\',' + drawMonth + ',' + drawYear + ', this);return false;"') + '>' + // actions
(otherMonth ? (showOtherMonths ? printDate.getDate() : '&#xa0;') : // display for other months
- (unselectable ? printDate.getDate() : '<a>' + printDate.getDate() + '</a>')) + '</td>'; // display for this month
+ (unselectable ? '<span class="ui-state-default">' + printDate.getDate() + '</span>' : '<a class="ui-state-default' +
+ (printDate.getTime() == today.getTime() ? ' ui-state-highlight' : '') +
+ (printDate.getTime() >= currentDate.getTime() && printDate.getTime() <= endDate.getTime() ? // in current range
+ ' ui-state-active' : '') + // highlight selected day
+ '" href="#">' + printDate.getDate() + '</a>')) + '</td>'; // display for this month
printDate.setDate(printDate.getDate() + 1);
printDate = this._daylightSavingAdjust(printDate);
}
- html += '</tr>';
+ calender += tbody + '</tr>';
}
drawMonth++;
if (drawMonth > 11) {
drawMonth = 0;
drawYear++;
}
- html += '</tbody></table></div>';
+ calender += '</tbody></table>' + (isMultiMonth ? '</div>' +
+ ((numMonths[0] > 0 && col == numMonths[1]-1) ? '<div class="ui-datepicker-row-break"></div>' : '') : '');
+ group += calender;
}
- html += (showStatus ? '<div style="clear: both;"></div><div id="ui-datepicker-status-' + inst.id +
- '" class="ui-datepicker-status">' + (this._get(inst, 'initStatus') || '&#xa0;') + '</div>' : '') +
- (!closeAtTop && !inst.inline ? controls : '') +
- '<div style="clear: both;"></div>' +
- ($.browser.msie && parseInt($.browser.version) < 7 && !inst.inline ?
- '<iframe src="javascript:false;" class="ui-datepicker-cover"></iframe>' : '');
+ html += group;
+ }
+ html += buttonPanel + ($.browser.msie && parseInt($.browser.version,10) < 7 && !inst.inline ?
+ '<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>' : '');
+ inst._keyEvent = false;
return html;
},
-
+
/* Generate the month and year header. */
_generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate,
- selectedDate, secondary, showStatus, monthNames) {
+ selectedDate, secondary, monthNames, monthNamesShort) {
minDate = (inst.rangeStart && minDate && selectedDate < minDate ? selectedDate : minDate);
- var html = '<div class="ui-datepicker-header">';
+ var changeMonth = this._get(inst, 'changeMonth');
+ var changeYear = this._get(inst, 'changeYear');
+ var showMonthAfterYear = this._get(inst, 'showMonthAfterYear');
+ var html = '<div class="ui-datepicker-title">';
+ var monthHtml = '';
// month selection
- if (secondary || !this._get(inst, 'changeMonth'))
- html += monthNames[drawMonth] + '&#xa0;';
+ if (secondary || !changeMonth)
+ monthHtml += '<span class="ui-datepicker-month">' + monthNames[drawMonth] + '</span> ';
else {
var inMinYear = (minDate && minDate.getFullYear() == drawYear);
var inMaxYear = (maxDate && maxDate.getFullYear() == drawYear);
- html += '<select class="ui-datepicker-new-month" ' +
- 'onchange="jQuery.datepicker._selectMonthYear(\'#' + inst.id + '\', this, \'M\');" ' +
- 'onclick="jQuery.datepicker._clickMonthYear(\'#' + inst.id + '\');"' +
- (showStatus ? this._addStatus(inst, this._get(inst, 'monthStatus') || '&#xa0;') : '') + '>';
+ monthHtml += '<select class="ui-datepicker-month" ' +
+ 'onchange="DP_jQuery.datepicker._selectMonthYear(\'#' + inst.id + '\', this, \'M\');" ' +
+ 'onclick="DP_jQuery.datepicker._clickMonthYear(\'#' + inst.id + '\');"' +
+ '>';
for (var month = 0; month < 12; month++) {
if ((!inMinYear || month >= minDate.getMonth()) &&
(!inMaxYear || month <= maxDate.getMonth()))
- html += '<option value="' + month + '"' +
+ monthHtml += '<option value="' + month + '"' +
(month == drawMonth ? ' selected="selected"' : '') +
- '>' + monthNames[month] + '</option>';
+ '>' + monthNamesShort[month] + '</option>';
}
- html += '</select>';
+ monthHtml += '</select>';
}
+ if (!showMonthAfterYear)
+ html += monthHtml + ((secondary || changeMonth || changeYear) && (!(changeMonth && changeYear)) ? '&#xa0;' : '');
// year selection
- if (secondary || !this._get(inst, 'changeYear'))
- html += drawYear;
+ if (secondary || !changeYear)
+ html += '<span class="ui-datepicker-year">' + drawYear + '</span>';
else {
// determine range of years to display
var years = this._get(inst, 'yearRange').split(':');
@@ -1383,19 +1461,18 @@ $.extend(Datepicker.prototype, {
year = drawYear - 10;
endYear = drawYear + 10;
} else if (years[0].charAt(0) == '+' || years[0].charAt(0) == '-') {
- year = endYear = new Date().getFullYear();
- year += parseInt(years[0], 10);
- endYear += parseInt(years[1], 10);
+ year = drawYear + parseInt(years[0], 10);
+ endYear = drawYear + parseInt(years[1], 10);
} else {
year = parseInt(years[0], 10);
endYear = parseInt(years[1], 10);
}
year = (minDate ? Math.max(year, minDate.getFullYear()) : year);
endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear);
- html += '<select class="ui-datepicker-new-year" ' +
- 'onchange="jQuery.datepicker._selectMonthYear(\'#' + inst.id + '\', this, \'Y\');" ' +
- 'onclick="jQuery.datepicker._clickMonthYear(\'#' + inst.id + '\');"' +
- (showStatus ? this._addStatus(inst, this._get(inst, 'yearStatus') || '&#xa0;') : '') + '>';
+ html += '<select class="ui-datepicker-year" ' +
+ 'onchange="DP_jQuery.datepicker._selectMonthYear(\'#' + inst.id + '\', this, \'Y\');" ' +
+ 'onclick="DP_jQuery.datepicker._clickMonthYear(\'#' + inst.id + '\');"' +
+ '>';
for (; year <= endYear; year++) {
html += '<option value="' + year + '"' +
(year == drawYear ? ' selected="selected"' : '') +
@@ -1403,16 +1480,12 @@ $.extend(Datepicker.prototype, {
}
html += '</select>';
}
+ if (showMonthAfterYear)
+ html += (secondary || changeMonth || changeYear ? '&#xa0;' : '') + monthHtml;
html += '</div>'; // Close datepicker_header
return html;
},
- /* Provide code to set and clear the status panel. */
- _addStatus: function(inst, text) {
- return ' onmouseover="jQuery(\'#ui-datepicker-status-' + inst.id + '\').html(\'' + text + '\');" ' +
- 'onmouseout="jQuery(\'#ui-datepicker-status-' + inst.id + '\').html(\'&#xa0;\');"';
- },
-
/* Adjust one of the date sub-fields. */
_adjustInstDate: function(inst, offset, period) {
var year = inst.drawYear + (period == 'Y' ? offset : 0);
@@ -1437,9 +1510,9 @@ $.extend(Datepicker.prototype, {
var onChange = this._get(inst, 'onChangeMonthYear');
if (onChange)
onChange.apply((inst.input ? inst.input[0] : null),
- [new Date(inst.selectedYear, inst.selectedMonth, 1), inst]);
+ [inst.selectedYear, inst.selectedMonth + 1, inst]);
},
-
+
/* Determine the number of months to show. */
_getNumberOfMonths: function(inst) {
var numMonths = this._get(inst, 'numberOfMonths');
@@ -1483,7 +1556,7 @@ $.extend(Datepicker.prototype, {
var maxDate = this._getMinMaxDate(inst, 'max');
return ((!minDate || date >= minDate) && (!maxDate || date <= maxDate));
},
-
+
/* Provide the configuration settings for formatting/parsing. */
_getFormatConfig: function(inst) {
var shortYearCutoff = this._get(inst, 'shortYearCutoff');
@@ -1528,10 +1601,21 @@ function isArray(a) {
Object - settings for attaching new datepicker functionality
@return jQuery object */
$.fn.datepicker = function(options){
+
+ /* Initialise the date picker. */
+ if (!$.datepicker.initialized) {
+ $(document).mousedown($.datepicker._checkExternalClick).
+ find('body').append($.datepicker.dpDiv);
+ $.datepicker.initialized = true;
+ }
+
var otherArgs = Array.prototype.slice.call(arguments, 1);
if (typeof options == 'string' && (options == 'isDisabled' || options == 'getDate'))
return $.datepicker['_' + options + 'Datepicker'].
apply($.datepicker, [this[0]].concat(otherArgs));
+ if (options == 'option' && arguments.length == 2 && typeof arguments[1] == 'string')
+ return $.datepicker['_' + options + 'Datepicker'].
+ apply($.datepicker, [this[0]].concat(otherArgs));
return this.each(function() {
typeof options == 'string' ?
$.datepicker['_' + options + 'Datepicker'].
@@ -1541,11 +1625,12 @@ $.fn.datepicker = function(options){
};
$.datepicker = new Datepicker(); // singleton instance
-
-/* Initialise the date picker. */
-$(document).ready(function() {
- $(document.body).append($.datepicker.dpDiv).
- mousedown($.datepicker._checkExternalClick);
-});
+$.datepicker.initialized = false;
+$.datepicker.uuid = new Date().getTime();
+$.datepicker.version = "1.7.2";
+
+// Workaround for #4055
+// Add another global to avoid noConflict issues with inline event handlers
+window.DP_jQuery = $;
})(jQuery);
diff --git a/template-common/lib/ui/ui.dialog.js b/template-common/lib/ui/ui.dialog.js
index 858e9e28b..fdd5b26df 100644
--- a/template-common/lib/ui/ui.dialog.js
+++ b/template-common/lib/ui/ui.dialog.js
@@ -1,10 +1,10 @@
/*
- * jQuery UI Dialog
+ * jQuery UI Dialog 1.7.2
*
- * Copyright (c) 2008 Richard D. Worth (rdworth.org)
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
- *
+ *
* http://docs.jquery.com/UI/Dialog
*
* Depends:
@@ -15,182 +15,357 @@
(function($) {
var setDataSwitch = {
- dragStart: "start.draggable",
- drag: "drag.draggable",
- dragStop: "stop.draggable",
- maxHeight: "maxHeight.resizable",
- minHeight: "minHeight.resizable",
- maxWidth: "maxWidth.resizable",
- minWidth: "minWidth.resizable",
- resizeStart: "start.resizable",
- resize: "drag.resizable",
- resizeStop: "stop.resizable"
-};
+ dragStart: "start.draggable",
+ drag: "drag.draggable",
+ dragStop: "stop.draggable",
+ maxHeight: "maxHeight.resizable",
+ minHeight: "minHeight.resizable",
+ maxWidth: "maxWidth.resizable",
+ minWidth: "minWidth.resizable",
+ resizeStart: "start.resizable",
+ resize: "drag.resizable",
+ resizeStop: "stop.resizable"
+ },
+
+ uiDialogClasses =
+ 'ui-dialog ' +
+ 'ui-widget ' +
+ 'ui-widget-content ' +
+ 'ui-corner-all ';
$.widget("ui.dialog", {
- init: function() {
+
+ _init: function() {
+ this.originalTitle = this.element.attr('title');
+
var self = this,
options = this.options,
- resizeHandles = typeof options.resizable == 'string'
- ? options.resizable
- : 'n,e,s,w,se,sw,ne,nw',
-
- uiDialogContent = this.element
- .addClass('ui-dialog-content')
- .wrap('<div/>')
- .wrap('<div/>'),
-
- uiDialogContainer = (this.uiDialogContainer = uiDialogContent.parent()
- .addClass('ui-dialog-container')
- .css({position: 'relative', width: '100%', height: '100%'})),
-
- title = options.title || uiDialogContent.attr('title') || '',
- uiDialogTitlebar = (this.uiDialogTitlebar =
- $('<div class="ui-dialog-titlebar"/>'))
- .append('<span class="ui-dialog-title">' + title + '</span>')
- .append('<a href="#" class="ui-dialog-titlebar-close"><span>X</span></a>')
- .prependTo(uiDialogContainer),
-
- uiDialog = (this.uiDialog = uiDialogContainer.parent())
+
+ title = options.title || this.originalTitle || '&nbsp;',
+ titleId = $.ui.dialog.getTitleId(this.element),
+
+ uiDialog = (this.uiDialog = $('<div/>'))
.appendTo(document.body)
.hide()
- .addClass('ui-dialog')
- .addClass(options.dialogClass)
- // add content classes to dialog
- // to inherit theme at top level of element
- .addClass(uiDialogContent.attr('className'))
- .removeClass('ui-dialog-content')
+ .addClass(uiDialogClasses + options.dialogClass)
.css({
position: 'absolute',
- width: options.width,
- height: options.height,
overflow: 'hidden',
zIndex: options.zIndex
})
// setting tabIndex makes the div focusable
// setting outline to 0 prevents a border on focus in Mozilla
- .attr('tabIndex', -1).css('outline', 0).keydown(function(ev) {
- if (options.closeOnEscape) {
- var ESC = 27;
- (ev.keyCode && ev.keyCode == ESC && self.close());
- }
+ .attr('tabIndex', -1).css('outline', 0).keydown(function(event) {
+ (options.closeOnEscape && event.keyCode
+ && event.keyCode == $.ui.keyCode.ESCAPE && self.close(event));
+ })
+ .attr({
+ role: 'dialog',
+ 'aria-labelledby': titleId
})
- .mousedown(function() {
- self.moveToTop();
+ .mousedown(function(event) {
+ self.moveToTop(false, event);
}),
-
- uiDialogButtonPane = (this.uiDialogButtonPane = $('<div/>'))
- .addClass('ui-dialog-buttonpane').css({ position: 'absolute', bottom: 0 })
- .appendTo(uiDialog);
+
+ uiDialogContent = this.element
+ .show()
+ .removeAttr('title')
+ .addClass(
+ 'ui-dialog-content ' +
+ 'ui-widget-content')
+ .appendTo(uiDialog),
+
+ uiDialogTitlebar = (this.uiDialogTitlebar = $('<div></div>'))
+ .addClass(
+ 'ui-dialog-titlebar ' +
+ 'ui-widget-header ' +
+ 'ui-corner-all ' +
+ 'ui-helper-clearfix'
+ )
+ .prependTo(uiDialog),
+
+ uiDialogTitlebarClose = $('<a href="#"/>')
+ .addClass(
+ 'ui-dialog-titlebar-close ' +
+ 'ui-corner-all'
+ )
+ .attr('role', 'button')
+ .hover(
+ function() {
+ uiDialogTitlebarClose.addClass('ui-state-hover');
+ },
+ function() {
+ uiDialogTitlebarClose.removeClass('ui-state-hover');
+ }
+ )
+ .focus(function() {
+ uiDialogTitlebarClose.addClass('ui-state-focus');
+ })
+ .blur(function() {
+ uiDialogTitlebarClose.removeClass('ui-state-focus');
+ })
+ .mousedown(function(ev) {
+ ev.stopPropagation();
+ })
+ .click(function(event) {
+ self.close(event);
+ return false;
+ })
+ .appendTo(uiDialogTitlebar),
+
+ uiDialogTitlebarCloseText = (this.uiDialogTitlebarCloseText = $('<span/>'))
+ .addClass(
+ 'ui-icon ' +
+ 'ui-icon-closethick'
+ )
+ .text(options.closeText)
+ .appendTo(uiDialogTitlebarClose),
+
+ uiDialogTitle = $('<span/>')
+ .addClass('ui-dialog-title')
+ .attr('id', titleId)
+ .html(title)
+ .prependTo(uiDialogTitlebar);
+
+ uiDialogTitlebar.find("*").add(uiDialogTitlebar).disableSelection();
+
+ (options.draggable && $.fn.draggable && this._makeDraggable());
+ (options.resizable && $.fn.resizable && this._makeResizable());
+
+ this._createButtons(options.buttons);
+ this._isOpen = false;
+
+ (options.bgiframe && $.fn.bgiframe && uiDialog.bgiframe());
+ (options.autoOpen && this.open());
- this.uiDialogTitlebarClose = $('.ui-dialog-titlebar-close', uiDialogTitlebar)
- .hover(
- function() {
- $(this).addClass('ui-dialog-titlebar-close-hover');
- },
- function() {
- $(this).removeClass('ui-dialog-titlebar-close-hover');
- }
- )
- .mousedown(function(ev) {
- ev.stopPropagation();
- })
- .click(function() {
- self.close();
- return false;
- });
+ },
- this.uiDialogTitlebar.find("*").add(this.uiDialogTitlebar).each(function() {
- $.ui.disableSelection(this);
- });
+ destroy: function() {
+ (this.overlay && this.overlay.destroy());
+ this.uiDialog.hide();
+ this.element
+ .unbind('.dialog')
+ .removeData('dialog')
+ .removeClass('ui-dialog-content ui-widget-content')
+ .hide().appendTo('body');
+ this.uiDialog.remove();
- if ($.fn.draggable) {
- uiDialog.draggable({
- cancel: '.ui-dialog-content',
- helper: options.dragHelper,
- handle: '.ui-dialog-titlebar',
- start: function(e, ui) {
- self.moveToTop();
- (options.dragStart && options.dragStart.apply(self.element[0], arguments));
- },
- drag: function(e, ui) {
- (options.drag && options.drag.apply(self.element[0], arguments));
- },
- stop: function(e, ui) {
- (options.dragStop && options.dragStop.apply(self.element[0], arguments));
- $.ui.dialog.overlay.resize();
- }
- });
- (options.draggable || uiDialog.draggable('disable'));
+ (this.originalTitle && this.element.attr('title', this.originalTitle));
+ },
+
+ close: function(event) {
+ var self = this;
+
+ if (false === self._trigger('beforeclose', event)) {
+ return;
}
+
+ (self.overlay && self.overlay.destroy());
+ self.uiDialog.unbind('keypress.ui-dialog');
+
+ (self.options.hide
+ ? self.uiDialog.hide(self.options.hide, function() {
+ self._trigger('close', event);
+ })
+ : self.uiDialog.hide() && self._trigger('close', event));
+
+ $.ui.dialog.overlay.resize();
+
+ self._isOpen = false;
- if ($.fn.resizable) {
- uiDialog.resizable({
- cancel: '.ui-dialog-content',
- helper: options.resizeHelper,
- maxWidth: options.maxWidth,
- maxHeight: options.maxHeight,
- minWidth: options.minWidth,
- minHeight: options.minHeight,
- start: function() {
- (options.resizeStart && options.resizeStart.apply(self.element[0], arguments));
- },
- resize: function(e, ui) {
- (options.autoResize && self.size.apply(self));
- (options.resize && options.resize.apply(self.element[0], arguments));
- },
- handles: resizeHandles,
- stop: function(e, ui) {
- (options.autoResize && self.size.apply(self));
- (options.resizeStop && options.resizeStop.apply(self.element[0], arguments));
- $.ui.dialog.overlay.resize();
+ // adjust the maxZ to allow other modal dialogs to continue to work (see #4309)
+ if (self.options.modal) {
+ var maxZ = 0;
+ $('.ui-dialog').each(function() {
+ if (this != self.uiDialog[0]) {
+ maxZ = Math.max(maxZ, $(this).css('z-index'));
}
});
- (options.resizable || uiDialog.resizable('disable'));
+ $.ui.dialog.maxZ = maxZ;
}
-
- this.createButtons(options.buttons);
- this.isOpen = false;
-
- (options.bgiframe && $.fn.bgiframe && uiDialog.bgiframe());
- (options.autoOpen && this.open());
},
-
- setData: function(key, value){
- (setDataSwitch[key] && this.uiDialog.data(setDataSwitch[key], value));
- switch (key) {
- case "buttons":
- this.createButtons(value);
- break;
- case "draggable":
- this.uiDialog.draggable(value ? 'enable' : 'disable');
- break;
- case "height":
- this.uiDialog.height(value);
- break;
- case "position":
- this.position(value);
- break;
- case "resizable":
- (typeof value == 'string' && this.uiDialog.data('handles.resizable', value));
- this.uiDialog.resizable(value ? 'enable' : 'disable');
- break;
- case "title":
- $(".ui-dialog-title", this.uiDialogTitlebar).text(value);
- break;
- case "width":
- this.uiDialog.width(value);
- break;
+
+ isOpen: function() {
+ return this._isOpen;
+ },
+
+ // the force parameter allows us to move modal dialogs to their correct
+ // position on open
+ moveToTop: function(force, event) {
+
+ if ((this.options.modal && !force)
+ || (!this.options.stack && !this.options.modal)) {
+ return this._trigger('focus', event);
}
- $.widget.prototype.setData.apply(this, arguments);
+ if (this.options.zIndex > $.ui.dialog.maxZ) {
+ $.ui.dialog.maxZ = this.options.zIndex;
+ }
+ (this.overlay && this.overlay.$el.css('z-index', $.ui.dialog.overlay.maxZ = ++$.ui.dialog.maxZ));
+
+ //Save and then restore scroll since Opera 9.5+ resets when parent z-Index is changed.
+ // http://ui.jquery.com/bugs/ticket/3193
+ var saveScroll = { scrollTop: this.element.attr('scrollTop'), scrollLeft: this.element.attr('scrollLeft') };
+ this.uiDialog.css('z-index', ++$.ui.dialog.maxZ);
+ this.element.attr(saveScroll);
+ this._trigger('focus', event);
},
-
- position: function(pos) {
+
+ open: function() {
+ if (this._isOpen) { return; }
+
+ var options = this.options,
+ uiDialog = this.uiDialog;
+
+ this.overlay = options.modal ? new $.ui.dialog.overlay(this) : null;
+ (uiDialog.next().length && uiDialog.appendTo('body'));
+ this._size();
+ this._position(options.position);
+ uiDialog.show(options.show);
+ this.moveToTop(true);
+
+ // prevent tabbing out of modal dialogs
+ (options.modal && uiDialog.bind('keypress.ui-dialog', function(event) {
+ if (event.keyCode != $.ui.keyCode.TAB) {
+ return;
+ }
+
+ var tabbables = $(':tabbable', this),
+ first = tabbables.filter(':first')[0],
+ last = tabbables.filter(':last')[0];
+
+ if (event.target == last && !event.shiftKey) {
+ setTimeout(function() {
+ first.focus();
+ }, 1);
+ } else if (event.target == first && event.shiftKey) {
+ setTimeout(function() {
+ last.focus();
+ }, 1);
+ }
+ }));
+
+ // set focus to the first tabbable element in the content area or the first button
+ // if there are no tabbable elements, set focus on the dialog itself
+ $([])
+ .add(uiDialog.find('.ui-dialog-content :tabbable:first'))
+ .add(uiDialog.find('.ui-dialog-buttonpane :tabbable:first'))
+ .add(uiDialog)
+ .filter(':first')
+ .focus();
+
+ this._trigger('open');
+ this._isOpen = true;
+ },
+
+ _createButtons: function(buttons) {
+ var self = this,
+ hasButtons = false,
+ uiDialogButtonPane = $('<div></div>')
+ .addClass(
+ 'ui-dialog-buttonpane ' +
+ 'ui-widget-content ' +
+ 'ui-helper-clearfix'
+ );
+
+ // if we already have a button pane, remove it
+ this.uiDialog.find('.ui-dialog-buttonpane').remove();
+
+ (typeof buttons == 'object' && buttons !== null &&
+ $.each(buttons, function() { return !(hasButtons = true); }));
+ if (hasButtons) {
+ $.each(buttons, function(name, fn) {
+ $('<button type="button"></button>')
+ .addClass(
+ 'ui-state-default ' +
+ 'ui-corner-all'
+ )
+ .text(name)
+ .click(function() { fn.apply(self.element[0], arguments); })
+ .hover(
+ function() {
+ $(this).addClass('ui-state-hover');
+ },
+ function() {
+ $(this).removeClass('ui-state-hover');
+ }
+ )
+ .focus(function() {
+ $(this).addClass('ui-state-focus');
+ })
+ .blur(function() {
+ $(this).removeClass('ui-state-focus');
+ })
+ .appendTo(uiDialogButtonPane);
+ });
+ uiDialogButtonPane.appendTo(this.uiDialog);
+ }
+ },
+
+ _makeDraggable: function() {
+ var self = this,
+ options = this.options,
+ heightBeforeDrag;
+
+ this.uiDialog.draggable({
+ cancel: '.ui-dialog-content',
+ handle: '.ui-dialog-titlebar',
+ containment: 'document',
+ start: function() {
+ heightBeforeDrag = options.height;
+ $(this).height($(this).height()).addClass("ui-dialog-dragging");
+ (options.dragStart && options.dragStart.apply(self.element[0], arguments));
+ },
+ drag: function() {
+ (options.drag && options.drag.apply(self.element[0], arguments));
+ },
+ stop: function() {
+ $(this).removeClass("ui-dialog-dragging").height(heightBeforeDrag);
+ (options.dragStop && options.dragStop.apply(self.element[0], arguments));
+ $.ui.dialog.overlay.resize();
+ }
+ });
+ },
+
+ _makeResizable: function(handles) {
+ handles = (handles === undefined ? this.options.resizable : handles);
+ var self = this,
+ options = this.options,
+ resizeHandles = typeof handles == 'string'
+ ? handles
+ : 'n,e,s,w,se,sw,ne,nw';
+
+ this.uiDialog.resizable({
+ cancel: '.ui-dialog-content',
+ alsoResize: this.element,
+ maxWidth: options.maxWidth,
+ maxHeight: options.maxHeight,
+ minWidth: options.minWidth,
+ minHeight: options.minHeight,
+ start: function() {
+ $(this).addClass("ui-dialog-resizing");
+ (options.resizeStart && options.resizeStart.apply(self.element[0], arguments));
+ },
+ resize: function() {
+ (options.resize && options.resize.apply(self.element[0], arguments));
+ },
+ handles: resizeHandles,
+ stop: function() {
+ $(this).removeClass("ui-dialog-resizing");
+ options.height = $(this).height();
+ options.width = $(this).width();
+ (options.resizeStop && options.resizeStop.apply(self.element[0], arguments));
+ $.ui.dialog.overlay.resize();
+ }
+ })
+ .find('.ui-resizable-se').addClass('ui-icon ui-icon-grip-diagonal-se');
+ },
+
+ _position: function(pos) {
var wnd = $(window), doc = $(document),
pTop = doc.scrollTop(), pLeft = doc.scrollLeft(),
minTop = pTop;
-
+
if ($.inArray(pos, ['center','top','right','bottom','left']) >= 0) {
pos = [
pos == 'right' || pos == 'left' ? pos : 'center',
@@ -208,11 +383,11 @@ $.widget("ui.dialog", {
pLeft += 0;
break;
case 'right':
- pLeft += wnd.width() - this.uiDialog.width();
+ pLeft += wnd.width() - this.uiDialog.outerWidth();
break;
default:
case 'center':
- pLeft += (wnd.width() - this.uiDialog.width()) / 2;
+ pLeft += (wnd.width() - this.uiDialog.outerWidth()) / 2;
}
}
if (pos[1].constructor == Number) {
@@ -223,134 +398,136 @@ $.widget("ui.dialog", {
pTop += 0;
break;
case 'bottom':
- pTop += wnd.height() - this.uiDialog.height();
+ pTop += wnd.height() - this.uiDialog.outerHeight();
break;
default:
case 'middle':
- pTop += (wnd.height() - this.uiDialog.height()) / 2;
+ pTop += (wnd.height() - this.uiDialog.outerHeight()) / 2;
}
}
-
+
// prevent the dialog from being too high (make sure the titlebar
// is accessible)
pTop = Math.max(pTop, minTop);
this.uiDialog.css({top: pTop, left: pLeft});
},
- size: function() {
- var container = this.uiDialogContainer,
- titlebar = this.uiDialogTitlebar,
- content = this.element,
- tbMargin = parseInt(content.css('margin-top'),10) + parseInt(content.css('margin-bottom'),10),
- lrMargin = parseInt(content.css('margin-left'),10) + parseInt(content.css('margin-right'),10);
- content.height(container.height() - titlebar.outerHeight() - tbMargin);
- content.width(container.width() - lrMargin);
- },
-
- open: function() {
- if (this.isOpen) { return; }
-
- this.overlay = this.options.modal ? new $.ui.dialog.overlay(this) : null;
- (this.uiDialog.next().length > 0) && this.uiDialog.appendTo('body');
- this.position(this.options.position);
- this.uiDialog.show(this.options.show);
- this.options.autoResize && this.size();
- this.moveToTop(true);
-
- // CALLBACK: open
- var openEV = null;
- var openUI = {
- options: this.options
- };
- this.uiDialogTitlebarClose.focus();
- this.element.triggerHandler("dialogopen", [openEV, openUI], this.options.open);
-
- this.isOpen = true;
+ _setData: function(key, value){
+ (setDataSwitch[key] && this.uiDialog.data(setDataSwitch[key], value));
+ switch (key) {
+ case "buttons":
+ this._createButtons(value);
+ break;
+ case "closeText":
+ this.uiDialogTitlebarCloseText.text(value);
+ break;
+ case "dialogClass":
+ this.uiDialog
+ .removeClass(this.options.dialogClass)
+ .addClass(uiDialogClasses + value);
+ break;
+ case "draggable":
+ (value
+ ? this._makeDraggable()
+ : this.uiDialog.draggable('destroy'));
+ break;
+ case "height":
+ this.uiDialog.height(value);
+ break;
+ case "position":
+ this._position(value);
+ break;
+ case "resizable":
+ var uiDialog = this.uiDialog,
+ isResizable = this.uiDialog.is(':data(resizable)');
+
+ // currently resizable, becoming non-resizable
+ (isResizable && !value && uiDialog.resizable('destroy'));
+
+ // currently resizable, changing handles
+ (isResizable && typeof value == 'string' &&
+ uiDialog.resizable('option', 'handles', value));
+
+ // currently non-resizable, becoming resizable
+ (isResizable || this._makeResizable(value));
+ break;
+ case "title":
+ $(".ui-dialog-title", this.uiDialogTitlebar).html(value || '&nbsp;');
+ break;
+ case "width":
+ this.uiDialog.width(value);
+ break;
+ }
+
+ $.widget.prototype._setData.apply(this, arguments);
},
-
- // the force parameter allows us to move modal dialogs to their correct
- // position on open
- moveToTop: function(force) {
- if ((this.options.modal && !force)
- || (!this.options.stack && !this.options.modal)) { return this.element.triggerHandler("dialogfocus", [null, { options: this.options }], this.options.focus); }
-
- var maxZ = this.options.zIndex, options = this.options;
- $('.ui-dialog:visible').each(function() {
- maxZ = Math.max(maxZ, parseInt($(this).css('z-index'), 10) || options.zIndex);
+
+ _size: function() {
+ /* If the user has resized the dialog, the .ui-dialog and .ui-dialog-content
+ * divs will both have width and height set, so we need to reset them
+ */
+ var options = this.options;
+
+ // reset content sizing
+ this.element.css({
+ height: 0,
+ minHeight: 0,
+ width: 'auto'
});
- (this.overlay && this.overlay.$el.css('z-index', ++maxZ));
- this.uiDialog.css('z-index', ++maxZ);
-
- this.element.triggerHandler("dialogfocus", [null, { options: this.options }], this.options.focus);
- },
-
- close: function() {
- (this.overlay && this.overlay.destroy());
- this.uiDialog.hide(this.options.hide);
-
- // CALLBACK: close
- var closeEV = null;
- var closeUI = {
- options: this.options
- };
- this.element.triggerHandler("dialogclose", [closeEV, closeUI], this.options.close);
- $.ui.dialog.overlay.resize();
-
- this.isOpen = false;
- },
-
- destroy: function() {
- (this.overlay && this.overlay.destroy());
- this.uiDialog.hide();
+
+ // reset wrapper sizing
+ // determine the height of all the non-content elements
+ var nonContentHeight = this.uiDialog.css({
+ height: 'auto',
+ width: options.width
+ })
+ .height();
+
this.element
- .unbind('.dialog')
- .removeData('dialog')
- .removeClass('ui-dialog-content')
- .hide().appendTo('body');
- this.uiDialog.remove();
- },
-
- createButtons: function(buttons) {
- var self = this,
- hasButtons = false,
- uiDialogButtonPane = this.uiDialogButtonPane;
-
- // remove any existing buttons
- uiDialogButtonPane.empty().hide();
-
- $.each(buttons, function() { return !(hasButtons = true); });
- if (hasButtons) {
- uiDialogButtonPane.show();
- $.each(buttons, function(name, fn) {
- $('<button/>')
- .text(name)
- .click(function() { fn.apply(self.element[0], arguments); })
- .appendTo(uiDialogButtonPane);
+ .css({
+ minHeight: Math.max(options.minHeight - nonContentHeight, 0),
+ height: options.height == 'auto'
+ ? 'auto'
+ : Math.max(options.height - nonContentHeight, 0)
});
- }
}
});
$.extend($.ui.dialog, {
+ version: "1.7.2",
defaults: {
autoOpen: true,
- autoResize: true,
bgiframe: false,
buttons: {},
closeOnEscape: true,
+ closeText: 'close',
+ dialogClass: '',
draggable: true,
- height: 200,
- minHeight: 100,
+ hide: null,
+ height: 'auto',
+ maxHeight: false,
+ maxWidth: false,
+ minHeight: 150,
minWidth: 150,
modal: false,
- overlay: {},
position: 'center',
resizable: true,
+ show: null,
stack: true,
+ title: '',
width: 300,
zIndex: 1000
},
-
+
+ getter: 'isOpen',
+
+ uuid: 0,
+ maxZ: 0,
+
+ getTitleId: function($el) {
+ return 'ui-dialog-title-' + ($el.attr('id') || ++this.uuid);
+ },
+
overlay: function(dialog) {
this.$el = $.ui.dialog.overlay.create(dialog);
}
@@ -358,71 +535,65 @@ $.extend($.ui.dialog, {
$.extend($.ui.dialog.overlay, {
instances: [],
+ maxZ: 0,
events: $.map('focus,mousedown,mouseup,keydown,keypress,click'.split(','),
- function(e) { return e + '.dialog-overlay'; }).join(' '),
+ function(event) { return event + '.dialog-overlay'; }).join(' '),
create: function(dialog) {
if (this.instances.length === 0) {
// prevent use of anchors and inputs
// we use a setTimeout in case the overlay is created from an
// event that we're going to be cancelling (see #2804)
setTimeout(function() {
- $('a, :input').bind($.ui.dialog.overlay.events, function() {
- // allow use of the element if inside a dialog and
- // - there are no modal dialogs
- // - there are modal dialogs, but we are in front of the topmost modal
- var allow = false;
- var $dialog = $(this).parents('.ui-dialog');
- if ($dialog.length) {
- var $overlays = $('.ui-dialog-overlay');
- if ($overlays.length) {
- var maxZ = parseInt($overlays.css('z-index'), 10);
- $overlays.each(function() {
- maxZ = Math.max(maxZ, parseInt($(this).css('z-index'), 10));
- });
- allow = parseInt($dialog.css('z-index'), 10) > maxZ;
- } else {
- allow = true;
- }
- }
- return allow;
- });
+ // handle $(el).dialog().dialog('close') (see #4065)
+ if ($.ui.dialog.overlay.instances.length) {
+ $(document).bind($.ui.dialog.overlay.events, function(event) {
+ var dialogZ = $(event.target).parents('.ui-dialog').css('zIndex') || 0;
+ return (dialogZ > $.ui.dialog.overlay.maxZ);
+ });
+ }
}, 1);
-
+
// allow closing by pressing the escape key
- $(document).bind('keydown.dialog-overlay', function(e) {
- var ESC = 27;
- (e.keyCode && e.keyCode == ESC && dialog.close());
+ $(document).bind('keydown.dialog-overlay', function(event) {
+ (dialog.options.closeOnEscape && event.keyCode
+ && event.keyCode == $.ui.keyCode.ESCAPE && dialog.close(event));
});
-
+
// handle window resize
$(window).bind('resize.dialog-overlay', $.ui.dialog.overlay.resize);
}
-
- var $el = $('<div/>').appendTo(document.body)
- .addClass('ui-dialog-overlay').css($.extend({
- borderWidth: 0, margin: 0, padding: 0,
- position: 'absolute', top: 0, left: 0,
+
+ var $el = $('<div></div>').appendTo(document.body)
+ .addClass('ui-widget-overlay').css({
width: this.width(),
height: this.height()
- }, dialog.options.overlay));
-
+ });
+
(dialog.options.bgiframe && $.fn.bgiframe && $el.bgiframe());
-
+
this.instances.push($el);
return $el;
},
-
+
destroy: function($el) {
this.instances.splice($.inArray(this.instances, $el), 1);
-
+
if (this.instances.length === 0) {
- $('a, :input').add([document, window]).unbind('.dialog-overlay');
+ $([document, window]).unbind('.dialog-overlay');
}
-
+
$el.remove();
+
+ // adjust the maxZ to allow other modal dialogs to continue to work (see #4309)
+ var maxZ = 0;
+ $.each(this.instances, function() {
+ maxZ = Math.max(maxZ, this.css('z-index'));
+ });
+ this.maxZ = maxZ;
},
-
+
height: function() {
+ // handle IE 6
if ($.browser.msie && $.browser.version < 7) {
var scrollHeight = Math.max(
document.documentElement.scrollHeight,
@@ -432,18 +603,20 @@ $.extend($.ui.dialog.overlay, {
document.documentElement.offsetHeight,
document.body.offsetHeight
);
-
+
if (scrollHeight < offsetHeight) {
return $(window).height() + 'px';
} else {
return scrollHeight + 'px';
}
+ // handle "good" browsers
} else {
return $(document).height() + 'px';
}
},
-
+
width: function() {
+ // handle IE 6
if ($.browser.msie && $.browser.version < 7) {
var scrollWidth = Math.max(
document.documentElement.scrollWidth,
@@ -453,17 +626,18 @@ $.extend($.ui.dialog.overlay, {
document.documentElement.offsetWidth,
document.body.offsetWidth
);
-
+
if (scrollWidth < offsetWidth) {
return $(window).width() + 'px';
} else {
return scrollWidth + 'px';
}
+ // handle "good" browsers
} else {
return $(document).width() + 'px';
}
},
-
+
resize: function() {
/* If the dialog is draggable and the user drags it past the
* right edge of the window, the document becomes wider so we
@@ -477,7 +651,7 @@ $.extend($.ui.dialog.overlay, {
$.each($.ui.dialog.overlay.instances, function() {
$overlays = $overlays.add(this);
});
-
+
$overlays.css({
width: 0,
height: 0
diff --git a/template-common/lib/ui/ui.draggable.js b/template-common/lib/ui/ui.draggable.js
index 31aecff58..0402f0e5c 100644
--- a/template-common/lib/ui/ui.draggable.js
+++ b/template-common/lib/ui/ui.draggable.js
@@ -1,10 +1,10 @@
/*
- * jQuery UI Draggable
+ * jQuery UI Draggable 1.7.2
*
- * Copyright (c) 2008 Paul Bakaus
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
- *
+ *
* http://docs.jquery.com/UI/Draggables
*
* Depends:
@@ -13,531 +13,559 @@
(function($) {
$.widget("ui.draggable", $.extend({}, $.ui.mouse, {
- init: function() {
-
- //Initialize needed constants
+
+ _init: function() {
+
+ if (this.options.helper == 'original' && !(/^(?:r|a|f)/).test(this.element.css("position")))
+ this.element[0].style.position = 'relative';
+
+ (this.options.addClasses && this.element.addClass("ui-draggable"));
+ (this.options.disabled && this.element.addClass("ui-draggable-disabled"));
+
+ this._mouseInit();
+
+ },
+
+ destroy: function() {
+ if(!this.element.data('draggable')) return;
+ this.element
+ .removeData("draggable")
+ .unbind(".draggable")
+ .removeClass("ui-draggable"
+ + " ui-draggable-dragging"
+ + " ui-draggable-disabled");
+ this._mouseDestroy();
+ },
+
+ _mouseCapture: function(event) {
+
var o = this.options;
- //Position the node
- if (o.helper == 'original' && !(/(relative|absolute|fixed)/).test(this.element.css('position')))
- this.element.css('position', 'relative');
+ if (this.helper || o.disabled || $(event.target).is('.ui-resizable-handle'))
+ return false;
+
+ //Quit if we're not on a valid handle
+ this.handle = this._getHandle(event);
+ if (!this.handle)
+ return false;
+
+ return true;
- this.element.addClass('ui-draggable');
- (o.disabled && this.element.addClass('ui-draggable-disabled'));
-
- this.mouseInit();
-
},
- mouseStart: function(e) {
+
+ _mouseStart: function(event) {
+
var o = this.options;
-
- if (this.helper || o.disabled || $(e.target).is('.ui-resizable-handle')) return false;
-
- var handle = !this.options.handle || !$(this.options.handle, this.element).length ? true : false;
-
-
- $(this.options.handle, this.element).find("*").andSelf().each(function() {
- if(this == e.target) handle = true;
- });
- if (!handle) return false;
-
- if($.ui.ddmanager) $.ui.ddmanager.current = this;
-
+
//Create and append the visible helper
- this.helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [e])) : (o.helper == 'clone' ? this.element.clone() : this.element);
- if(!this.helper.parents('body').length) this.helper.appendTo((o.appendTo == 'parent' ? this.element[0].parentNode : o.appendTo));
- if(this.helper[0] != this.element[0] && !(/(fixed|absolute)/).test(this.helper.css("position"))) this.helper.css("position", "absolute");
-
+ this.helper = this._createHelper(event);
+
+ //Cache the helper size
+ this._cacheHelperProportions();
+
+ //If ddmanager is used for droppables, set the global draggable
+ if($.ui.ddmanager)
+ $.ui.ddmanager.current = this;
+
/*
* - Position generation -
* This block generates everything position related - it's the core of draggables.
*/
-
- this.margins = { //Cache the margins
- left: (parseInt(this.element.css("marginLeft"),10) || 0),
- top: (parseInt(this.element.css("marginTop"),10) || 0)
- };
-
- this.cssPosition = this.helper.css("position"); //Store the helper's css position
- this.offset = this.element.offset(); //The element's absolute position on the page
- this.offset = { //Substract the margins from the element's absolute offset
+
+ //Cache the margins of the original element
+ this._cacheMargins();
+
+ //Store the helper's css position
+ this.cssPosition = this.helper.css("position");
+ this.scrollParent = this.helper.scrollParent();
+
+ //The element's absolute position on the page minus margins
+ this.offset = this.element.offset();
+ this.offset = {
top: this.offset.top - this.margins.top,
left: this.offset.left - this.margins.left
};
-
- this.offset.click = { //Where the click happened, relative to the element
- left: e.pageX - this.offset.left,
- top: e.pageY - this.offset.top
- };
-
- this.offsetParent = this.helper.offsetParent(); var po = this.offsetParent.offset(); //Get the offsetParent and cache its position
- if(this.offsetParent[0] == document.body && $.browser.mozilla) po = { top: 0, left: 0 }; //Ugly FF3 fix
- this.offset.parent = { //Store its position plus border
+
+ $.extend(this.offset, {
+ click: { //Where the click happened, relative to the element
+ left: event.pageX - this.offset.left,
+ top: event.pageY - this.offset.top
+ },
+ parent: this._getParentOffset(),
+ relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper
+ });
+
+ //Generate the original position
+ this.originalPosition = this._generatePosition(event);
+ this.originalPageX = event.pageX;
+ this.originalPageY = event.pageY;
+
+ //Adjust the mouse offset relative to the helper if 'cursorAt' is supplied
+ if(o.cursorAt)
+ this._adjustOffsetFromHelper(o.cursorAt);
+
+ //Set a containment if given in the options
+ if(o.containment)
+ this._setContainment();
+
+ //Call plugins and callbacks
+ this._trigger("start", event);
+
+ //Recache the helper size
+ this._cacheHelperProportions();
+
+ //Prepare the droppable offsets
+ if ($.ui.ddmanager && !o.dropBehaviour)
+ $.ui.ddmanager.prepareOffsets(this, event);
+
+ this.helper.addClass("ui-draggable-dragging");
+ this._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position
+ return true;
+ },
+
+ _mouseDrag: function(event, noPropagation) {
+
+ //Compute the helpers position
+ this.position = this._generatePosition(event);
+ this.positionAbs = this._convertPositionTo("absolute");
+
+ //Call plugins and callbacks and use the resulting position if something is returned
+ if (!noPropagation) {
+ var ui = this._uiHash();
+ this._trigger('drag', event, ui);
+ this.position = ui.position;
+ }
+
+ if(!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left+'px';
+ if(!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top+'px';
+ if($.ui.ddmanager) $.ui.ddmanager.drag(this, event);
+
+ return false;
+ },
+
+ _mouseStop: function(event) {
+
+ //If we are using droppables, inform the manager about the drop
+ var dropped = false;
+ if ($.ui.ddmanager && !this.options.dropBehaviour)
+ dropped = $.ui.ddmanager.drop(this, event);
+
+ //if a drop comes from outside (a sortable)
+ if(this.dropped) {
+ dropped = this.dropped;
+ this.dropped = false;
+ }
+
+ if((this.options.revert == "invalid" && !dropped) || (this.options.revert == "valid" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) {
+ var self = this;
+ $(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() {
+ self._trigger("stop", event);
+ self._clear();
+ });
+ } else {
+ this._trigger("stop", event);
+ this._clear();
+ }
+
+ return false;
+ },
+
+ _getHandle: function(event) {
+
+ var handle = !this.options.handle || !$(this.options.handle, this.element).length ? true : false;
+ $(this.options.handle, this.element)
+ .find("*")
+ .andSelf()
+ .each(function() {
+ if(this == event.target) handle = true;
+ });
+
+ return handle;
+
+ },
+
+ _createHelper: function(event) {
+
+ var o = this.options;
+ var helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event])) : (o.helper == 'clone' ? this.element.clone() : this.element);
+
+ if(!helper.parents('body').length)
+ helper.appendTo((o.appendTo == 'parent' ? this.element[0].parentNode : o.appendTo));
+
+ if(helper[0] != this.element[0] && !(/(fixed|absolute)/).test(helper.css("position")))
+ helper.css("position", "absolute");
+
+ return helper;
+
+ },
+
+ _adjustOffsetFromHelper: function(obj) {
+ if(obj.left != undefined) this.offset.click.left = obj.left + this.margins.left;
+ if(obj.right != undefined) this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
+ if(obj.top != undefined) this.offset.click.top = obj.top + this.margins.top;
+ if(obj.bottom != undefined) this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
+ },
+
+ _getParentOffset: function() {
+
+ //Get the offsetParent and cache its position
+ this.offsetParent = this.helper.offsetParent();
+ var po = this.offsetParent.offset();
+
+ // This is a special case where we need to modify a offset calculated on start, since the following happened:
+ // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
+ // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
+ // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
+ if(this.cssPosition == 'absolute' && this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) {
+ po.left += this.scrollParent.scrollLeft();
+ po.top += this.scrollParent.scrollTop();
+ }
+
+ if((this.offsetParent[0] == document.body) //This needs to be actually done for all browsers, since pageX/pageY includes this information
+ || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.browser.msie)) //Ugly IE fix
+ po = { top: 0, left: 0 };
+
+ return {
top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
};
-
- var p = this.element.position(); //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helpers
- this.offset.relative = this.cssPosition == "relative" ? {
- top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.offsetParent[0].scrollTop,
- left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.offsetParent[0].scrollLeft
- } : { top: 0, left: 0 };
-
- this.originalPosition = this.generatePosition(e); //Generate the original position
- this.helperProportions = { width: this.helper.outerWidth(), height: this.helper.outerHeight() };//Cache the helper size
-
- if(o.cursorAt) {
- if(o.cursorAt.left != undefined) this.offset.click.left = o.cursorAt.left + this.margins.left;
- if(o.cursorAt.right != undefined) this.offset.click.left = this.helperProportions.width - o.cursorAt.right + this.margins.left;
- if(o.cursorAt.top != undefined) this.offset.click.top = o.cursorAt.top + this.margins.top;
- if(o.cursorAt.bottom != undefined) this.offset.click.top = this.helperProportions.height - o.cursorAt.bottom + this.margins.top;
+
+ },
+
+ _getRelativeOffset: function() {
+
+ if(this.cssPosition == "relative") {
+ var p = this.element.position();
+ return {
+ top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(),
+ left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft()
+ };
+ } else {
+ return { top: 0, left: 0 };
}
-
-
- /*
- * - Position constraining -
- * Here we prepare position constraining like grid and containment.
- */
-
- if(o.containment) {
- if(o.containment == 'parent') o.containment = this.helper[0].parentNode;
- if(o.containment == 'document' || o.containment == 'window') this.containment = [
- 0 - this.offset.relative.left - this.offset.parent.left,
- 0 - this.offset.relative.top - this.offset.parent.top,
- $(o.containment == 'document' ? document : window).width() - this.offset.relative.left - this.offset.parent.left - this.helperProportions.width - this.margins.left - (parseInt(this.element.css("marginRight"),10) || 0),
- ($(o.containment == 'document' ? document : window).height() || document.body.parentNode.scrollHeight) - this.offset.relative.top - this.offset.parent.top - this.helperProportions.height - this.margins.top - (parseInt(this.element.css("marginBottom"),10) || 0)
+
+ },
+
+ _cacheMargins: function() {
+ this.margins = {
+ left: (parseInt(this.element.css("marginLeft"),10) || 0),
+ top: (parseInt(this.element.css("marginTop"),10) || 0)
+ };
+ },
+
+ _cacheHelperProportions: function() {
+ this.helperProportions = {
+ width: this.helper.outerWidth(),
+ height: this.helper.outerHeight()
+ };
+ },
+
+ _setContainment: function() {
+
+ var o = this.options;
+ if(o.containment == 'parent') o.containment = this.helper[0].parentNode;
+ if(o.containment == 'document' || o.containment == 'window') this.containment = [
+ 0 - this.offset.relative.left - this.offset.parent.left,
+ 0 - this.offset.relative.top - this.offset.parent.top,
+ $(o.containment == 'document' ? document : window).width() - this.helperProportions.width - this.margins.left,
+ ($(o.containment == 'document' ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top
+ ];
+
+ if(!(/^(document|window|parent)$/).test(o.containment) && o.containment.constructor != Array) {
+ var ce = $(o.containment)[0]; if(!ce) return;
+ var co = $(o.containment).offset();
+ var over = ($(ce).css("overflow") != 'hidden');
+
+ this.containment = [
+ co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left,
+ co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top,
+ co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left,
+ co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top
];
-
- if(!(/^(document|window|parent)$/).test(o.containment)) {
- var ce = $(o.containment)[0];
- var co = $(o.containment).offset();
-
- this.containment = [
- co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) - this.offset.relative.left - this.offset.parent.left,
- co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) - this.offset.relative.top - this.offset.parent.top,
- co.left+Math.max(ce.scrollWidth,ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - this.offset.relative.left - this.offset.parent.left - this.helperProportions.width - this.margins.left - (parseInt(this.element.css("marginRight"),10) || 0),
- co.top+Math.max(ce.scrollHeight,ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - this.offset.relative.top - this.offset.parent.top - this.helperProportions.height - this.margins.top - (parseInt(this.element.css("marginBottom"),10) || 0)
- ];
- }
+ } else if(o.containment.constructor == Array) {
+ this.containment = o.containment;
}
-
- //Call plugins and callbacks
- this.propagate("start", e);
-
- this.helperProportions = { width: this.helper.outerWidth(), height: this.helper.outerHeight() };//Recache the helper size
- if ($.ui.ddmanager && !o.dropBehaviour) $.ui.ddmanager.prepareOffsets(this, e);
-
- this.helper.addClass("ui-draggable-dragging");
- this.mouseDrag(e); //Execute the drag once - this causes the helper not to be visible before getting its correct position
- return true;
+
},
- convertPositionTo: function(d, pos) {
+
+ _convertPositionTo: function(d, pos) {
+
if(!pos) pos = this.position;
var mod = d == "absolute" ? 1 : -1;
+ var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
+
return {
top: (
- pos.top // the calculated relative position
- + this.offset.relative.top * mod // Only for relative positioned nodes: Relative offset from element to offset parent
+ pos.top // The absolute mouse position
+ + this.offset.relative.top * mod // Only for relative positioned nodes: Relative offset from element to offset parent
+ this.offset.parent.top * mod // The offsetParent's offset without borders (offset + border)
- - (this.cssPosition == "fixed" || (this.cssPosition == "absolute" && this.offsetParent[0] == document.body) ? 0 : this.offsetParent[0].scrollTop) * mod // The offsetParent's scroll position, not if the element is fixed
- + (this.cssPosition == "fixed" ? $(document).scrollTop() : 0) * mod
- + this.margins.top * mod //Add the margin (you don't want the margin counting in intersection methods)
+ - ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
),
left: (
- pos.left // the calculated relative position
- + this.offset.relative.left * mod // Only for relative positioned nodes: Relative offset from element to offset parent
+ pos.left // The absolute mouse position
+ + this.offset.relative.left * mod // Only for relative positioned nodes: Relative offset from element to offset parent
+ this.offset.parent.left * mod // The offsetParent's offset without borders (offset + border)
- - (this.cssPosition == "fixed" || (this.cssPosition == "absolute" && this.offsetParent[0] == document.body) ? 0 : this.offsetParent[0].scrollLeft) * mod // The offsetParent's scroll position, not if the element is fixed
- + (this.cssPosition == "fixed" ? $(document).scrollLeft() : 0) * mod
- + this.margins.left * mod //Add the margin (you don't want the margin counting in intersection methods)
+ - ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
)
};
+
},
- generatePosition: function(e) {
-
- var o = this.options;
- var position = {
+
+ _generatePosition: function(event) {
+
+ var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
+
+ // This is another very weird special case that only happens for relative elements:
+ // 1. If the css position is relative
+ // 2. and the scroll parent is the document or similar to the offset parent
+ // we have to refresh the relative offset during the scroll so there are no jumps
+ if(this.cssPosition == 'relative' && !(this.scrollParent[0] != document && this.scrollParent[0] != this.offsetParent[0])) {
+ this.offset.relative = this._getRelativeOffset();
+ }
+
+ var pageX = event.pageX;
+ var pageY = event.pageY;
+
+ /*
+ * - Position constraining -
+ * Constrain the position to a mix of grid, containment.
+ */
+
+ if(this.originalPosition) { //If we are not dragging yet, we won't check for options
+
+ if(this.containment) {
+ if(event.pageX - this.offset.click.left < this.containment[0]) pageX = this.containment[0] + this.offset.click.left;
+ if(event.pageY - this.offset.click.top < this.containment[1]) pageY = this.containment[1] + this.offset.click.top;
+ if(event.pageX - this.offset.click.left > this.containment[2]) pageX = this.containment[2] + this.offset.click.left;
+ if(event.pageY - this.offset.click.top > this.containment[3]) pageY = this.containment[3] + this.offset.click.top;
+ }
+
+ if(o.grid) {
+ var top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1];
+ pageY = this.containment ? (!(top - this.offset.click.top < this.containment[1] || top - this.offset.click.top > this.containment[3]) ? top : (!(top - this.offset.click.top < this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
+
+ var left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0];
+ pageX = this.containment ? (!(left - this.offset.click.left < this.containment[0] || left - this.offset.click.left > this.containment[2]) ? left : (!(left - this.offset.click.left < this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
+ }
+
+ }
+
+ return {
top: (
- e.pageY // The absolute mouse position
+ pageY // The absolute mouse position
- this.offset.click.top // Click offset (relative to the element)
- this.offset.relative.top // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.top // The offsetParent's offset without borders (offset + border)
- + (this.cssPosition == "fixed" || (this.cssPosition == "absolute" && this.offsetParent[0] == document.body) ? 0 : this.offsetParent[0].scrollTop) // The offsetParent's scroll position, not if the element is fixed
- - (this.cssPosition == "fixed" ? $(document).scrollTop() : 0)
+ + ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
),
left: (
- e.pageX // The absolute mouse position
+ pageX // The absolute mouse position
- this.offset.click.left // Click offset (relative to the element)
- this.offset.relative.left // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.left // The offsetParent's offset without borders (offset + border)
- + (this.cssPosition == "fixed" || (this.cssPosition == "absolute" && this.offsetParent[0] == document.body) ? 0 : this.offsetParent[0].scrollLeft) // The offsetParent's scroll position, not if the element is fixed
- - (this.cssPosition == "fixed" ? $(document).scrollLeft() : 0)
+ + ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
)
};
-
- if(!this.originalPosition) return position; //If we are not dragging yet, we won't check for options
-
- /*
- * - Position constraining -
- * Constrain the position to a mix of grid, containment.
- */
- if(this.containment) {
- if(position.left < this.containment[0]) position.left = this.containment[0];
- if(position.top < this.containment[1]) position.top = this.containment[1];
- if(position.left > this.containment[2]) position.left = this.containment[2];
- if(position.top > this.containment[3]) position.top = this.containment[3];
- }
-
- if(o.grid) {
- var top = this.originalPosition.top + Math.round((position.top - this.originalPosition.top) / o.grid[1]) * o.grid[1];
- position.top = this.containment ? (!(top < this.containment[1] || top > this.containment[3]) ? top : (!(top < this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
-
- var left = this.originalPosition.left + Math.round((position.left - this.originalPosition.left) / o.grid[0]) * o.grid[0];
- position.left = this.containment ? (!(left < this.containment[0] || left > this.containment[2]) ? left : (!(left < this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
- }
-
- return position;
- },
- mouseDrag: function(e) {
-
- //Compute the helpers position
- this.position = this.generatePosition(e);
- this.positionAbs = this.convertPositionTo("absolute");
-
- //Call plugins and callbacks and use the resulting position if something is returned
- this.position = this.propagate("drag", e) || this.position;
-
- if(!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left+'px';
- if(!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top+'px';
- if($.ui.ddmanager) $.ui.ddmanager.drag(this, e);
-
- return false;
- },
- mouseStop: function(e) {
-
- //If we are using droppables, inform the manager about the drop
- var dropped = false;
- if ($.ui.ddmanager && !this.options.dropBehaviour)
- var dropped = $.ui.ddmanager.drop(this, e);
-
- if((this.options.revert == "invalid" && !dropped) || (this.options.revert == "valid" && dropped) || this.options.revert === true) {
- var self = this;
- $(this.helper).animate(this.originalPosition, parseInt(this.options.revert, 10) || 500, function() {
- self.propagate("stop", e);
- self.clear();
- });
- } else {
- this.propagate("stop", e);
- this.clear();
- }
-
- return false;
+
},
- clear: function() {
+
+ _clear: function() {
this.helper.removeClass("ui-draggable-dragging");
- if(this.options.helper != 'original' && !this.cancelHelperRemoval) this.helper.remove();
+ if(this.helper[0] != this.element[0] && !this.cancelHelperRemoval) this.helper.remove();
//if($.ui.ddmanager) $.ui.ddmanager.current = null;
this.helper = null;
this.cancelHelperRemoval = false;
},
-
+
// From now on bulk stuff - mainly helpers
+
+ _trigger: function(type, event, ui) {
+ ui = ui || this._uiHash();
+ $.ui.plugin.call(this, type, [event, ui]);
+ if(type == "drag") this.positionAbs = this._convertPositionTo("absolute"); //The absolute position has to be recalculated after plugins
+ return $.widget.prototype._trigger.call(this, type, event, ui);
+ },
+
plugins: {},
- uiHash: function(e) {
+
+ _uiHash: function(event) {
return {
helper: this.helper,
position: this.position,
- absolutePosition: this.positionAbs,
- options: this.options
+ absolutePosition: this.positionAbs, //deprecated
+ offset: this.positionAbs
};
- },
- propagate: function(n,e) {
- $.ui.plugin.call(this, n, [e, this.uiHash()]);
- if(n == "drag") this.positionAbs = this.convertPositionTo("absolute"); //The absolute position has to be recalculated after plugins
- return this.element.triggerHandler(n == "drag" ? n : "drag"+n, [e, this.uiHash()], this.options[n]);
- },
- destroy: function() {
- if(!this.element.data('draggable')) return;
- this.element.removeData("draggable").unbind(".draggable").removeClass('ui-draggable');
- this.mouseDestroy();
}
+
}));
$.extend($.ui.draggable, {
+ version: "1.7.2",
+ eventPrefix: "drag",
defaults: {
+ addClasses: true,
appendTo: "parent",
axis: false,
- cancel: ":input",
+ cancel: ":input,option",
+ connectToSortable: false,
+ containment: false,
+ cursor: "auto",
+ cursorAt: false,
delay: 0,
distance: 1,
- helper: "original"
- }
-});
-
-$.ui.plugin.add("draggable", "cursor", {
- start: function(e, ui) {
- var t = $('body');
- if (t.css("cursor")) ui.options._cursor = t.css("cursor");
- t.css("cursor", ui.options.cursor);
- },
- stop: function(e, ui) {
- if (ui.options._cursor) $('body').css("cursor", ui.options._cursor);
- }
-});
-
-$.ui.plugin.add("draggable", "zIndex", {
- start: function(e, ui) {
- var t = $(ui.helper);
- if(t.css("zIndex")) ui.options._zIndex = t.css("zIndex");
- t.css('zIndex', ui.options.zIndex);
- },
- stop: function(e, ui) {
- if(ui.options._zIndex) $(ui.helper).css('zIndex', ui.options._zIndex);
- }
-});
-
-$.ui.plugin.add("draggable", "opacity", {
- start: function(e, ui) {
- var t = $(ui.helper);
- if(t.css("opacity")) ui.options._opacity = t.css("opacity");
- t.css('opacity', ui.options.opacity);
- },
- stop: function(e, ui) {
- if(ui.options._opacity) $(ui.helper).css('opacity', ui.options._opacity);
- }
-});
-
-$.ui.plugin.add("draggable", "iframeFix", {
- start: function(e, ui) {
- $(ui.options.iframeFix === true ? "iframe" : ui.options.iframeFix).each(function() {
- $('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>')
- .css({
- width: this.offsetWidth+"px", height: this.offsetHeight+"px",
- position: "absolute", opacity: "0.001", zIndex: 1000
- })
- .css($(this).offset())
- .appendTo("body");
- });
- },
- stop: function(e, ui) {
- $("div.DragDropIframeFix").each(function() { this.parentNode.removeChild(this); }); //Remove frame helpers
- }
-});
-
-$.ui.plugin.add("draggable", "scroll", {
- start: function(e, ui) {
- var o = ui.options;
- var i = $(this).data("draggable");
- o.scrollSensitivity = o.scrollSensitivity || 20;
- o.scrollSpeed = o.scrollSpeed || 20;
-
- i.overflowY = function(el) {
- do { if(/auto|scroll/.test(el.css('overflow')) || (/auto|scroll/).test(el.css('overflow-y'))) return el; el = el.parent(); } while (el[0].parentNode);
- return $(document);
- }(this);
- i.overflowX = function(el) {
- do { if(/auto|scroll/.test(el.css('overflow')) || (/auto|scroll/).test(el.css('overflow-x'))) return el; el = el.parent(); } while (el[0].parentNode);
- return $(document);
- }(this);
-
- if(i.overflowY[0] != document && i.overflowY[0].tagName != 'HTML') i.overflowYOffset = i.overflowY.offset();
- if(i.overflowX[0] != document && i.overflowX[0].tagName != 'HTML') i.overflowXOffset = i.overflowX.offset();
-
- },
- drag: function(e, ui) {
-
- var o = ui.options;
- var i = $(this).data("draggable");
-
- if(i.overflowY[0] != document && i.overflowY[0].tagName != 'HTML') {
- if((i.overflowYOffset.top + i.overflowY[0].offsetHeight) - e.pageY < o.scrollSensitivity)
- i.overflowY[0].scrollTop = i.overflowY[0].scrollTop + o.scrollSpeed;
- if(e.pageY - i.overflowYOffset.top < o.scrollSensitivity)
- i.overflowY[0].scrollTop = i.overflowY[0].scrollTop - o.scrollSpeed;
-
- } else {
- if(e.pageY - $(document).scrollTop() < o.scrollSensitivity)
- $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
- if($(window).height() - (e.pageY - $(document).scrollTop()) < o.scrollSensitivity)
- $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
- }
-
- if(i.overflowX[0] != document && i.overflowX[0].tagName != 'HTML') {
- if((i.overflowXOffset.left + i.overflowX[0].offsetWidth) - e.pageX < o.scrollSensitivity)
- i.overflowX[0].scrollLeft = i.overflowX[0].scrollLeft + o.scrollSpeed;
- if(e.pageX - i.overflowXOffset.left < o.scrollSensitivity)
- i.overflowX[0].scrollLeft = i.overflowX[0].scrollLeft - o.scrollSpeed;
- } else {
- if(e.pageX - $(document).scrollLeft() < o.scrollSensitivity)
- $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
- if($(window).width() - (e.pageX - $(document).scrollLeft()) < o.scrollSensitivity)
- $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
- }
-
- }
-});
-
-$.ui.plugin.add("draggable", "snap", {
- start: function(e, ui) {
-
- var inst = $(this).data("draggable");
- inst.snapElements = [];
- $(ui.options.snap === true ? '.ui-draggable' : ui.options.snap).each(function() {
- var $t = $(this); var $o = $t.offset();
- if(this != inst.element[0]) inst.snapElements.push({
- item: this,
- width: $t.outerWidth(), height: $t.outerHeight(),
- top: $o.top, left: $o.left
- });
- });
-
- },
- drag: function(e, ui) {
-
- var inst = $(this).data("draggable");
- var d = ui.options.snapTolerance || 20;
- var x1 = ui.absolutePosition.left, x2 = x1 + inst.helperProportions.width,
- y1 = ui.absolutePosition.top, y2 = y1 + inst.helperProportions.height;
-
- for (var i = inst.snapElements.length - 1; i >= 0; i--){
-
- var l = inst.snapElements[i].left, r = l + inst.snapElements[i].width,
- t = inst.snapElements[i].top, b = t + inst.snapElements[i].height;
-
- //Yes, I know, this is insane ;)
- if(!((l-d < x1 && x1 < r+d && t-d < y1 && y1 < b+d) || (l-d < x1 && x1 < r+d && t-d < y2 && y2 < b+d) || (l-d < x2 && x2 < r+d && t-d < y1 && y1 < b+d) || (l-d < x2 && x2 < r+d && t-d < y2 && y2 < b+d))) continue;
-
- if(ui.options.snapMode != 'inner') {
- var ts = Math.abs(t - y2) <= 20;
- var bs = Math.abs(b - y1) <= 20;
- var ls = Math.abs(l - x2) <= 20;
- var rs = Math.abs(r - x1) <= 20;
- if(ts) ui.position.top = inst.convertPositionTo("relative", { top: t - inst.helperProportions.height, left: 0 }).top;
- if(bs) ui.position.top = inst.convertPositionTo("relative", { top: b, left: 0 }).top;
- if(ls) ui.position.left = inst.convertPositionTo("relative", { top: 0, left: l - inst.helperProportions.width }).left;
- if(rs) ui.position.left = inst.convertPositionTo("relative", { top: 0, left: r }).left;
- }
-
- if(ui.options.snapMode != 'outer') {
- var ts = Math.abs(t - y1) <= 20;
- var bs = Math.abs(b - y2) <= 20;
- var ls = Math.abs(l - x1) <= 20;
- var rs = Math.abs(r - x2) <= 20;
- if(ts) ui.position.top = inst.convertPositionTo("relative", { top: t, left: 0 }).top;
- if(bs) ui.position.top = inst.convertPositionTo("relative", { top: b - inst.helperProportions.height, left: 0 }).top;
- if(ls) ui.position.left = inst.convertPositionTo("relative", { top: 0, left: l }).left;
- if(rs) ui.position.left = inst.convertPositionTo("relative", { top: 0, left: r - inst.helperProportions.width }).left;
- }
-
- };
+ grid: false,
+ handle: false,
+ helper: "original",
+ iframeFix: false,
+ opacity: false,
+ refreshPositions: false,
+ revert: false,
+ revertDuration: 500,
+ scope: "default",
+ scroll: true,
+ scrollSensitivity: 20,
+ scrollSpeed: 20,
+ snap: false,
+ snapMode: "both",
+ snapTolerance: 20,
+ stack: false,
+ zIndex: false
}
});
$.ui.plugin.add("draggable", "connectToSortable", {
- start: function(e,ui) {
-
- var inst = $(this).data("draggable");
+ start: function(event, ui) {
+
+ var inst = $(this).data("draggable"), o = inst.options,
+ uiSortable = $.extend({}, ui, { item: inst.element });
inst.sortables = [];
- $(ui.options.connectToSortable).each(function() {
- if($.data(this, 'sortable')) {
- var sortable = $.data(this, 'sortable');
+ $(o.connectToSortable).each(function() {
+ var sortable = $.data(this, 'sortable');
+ if (sortable && !sortable.options.disabled) {
inst.sortables.push({
instance: sortable,
shouldRevert: sortable.options.revert
});
- sortable.refreshItems(); //Do a one-time refresh at start to refresh the containerCache
- sortable.propagate("activate", e, inst);
+ sortable._refreshItems(); //Do a one-time refresh at start to refresh the containerCache
+ sortable._trigger("activate", event, uiSortable);
}
});
},
- stop: function(e,ui) {
-
+ stop: function(event, ui) {
+
//If we are still over the sortable, we fake the stop event of the sortable, but also remove helper
- var inst = $(this).data("draggable");
-
+ var inst = $(this).data("draggable"),
+ uiSortable = $.extend({}, ui, { item: inst.element });
+
$.each(inst.sortables, function() {
if(this.instance.isOver) {
+
this.instance.isOver = 0;
+
inst.cancelHelperRemoval = true; //Don't remove the helper in the draggable instance
this.instance.cancelHelperRemoval = false; //Remove it in the sortable instance (so sortable plugins like revert still work)
- if(this.shouldRevert) this.instance.options.revert = true; //revert here
- this.instance.mouseStop(e);
-
- //Also propagate receive event, since the sortable is actually receiving a element
- this.instance.element.triggerHandler("sortreceive", [e, $.extend(this.instance.ui(), { sender: inst.element })], this.instance.options["receive"]);
+
+ //The sortable revert is supported, and we have to set a temporary dropped variable on the draggable to support revert: 'valid/invalid'
+ if(this.shouldRevert) this.instance.options.revert = true;
+
+ //Trigger the stop of the sortable
+ this.instance._mouseStop(event);
this.instance.options.helper = this.instance.options._helper;
+
+ //If the helper has been the original item, restore properties in the sortable
+ if(inst.options.helper == 'original')
+ this.instance.currentItem.css({ top: 'auto', left: 'auto' });
+
} else {
- this.instance.propagate("deactivate", e, inst);
+ this.instance.cancelHelperRemoval = false; //Remove the helper in the sortable instance
+ this.instance._trigger("deactivate", event, uiSortable);
}
});
-
+
},
- drag: function(e,ui) {
+ drag: function(event, ui) {
var inst = $(this).data("draggable"), self = this;
-
+
var checkPos = function(o) {
-
- var l = o.left, r = l + o.width,
- t = o.top, b = t + o.height;
+ var dyClick = this.offset.click.top, dxClick = this.offset.click.left;
+ var helperTop = this.positionAbs.top, helperLeft = this.positionAbs.left;
+ var itemHeight = o.height, itemWidth = o.width;
+ var itemTop = o.top, itemLeft = o.left;
- return (l < (this.positionAbs.left + this.offset.click.left) && (this.positionAbs.left + this.offset.click.left) < r
- && t < (this.positionAbs.top + this.offset.click.top) && (this.positionAbs.top + this.offset.click.top) < b);
+ return $.ui.isOver(helperTop + dyClick, helperLeft + dxClick, itemTop, itemLeft, itemHeight, itemWidth);
};
-
- $.each(inst.sortables, function(i) {
- if(checkPos.call(inst, this.instance.containerCache)) {
+ $.each(inst.sortables, function(i) {
+
+ //Copy over some variables to allow calling the sortable's native _intersectsWith
+ this.instance.positionAbs = inst.positionAbs;
+ this.instance.helperProportions = inst.helperProportions;
+ this.instance.offset.click = inst.offset.click;
+
+ if(this.instance._intersectsWith(this.instance.containerCache)) {
//If it intersects, we use a little isOver variable and set it once, so our move-in stuff gets fired only once
if(!this.instance.isOver) {
- this.instance.isOver = 1;
+ this.instance.isOver = 1;
//Now we fake the start of dragging for the sortable instance,
//by cloning the list group item, appending it to the sortable and using it as inst.currentItem
//We can then fire the start event of the sortable with our passed browser event, and our own helper (so it doesn't create a new one)
this.instance.currentItem = $(self).clone().appendTo(this.instance.element).data("sortable-item", true);
this.instance.options._helper = this.instance.options.helper; //Store helper option to later restore it
this.instance.options.helper = function() { return ui.helper[0]; };
-
- e.target = this.instance.currentItem[0];
- this.instance.mouseCapture(e, true);
- this.instance.mouseStart(e, true, true);
+
+ event.target = this.instance.currentItem[0];
+ this.instance._mouseCapture(event, true);
+ this.instance._mouseStart(event, true, true);
//Because the browser event is way off the new appended portlet, we modify a couple of variables to reflect the changes
this.instance.offset.click.top = inst.offset.click.top;
this.instance.offset.click.left = inst.offset.click.left;
this.instance.offset.parent.left -= inst.offset.parent.left - this.instance.offset.parent.left;
this.instance.offset.parent.top -= inst.offset.parent.top - this.instance.offset.parent.top;
-
- inst.propagate("toSortable", e);
-
+
+ inst._trigger("toSortable", event);
+ inst.dropped = this.instance.element; //draggable revert needs that
+ //hack so receive/update callbacks work (mostly)
+ inst.currentItem = inst.element;
+ this.instance.fromOutside = inst;
+
}
-
+
//Provided we did all the previous steps, we can fire the drag event of the sortable on every draggable drag, when it intersects with the sortable
- if(this.instance.currentItem) this.instance.mouseDrag(e);
-
+ if(this.instance.currentItem) this.instance._mouseDrag(event);
+
} else {
-
+
//If it doesn't intersect with the sortable, and it intersected before,
//we fake the drag stop of the sortable, but make sure it doesn't remove the helper by using cancelHelperRemoval
if(this.instance.isOver) {
+
this.instance.isOver = 0;
this.instance.cancelHelperRemoval = true;
- this.instance.options.revert = false; //No revert here
- this.instance.mouseStop(e, true);
- this.instance.options.helper = this.instance.options._helper;
+ //Prevent reverting on this forced stop
+ this.instance.options.revert = false;
+
+ // The out event needs to be triggered independently
+ this.instance._trigger('out', event, this.instance._uiHash(this.instance));
+
+ this.instance._mouseStop(event, true);
+ this.instance.options.helper = this.instance.options._helper;
+
//Now we remove our currentItem, the list group clone again, and the placeholder, and animate the helper back to it's original size
this.instance.currentItem.remove();
if(this.instance.placeholder) this.instance.placeholder.remove();
-
- inst.propagate("fromSortable", e);
+
+ inst._trigger("fromSortable", event);
+ inst.dropped = false; //draggable revert needs that
}
-
+
};
});
@@ -545,17 +573,193 @@ $.ui.plugin.add("draggable", "connectToSortable", {
}
});
+$.ui.plugin.add("draggable", "cursor", {
+ start: function(event, ui) {
+ var t = $('body'), o = $(this).data('draggable').options;
+ if (t.css("cursor")) o._cursor = t.css("cursor");
+ t.css("cursor", o.cursor);
+ },
+ stop: function(event, ui) {
+ var o = $(this).data('draggable').options;
+ if (o._cursor) $('body').css("cursor", o._cursor);
+ }
+});
+
+$.ui.plugin.add("draggable", "iframeFix", {
+ start: function(event, ui) {
+ var o = $(this).data('draggable').options;
+ $(o.iframeFix === true ? "iframe" : o.iframeFix).each(function() {
+ $('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>')
+ .css({
+ width: this.offsetWidth+"px", height: this.offsetHeight+"px",
+ position: "absolute", opacity: "0.001", zIndex: 1000
+ })
+ .css($(this).offset())
+ .appendTo("body");
+ });
+ },
+ stop: function(event, ui) {
+ $("div.ui-draggable-iframeFix").each(function() { this.parentNode.removeChild(this); }); //Remove frame helpers
+ }
+});
+
+$.ui.plugin.add("draggable", "opacity", {
+ start: function(event, ui) {
+ var t = $(ui.helper), o = $(this).data('draggable').options;
+ if(t.css("opacity")) o._opacity = t.css("opacity");
+ t.css('opacity', o.opacity);
+ },
+ stop: function(event, ui) {
+ var o = $(this).data('draggable').options;
+ if(o._opacity) $(ui.helper).css('opacity', o._opacity);
+ }
+});
+
+$.ui.plugin.add("draggable", "scroll", {
+ start: function(event, ui) {
+ var i = $(this).data("draggable");
+ if(i.scrollParent[0] != document && i.scrollParent[0].tagName != 'HTML') i.overflowOffset = i.scrollParent.offset();
+ },
+ drag: function(event, ui) {
+
+ var i = $(this).data("draggable"), o = i.options, scrolled = false;
+
+ if(i.scrollParent[0] != document && i.scrollParent[0].tagName != 'HTML') {
+
+ if(!o.axis || o.axis != 'x') {
+ if((i.overflowOffset.top + i.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity)
+ i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop + o.scrollSpeed;
+ else if(event.pageY - i.overflowOffset.top < o.scrollSensitivity)
+ i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop - o.scrollSpeed;
+ }
+
+ if(!o.axis || o.axis != 'y') {
+ if((i.overflowOffset.left + i.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity)
+ i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft + o.scrollSpeed;
+ else if(event.pageX - i.overflowOffset.left < o.scrollSensitivity)
+ i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft - o.scrollSpeed;
+ }
+
+ } else {
+
+ if(!o.axis || o.axis != 'x') {
+ if(event.pageY - $(document).scrollTop() < o.scrollSensitivity)
+ scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
+ else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity)
+ scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
+ }
+
+ if(!o.axis || o.axis != 'y') {
+ if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity)
+ scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
+ else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity)
+ scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
+ }
+
+ }
+
+ if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour)
+ $.ui.ddmanager.prepareOffsets(i, event);
+
+ }
+});
+
+$.ui.plugin.add("draggable", "snap", {
+ start: function(event, ui) {
+
+ var i = $(this).data("draggable"), o = i.options;
+ i.snapElements = [];
+
+ $(o.snap.constructor != String ? ( o.snap.items || ':data(draggable)' ) : o.snap).each(function() {
+ var $t = $(this); var $o = $t.offset();
+ if(this != i.element[0]) i.snapElements.push({
+ item: this,
+ width: $t.outerWidth(), height: $t.outerHeight(),
+ top: $o.top, left: $o.left
+ });
+ });
+
+ },
+ drag: function(event, ui) {
+
+ var inst = $(this).data("draggable"), o = inst.options;
+ var d = o.snapTolerance;
+
+ var x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width,
+ y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height;
+
+ for (var i = inst.snapElements.length - 1; i >= 0; i--){
+
+ var l = inst.snapElements[i].left, r = l + inst.snapElements[i].width,
+ t = inst.snapElements[i].top, b = t + inst.snapElements[i].height;
+
+ //Yes, I know, this is insane ;)
+ if(!((l-d < x1 && x1 < r+d && t-d < y1 && y1 < b+d) || (l-d < x1 && x1 < r+d && t-d < y2 && y2 < b+d) || (l-d < x2 && x2 < r+d && t-d < y1 && y1 < b+d) || (l-d < x2 && x2 < r+d && t-d < y2 && y2 < b+d))) {
+ if(inst.snapElements[i].snapping) (inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
+ inst.snapElements[i].snapping = false;
+ continue;
+ }
+
+ if(o.snapMode != 'inner') {
+ var ts = Math.abs(t - y2) <= d;
+ var bs = Math.abs(b - y1) <= d;
+ var ls = Math.abs(l - x2) <= d;
+ var rs = Math.abs(r - x1) <= d;
+ if(ts) ui.position.top = inst._convertPositionTo("relative", { top: t - inst.helperProportions.height, left: 0 }).top - inst.margins.top;
+ if(bs) ui.position.top = inst._convertPositionTo("relative", { top: b, left: 0 }).top - inst.margins.top;
+ if(ls) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l - inst.helperProportions.width }).left - inst.margins.left;
+ if(rs) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r }).left - inst.margins.left;
+ }
+
+ var first = (ts || bs || ls || rs);
+
+ if(o.snapMode != 'outer') {
+ var ts = Math.abs(t - y1) <= d;
+ var bs = Math.abs(b - y2) <= d;
+ var ls = Math.abs(l - x1) <= d;
+ var rs = Math.abs(r - x2) <= d;
+ if(ts) ui.position.top = inst._convertPositionTo("relative", { top: t, left: 0 }).top - inst.margins.top;
+ if(bs) ui.position.top = inst._convertPositionTo("relative", { top: b - inst.helperProportions.height, left: 0 }).top - inst.margins.top;
+ if(ls) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l }).left - inst.margins.left;
+ if(rs) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r - inst.helperProportions.width }).left - inst.margins.left;
+ }
+
+ if(!inst.snapElements[i].snapping && (ts || bs || ls || rs || first))
+ (inst.options.snap.snap && inst.options.snap.snap.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
+ inst.snapElements[i].snapping = (ts || bs || ls || rs || first);
+
+ };
+
+ }
+});
+
$.ui.plugin.add("draggable", "stack", {
- start: function(e,ui) {
- var group = $.makeArray($(ui.options.stack.group)).sort(function(a,b) {
- return (parseInt($(a).css("zIndex"),10) || ui.options.stack.min) - (parseInt($(b).css("zIndex"),10) || ui.options.stack.min);
+ start: function(event, ui) {
+
+ var o = $(this).data("draggable").options;
+
+ var group = $.makeArray($(o.stack.group)).sort(function(a,b) {
+ return (parseInt($(a).css("zIndex"),10) || o.stack.min) - (parseInt($(b).css("zIndex"),10) || o.stack.min);
});
-
+
$(group).each(function(i) {
- this.style.zIndex = ui.options.stack.min + i;
+ this.style.zIndex = o.stack.min + i;
});
-
- this[0].style.zIndex = ui.options.stack.min + group.length;
+
+ this[0].style.zIndex = o.stack.min + group.length;
+
+ }
+});
+
+$.ui.plugin.add("draggable", "zIndex", {
+ start: function(event, ui) {
+ var t = $(ui.helper), o = $(this).data("draggable").options;
+ if(t.css("zIndex")) o._zIndex = t.css("zIndex");
+ t.css('zIndex', o.zIndex);
+ },
+ stop: function(event, ui) {
+ var o = $(this).data("draggable").options;
+ if(o._zIndex) $(ui.helper).css('zIndex', o._zIndex);
}
});
diff --git a/template-common/lib/ui/ui.droppable.js b/template-common/lib/ui/ui.droppable.js
index 6d3e159fa..8e7be33c5 100644
--- a/template-common/lib/ui/ui.droppable.js
+++ b/template-common/lib/ui/ui.droppable.js
@@ -1,10 +1,10 @@
/*
- * jQuery UI Droppable
+ * jQuery UI Droppable 1.7.2
*
- * Copyright (c) 2008 Paul Bakaus
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
- *
+ *
* http://docs.jquery.com/UI/Droppables
*
* Depends:
@@ -14,125 +14,147 @@
(function($) {
$.widget("ui.droppable", {
- init: function() {
- this.element.addClass("ui-droppable");
- this.isover = 0; this.isout = 1;
-
- //Prepare the passed options
+ _init: function() {
+
var o = this.options, accept = o.accept;
- o = $.extend(o, {
- accept: o.accept && o.accept.constructor == Function ? o.accept : function(d) {
- return $(d).is(accept);
- }
- });
-
+ this.isover = 0; this.isout = 1;
+
+ this.options.accept = this.options.accept && $.isFunction(this.options.accept) ? this.options.accept : function(d) {
+ return d.is(accept);
+ };
+
//Store the droppable's proportions
this.proportions = { width: this.element[0].offsetWidth, height: this.element[0].offsetHeight };
-
+
// Add the reference and positions to the manager
- $.ui.ddmanager.droppables.push(this);
-
- },
- plugins: {},
- ui: function(c) {
- return {
- draggable: (c.currentItem || c.element),
- helper: c.helper,
- position: c.position,
- absolutePosition: c.positionAbs,
- options: this.options,
- element: this.element
- };
+ $.ui.ddmanager.droppables[this.options.scope] = $.ui.ddmanager.droppables[this.options.scope] || [];
+ $.ui.ddmanager.droppables[this.options.scope].push(this);
+
+ (this.options.addClasses && this.element.addClass("ui-droppable"));
+
},
+
destroy: function() {
- var drop = $.ui.ddmanager.droppables;
+ var drop = $.ui.ddmanager.droppables[this.options.scope];
for ( var i = 0; i < drop.length; i++ )
if ( drop[i] == this )
drop.splice(i, 1);
-
+
this.element
.removeClass("ui-droppable ui-droppable-disabled")
.removeData("droppable")
.unbind(".droppable");
},
- over: function(e) {
-
+
+ _setData: function(key, value) {
+
+ if(key == 'accept') {
+ this.options.accept = value && $.isFunction(value) ? value : function(d) {
+ return d.is(value);
+ };
+ } else {
+ $.widget.prototype._setData.apply(this, arguments);
+ }
+
+ },
+
+ _activate: function(event) {
+ var draggable = $.ui.ddmanager.current;
+ if(this.options.activeClass) this.element.addClass(this.options.activeClass);
+ (draggable && this._trigger('activate', event, this.ui(draggable)));
+ },
+
+ _deactivate: function(event) {
+ var draggable = $.ui.ddmanager.current;
+ if(this.options.activeClass) this.element.removeClass(this.options.activeClass);
+ (draggable && this._trigger('deactivate', event, this.ui(draggable)));
+ },
+
+ _over: function(event) {
+
var draggable = $.ui.ddmanager.current;
if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return; // Bail if draggable and droppable are same element
-
- if (this.options.accept.call(this.element,(draggable.currentItem || draggable.element))) {
- $.ui.plugin.call(this, 'over', [e, this.ui(draggable)]);
- this.element.triggerHandler("dropover", [e, this.ui(draggable)], this.options.over);
+
+ if (this.options.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
+ if(this.options.hoverClass) this.element.addClass(this.options.hoverClass);
+ this._trigger('over', event, this.ui(draggable));
}
-
+
},
- out: function(e) {
-
+
+ _out: function(event) {
+
var draggable = $.ui.ddmanager.current;
if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return; // Bail if draggable and droppable are same element
-
- if (this.options.accept.call(this.element,(draggable.currentItem || draggable.element))) {
- $.ui.plugin.call(this, 'out', [e, this.ui(draggable)]);
- this.element.triggerHandler("dropout", [e, this.ui(draggable)], this.options.out);
+
+ if (this.options.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
+ if(this.options.hoverClass) this.element.removeClass(this.options.hoverClass);
+ this._trigger('out', event, this.ui(draggable));
}
-
+
},
- drop: function(e,custom) {
-
+
+ _drop: function(event,custom) {
+
var draggable = custom || $.ui.ddmanager.current;
if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return false; // Bail if draggable and droppable are same element
-
+
var childrenIntersection = false;
- this.element.find(".ui-droppable").not(".ui-draggable-dragging").each(function() {
+ this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function() {
var inst = $.data(this, 'droppable');
if(inst.options.greedy && $.ui.intersect(draggable, $.extend(inst, { offset: inst.element.offset() }), inst.options.tolerance)) {
childrenIntersection = true; return false;
}
});
if(childrenIntersection) return false;
-
- if(this.options.accept.call(this.element,(draggable.currentItem || draggable.element))) {
- $.ui.plugin.call(this, 'drop', [e, this.ui(draggable)]);
- this.element.triggerHandler("drop", [e, this.ui(draggable)], this.options.drop);
- return true;
+
+ if(this.options.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
+ if(this.options.activeClass) this.element.removeClass(this.options.activeClass);
+ if(this.options.hoverClass) this.element.removeClass(this.options.hoverClass);
+ this._trigger('drop', event, this.ui(draggable));
+ return this.element;
}
-
+
return false;
-
- },
- activate: function(e) {
-
- var draggable = $.ui.ddmanager.current;
- $.ui.plugin.call(this, 'activate', [e, this.ui(draggable)]);
- if(draggable) this.element.triggerHandler("dropactivate", [e, this.ui(draggable)], this.options.activate);
-
+
},
- deactivate: function(e) {
-
- var draggable = $.ui.ddmanager.current;
- $.ui.plugin.call(this, 'deactivate', [e, this.ui(draggable)]);
- if(draggable) this.element.triggerHandler("dropdeactivate", [e, this.ui(draggable)], this.options.deactivate);
-
+
+ ui: function(c) {
+ return {
+ draggable: (c.currentItem || c.element),
+ helper: c.helper,
+ position: c.position,
+ absolutePosition: c.positionAbs, //deprecated
+ offset: c.positionAbs
+ };
}
+
});
$.extend($.ui.droppable, {
+ version: "1.7.2",
+ eventPrefix: 'drop',
defaults: {
- disabled: false,
+ accept: '*',
+ activeClass: false,
+ addClasses: true,
+ greedy: false,
+ hoverClass: false,
+ scope: 'default',
tolerance: 'intersect'
}
});
$.ui.intersect = function(draggable, droppable, toleranceMode) {
-
+
if (!droppable.offset) return false;
-
+
var x1 = (draggable.positionAbs || draggable.position.absolute).left, x2 = x1 + draggable.helperProportions.width,
y1 = (draggable.positionAbs || draggable.position.absolute).top, y2 = y1 + draggable.helperProportions.height;
var l = droppable.offset.left, r = l + droppable.proportions.width,
t = droppable.offset.top, b = t + droppable.proportions.height;
-
+
switch (toleranceMode) {
case 'fit':
return (l < x1 && x2 < r
@@ -145,8 +167,10 @@ $.ui.intersect = function(draggable, droppable, toleranceMode) {
&& y2 - (draggable.helperProportions.height / 2) < b ); // Top Half
break;
case 'pointer':
- return (l < ((draggable.positionAbs || draggable.position.absolute).left + (draggable.clickOffset || draggable.offset.click).left) && ((draggable.positionAbs || draggable.position.absolute).left + (draggable.clickOffset || draggable.offset.click).left) < r
- && t < ((draggable.positionAbs || draggable.position.absolute).top + (draggable.clickOffset || draggable.offset.click).top) && ((draggable.positionAbs || draggable.position.absolute).top + (draggable.clickOffset || draggable.offset.click).top) < b);
+ var draggableLeft = ((draggable.positionAbs || draggable.position.absolute).left + (draggable.clickOffset || draggable.offset.click).left),
+ draggableTop = ((draggable.positionAbs || draggable.position.absolute).top + (draggable.clickOffset || draggable.offset.click).top),
+ isOver = $.ui.isOver(draggableTop, draggableLeft, t, l, droppable.proportions.height, droppable.proportions.width);
+ return isOver;
break;
case 'touch':
return (
@@ -163,7 +187,7 @@ $.ui.intersect = function(draggable, droppable, toleranceMode) {
return false;
break;
}
-
+
};
/*
@@ -171,111 +195,88 @@ $.ui.intersect = function(draggable, droppable, toleranceMode) {
*/
$.ui.ddmanager = {
current: null,
- droppables: [],
- prepareOffsets: function(t, e) {
-
- var m = $.ui.ddmanager.droppables;
- var type = e ? e.type : null; // workaround for #2317
-
- for (var i = 0; i < m.length; i++) {
- if(m[i].options.disabled || (t && !m[i].options.accept.call(m[i].element,(t.currentItem || t.element)))) continue;
- m[i].visible = m[i].element.css("display") != "none"; if(!m[i].visible) continue; //If the element is not visible, continue
+ droppables: { 'default': [] },
+ prepareOffsets: function(t, event) {
+
+ var m = $.ui.ddmanager.droppables[t.options.scope];
+ var type = event ? event.type : null; // workaround for #2317
+ var list = (t.currentItem || t.element).find(":data(droppable)").andSelf();
+
+ droppablesLoop: for (var i = 0; i < m.length; i++) {
+
+ if(m[i].options.disabled || (t && !m[i].options.accept.call(m[i].element[0],(t.currentItem || t.element)))) continue; //No disabled and non-accepted
+ for (var j=0; j < list.length; j++) { if(list[j] == m[i].element[0]) { m[i].proportions.height = 0; continue droppablesLoop; } }; //Filter out elements in the current dragged item
+ m[i].visible = m[i].element.css("display") != "none"; if(!m[i].visible) continue; //If the element is not visible, continue
+
m[i].offset = m[i].element.offset();
m[i].proportions = { width: m[i].element[0].offsetWidth, height: m[i].element[0].offsetHeight };
-
- if(type == "dragstart" || type == "sortactivate") m[i].activate.call(m[i], e); //Activate the droppable if used directly from draggables
+
+ if(type == "mousedown") m[i]._activate.call(m[i], event); //Activate the droppable if used directly from draggables
+
}
-
+
},
- drop: function(draggable, e) {
-
+ drop: function(draggable, event) {
+
var dropped = false;
- $.each($.ui.ddmanager.droppables, function() {
-
+ $.each($.ui.ddmanager.droppables[draggable.options.scope], function() {
+
if(!this.options) return;
if (!this.options.disabled && this.visible && $.ui.intersect(draggable, this, this.options.tolerance))
- dropped = this.drop.call(this, e);
-
- if (!this.options.disabled && this.visible && this.options.accept.call(this.element,(draggable.currentItem || draggable.element))) {
+ dropped = this._drop.call(this, event);
+
+ if (!this.options.disabled && this.visible && this.options.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
this.isout = 1; this.isover = 0;
- this.deactivate.call(this, e);
+ this._deactivate.call(this, event);
}
-
+
});
return dropped;
-
+
},
- drag: function(draggable, e) {
-
+ drag: function(draggable, event) {
+
//If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse.
- if(draggable.options.refreshPositions) $.ui.ddmanager.prepareOffsets(draggable, e);
-
+ if(draggable.options.refreshPositions) $.ui.ddmanager.prepareOffsets(draggable, event);
+
//Run through all droppables and check their positions based on specific tolerance options
- $.each($.ui.ddmanager.droppables, function() {
-
+ $.each($.ui.ddmanager.droppables[draggable.options.scope], function() {
+
if(this.options.disabled || this.greedyChild || !this.visible) return;
var intersects = $.ui.intersect(draggable, this, this.options.tolerance);
-
+
var c = !intersects && this.isover == 1 ? 'isout' : (intersects && this.isover == 0 ? 'isover' : null);
if(!c) return;
-
+
var parentInstance;
if (this.options.greedy) {
- var parent = this.element.parents('.ui-droppable:eq(0)');
+ var parent = this.element.parents(':data(droppable):eq(0)');
if (parent.length) {
parentInstance = $.data(parent[0], 'droppable');
parentInstance.greedyChild = (c == 'isover' ? 1 : 0);
}
}
-
+
// we just moved into a greedy child
if (parentInstance && c == 'isover') {
parentInstance['isover'] = 0;
parentInstance['isout'] = 1;
- parentInstance.out.call(parentInstance, e);
+ parentInstance._out.call(parentInstance, event);
}
-
+
this[c] = 1; this[c == 'isout' ? 'isover' : 'isout'] = 0;
- this[c == "isover" ? "over" : "out"].call(this, e);
-
+ this[c == "isover" ? "_over" : "_out"].call(this, event);
+
// we just moved out of a greedy child
if (parentInstance && c == 'isout') {
parentInstance['isout'] = 0;
parentInstance['isover'] = 1;
- parentInstance.over.call(parentInstance, e);
+ parentInstance._over.call(parentInstance, event);
}
});
-
- }
-};
-/*
- * Droppable Extensions
- */
-
-$.ui.plugin.add("droppable", "activeClass", {
- activate: function(e, ui) {
- $(this).addClass(ui.options.activeClass);
- },
- deactivate: function(e, ui) {
- $(this).removeClass(ui.options.activeClass);
- },
- drop: function(e, ui) {
- $(this).removeClass(ui.options.activeClass);
}
-});
-
-$.ui.plugin.add("droppable", "hoverClass", {
- over: function(e, ui) {
- $(this).addClass(ui.options.hoverClass);
- },
- out: function(e, ui) {
- $(this).removeClass(ui.options.hoverClass);
- },
- drop: function(e, ui) {
- $(this).removeClass(ui.options.hoverClass);
- }
-});
+};
})(jQuery);
diff --git a/template-common/lib/ui/ui.resizable.js b/template-common/lib/ui/ui.resizable.js
index 7b681af55..6172d6cb8 100644
--- a/template-common/lib/ui/ui.resizable.js
+++ b/template-common/lib/ui/ui.resizable.js
@@ -1,10 +1,10 @@
/*
- * jQuery UI Resizable
+ * jQuery UI Resizable 1.7.2
*
- * Copyright (c) 2008 Paul Bakaus
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
- *
+ *
* http://docs.jquery.com/UI/Resizables
*
* Depends:
@@ -13,513 +13,513 @@
(function($) {
$.widget("ui.resizable", $.extend({}, $.ui.mouse, {
- init: function() {
+
+ _init: function() {
var self = this, o = this.options;
+ this.element.addClass("ui-resizable");
- var elpos = this.element.css('position');
-
- this.originalElement = this.element;
-
- // simulate .ui-resizable { position: relative; }
- this.element.addClass("ui-resizable").css({ position: /static/.test(elpos) ? 'relative' : elpos });
-
- $.extend(o, {
+ $.extend(this, {
_aspectRatio: !!(o.aspectRatio),
- helper: o.helper || o.ghost || o.animate ? o.helper || 'proxy' : null,
- knobHandles: o.knobHandles === true ? 'ui-resizable-knob-handle' : o.knobHandles
+ aspectRatio: o.aspectRatio,
+ originalElement: this.element,
+ _proportionallyResizeElements: [],
+ _helper: o.helper || o.ghost || o.animate ? o.helper || 'ui-resizable-helper' : null
});
-
- //Default Theme
- var aBorder = '1px solid #DEDEDE';
-
- o.defaultTheme = {
- 'ui-resizable': { display: 'block' },
- 'ui-resizable-handle': { position: 'absolute', background: '#F2F2F2', fontSize: '0.1px' },
- 'ui-resizable-n': { cursor: 'n-resize', height: '4px', left: '0px', right: '0px', borderTop: aBorder },
- 'ui-resizable-s': { cursor: 's-resize', height: '4px', left: '0px', right: '0px', borderBottom: aBorder },
- 'ui-resizable-e': { cursor: 'e-resize', width: '4px', top: '0px', bottom: '0px', borderRight: aBorder },
- 'ui-resizable-w': { cursor: 'w-resize', width: '4px', top: '0px', bottom: '0px', borderLeft: aBorder },
- 'ui-resizable-se': { cursor: 'se-resize', width: '4px', height: '4px', borderRight: aBorder, borderBottom: aBorder },
- 'ui-resizable-sw': { cursor: 'sw-resize', width: '4px', height: '4px', borderBottom: aBorder, borderLeft: aBorder },
- 'ui-resizable-ne': { cursor: 'ne-resize', width: '4px', height: '4px', borderRight: aBorder, borderTop: aBorder },
- 'ui-resizable-nw': { cursor: 'nw-resize', width: '4px', height: '4px', borderLeft: aBorder, borderTop: aBorder }
- };
-
- o.knobTheme = {
- 'ui-resizable-handle': { background: '#F2F2F2', border: '1px solid #808080', height: '8px', width: '8px' },
- 'ui-resizable-n': { cursor: 'n-resize', top: '0px', left: '45%' },
- 'ui-resizable-s': { cursor: 's-resize', bottom: '0px', left: '45%' },
- 'ui-resizable-e': { cursor: 'e-resize', right: '0px', top: '45%' },
- 'ui-resizable-w': { cursor: 'w-resize', left: '0px', top: '45%' },
- 'ui-resizable-se': { cursor: 'se-resize', right: '0px', bottom: '0px' },
- 'ui-resizable-sw': { cursor: 'sw-resize', left: '0px', bottom: '0px' },
- 'ui-resizable-nw': { cursor: 'nw-resize', left: '0px', top: '0px' },
- 'ui-resizable-ne': { cursor: 'ne-resize', right: '0px', top: '0px' }
- };
-
- o._nodeName = this.element[0].nodeName;
-
+
//Wrap the element if it cannot hold child nodes
- if(o._nodeName.match(/canvas|textarea|input|select|button|img/i)) {
- var el = this.element;
-
- //Opera fixing relative position
- if (/relative/.test(el.css('position')) && $.browser.opera)
- el.css({ position: 'relative', top: 'auto', left: 'auto' });
-
+ if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)) {
+
+ //Opera fix for relative positioning
+ if (/relative/.test(this.element.css('position')) && $.browser.opera)
+ this.element.css({ position: 'relative', top: 'auto', left: 'auto' });
+
//Create a wrapper element and set the wrapper to the new current internal element
- el.wrap(
- $('<div class="ui-wrapper" style="overflow: hidden;"></div>').css( {
- position: el.css('position'),
- width: el.outerWidth(),
- height: el.outerHeight(),
- top: el.css('top'),
- left: el.css('left')
+ this.element.wrap(
+ $('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({
+ position: this.element.css('position'),
+ width: this.element.outerWidth(),
+ height: this.element.outerHeight(),
+ top: this.element.css('top'),
+ left: this.element.css('left')
})
);
-
- var oel = this.element; this.element = this.element.parent();
-
- // store instance on wrapper
- this.element.data('resizable', this);
-
+
+ //Overwrite the original this.element
+ this.element = this.element.parent().data(
+ "resizable", this.element.data('resizable')
+ );
+
+ this.elementIsWrapper = true;
+
//Move margins to the wrapper
- this.element.css({ marginLeft: oel.css("marginLeft"), marginTop: oel.css("marginTop"),
- marginRight: oel.css("marginRight"), marginBottom: oel.css("marginBottom")
- });
-
- oel.css({ marginLeft: 0, marginTop: 0, marginRight: 0, marginBottom: 0});
-
+ this.element.css({ marginLeft: this.originalElement.css("marginLeft"), marginTop: this.originalElement.css("marginTop"), marginRight: this.originalElement.css("marginRight"), marginBottom: this.originalElement.css("marginBottom") });
+ this.originalElement.css({ marginLeft: 0, marginTop: 0, marginRight: 0, marginBottom: 0});
+
//Prevent Safari textarea resize
- if ($.browser.safari && o.preventDefault) oel.css('resize', 'none');
-
- o.proportionallyResize = oel.css({ position: 'static', zoom: 1, display: 'block' });
-
- // avoid IE jump
- this.element.css({ margin: oel.css('margin') });
-
+ this.originalResizeStyle = this.originalElement.css('resize');
+ this.originalElement.css('resize', 'none');
+
+ //Push the actual element to our proportionallyResize internal array
+ this._proportionallyResizeElements.push(this.originalElement.css({ position: 'static', zoom: 1, display: 'block' }));
+
+ // avoid IE jump (hard set the margin)
+ this.originalElement.css({ margin: this.originalElement.css('margin') });
+
// fix handlers offset
this._proportionallyResize();
+
}
-
- if(!o.handles) o.handles = !$('.ui-resizable-handle', this.element).length ? "e,s,se" : { n: '.ui-resizable-n', e: '.ui-resizable-e', s: '.ui-resizable-s', w: '.ui-resizable-w', se: '.ui-resizable-se', sw: '.ui-resizable-sw', ne: '.ui-resizable-ne', nw: '.ui-resizable-nw' };
- if(o.handles.constructor == String) {
-
- o.zIndex = o.zIndex || 1000;
-
- if(o.handles == 'all') o.handles = 'n,e,s,w,se,sw,ne,nw';
-
- var n = o.handles.split(","); o.handles = {};
-
- // insertions are applied when don't have theme loaded
- var insertionsDefault = {
- handle: 'position: absolute; display: none; overflow:hidden;',
- n: 'top: 0pt; width:100%;',
- e: 'right: 0pt; height:100%;',
- s: 'bottom: 0pt; width:100%;',
- w: 'left: 0pt; height:100%;',
- se: 'bottom: 0pt; right: 0px;',
- sw: 'bottom: 0pt; left: 0px;',
- ne: 'top: 0pt; right: 0px;',
- nw: 'top: 0pt; left: 0px;'
- };
-
+
+ this.handles = o.handles || (!$('.ui-resizable-handle', this.element).length ? "e,s,se" : { n: '.ui-resizable-n', e: '.ui-resizable-e', s: '.ui-resizable-s', w: '.ui-resizable-w', se: '.ui-resizable-se', sw: '.ui-resizable-sw', ne: '.ui-resizable-ne', nw: '.ui-resizable-nw' });
+ if(this.handles.constructor == String) {
+
+ if(this.handles == 'all') this.handles = 'n,e,s,w,se,sw,ne,nw';
+ var n = this.handles.split(","); this.handles = {};
+
for(var i = 0; i < n.length; i++) {
- var handle = $.trim(n[i]), dt = o.defaultTheme, hname = 'ui-resizable-'+handle, loadDefault = !$.ui.css(hname) && !o.knobHandles, userKnobClass = $.ui.css('ui-resizable-knob-handle'),
- allDefTheme = $.extend(dt[hname], dt['ui-resizable-handle']), allKnobTheme = $.extend(o.knobTheme[hname], !userKnobClass ? o.knobTheme['ui-resizable-handle'] : {});
-
+
+ var handle = $.trim(n[i]), hname = 'ui-resizable-'+handle;
+ var axis = $('<div class="ui-resizable-handle ' + hname + '"></div>');
+
// increase zIndex of sw, se, ne, nw axis
- var applyZIndex = /sw|se|ne|nw/.test(handle) ? { zIndex: ++o.zIndex } : {};
-
- var defCss = (loadDefault ? insertionsDefault[handle] : ''),
- axis = $(['<div class="ui-resizable-handle ', hname, '" style="', defCss, insertionsDefault.handle, '"></div>'].join('')).css( applyZIndex );
- o.handles[handle] = '.ui-resizable-'+handle;
-
- this.element.append(
- //Theme detection, if not loaded, load o.defaultTheme
- axis.css( loadDefault ? allDefTheme : {} )
- // Load the knobHandle css, fix width, height, top, left...
- .css( o.knobHandles ? allKnobTheme : {} ).addClass(o.knobHandles ? 'ui-resizable-knob-handle' : '').addClass(o.knobHandles)
- );
+ //TODO : this modifies original option
+ if(/sw|se|ne|nw/.test(handle)) axis.css({ zIndex: ++o.zIndex });
+
+ //TODO : What's going on here?
+ if ('se' == handle) {
+ axis.addClass('ui-icon ui-icon-gripsmall-diagonal-se');
+ };
+
+ //Insert into internal handles object and append to element
+ this.handles[handle] = '.ui-resizable-'+handle;
+ this.element.append(axis);
}
-
- if (o.knobHandles) this.element.addClass('ui-resizable-knob').css( !$.ui.css('ui-resizable-knob') ? { /*border: '1px #fff dashed'*/ } : {} );
+
}
-
+
this._renderAxis = function(target) {
+
target = target || this.element;
-
- for(var i in o.handles) {
- if(o.handles[i].constructor == String)
- o.handles[i] = $(o.handles[i], this.element).show();
-
- if (o.transparent)
- o.handles[i].css({opacity:0});
-
+
+ for(var i in this.handles) {
+
+ if(this.handles[i].constructor == String)
+ this.handles[i] = $(this.handles[i], this.element).show();
+
//Apply pad to wrapper element, needed to fix axis position (textarea, inputs, scrolls)
- if (this.element.is('.ui-wrapper') &&
- o._nodeName.match(/textarea|input|select|button/i)) {
-
- var axis = $(o.handles[i], this.element), padWrapper = 0;
-
+ if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) {
+
+ var axis = $(this.handles[i], this.element), padWrapper = 0;
+
//Checking the correct pad and border
padWrapper = /sw|ne|nw|se|n|s/.test(i) ? axis.outerHeight() : axis.outerWidth();
-
+
//The padding type i have to apply...
- var padPos = [ 'padding',
+ var padPos = [ 'padding',
/ne|nw|n/.test(i) ? 'Top' :
- /se|sw|s/.test(i) ? 'Bottom' :
- /^e$/.test(i) ? 'Right' : 'Left' ].join("");
-
- if (!o.transparent)
- target.css(padPos, padWrapper);
-
+ /se|sw|s/.test(i) ? 'Bottom' :
+ /^e$/.test(i) ? 'Right' : 'Left' ].join("");
+
+ target.css(padPos, padWrapper);
+
this._proportionallyResize();
+
}
- if(!$(o.handles[i]).length) continue;
+
+ //TODO: What's that good for? There's not anything to be executed left
+ if(!$(this.handles[i]).length)
+ continue;
+
}
};
-
+
+ //TODO: make renderAxis a prototype function
this._renderAxis(this.element);
- o._handles = $('.ui-resizable-handle', self.element);
-
- if (o.disableSelection)
- o._handles.each(function(i, e) { $.ui.disableSelection(e); });
-
+
+ this._handles = $('.ui-resizable-handle', this.element)
+ .disableSelection();
+
//Matching axis name
- o._handles.mouseover(function() {
- if (!o.resizing) {
- if (this.className)
+ this._handles.mouseover(function() {
+ if (!self.resizing) {
+ if (this.className)
var axis = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);
//Axis, default = se
- self.axis = o.axis = axis && axis[1] ? axis[1] : 'se';
+ self.axis = axis && axis[1] ? axis[1] : 'se';
}
});
-
+
//If we want to auto hide the elements
if (o.autoHide) {
- o._handles.hide();
- $(self.element).addClass("ui-resizable-autohide").hover(function() {
- $(this).removeClass("ui-resizable-autohide");
- o._handles.show();
- },
- function(){
- if (!o.resizing) {
- $(this).addClass("ui-resizable-autohide");
- o._handles.hide();
- }
- });
+ this._handles.hide();
+ $(this.element)
+ .addClass("ui-resizable-autohide")
+ .hover(function() {
+ $(this).removeClass("ui-resizable-autohide");
+ self._handles.show();
+ },
+ function(){
+ if (!self.resizing) {
+ $(this).addClass("ui-resizable-autohide");
+ self._handles.hide();
+ }
+ });
}
-
- this.mouseInit();
- },
- plugins: {},
- ui: function() {
- return {
- originalElement: this.originalElement,
- element: this.element,
- helper: this.helper,
- position: this.position,
- size: this.size,
- options: this.options,
- originalSize: this.originalSize,
- originalPosition: this.originalPosition
- };
- },
- propagate: function(n,e) {
- $.ui.plugin.call(this, n, [e, this.ui()]);
- if (n != "resize") this.element.triggerHandler(["resize", n].join(""), [e, this.ui()], this.options[n]);
+
+ //Initialize the mouse interaction
+ this._mouseInit();
+
},
+
destroy: function() {
- var el = this.element, wrapped = el.children(".ui-resizable").get(0);
-
- this.mouseDestroy();
-
+
+ this._mouseDestroy();
+
var _destroy = function(exp) {
- $(exp).removeClass("ui-resizable ui-resizable-disabled")
+ $(exp).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing")
.removeData("resizable").unbind(".resizable").find('.ui-resizable-handle').remove();
};
-
- _destroy(el);
-
- if (el.is('.ui-wrapper') && wrapped) {
- el.parent().append(
- $(wrapped).css({
- position: el.css('position'),
- width: el.outerWidth(),
- height: el.outerHeight(),
- top: el.css('top'),
- left: el.css('left')
+
+ //TODO: Unwrap at same DOM position
+ if (this.elementIsWrapper) {
+ _destroy(this.element);
+ var wrapper = this.element;
+ wrapper.parent().append(
+ this.originalElement.css({
+ position: wrapper.css('position'),
+ width: wrapper.outerWidth(),
+ height: wrapper.outerHeight(),
+ top: wrapper.css('top'),
+ left: wrapper.css('left')
})
).end().remove();
-
- _destroy(wrapped);
}
+
+ this.originalElement.css('resize', this.originalResizeStyle);
+ _destroy(this.originalElement);
+
},
- mouseStart: function(e) {
- if(this.options.disabled) return false;
-
+
+ _mouseCapture: function(event) {
+
var handle = false;
- for(var i in this.options.handles) {
- if($(this.options.handles[i])[0] == e.target) handle = true;
+ for(var i in this.handles) {
+ if($(this.handles[i])[0] == event.target) handle = true;
}
- if (!handle) return false;
-
- var o = this.options, iniPos = this.element.position(), el = this.element,
- num = function(v) { return parseInt(v, 10) || 0; }, ie6 = $.browser.msie && $.browser.version < 7;
- o.resizing = true;
- o.documentScroll = { top: $(document).scrollTop(), left: $(document).scrollLeft() };
-
- // bugfix #1749
+
+ return this.options.disabled || !!handle;
+
+ },
+
+ _mouseStart: function(event) {
+
+ var o = this.options, iniPos = this.element.position(), el = this.element;
+
+ this.resizing = true;
+ this.documentScroll = { top: $(document).scrollTop(), left: $(document).scrollLeft() };
+
+ // bugfix for http://dev.jquery.com/ticket/1749
if (el.is('.ui-draggable') || (/absolute/).test(el.css('position'))) {
-
- // sOffset decides if document scrollOffset will be added to the top/left of the resizable element
- var sOffset = $.browser.msie && !o.containment && (/absolute/).test(el.css('position')) && !(/relative/).test(el.parent().css('position'));
- var dscrollt = sOffset ? o.documentScroll.top : 0, dscrolll = sOffset ? o.documentScroll.left : 0;
-
- el.css({ position: 'absolute', top: (iniPos.top + dscrollt), left: (iniPos.left + dscrolll) });
+ el.css({ position: 'absolute', top: iniPos.top, left: iniPos.left });
}
-
+
//Opera fixing relative position
- if ($.browser.opera && /relative/.test(el.css('position')))
+ if ($.browser.opera && (/relative/).test(el.css('position')))
el.css({ position: 'relative', top: 'auto', left: 'auto' });
-
+
this._renderProxy();
-
+
var curleft = num(this.helper.css('left')), curtop = num(this.helper.css('top'));
-
+
if (o.containment) {
- curleft += $(o.containment).scrollLeft()||0;
- curtop += $(o.containment).scrollTop()||0;
+ curleft += $(o.containment).scrollLeft() || 0;
+ curtop += $(o.containment).scrollTop() || 0;
}
-
+
//Store needed variables
this.offset = this.helper.offset();
this.position = { left: curleft, top: curtop };
- this.size = o.helper || ie6 ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };
- this.originalSize = o.helper || ie6 ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };
+ this.size = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };
+ this.originalSize = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };
this.originalPosition = { left: curleft, top: curtop };
this.sizeDiff = { width: el.outerWidth() - el.width(), height: el.outerHeight() - el.height() };
- this.originalMousePosition = { left: e.pageX, top: e.pageY };
-
+ this.originalMousePosition = { left: event.pageX, top: event.pageY };
+
//Aspect Ratio
- o.aspectRatio = (typeof o.aspectRatio == 'number') ? o.aspectRatio : ((this.originalSize.height / this.originalSize.width)||1);
-
- if (o.preserveCursor)
- $('body').css('cursor', this.axis + '-resize');
-
- this.propagate("start", e);
+ this.aspectRatio = (typeof o.aspectRatio == 'number') ? o.aspectRatio : ((this.originalSize.width / this.originalSize.height) || 1);
+
+ var cursor = $('.ui-resizable-' + this.axis).css('cursor');
+ $('body').css('cursor', cursor == 'auto' ? this.axis + '-resize' : cursor);
+
+ el.addClass("ui-resizable-resizing");
+ this._propagate("start", event);
return true;
},
- mouseDrag: function(e) {
-
+
+ _mouseDrag: function(event) {
+
//Increase performance, avoid regex
var el = this.helper, o = this.options, props = {},
self = this, smp = this.originalMousePosition, a = this.axis;
-
- var dx = (e.pageX-smp.left)||0, dy = (e.pageY-smp.top)||0;
+
+ var dx = (event.pageX-smp.left)||0, dy = (event.pageY-smp.top)||0;
var trigger = this._change[a];
if (!trigger) return false;
-
+
// Calculate the attrs that will be change
- var data = trigger.apply(this, [e, dx, dy]), ie6 = $.browser.msie && $.browser.version < 7, csdif = this.sizeDiff;
-
- if (o._aspectRatio || e.shiftKey)
- data = this._updateRatio(data, e);
-
- data = this._respectSize(data, e);
-
+ var data = trigger.apply(this, [event, dx, dy]), ie6 = $.browser.msie && $.browser.version < 7, csdif = this.sizeDiff;
+
+ if (this._aspectRatio || event.shiftKey)
+ data = this._updateRatio(data, event);
+
+ data = this._respectSize(data, event);
+
// plugins callbacks need to be called first
- this.propagate("resize", e);
-
+ this._propagate("resize", event);
+
el.css({
- top: this.position.top + "px", left: this.position.left + "px",
+ top: this.position.top + "px", left: this.position.left + "px",
width: this.size.width + "px", height: this.size.height + "px"
});
-
- if (!o.helper && o.proportionallyResize)
+
+ if (!this._helper && this._proportionallyResizeElements.length)
this._proportionallyResize();
-
+
this._updateCache(data);
-
+
// calling the user callback at the end
- this.element.triggerHandler("resize", [e, this.ui()], this.options["resize"]);
-
+ this._trigger('resize', event, this.ui());
+
return false;
},
- mouseStop: function(e) {
-
- this.options.resizing = false;
- var o = this.options, num = function(v) { return parseInt(v, 10) || 0; }, self = this;
-
- if(o.helper) {
- var pr = o.proportionallyResize, ista = pr && (/textarea/i).test(pr.get(0).nodeName),
- soffseth = ista && $.ui.hasScroll(pr.get(0), 'left') /* TODO - jump height */ ? 0 : self.sizeDiff.height,
+
+ _mouseStop: function(event) {
+
+ this.resizing = false;
+ var o = this.options, self = this;
+
+ if(this._helper) {
+ var pr = this._proportionallyResizeElements, ista = pr.length && (/textarea/i).test(pr[0].nodeName),
+ soffseth = ista && $.ui.hasScroll(pr[0], 'left') /* TODO - jump height */ ? 0 : self.sizeDiff.height,
soffsetw = ista ? 0 : self.sizeDiff.width;
-
+
var s = { width: (self.size.width - soffsetw), height: (self.size.height - soffseth) },
- left = (parseInt(self.element.css('left'), 10) + (self.position.left - self.originalPosition.left)) || null,
+ left = (parseInt(self.element.css('left'), 10) + (self.position.left - self.originalPosition.left)) || null,
top = (parseInt(self.element.css('top'), 10) + (self.position.top - self.originalPosition.top)) || null;
-
+
if (!o.animate)
this.element.css($.extend(s, { top: top, left: left }));
-
- if (o.helper && !o.animate) this._proportionallyResize();
+
+ self.helper.height(self.size.height);
+ self.helper.width(self.size.width);
+
+ if (this._helper && !o.animate) this._proportionallyResize();
}
-
- if (o.preserveCursor)
- $('body').css('cursor', 'auto');
-
- this.propagate("stop", e);
-
- if (o.helper) this.helper.remove();
-
+
+ $('body').css('cursor', 'auto');
+
+ this.element.removeClass("ui-resizable-resizing");
+
+ this._propagate("stop", event);
+
+ if (this._helper) this.helper.remove();
return false;
+
},
+
_updateCache: function(data) {
var o = this.options;
this.offset = this.helper.offset();
- if (data.left) this.position.left = data.left;
- if (data.top) this.position.top = data.top;
- if (data.height) this.size.height = data.height;
- if (data.width) this.size.width = data.width;
+ if (isNumber(data.left)) this.position.left = data.left;
+ if (isNumber(data.top)) this.position.top = data.top;
+ if (isNumber(data.height)) this.size.height = data.height;
+ if (isNumber(data.width)) this.size.width = data.width;
},
- _updateRatio: function(data, e) {
+
+ _updateRatio: function(data, event) {
+
var o = this.options, cpos = this.position, csize = this.size, a = this.axis;
-
- if (data.height) data.width = (csize.height / o.aspectRatio);
- else if (data.width) data.height = (csize.width * o.aspectRatio);
-
+
+ if (data.height) data.width = (csize.height * this.aspectRatio);
+ else if (data.width) data.height = (csize.width / this.aspectRatio);
+
if (a == 'sw') {
data.left = cpos.left + (csize.width - data.width);
data.top = null;
}
- if (a == 'nw') {
+ if (a == 'nw') {
data.top = cpos.top + (csize.height - data.height);
data.left = cpos.left + (csize.width - data.width);
}
-
+
return data;
},
- _respectSize: function(data, e) {
-
- var el = this.helper, o = this.options, pRatio = o._aspectRatio || e.shiftKey, a = this.axis,
- ismaxw = data.width && o.maxWidth && o.maxWidth < data.width, ismaxh = data.height && o.maxHeight && o.maxHeight < data.height,
- isminw = data.width && o.minWidth && o.minWidth > data.width, isminh = data.height && o.minHeight && o.minHeight > data.height;
-
+
+ _respectSize: function(data, event) {
+
+ var el = this.helper, o = this.options, pRatio = this._aspectRatio || event.shiftKey, a = this.axis,
+ ismaxw = isNumber(data.width) && o.maxWidth && (o.maxWidth < data.width), ismaxh = isNumber(data.height) && o.maxHeight && (o.maxHeight < data.height),
+ isminw = isNumber(data.width) && o.minWidth && (o.minWidth > data.width), isminh = isNumber(data.height) && o.minHeight && (o.minHeight > data.height);
+
if (isminw) data.width = o.minWidth;
if (isminh) data.height = o.minHeight;
if (ismaxw) data.width = o.maxWidth;
if (ismaxh) data.height = o.maxHeight;
-
+
var dw = this.originalPosition.left + this.originalSize.width, dh = this.position.top + this.size.height;
var cw = /sw|nw|w/.test(a), ch = /nw|ne|n/.test(a);
-
+
if (isminw && cw) data.left = dw - o.minWidth;
if (ismaxw && cw) data.left = dw - o.maxWidth;
if (isminh && ch) data.top = dh - o.minHeight;
if (ismaxh && ch) data.top = dh - o.maxHeight;
-
+
// fixing jump error on top/left - bug #2330
var isNotwh = !data.width && !data.height;
if (isNotwh && !data.left && data.top) data.top = null;
else if (isNotwh && !data.top && data.left) data.left = null;
-
+
return data;
},
+
_proportionallyResize: function() {
+
var o = this.options;
- if (!o.proportionallyResize) return;
- var prel = o.proportionallyResize, el = this.helper || this.element;
-
- if (!o.borderDif) {
- var b = [prel.css('borderTopWidth'), prel.css('borderRightWidth'), prel.css('borderBottomWidth'), prel.css('borderLeftWidth')],
- p = [prel.css('paddingTop'), prel.css('paddingRight'), prel.css('paddingBottom'), prel.css('paddingLeft')];
-
- o.borderDif = $.map(b, function(v, i) {
- var border = parseInt(v,10)||0, padding = parseInt(p[i],10)||0;
- return border + padding;
+ if (!this._proportionallyResizeElements.length) return;
+ var element = this.helper || this.element;
+
+ for (var i=0; i < this._proportionallyResizeElements.length; i++) {
+
+ var prel = this._proportionallyResizeElements[i];
+
+ if (!this.borderDif) {
+ var b = [prel.css('borderTopWidth'), prel.css('borderRightWidth'), prel.css('borderBottomWidth'), prel.css('borderLeftWidth')],
+ p = [prel.css('paddingTop'), prel.css('paddingRight'), prel.css('paddingBottom'), prel.css('paddingLeft')];
+
+ this.borderDif = $.map(b, function(v, i) {
+ var border = parseInt(v,10)||0, padding = parseInt(p[i],10)||0;
+ return border + padding;
+ });
+ }
+
+ if ($.browser.msie && !(!($(element).is(':hidden') || $(element).parents(':hidden').length)))
+ continue;
+
+ prel.css({
+ height: (element.height() - this.borderDif[0] - this.borderDif[2]) || 0,
+ width: (element.width() - this.borderDif[1] - this.borderDif[3]) || 0
});
- }
- prel.css({
- height: (el.height() - o.borderDif[0] - o.borderDif[2]) + "px",
- width: (el.width() - o.borderDif[1] - o.borderDif[3]) + "px"
- });
+
+ };
+
},
+
_renderProxy: function() {
+
var el = this.element, o = this.options;
this.elementOffset = el.offset();
-
- if(o.helper) {
+
+ if(this._helper) {
+
this.helper = this.helper || $('<div style="overflow:hidden;"></div>');
-
- // fix ie6 offset
+
+ // fix ie6 offset TODO: This seems broken
var ie6 = $.browser.msie && $.browser.version < 7, ie6offset = (ie6 ? 1 : 0),
pxyoffset = ( ie6 ? 2 : -1 );
-
- this.helper.addClass(o.helper).css({
- width: el.outerWidth() + pxyoffset,
- height: el.outerHeight() + pxyoffset,
+
+ this.helper.addClass(this._helper).css({
+ width: this.element.outerWidth() + pxyoffset,
+ height: this.element.outerHeight() + pxyoffset,
position: 'absolute',
left: this.elementOffset.left - ie6offset +'px',
top: this.elementOffset.top - ie6offset +'px',
- zIndex: ++o.zIndex
+ zIndex: ++o.zIndex //TODO: Don't modify option
});
-
- this.helper.appendTo("body");
-
- if (o.disableSelection)
- $.ui.disableSelection(this.helper.get(0));
-
+
+ this.helper
+ .appendTo("body")
+ .disableSelection();
+
} else {
- this.helper = el;
+ this.helper = this.element;
}
+
},
+
_change: {
- e: function(e, dx, dy) {
+ e: function(event, dx, dy) {
return { width: this.originalSize.width + dx };
},
- w: function(e, dx, dy) {
+ w: function(event, dx, dy) {
var o = this.options, cs = this.originalSize, sp = this.originalPosition;
return { left: sp.left + dx, width: cs.width - dx };
},
- n: function(e, dx, dy) {
+ n: function(event, dx, dy) {
var o = this.options, cs = this.originalSize, sp = this.originalPosition;
return { top: sp.top + dy, height: cs.height - dy };
},
- s: function(e, dx, dy) {
+ s: function(event, dx, dy) {
return { height: this.originalSize.height + dy };
},
- se: function(e, dx, dy) {
- return $.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [e, dx, dy]));
+ se: function(event, dx, dy) {
+ return $.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [event, dx, dy]));
},
- sw: function(e, dx, dy) {
- return $.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [e, dx, dy]));
+ sw: function(event, dx, dy) {
+ return $.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [event, dx, dy]));
},
- ne: function(e, dx, dy) {
- return $.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [e, dx, dy]));
+ ne: function(event, dx, dy) {
+ return $.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [event, dx, dy]));
},
- nw: function(e, dx, dy) {
- return $.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [e, dx, dy]));
+ nw: function(event, dx, dy) {
+ return $.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [event, dx, dy]));
}
+ },
+
+ _propagate: function(n, event) {
+ $.ui.plugin.call(this, n, [event, this.ui()]);
+ (n != "resize" && this._trigger(n, event, this.ui()));
+ },
+
+ plugins: {},
+
+ ui: function() {
+ return {
+ originalElement: this.originalElement,
+ element: this.element,
+ helper: this.helper,
+ position: this.position,
+ size: this.size,
+ originalSize: this.originalSize,
+ originalPosition: this.originalPosition
+ };
}
+
}));
$.extend($.ui.resizable, {
+ version: "1.7.2",
+ eventPrefix: "resize",
defaults: {
- cancel: ":input",
- distance: 1,
- delay: 0,
- preventDefault: true,
- transparent: false,
- minWidth: 10,
- minHeight: 10,
+ alsoResize: false,
+ animate: false,
+ animateDuration: "slow",
+ animateEasing: "swing",
aspectRatio: false,
- disableSelection: true,
- preserveCursor: true,
autoHide: false,
- knobHandles: false
+ cancel: ":input,option",
+ containment: false,
+ delay: 0,
+ distance: 1,
+ ghost: false,
+ grid: false,
+ handles: "e,s,se",
+ helper: false,
+ maxHeight: null,
+ maxWidth: null,
+ minHeight: 10,
+ minWidth: 10,
+ zIndex: 1000
}
});
@@ -527,98 +527,244 @@ $.extend($.ui.resizable, {
* Resizable Extensions
*/
+$.ui.plugin.add("resizable", "alsoResize", {
+
+ start: function(event, ui) {
+
+ var self = $(this).data("resizable"), o = self.options;
+
+ _store = function(exp) {
+ $(exp).each(function() {
+ $(this).data("resizable-alsoresize", {
+ width: parseInt($(this).width(), 10), height: parseInt($(this).height(), 10),
+ left: parseInt($(this).css('left'), 10), top: parseInt($(this).css('top'), 10)
+ });
+ });
+ };
+
+ if (typeof(o.alsoResize) == 'object' && !o.alsoResize.parentNode) {
+ if (o.alsoResize.length) { o.alsoResize = o.alsoResize[0]; _store(o.alsoResize); }
+ else { $.each(o.alsoResize, function(exp, c) { _store(exp); }); }
+ }else{
+ _store(o.alsoResize);
+ }
+ },
+
+ resize: function(event, ui){
+ var self = $(this).data("resizable"), o = self.options, os = self.originalSize, op = self.originalPosition;
+
+ var delta = {
+ height: (self.size.height - os.height) || 0, width: (self.size.width - os.width) || 0,
+ top: (self.position.top - op.top) || 0, left: (self.position.left - op.left) || 0
+ },
+
+ _alsoResize = function(exp, c) {
+ $(exp).each(function() {
+ var el = $(this), start = $(this).data("resizable-alsoresize"), style = {}, css = c && c.length ? c : ['width', 'height', 'top', 'left'];
+
+ $.each(css || ['width', 'height', 'top', 'left'], function(i, prop) {
+ var sum = (start[prop]||0) + (delta[prop]||0);
+ if (sum && sum >= 0)
+ style[prop] = sum || null;
+ });
+
+ //Opera fixing relative position
+ if (/relative/.test(el.css('position')) && $.browser.opera) {
+ self._revertToRelativePosition = true;
+ el.css({ position: 'absolute', top: 'auto', left: 'auto' });
+ }
+
+ el.css(style);
+ });
+ };
+
+ if (typeof(o.alsoResize) == 'object' && !o.alsoResize.nodeType) {
+ $.each(o.alsoResize, function(exp, c) { _alsoResize(exp, c); });
+ }else{
+ _alsoResize(o.alsoResize);
+ }
+ },
+
+ stop: function(event, ui){
+ var self = $(this).data("resizable");
+
+ //Opera fixing relative position
+ if (self._revertToRelativePosition && $.browser.opera) {
+ self._revertToRelativePosition = false;
+ el.css({ position: 'relative' });
+ }
+
+ $(this).removeData("resizable-alsoresize-start");
+ }
+});
+
+$.ui.plugin.add("resizable", "animate", {
+
+ stop: function(event, ui) {
+ var self = $(this).data("resizable"), o = self.options;
+
+ var pr = self._proportionallyResizeElements, ista = pr.length && (/textarea/i).test(pr[0].nodeName),
+ soffseth = ista && $.ui.hasScroll(pr[0], 'left') /* TODO - jump height */ ? 0 : self.sizeDiff.height,
+ soffsetw = ista ? 0 : self.sizeDiff.width;
+
+ var style = { width: (self.size.width - soffsetw), height: (self.size.height - soffseth) },
+ left = (parseInt(self.element.css('left'), 10) + (self.position.left - self.originalPosition.left)) || null,
+ top = (parseInt(self.element.css('top'), 10) + (self.position.top - self.originalPosition.top)) || null;
+
+ self.element.animate(
+ $.extend(style, top && left ? { top: top, left: left } : {}), {
+ duration: o.animateDuration,
+ easing: o.animateEasing,
+ step: function() {
+
+ var data = {
+ width: parseInt(self.element.css('width'), 10),
+ height: parseInt(self.element.css('height'), 10),
+ top: parseInt(self.element.css('top'), 10),
+ left: parseInt(self.element.css('left'), 10)
+ };
+
+ if (pr && pr.length) $(pr[0]).css({ width: data.width, height: data.height });
+
+ // propagating resize, and updating values for each animation step
+ self._updateCache(data);
+ self._propagate("resize", event);
+
+ }
+ }
+ );
+ }
+
+});
+
$.ui.plugin.add("resizable", "containment", {
-
- start: function(e, ui) {
- var o = ui.options, self = $(this).data("resizable"), el = self.element;
+
+ start: function(event, ui) {
+ var self = $(this).data("resizable"), o = self.options, el = self.element;
var oc = o.containment, ce = (oc instanceof $) ? oc.get(0) : (/parent/.test(oc)) ? el.parent().get(0) : oc;
if (!ce) return;
-
+
self.containerElement = $(ce);
-
+
if (/document/.test(oc) || oc == document) {
self.containerOffset = { left: 0, top: 0 };
self.containerPosition = { left: 0, top: 0 };
-
- self.parentData = {
- element: $(document), left: 0, top: 0,
+
+ self.parentData = {
+ element: $(document), left: 0, top: 0,
width: $(document).width(), height: $(document).height() || document.body.parentNode.scrollHeight
};
}
-
-
+
// i'm a node, so compute top, left, right, bottom
- else{
- self.containerOffset = $(ce).offset();
- self.containerPosition = $(ce).position();
- self.containerSize = { height: $(ce).innerHeight(), width: $(ce).innerWidth() };
-
- var co = self.containerOffset, ch = self.containerSize.height, cw = self.containerSize.width,
+ else {
+ var element = $(ce), p = [];
+ $([ "Top", "Right", "Left", "Bottom" ]).each(function(i, name) { p[i] = num(element.css("padding" + name)); });
+
+ self.containerOffset = element.offset();
+ self.containerPosition = element.position();
+ self.containerSize = { height: (element.innerHeight() - p[3]), width: (element.innerWidth() - p[1]) };
+
+ var co = self.containerOffset, ch = self.containerSize.height, cw = self.containerSize.width,
width = ($.ui.hasScroll(ce, "left") ? ce.scrollWidth : cw ), height = ($.ui.hasScroll(ce) ? ce.scrollHeight : ch);
-
- self.parentData = {
+
+ self.parentData = {
element: ce, left: co.left, top: co.top, width: width, height: height
};
}
},
-
- resize: function(e, ui) {
- var o = ui.options, self = $(this).data("resizable"),
+
+ resize: function(event, ui) {
+ var self = $(this).data("resizable"), o = self.options,
ps = self.containerSize, co = self.containerOffset, cs = self.size, cp = self.position,
- pRatio = o._aspectRatio || e.shiftKey, cop = { top:0, left:0 }, ce = self.containerElement;
-
- if (ce[0] != document && /static/.test(ce.css('position')))
- cop = self.containerPosition;
-
- if (cp.left < (o.helper ? co.left : cop.left)) {
- self.size.width = self.size.width + (o.helper ? (self.position.left - co.left) : (self.position.left - cop.left));
- if (pRatio) self.size.height = self.size.width * o.aspectRatio;
- self.position.left = o.helper ? co.left : cop.left;
+ pRatio = self._aspectRatio || event.shiftKey, cop = { top:0, left:0 }, ce = self.containerElement;
+
+ if (ce[0] != document && (/static/).test(ce.css('position'))) cop = co;
+
+ if (cp.left < (self._helper ? co.left : 0)) {
+ self.size.width = self.size.width + (self._helper ? (self.position.left - co.left) : (self.position.left - cop.left));
+ if (pRatio) self.size.height = self.size.width / o.aspectRatio;
+ self.position.left = o.helper ? co.left : 0;
}
-
- if (cp.top < (o.helper ? co.top : 0)) {
- self.size.height = self.size.height + (o.helper ? (self.position.top - co.top) : self.position.top);
- if (pRatio) self.size.width = self.size.height / o.aspectRatio;
- self.position.top = o.helper ? co.top : 0;
+
+ if (cp.top < (self._helper ? co.top : 0)) {
+ self.size.height = self.size.height + (self._helper ? (self.position.top - co.top) : self.position.top);
+ if (pRatio) self.size.width = self.size.height * o.aspectRatio;
+ self.position.top = self._helper ? co.top : 0;
}
-
- var woset = (o.helper ? self.offset.left - co.left : (self.position.left - cop.left)) + self.sizeDiff.width,
- hoset = (o.helper ? self.offset.top - co.top : self.position.top) + self.sizeDiff.height;
-
+
+ self.offset.left = self.parentData.left+self.position.left;
+ self.offset.top = self.parentData.top+self.position.top;
+
+ var woset = Math.abs( (self._helper ? self.offset.left - cop.left : (self.offset.left - cop.left)) + self.sizeDiff.width ),
+ hoset = Math.abs( (self._helper ? self.offset.top - cop.top : (self.offset.top - co.top)) + self.sizeDiff.height );
+
+ var isParent = self.containerElement.get(0) == self.element.parent().get(0),
+ isOffsetRelative = /relative|absolute/.test(self.containerElement.css('position'));
+
+ if(isParent && isOffsetRelative) woset -= self.parentData.left;
+
if (woset + self.size.width >= self.parentData.width) {
self.size.width = self.parentData.width - woset;
- if (pRatio) self.size.height = self.size.width * o.aspectRatio;
+ if (pRatio) self.size.height = self.size.width / self.aspectRatio;
}
-
+
if (hoset + self.size.height >= self.parentData.height) {
self.size.height = self.parentData.height - hoset;
- if (pRatio) self.size.width = self.size.height / o.aspectRatio;
+ if (pRatio) self.size.width = self.size.height * self.aspectRatio;
}
},
-
- stop: function(e, ui){
- var o = ui.options, self = $(this).data("resizable"), cp = self.position,
+
+ stop: function(event, ui){
+ var self = $(this).data("resizable"), o = self.options, cp = self.position,
co = self.containerOffset, cop = self.containerPosition, ce = self.containerElement;
-
- var helper = $(self.helper), ho = helper.offset(), w = helper.innerWidth(), h = helper.innerHeight();
-
-
- if (o.helper && !o.animate && /relative/.test(ce.css('position')))
- $(this).css({ left: (ho.left - co.left), top: (ho.top - co.top), width: w, height: h });
-
- if (o.helper && !o.animate && /static/.test(ce.css('position')))
- $(this).css({ left: cop.left + (ho.left - co.left), top: cop.top + (ho.top - co.top), width: w, height: h });
-
+
+ var helper = $(self.helper), ho = helper.offset(), w = helper.outerWidth() - self.sizeDiff.width, h = helper.outerHeight() - self.sizeDiff.height;
+
+ if (self._helper && !o.animate && (/relative/).test(ce.css('position')))
+ $(this).css({ left: ho.left - cop.left - co.left, width: w, height: h });
+
+ if (self._helper && !o.animate && (/static/).test(ce.css('position')))
+ $(this).css({ left: ho.left - cop.left - co.left, width: w, height: h });
+
+ }
+});
+
+$.ui.plugin.add("resizable", "ghost", {
+
+ start: function(event, ui) {
+
+ var self = $(this).data("resizable"), o = self.options, cs = self.size;
+
+ self.ghost = self.originalElement.clone();
+ self.ghost
+ .css({ opacity: .25, display: 'block', position: 'relative', height: cs.height, width: cs.width, margin: 0, left: 0, top: 0 })
+ .addClass('ui-resizable-ghost')
+ .addClass(typeof o.ghost == 'string' ? o.ghost : '');
+
+ self.ghost.appendTo(self.helper);
+
+ },
+
+ resize: function(event, ui){
+ var self = $(this).data("resizable"), o = self.options;
+ if (self.ghost) self.ghost.css({ position: 'relative', height: self.size.height, width: self.size.width });
+ },
+
+ stop: function(event, ui){
+ var self = $(this).data("resizable"), o = self.options;
+ if (self.ghost && self.helper) self.helper.get(0).removeChild(self.ghost.get(0));
}
+
});
$.ui.plugin.add("resizable", "grid", {
-
- resize: function(e, ui) {
- var o = ui.options, self = $(this).data("resizable"), cs = self.size, os = self.originalSize, op = self.originalPosition, a = self.axis, ratio = o._aspectRatio || e.shiftKey;
+
+ resize: function(event, ui) {
+ var self = $(this).data("resizable"), o = self.options, cs = self.size, os = self.originalSize, op = self.originalPosition, a = self.axis, ratio = o._aspectRatio || event.shiftKey;
o.grid = typeof o.grid == "number" ? [o.grid, o.grid] : o.grid;
var ox = Math.round((cs.width - os.width) / (o.grid[0]||1)) * (o.grid[0]||1), oy = Math.round((cs.height - os.height) / (o.grid[1]||1)) * (o.grid[1]||1);
-
+
if (/^(se|s|e)$/.test(a)) {
self.size.width = os.width + ox;
self.size.height = os.height + oy;
@@ -640,131 +786,15 @@ $.ui.plugin.add("resizable", "grid", {
self.position.left = op.left - ox;
}
}
-
-});
-$.ui.plugin.add("resizable", "animate", {
-
- stop: function(e, ui) {
- var o = ui.options, self = $(this).data("resizable");
-
- var pr = o.proportionallyResize, ista = pr && (/textarea/i).test(pr.get(0).nodeName),
- soffseth = ista && $.ui.hasScroll(pr.get(0), 'left') /* TODO - jump height */ ? 0 : self.sizeDiff.height,
- soffsetw = ista ? 0 : self.sizeDiff.width;
-
- var style = { width: (self.size.width - soffsetw), height: (self.size.height - soffseth) },
- left = (parseInt(self.element.css('left'), 10) + (self.position.left - self.originalPosition.left)) || null,
- top = (parseInt(self.element.css('top'), 10) + (self.position.top - self.originalPosition.top)) || null;
-
- self.element.animate(
- $.extend(style, top && left ? { top: top, left: left } : {}), {
- duration: o.animateDuration || "slow", easing: o.animateEasing || "swing",
- step: function() {
-
- var data = {
- width: parseInt(self.element.css('width'), 10),
- height: parseInt(self.element.css('height'), 10),
- top: parseInt(self.element.css('top'), 10),
- left: parseInt(self.element.css('left'), 10)
- };
-
- if (pr) pr.css({ width: data.width, height: data.height });
-
- // propagating resize, and updating values for each animation step
- self._updateCache(data);
- self.propagate("animate", e);
-
- }
- }
- );
- }
-
});
-$.ui.plugin.add("resizable", "ghost", {
-
- start: function(e, ui) {
- var o = ui.options, self = $(this).data("resizable"), pr = o.proportionallyResize, cs = self.size;
-
- if (!pr) self.ghost = self.element.clone();
- else self.ghost = pr.clone();
-
- self.ghost.css(
- { opacity: .25, display: 'block', position: 'relative', height: cs.height, width: cs.width, margin: 0, left: 0, top: 0 }
- )
- .addClass('ui-resizable-ghost').addClass(typeof o.ghost == 'string' ? o.ghost : '');
-
- self.ghost.appendTo(self.helper);
-
- },
-
- resize: function(e, ui){
- var o = ui.options, self = $(this).data("resizable"), pr = o.proportionallyResize;
-
- if (self.ghost) self.ghost.css({ position: 'relative', height: self.size.height, width: self.size.width });
-
- },
-
- stop: function(e, ui){
- var o = ui.options, self = $(this).data("resizable"), pr = o.proportionallyResize;
- if (self.ghost && self.helper) self.helper.get(0).removeChild(self.ghost.get(0));
- }
-
-});
+var num = function(v) {
+ return parseInt(v, 10) || 0;
+};
-$.ui.plugin.add("resizable", "alsoResize", {
-
- start: function(e, ui) {
- var o = ui.options, self = $(this).data("resizable"),
-
- _store = function(exp) {
- $(exp).each(function() {
- $(this).data("resizable-alsoresize", {
- width: parseInt($(this).width(), 10), height: parseInt($(this).height(), 10),
- left: parseInt($(this).css('left'), 10), top: parseInt($(this).css('top'), 10)
- });
- });
- };
-
- if (typeof(o.alsoResize) == 'object') {
- if (o.alsoResize.length) { o.alsoResize = o.alsoResize[0]; _store(o.alsoResize); }
- else { $.each(o.alsoResize, function(exp, c) { _store(exp); }); }
- }else{
- _store(o.alsoResize);
- }
- },
-
- resize: function(e, ui){
- var o = ui.options, self = $(this).data("resizable"), os = self.originalSize, op = self.originalPosition;
-
- var delta = {
- height: (self.size.height - os.height) || 0, width: (self.size.width - os.width) || 0,
- top: (self.position.top - op.top) || 0, left: (self.position.left - op.left) || 0
- },
-
- _alsoResize = function(exp, c) {
- $(exp).each(function() {
- var start = $(this).data("resizable-alsoresize"), style = {}, css = c && c.length ? c : ['width', 'height', 'top', 'left'];
-
- $.each(css || ['width', 'height', 'top', 'left'], function(i, prop) {
- var sum = (start[prop]||0) + (delta[prop]||0);
- if (sum && sum >= 0)
- style[prop] = sum || null;
- });
- $(this).css(style);
- });
- };
-
- if (typeof(o.alsoResize) == 'object') {
- $.each(o.alsoResize, function(exp, c) { _alsoResize(exp, c); });
- }else{
- _alsoResize(o.alsoResize);
- }
- },
-
- stop: function(e, ui){
- $(this).removeData("resizable-alsoresize-start");
- }
-});
+var isNumber = function(value) {
+ return !isNaN(parseInt(value, 10));
+};
})(jQuery);
diff --git a/template-common/lib/ui/ui.selectable.js b/template-common/lib/ui/ui.selectable.js
index 814e7d48e..08f99cf4a 100644
--- a/template-common/lib/ui/ui.selectable.js
+++ b/template-common/lib/ui/ui.selectable.js
@@ -1,10 +1,10 @@
/*
- * jQuery UI Selectable
+ * jQuery UI Selectable 1.7.2
*
- * Copyright (c) 2008 Richard D. Worth (rdworth.org)
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
- *
+ *
* http://docs.jquery.com/UI/Selectables
*
* Depends:
@@ -13,11 +13,12 @@
(function($) {
$.widget("ui.selectable", $.extend({}, $.ui.mouse, {
- init: function() {
+
+ _init: function() {
var self = this;
-
+
this.element.addClass("ui-selectable");
-
+
this.dragged = false;
// cache selectee children based on filter
@@ -32,8 +33,8 @@ $.widget("ui.selectable", $.extend({}, $.ui.mouse, {
$element: $this,
left: pos.left,
top: pos.top,
- right: pos.left + $this.width(),
- bottom: pos.top + $this.height(),
+ right: pos.left + $this.outerWidth(),
+ bottom: pos.top + $this.outerHeight(),
startselected: false,
selected: $this.hasClass('ui-selected'),
selecting: $this.hasClass('ui-selecting'),
@@ -44,30 +45,27 @@ $.widget("ui.selectable", $.extend({}, $.ui.mouse, {
this.refresh();
this.selectees = selectees.addClass("ui-selectee");
-
- this.mouseInit();
-
- this.helper = $(document.createElement('div')).css({border:'1px dotted black'});
- },
- toggle: function() {
- if(this.options.disabled){
- this.enable();
- } else {
- this.disable();
- }
+
+ this._mouseInit();
+
+ this.helper = $(document.createElement('div'))
+ .css({border:'1px dotted black'})
+ .addClass("ui-selectable-helper");
},
+
destroy: function() {
this.element
.removeClass("ui-selectable ui-selectable-disabled")
.removeData("selectable")
.unbind(".selectable");
- this.mouseDestroy();
+ this._mouseDestroy();
},
- mouseStart: function(e) {
+
+ _mouseStart: function(event) {
var self = this;
-
- this.opos = [e.pageX, e.pageY];
-
+
+ this.opos = [event.pageX, event.pageY];
+
if (this.options.disabled)
return;
@@ -75,19 +73,15 @@ $.widget("ui.selectable", $.extend({}, $.ui.mouse, {
this.selectees = $(options.filter, this.element[0]);
- // selectable START callback
- this.element.triggerHandler("selectablestart", [e, {
- "selectable": this.element[0],
- "options": options
- }], options.start);
+ this._trigger("start", event);
- $('body').append(this.helper);
+ $(options.appendTo).append(this.helper);
// position helper (lasso)
this.helper.css({
"z-index": 100,
"position": "absolute",
- "left": e.clientX,
- "top": e.clientY,
+ "left": event.clientX,
+ "top": event.clientY,
"width": 0,
"height": 0
});
@@ -99,36 +93,45 @@ $.widget("ui.selectable", $.extend({}, $.ui.mouse, {
this.selectees.filter('.ui-selected').each(function() {
var selectee = $.data(this, "selectable-item");
selectee.startselected = true;
- if (!e.ctrlKey) {
+ if (!event.metaKey) {
selectee.$element.removeClass('ui-selected');
selectee.selected = false;
selectee.$element.addClass('ui-unselecting');
selectee.unselecting = true;
// selectable UNSELECTING callback
- self.element.triggerHandler("selectableunselecting", [e, {
- selectable: self.element[0],
- unselecting: selectee.element,
- options: options
- }], options.unselecting);
+ self._trigger("unselecting", event, {
+ unselecting: selectee.element
+ });
}
});
-
- var isSelectee = false;
- $(e.target).parents().andSelf().each(function() {
- if($.data(this, "selectable-item")) isSelectee = true;
+
+ $(event.target).parents().andSelf().each(function() {
+ var selectee = $.data(this, "selectable-item");
+ if (selectee) {
+ selectee.$element.removeClass("ui-unselecting").addClass('ui-selecting');
+ selectee.unselecting = false;
+ selectee.selecting = true;
+ selectee.selected = true;
+ // selectable SELECTING callback
+ self._trigger("selecting", event, {
+ selecting: selectee.element
+ });
+ return false;
+ }
});
- return this.options.keyboard ? !isSelectee : true;
+
},
- mouseDrag: function(e) {
+
+ _mouseDrag: function(event) {
var self = this;
this.dragged = true;
-
+
if (this.options.disabled)
return;
var options = this.options;
- var x1 = this.opos[0], y1 = this.opos[1], x2 = e.pageX, y2 = e.pageY;
+ var x1 = this.opos[0], y1 = this.opos[1], x2 = event.pageX, y2 = event.pageY;
if (x1 > x2) { var tmp = x2; x2 = x1; x1 = tmp; }
if (y1 > y2) { var tmp = y2; y2 = y1; y1 = tmp; }
this.helper.css({left: x1, top: y1, width: x2-x1, height: y2-y1});
@@ -159,16 +162,14 @@ $.widget("ui.selectable", $.extend({}, $.ui.mouse, {
selectee.$element.addClass('ui-selecting');
selectee.selecting = true;
// selectable SELECTING callback
- self.element.triggerHandler("selectableselecting", [e, {
- selectable: self.element[0],
- selecting: selectee.element,
- options: options
- }], options.selecting);
+ self._trigger("selecting", event, {
+ selecting: selectee.element
+ });
}
} else {
// UNSELECT
if (selectee.selecting) {
- if (e.ctrlKey && selectee.startselected) {
+ if (event.metaKey && selectee.startselected) {
selectee.$element.removeClass('ui-selecting');
selectee.selecting = false;
selectee.$element.addClass('ui-selected');
@@ -181,38 +182,35 @@ $.widget("ui.selectable", $.extend({}, $.ui.mouse, {
selectee.unselecting = true;
}
// selectable UNSELECTING callback
- self.element.triggerHandler("selectableunselecting", [e, {
- selectable: self.element[0],
- unselecting: selectee.element,
- options: options
- }], options.unselecting);
+ self._trigger("unselecting", event, {
+ unselecting: selectee.element
+ });
}
}
if (selectee.selected) {
- if (!e.ctrlKey && !selectee.startselected) {
+ if (!event.metaKey && !selectee.startselected) {
selectee.$element.removeClass('ui-selected');
selectee.selected = false;
selectee.$element.addClass('ui-unselecting');
selectee.unselecting = true;
// selectable UNSELECTING callback
- self.element.triggerHandler("selectableunselecting", [e, {
- selectable: self.element[0],
- unselecting: selectee.element,
- options: options
- }], options.unselecting);
+ self._trigger("unselecting", event, {
+ unselecting: selectee.element
+ });
}
}
}
});
-
+
return false;
},
- mouseStop: function(e) {
+
+ _mouseStop: function(event) {
var self = this;
-
+
this.dragged = false;
-
+
var options = this.options;
$('.ui-unselecting', this.element[0]).each(function() {
@@ -220,11 +218,9 @@ $.widget("ui.selectable", $.extend({}, $.ui.mouse, {
selectee.$element.removeClass('ui-unselecting');
selectee.unselecting = false;
selectee.startselected = false;
- self.element.triggerHandler("selectableunselected", [e, {
- selectable: self.element[0],
- unselected: selectee.element,
- options: options
- }], options.unselected);
+ self._trigger("unselected", event, {
+ unselected: selectee.element
+ });
});
$('.ui-selecting', this.element[0]).each(function() {
var selectee = $.data(this, "selectable-item");
@@ -232,30 +228,27 @@ $.widget("ui.selectable", $.extend({}, $.ui.mouse, {
selectee.selecting = false;
selectee.selected = true;
selectee.startselected = true;
- self.element.triggerHandler("selectableselected", [e, {
- selectable: self.element[0],
- selected: selectee.element,
- options: options
- }], options.selected);
+ self._trigger("selected", event, {
+ selected: selectee.element
+ });
});
- this.element.triggerHandler("selectablestop", [e, {
- selectable: self.element[0],
- options: this.options
- }], this.options.stop);
-
+ this._trigger("stop", event);
+
this.helper.remove();
-
+
return false;
}
+
}));
$.extend($.ui.selectable, {
+ version: "1.7.2",
defaults: {
- distance: 1,
- delay: 0,
- cancel: ":input",
appendTo: 'body',
autoRefresh: true,
+ cancel: ":input,option",
+ delay: 0,
+ distance: 0,
filter: '*',
tolerance: 'touch'
}
diff --git a/template-common/lib/ui/ui.slider.js b/template-common/lib/ui/ui.slider.js
index fc4cbd870..f466a69b2 100644
--- a/template-common/lib/ui/ui.slider.js
+++ b/template-common/lib/ui/ui.slider.js
@@ -1,440 +1,558 @@
/*
- * jQuery UI Slider
+ * jQuery UI Slider 1.7.2
*
- * Copyright (c) 2008 Paul Bakaus
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
- *
+ *
* http://docs.jquery.com/UI/Slider
*
* Depends:
* ui.core.js
*/
+
(function($) {
-$.fn.unwrap = $.fn.unwrap || function(expr) {
- return this.each(function(){
- $(this).parents(expr).eq(0).after(this).remove();
- });
-};
-
-$.widget("ui.slider", {
- plugins: {},
- ui: function(e) {
- return {
- options: this.options,
- handle: this.currentHandle,
- value: this.options.axis != "both" || !this.options.axis ? Math.round(this.value(null,this.options.axis == "vertical" ? "y" : "x")) : {
- x: Math.round(this.value(null,"x")),
- y: Math.round(this.value(null,"y"))
- },
- range: this.getRange()
- };
- },
- propagate: function(n,e) {
- $.ui.plugin.call(this, n, [e, this.ui()]);
- this.element.triggerHandler(n == "slide" ? n : "slide"+n, [e, this.ui()], this.options[n]);
- },
- destroy: function() {
-
+$.widget("ui.slider", $.extend({}, $.ui.mouse, {
+
+ _init: function() {
+
+ var self = this, o = this.options;
+ this._keySliding = false;
+ this._handleIndex = null;
+ this._detectOrientation();
+ this._mouseInit();
+
this.element
- .removeClass("ui-slider ui-slider-disabled")
- .removeData("slider")
- .unbind(".slider");
-
- if(this.handle && this.handle.length) {
- this.handle
- .unwrap("a");
- this.handle.each(function() {
- $(this).data("mouse").mouseDestroy();
- });
- }
-
- this.generated && this.generated.remove();
-
- },
- setData: function(key, value) {
- $.widget.prototype.setData.apply(this, arguments);
- if (/min|max|steps/.test(key)) {
- this.initBoundaries();
- }
-
- if(key == "range") {
- value ? this.handle.length == 2 && this.createRange() : this.removeRange();
+ .addClass("ui-slider"
+ + " ui-slider-" + this.orientation
+ + " ui-widget"
+ + " ui-widget-content"
+ + " ui-corner-all");
+
+ this.range = $([]);
+
+ if (o.range) {
+
+ if (o.range === true) {
+ this.range = $('<div></div>');
+ if (!o.values) o.values = [this._valueMin(), this._valueMin()];
+ if (o.values.length && o.values.length != 2) {
+ o.values = [o.values[0], o.values[0]];
+ }
+ } else {
+ this.range = $('<div></div>');
+ }
+
+ this.range
+ .appendTo(this.element)
+ .addClass("ui-slider-range");
+
+ if (o.range == "min" || o.range == "max") {
+ this.range.addClass("ui-slider-range-" + o.range);
+ }
+
+ // note: this isn't the most fittingly semantic framework class for this element,
+ // but worked best visually with a variety of themes
+ this.range.addClass("ui-widget-header");
+
}
-
- },
- init: function() {
-
- var self = this;
- this.element.addClass("ui-slider");
- this.initBoundaries();
-
- // Initialize mouse and key events for interaction
- this.handle = $(this.options.handle, this.element);
- if (!this.handle.length) {
- self.handle = self.generated = $(self.options.handles || [0]).map(function() {
- var handle = $("<div/>").addClass("ui-slider-handle").appendTo(self.element);
- if (this.id)
- handle.attr("id", this.id);
- return handle[0];
- });
+ if ($(".ui-slider-handle", this.element).length == 0)
+ $('<a href="#"></a>')
+ .appendTo(this.element)
+ .addClass("ui-slider-handle");
+
+ if (o.values && o.values.length) {
+ while ($(".ui-slider-handle", this.element).length < o.values.length)
+ $('<a href="#"></a>')
+ .appendTo(this.element)
+ .addClass("ui-slider-handle");
}
-
-
- var handleclass = function(el) {
- this.element = $(el);
- this.element.data("mouse", this);
- this.options = self.options;
-
- this.element.bind("mousedown", function() {
- if(self.currentHandle) this.blur(self.currentHandle);
- self.focus(this,1);
- });
-
- this.mouseInit();
- };
-
- $.extend(handleclass.prototype, $.ui.mouse, {
- mouseStart: function(e) { return self.start.call(self, e, this.element[0]); },
- mouseStop: function(e) { return self.stop.call(self, e, this.element[0]); },
- mouseDrag: function(e) { return self.drag.call(self, e, this.element[0]); },
- mouseCapture: function() { return true; },
- trigger: function(e) { this.mouseDown(e); }
- });
-
-
- $(this.handle)
- .each(function() {
- new handleclass(this);
+
+ this.handles = $(".ui-slider-handle", this.element)
+ .addClass("ui-state-default"
+ + " ui-corner-all");
+
+ this.handle = this.handles.eq(0);
+
+ this.handles.add(this.range).filter("a")
+ .click(function(event) {
+ event.preventDefault();
})
- .wrap('<a href="javascript:void(0)" style="outline:none;border:none;"></a>')
- .parent()
- .bind('focus', function(e) { self.focus(this.firstChild); })
- .bind('blur', function(e) { self.blur(this.firstChild); })
- .bind('keydown', function(e) { if(!self.options.noKeyboard) self.keydown(e.keyCode, this.firstChild); })
- ;
-
- // Bind the click to the slider itself
- this.element.bind('mousedown.slider', function(e) {
- self.click.apply(self, [e]);
- self.currentHandle.data("mouse").trigger(e);
- self.firstValue = self.firstValue + 1; //This is for always triggering the change event
+ .hover(function() {
+ if (!o.disabled) {
+ $(this).addClass('ui-state-hover');
+ }
+ }, function() {
+ $(this).removeClass('ui-state-hover');
+ })
+ .focus(function() {
+ if (!o.disabled) {
+ $(".ui-slider .ui-state-focus").removeClass('ui-state-focus'); $(this).addClass('ui-state-focus');
+ } else {
+ $(this).blur();
+ }
+ })
+ .blur(function() {
+ $(this).removeClass('ui-state-focus');
+ });
+
+ this.handles.each(function(i) {
+ $(this).data("index.ui-slider-handle", i);
});
-
- // Move the first handle to the startValue
- $.each(this.options.handles || [], function(index, handle) {
- self.moveTo(handle.start, index, true);
+
+ this.handles.keydown(function(event) {
+
+ var ret = true;
+
+ var index = $(this).data("index.ui-slider-handle");
+
+ if (self.options.disabled)
+ return;
+
+ switch (event.keyCode) {
+ case $.ui.keyCode.HOME:
+ case $.ui.keyCode.END:
+ case $.ui.keyCode.UP:
+ case $.ui.keyCode.RIGHT:
+ case $.ui.keyCode.DOWN:
+ case $.ui.keyCode.LEFT:
+ ret = false;
+ if (!self._keySliding) {
+ self._keySliding = true;
+ $(this).addClass("ui-state-active");
+ self._start(event, index);
+ }
+ break;
+ }
+
+ var curVal, newVal, step = self._step();
+ if (self.options.values && self.options.values.length) {
+ curVal = newVal = self.values(index);
+ } else {
+ curVal = newVal = self.value();
+ }
+
+ switch (event.keyCode) {
+ case $.ui.keyCode.HOME:
+ newVal = self._valueMin();
+ break;
+ case $.ui.keyCode.END:
+ newVal = self._valueMax();
+ break;
+ case $.ui.keyCode.UP:
+ case $.ui.keyCode.RIGHT:
+ if(curVal == self._valueMax()) return;
+ newVal = curVal + step;
+ break;
+ case $.ui.keyCode.DOWN:
+ case $.ui.keyCode.LEFT:
+ if(curVal == self._valueMin()) return;
+ newVal = curVal - step;
+ break;
+ }
+
+ self._slide(event, index, newVal);
+
+ return ret;
+
+ }).keyup(function(event) {
+
+ var index = $(this).data("index.ui-slider-handle");
+
+ if (self._keySliding) {
+ self._stop(event, index);
+ self._change(event, index);
+ self._keySliding = false;
+ $(this).removeClass("ui-state-active");
+ }
+
});
- if (!isNaN(this.options.startValue))
- this.moveTo(this.options.startValue, 0, true);
- this.previousHandle = $(this.handle[0]); //set the previous handle to the first to allow clicking before selecting the handle
- if(this.handle.length == 2 && this.options.range) this.createRange();
+ this._refreshValue();
+
},
- initBoundaries: function() {
-
- var element = this.element[0], o = this.options;
- this.actualSize = { width: this.element.outerWidth() , height: this.element.outerHeight() };
-
- $.extend(o, {
- axis: o.axis || (element.offsetWidth < element.offsetHeight ? 'vertical' : 'horizontal'),
- max: !isNaN(parseInt(o.max,10)) ? { x: parseInt(o.max, 10), y: parseInt(o.max, 10) } : ({ x: o.max && o.max.x || 100, y: o.max && o.max.y || 100 }),
- min: !isNaN(parseInt(o.min,10)) ? { x: parseInt(o.min, 10), y: parseInt(o.min, 10) } : ({ x: o.min && o.min.x || 0, y: o.min && o.min.y || 0 })
- });
- //Prepare the real maxValue
- o.realMax = {
- x: o.max.x - o.min.x,
- y: o.max.y - o.min.y
- };
- //Calculate stepping based on steps
- o.stepping = {
- x: o.stepping && o.stepping.x || parseInt(o.stepping, 10) || (o.steps ? o.realMax.x/(o.steps.x || parseInt(o.steps, 10) || o.realMax.x) : 0),
- y: o.stepping && o.stepping.y || parseInt(o.stepping, 10) || (o.steps ? o.realMax.y/(o.steps.y || parseInt(o.steps, 10) || o.realMax.y) : 0)
- };
+
+ destroy: function() {
+
+ this.handles.remove();
+ this.range.remove();
+
+ this.element
+ .removeClass("ui-slider"
+ + " ui-slider-horizontal"
+ + " ui-slider-vertical"
+ + " ui-slider-disabled"
+ + " ui-widget"
+ + " ui-widget-content"
+ + " ui-corner-all")
+ .removeData("slider")
+ .unbind(".slider");
+
+ this._mouseDestroy();
+
},
-
- keydown: function(keyCode, handle) {
- if(/(37|38|39|40)/.test(keyCode)) {
- this.moveTo({
- x: /(37|39)/.test(keyCode) ? (keyCode == 37 ? '-' : '+') + '=' + this.oneStep("x") : 0,
- y: /(38|40)/.test(keyCode) ? (keyCode == 38 ? '-' : '+') + '=' + this.oneStep("y") : 0
- }, handle);
+ _mouseCapture: function(event) {
+
+ var o = this.options;
+
+ if (o.disabled)
+ return false;
+
+ this.elementSize = {
+ width: this.element.outerWidth(),
+ height: this.element.outerHeight()
+ };
+ this.elementOffset = this.element.offset();
+
+ var position = { x: event.pageX, y: event.pageY };
+ var normValue = this._normValueFromMouse(position);
+
+ var distance = this._valueMax() - this._valueMin() + 1, closestHandle;
+ var self = this, index;
+ this.handles.each(function(i) {
+ var thisDistance = Math.abs(normValue - self.values(i));
+ if (distance > thisDistance) {
+ distance = thisDistance;
+ closestHandle = $(this);
+ index = i;
+ }
+ });
+
+ // workaround for bug #3736 (if both handles of a range are at 0,
+ // the first is always used as the one with least distance,
+ // and moving it is obviously prevented by preventing negative ranges)
+ if(o.range == true && this.values(1) == o.min) {
+ closestHandle = $(this.handles[++index]);
}
+
+ this._start(event, index);
+
+ self._handleIndex = index;
+
+ closestHandle
+ .addClass("ui-state-active")
+ .focus();
+
+ var offset = closestHandle.offset();
+ var mouseOverHandle = !$(event.target).parents().andSelf().is('.ui-slider-handle');
+ this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : {
+ left: event.pageX - offset.left - (closestHandle.width() / 2),
+ top: event.pageY - offset.top
+ - (closestHandle.height() / 2)
+ - (parseInt(closestHandle.css('borderTopWidth'),10) || 0)
+ - (parseInt(closestHandle.css('borderBottomWidth'),10) || 0)
+ + (parseInt(closestHandle.css('marginTop'),10) || 0)
+ };
+
+ normValue = this._normValueFromMouse(position);
+ this._slide(event, index, normValue);
+ return true;
+
},
- focus: function(handle,hard) {
- this.currentHandle = $(handle).addClass('ui-slider-handle-active');
- if (hard)
- this.currentHandle.parent()[0].focus();
- },
- blur: function(handle) {
- $(handle).removeClass('ui-slider-handle-active');
- if(this.currentHandle && this.currentHandle[0] == handle) { this.previousHandle = this.currentHandle; this.currentHandle = null; };
+
+ _mouseStart: function(event) {
+ return true;
},
- click: function(e) {
- // This method is only used if:
- // - The user didn't click a handle
- // - The Slider is not disabled
- // - There is a current, or previous selected handle (otherwise we wouldn't know which one to move)
-
- var pointer = [e.pageX,e.pageY];
-
- var clickedHandle = false;
- this.handle.each(function() {
- if(this == e.target)
- clickedHandle = true;
- });
- if (clickedHandle || this.options.disabled || !(this.currentHandle || this.previousHandle))
- return;
- // If a previous handle was focussed, focus it again
- if (!this.currentHandle && this.previousHandle)
- this.focus(this.previousHandle, true);
+ _mouseDrag: function(event) {
+
+ var position = { x: event.pageX, y: event.pageY };
+ var normValue = this._normValueFromMouse(position);
- // propagate only for distance > 0, otherwise propagation is done my drag
- this.offset = this.element.offset();
+ this._slide(event, this._handleIndex, normValue);
+
+ return false;
- this.moveTo({
- y: this.convertValue(e.pageY - this.offset.top - this.currentHandle[0].offsetHeight/2, "y"),
- x: this.convertValue(e.pageX - this.offset.left - this.currentHandle[0].offsetWidth/2, "x")
- }, null, !this.options.distance);
},
-
+ _mouseStop: function(event) {
+
+ this.handles.removeClass("ui-state-active");
+ this._stop(event, this._handleIndex);
+ this._change(event, this._handleIndex);
+ this._handleIndex = null;
+ this._clickOffset = null;
+
+ return false;
- createRange: function() {
- if(this.rangeElement) return;
- this.rangeElement = $('<div></div>')
- .addClass('ui-slider-range')
- .css({ position: 'absolute' })
- .appendTo(this.element);
- this.updateRange();
- },
- removeRange: function() {
- this.rangeElement.remove();
- this.rangeElement = null;
- },
- updateRange: function() {
- var prop = this.options.axis == "vertical" ? "top" : "left";
- var size = this.options.axis == "vertical" ? "height" : "width";
- this.rangeElement.css(prop, (parseInt($(this.handle[0]).css(prop),10) || 0) + this.handleSize(0, this.options.axis == "vertical" ? "y" : "x")/2);
- this.rangeElement.css(size, (parseInt($(this.handle[1]).css(prop),10) || 0) - (parseInt($(this.handle[0]).css(prop),10) || 0));
},
- getRange: function() {
- return this.rangeElement ? this.convertValue(parseInt(this.rangeElement.css(this.options.axis == "vertical" ? "height" : "width"),10), this.options.axis == "vertical" ? "y" : "x") : null;
+
+ _detectOrientation: function() {
+ this.orientation = this.options.orientation == 'vertical' ? 'vertical' : 'horizontal';
},
- handleIndex: function() {
- return this.handle.index(this.currentHandle[0]);
- },
- value: function(handle, axis) {
- if(this.handle.length == 1) this.currentHandle = this.handle;
- if(!axis) axis = this.options.axis == "vertical" ? "y" : "x";
+ _normValueFromMouse: function(position) {
- var curHandle = $(handle != undefined && handle !== null ? this.handle[handle] || handle : this.currentHandle);
-
- if(curHandle.data("mouse").sliderValue) {
- return parseInt(curHandle.data("mouse").sliderValue[axis],10);
+ var pixelTotal, pixelMouse;
+ if ('horizontal' == this.orientation) {
+ pixelTotal = this.elementSize.width;
+ pixelMouse = position.x - this.elementOffset.left - (this._clickOffset ? this._clickOffset.left : 0);
} else {
- return parseInt(((parseInt(curHandle.css(axis == "x" ? "left" : "top"),10) / (this.actualSize[axis == "x" ? "width" : "height"] - this.handleSize(handle,axis))) * this.options.realMax[axis]) + this.options.min[axis],10);
+ pixelTotal = this.elementSize.height;
+ pixelMouse = position.y - this.elementOffset.top - (this._clickOffset ? this._clickOffset.top : 0);
}
+ var percentMouse = (pixelMouse / pixelTotal);
+ if (percentMouse > 1) percentMouse = 1;
+ if (percentMouse < 0) percentMouse = 0;
+ if ('vertical' == this.orientation)
+ percentMouse = 1 - percentMouse;
+
+ var valueTotal = this._valueMax() - this._valueMin(),
+ valueMouse = percentMouse * valueTotal,
+ valueMouseModStep = valueMouse % this.options.step,
+ normValue = this._valueMin() + valueMouse - valueMouseModStep;
+
+ if (valueMouseModStep > (this.options.step / 2))
+ normValue += this.options.step;
+
+ // Since JavaScript has problems with large floats, round
+ // the final value to 5 digits after the decimal point (see #4124)
+ return parseFloat(normValue.toFixed(5));
+
},
- convertValue: function(value,axis) {
- return this.options.min[axis] + (value / (this.actualSize[axis == "x" ? "width" : "height"] - this.handleSize(null,axis))) * this.options.realMax[axis];
- },
-
- translateValue: function(value,axis) {
- return ((value - this.options.min[axis]) / this.options.realMax[axis]) * (this.actualSize[axis == "x" ? "width" : "height"] - this.handleSize(null,axis));
- },
- translateRange: function(value,axis) {
- if (this.rangeElement) {
- if (this.currentHandle[0] == this.handle[0] && value >= this.translateValue(this.value(1),axis))
- value = this.translateValue(this.value(1,axis) - this.oneStep(axis), axis);
- if (this.currentHandle[0] == this.handle[1] && value <= this.translateValue(this.value(0),axis))
- value = this.translateValue(this.value(0,axis) + this.oneStep(axis), axis);
- }
- if (this.options.handles) {
- var handle = this.options.handles[this.handleIndex()];
- if (value < this.translateValue(handle.min,axis)) {
- value = this.translateValue(handle.min,axis);
- } else if (value > this.translateValue(handle.max,axis)) {
- value = this.translateValue(handle.max,axis);
- }
+
+ _start: function(event, index) {
+ var uiHash = {
+ handle: this.handles[index],
+ value: this.value()
+ };
+ if (this.options.values && this.options.values.length) {
+ uiHash.value = this.values(index);
+ uiHash.values = this.values();
}
- return value;
- },
- translateLimits: function(value,axis) {
- if (value >= this.actualSize[axis == "x" ? "width" : "height"] - this.handleSize(null,axis))
- value = this.actualSize[axis == "x" ? "width" : "height"] - this.handleSize(null,axis);
- if (value <= 0)
- value = 0;
- return value;
- },
- handleSize: function(handle,axis) {
- return $(handle != undefined && handle !== null ? this.handle[handle] : this.currentHandle)[0]["offset"+(axis == "x" ? "Width" : "Height")];
- },
- oneStep: function(axis) {
- return this.options.stepping[axis] || 1;
+ this._trigger("start", event, uiHash);
},
+ _slide: function(event, index, newVal) {
- start: function(e, handle) {
-
- var o = this.options;
- if(o.disabled) return false;
+ var handle = this.handles[index];
- // Prepare the outer size
- this.actualSize = { width: this.element.outerWidth() , height: this.element.outerHeight() };
-
- // This is a especially ugly fix for strange blur events happening on mousemove events
- if (!this.currentHandle)
- this.focus(this.previousHandle, true);
+ if (this.options.values && this.options.values.length) {
- this.offset = this.element.offset();
-
- this.handleOffset = this.currentHandle.offset();
- this.clickOffset = { top: e.pageY - this.handleOffset.top, left: e.pageX - this.handleOffset.left };
-
- this.firstValue = this.value();
-
- this.propagate('start', e);
- this.drag(e, handle);
- return true;
-
- },
- stop: function(e) {
- this.propagate('stop', e);
- if (this.firstValue != this.value())
- this.propagate('change', e);
- // This is a especially ugly fix for strange blur events happening on mousemove events
- this.focus(this.currentHandle, true);
- return false;
- },
- drag: function(e, handle) {
+ var otherVal = this.values(index ? 0 : 1);
- var o = this.options;
- var position = { top: e.pageY - this.offset.top - this.clickOffset.top, left: e.pageX - this.offset.left - this.clickOffset.left};
- if(!this.currentHandle) this.focus(this.previousHandle, true); //This is a especially ugly fix for strange blur events happening on mousemove events
+ if ((this.options.values.length == 2 && this.options.range === true) &&
+ ((index == 0 && newVal > otherVal) || (index == 1 && newVal < otherVal))){
+ newVal = otherVal;
+ }
+
+ if (newVal != this.values(index)) {
+ var newValues = this.values();
+ newValues[index] = newVal;
+ // A slide can be canceled by returning false from the slide callback
+ var allowed = this._trigger("slide", event, {
+ handle: this.handles[index],
+ value: newVal,
+ values: newValues
+ });
+ var otherVal = this.values(index ? 0 : 1);
+ if (allowed !== false) {
+ this.values(index, newVal, ( event.type == 'mousedown' && this.options.animate ), true);
+ }
+ }
+
+ } else {
+
+ if (newVal != this.value()) {
+ // A slide can be canceled by returning false from the slide callback
+ var allowed = this._trigger("slide", event, {
+ handle: this.handles[index],
+ value: newVal
+ });
+ if (allowed !== false) {
+ this._setData('value', newVal, ( event.type == 'mousedown' && this.options.animate ));
+ }
+
+ }
- position.left = this.translateLimits(position.left, "x");
- position.top = this.translateLimits(position.top, "y");
-
- if (o.stepping.x) {
- var value = this.convertValue(position.left, "x");
- value = Math.round(value / o.stepping.x) * o.stepping.x;
- position.left = this.translateValue(value, "x");
}
- if (o.stepping.y) {
- var value = this.convertValue(position.top, "y");
- value = Math.round(value / o.stepping.y) * o.stepping.y;
- position.top = this.translateValue(value, "y");
+
+ },
+
+ _stop: function(event, index) {
+ var uiHash = {
+ handle: this.handles[index],
+ value: this.value()
+ };
+ if (this.options.values && this.options.values.length) {
+ uiHash.value = this.values(index);
+ uiHash.values = this.values();
}
-
- position.left = this.translateRange(position.left, "x");
- position.top = this.translateRange(position.top, "y");
+ this._trigger("stop", event, uiHash);
+ },
- if(o.axis != "vertical") this.currentHandle.css({ left: position.left });
- if(o.axis != "horizontal") this.currentHandle.css({ top: position.top });
-
- //Store the slider's value
- this.currentHandle.data("mouse").sliderValue = {
- x: Math.round(this.convertValue(position.left, "x")) || 0,
- y: Math.round(this.convertValue(position.top, "y")) || 0
+ _change: function(event, index) {
+ var uiHash = {
+ handle: this.handles[index],
+ value: this.value()
};
-
- if (this.rangeElement)
- this.updateRange();
- this.propagate('slide', e);
- return false;
+ if (this.options.values && this.options.values.length) {
+ uiHash.value = this.values(index);
+ uiHash.values = this.values();
+ }
+ this._trigger("change", event, uiHash);
},
-
- moveTo: function(value, handle, noPropagation) {
- var o = this.options;
+ value: function(newValue) {
- // Prepare the outer size
- this.actualSize = { width: this.element.outerWidth() , height: this.element.outerHeight() };
+ if (arguments.length) {
+ this._setData("value", newValue);
+ this._change(null, 0);
+ }
- //If no handle has been passed, no current handle is available and we have multiple handles, return false
- if (handle == undefined && !this.currentHandle && this.handle.length != 1)
- return false;
-
- //If only one handle is available, use it
- if (handle == undefined && !this.currentHandle)
- handle = 0;
-
- if (handle != undefined)
- this.currentHandle = this.previousHandle = $(this.handle[handle] || handle);
+ return this._value();
+ },
- if(value.x !== undefined && value.y !== undefined) {
- var x = value.x, y = value.y;
- } else {
- var x = value, y = value;
+ values: function(index, newValue, animated, noPropagation) {
+
+ if (arguments.length > 1) {
+ this.options.values[index] = newValue;
+ this._refreshValue(animated);
+ if(!noPropagation) this._change(null, index);
}
- if(x !== undefined && x.constructor != Number) {
- var me = /^\-\=/.test(x), pe = /^\+\=/.test(x);
- if(me || pe) {
- x = this.value(null, "x") + parseInt(x.replace(me ? '=' : '+=', ''), 10);
+ if (arguments.length) {
+ if (this.options.values && this.options.values.length) {
+ return this._values(index);
} else {
- x = isNaN(parseInt(x, 10)) ? undefined : parseInt(x, 10);
+ return this.value();
}
+ } else {
+ return this._values();
}
-
- if(y !== undefined && y.constructor != Number) {
- var me = /^\-\=/.test(y), pe = /^\+\=/.test(y);
- if(me || pe) {
- y = this.value(null, "y") + parseInt(y.replace(me ? '=' : '+=', ''), 10);
- } else {
- y = isNaN(parseInt(y, 10)) ? undefined : parseInt(y, 10);
- }
+
+ },
+
+ _setData: function(key, value, animated) {
+
+ $.widget.prototype._setData.apply(this, arguments);
+
+ switch (key) {
+ case 'disabled':
+ if (value) {
+ this.handles.filter(".ui-state-focus").blur();
+ this.handles.removeClass("ui-state-hover");
+ this.handles.attr("disabled", "disabled");
+ } else {
+ this.handles.removeAttr("disabled");
+ }
+ case 'orientation':
+
+ this._detectOrientation();
+
+ this.element
+ .removeClass("ui-slider-horizontal ui-slider-vertical")
+ .addClass("ui-slider-" + this.orientation);
+ this._refreshValue(animated);
+ break;
+ case 'value':
+ this._refreshValue(animated);
+ break;
}
- if(o.axis != "vertical" && x !== undefined) {
- if(o.stepping.x) x = Math.round(x / o.stepping.x) * o.stepping.x;
- x = this.translateValue(x, "x");
- x = this.translateLimits(x, "x");
- x = this.translateRange(x, "x");
+ },
+
+ _step: function() {
+ var step = this.options.step;
+ return step;
+ },
+
+ _value: function() {
- o.animate ? this.currentHandle.stop().animate({ left: x }, (Math.abs(parseInt(this.currentHandle.css("left")) - x)) * (!isNaN(parseInt(o.animate)) ? o.animate : 5)) : this.currentHandle.css({ left: x });
+ var val = this.options.value;
+ if (val < this._valueMin()) val = this._valueMin();
+ if (val > this._valueMax()) val = this._valueMax();
+
+ return val;
+
+ },
+
+ _values: function(index) {
+
+ if (arguments.length) {
+ var val = this.options.values[index];
+ if (val < this._valueMin()) val = this._valueMin();
+ if (val > this._valueMax()) val = this._valueMax();
+
+ return val;
+ } else {
+ return this.options.values;
}
- if(o.axis != "horizontal" && y !== undefined) {
- if(o.stepping.y) y = Math.round(y / o.stepping.y) * o.stepping.y;
- y = this.translateValue(y, "y");
- y = this.translateLimits(y, "y");
- y = this.translateRange(y, "y");
- o.animate ? this.currentHandle.stop().animate({ top: y }, (Math.abs(parseInt(this.currentHandle.css("top")) - y)) * (!isNaN(parseInt(o.animate)) ? o.animate : 5)) : this.currentHandle.css({ top: y });
+ },
+
+ _valueMin: function() {
+ var valueMin = this.options.min;
+ return valueMin;
+ },
+
+ _valueMax: function() {
+ var valueMax = this.options.max;
+ return valueMax;
+ },
+
+ _refreshValue: function(animate) {
+
+ var oRange = this.options.range, o = this.options, self = this;
+
+ if (this.options.values && this.options.values.length) {
+ var vp0, vp1;
+ this.handles.each(function(i, j) {
+ var valPercent = (self.values(i) - self._valueMin()) / (self._valueMax() - self._valueMin()) * 100;
+ var _set = {}; _set[self.orientation == 'horizontal' ? 'left' : 'bottom'] = valPercent + '%';
+ $(this).stop(1,1)[animate ? 'animate' : 'css'](_set, o.animate);
+ if (self.options.range === true) {
+ if (self.orientation == 'horizontal') {
+ (i == 0) && self.range.stop(1,1)[animate ? 'animate' : 'css']({ left: valPercent + '%' }, o.animate);
+ (i == 1) && self.range[animate ? 'animate' : 'css']({ width: (valPercent - lastValPercent) + '%' }, { queue: false, duration: o.animate });
+ } else {
+ (i == 0) && self.range.stop(1,1)[animate ? 'animate' : 'css']({ bottom: (valPercent) + '%' }, o.animate);
+ (i == 1) && self.range[animate ? 'animate' : 'css']({ height: (valPercent - lastValPercent) + '%' }, { queue: false, duration: o.animate });
+ }
+ }
+ lastValPercent = valPercent;
+ });
+ } else {
+ var value = this.value(),
+ valueMin = this._valueMin(),
+ valueMax = this._valueMax(),
+ valPercent = valueMax != valueMin
+ ? (value - valueMin) / (valueMax - valueMin) * 100
+ : 0;
+ var _set = {}; _set[self.orientation == 'horizontal' ? 'left' : 'bottom'] = valPercent + '%';
+ this.handle.stop(1,1)[animate ? 'animate' : 'css'](_set, o.animate);
+
+ (oRange == "min") && (this.orientation == "horizontal") && this.range.stop(1,1)[animate ? 'animate' : 'css']({ width: valPercent + '%' }, o.animate);
+ (oRange == "max") && (this.orientation == "horizontal") && this.range[animate ? 'animate' : 'css']({ width: (100 - valPercent) + '%' }, { queue: false, duration: o.animate });
+ (oRange == "min") && (this.orientation == "vertical") && this.range.stop(1,1)[animate ? 'animate' : 'css']({ height: valPercent + '%' }, o.animate);
+ (oRange == "max") && (this.orientation == "vertical") && this.range[animate ? 'animate' : 'css']({ height: (100 - valPercent) + '%' }, { queue: false, duration: o.animate });
}
-
- if (this.rangeElement)
- this.updateRange();
-
- //Store the slider's value
- this.currentHandle.data("mouse").sliderValue = {
- x: Math.round(this.convertValue(x, "x")) || 0,
- y: Math.round(this.convertValue(y, "y")) || 0
- };
+
+ }
- if (!noPropagation) {
- this.propagate('start', null);
- this.propagate('stop', null);
- this.propagate('change', null);
- this.propagate("slide", null);
- }
+}));
+
+$.extend($.ui.slider, {
+ getter: "value values",
+ version: "1.7.2",
+ eventPrefix: "slide",
+ defaults: {
+ animate: false,
+ delay: 0,
+ distance: 0,
+ max: 100,
+ min: 0,
+ orientation: 'horizontal',
+ range: false,
+ step: 1,
+ value: 0,
+ values: null
}
});
-$.ui.slider.getter = "value";
-
-$.ui.slider.defaults = {
- handle: ".ui-slider-handle",
- distance: 1,
- animate: false
-};
-
})(jQuery);
diff --git a/template-common/lib/ui/ui.sortable.js b/template-common/lib/ui/ui.sortable.js
index 6d33bf98c..5460850b4 100644
--- a/template-common/lib/ui/ui.sortable.js
+++ b/template-common/lib/ui/ui.sortable.js
@@ -1,10 +1,10 @@
/*
- * jQuery UI Sortable
+ * jQuery UI Sortable 1.7.2
*
- * Copyright (c) 2008 Paul Bakaus
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
- *
+ *
* http://docs.jquery.com/UI/Sortables
*
* Depends:
@@ -12,206 +12,582 @@
*/
(function($) {
-function contains(a, b) {
- var safari2 = $.browser.safari && $.browser.version < 522;
- if (a.contains && !safari2) {
- return a.contains(b);
- }
- if (a.compareDocumentPosition)
- return !!(a.compareDocumentPosition(b) & 16);
- while (b = b.parentNode)
- if (b == a) return true;
- return false;
-};
-
$.widget("ui.sortable", $.extend({}, $.ui.mouse, {
- init: function() {
+ _init: function() {
var o = this.options;
this.containerCache = {};
this.element.addClass("ui-sortable");
-
+
//Get the items
this.refresh();
//Let's determine if the items are floating
this.floating = this.items.length ? (/left|right/).test(this.items[0].item.css('float')) : false;
-
+
//Let's determine the parent's offset
- if(!(/(relative|absolute|fixed)/).test(this.element.css('position'))) this.element.css('position', 'relative');
this.offset = this.element.offset();
//Initialize mouse events for interaction
- this.mouseInit();
-
+ this._mouseInit();
+
},
- plugins: {},
- ui: function(inst) {
- return {
- helper: (inst || this)["helper"],
- placeholder: (inst || this)["placeholder"] || $([]),
- position: (inst || this)["position"],
- absolutePosition: (inst || this)["positionAbs"],
- options: this.options,
- element: this.element,
- item: (inst || this)["currentItem"],
- sender: inst ? inst.element : null
- };
+
+ destroy: function() {
+ this.element
+ .removeClass("ui-sortable ui-sortable-disabled")
+ .removeData("sortable")
+ .unbind(".sortable");
+ this._mouseDestroy();
+
+ for ( var i = this.items.length - 1; i >= 0; i-- )
+ this.items[i].item.removeData("sortable-item");
},
- propagate: function(n,e,inst, noPropagation) {
- $.ui.plugin.call(this, n, [e, this.ui(inst)]);
- if(!noPropagation) this.element.triggerHandler(n == "sort" ? n : "sort"+n, [e, this.ui(inst)], this.options[n]);
+
+ _mouseCapture: function(event, overrideHandle) {
+
+ if (this.reverting) {
+ return false;
+ }
+
+ if(this.options.disabled || this.options.type == 'static') return false;
+
+ //We have to refresh the items data once first
+ this._refreshItems(event);
+
+ //Find out if the clicked node (or one of its parents) is a actual item in this.items
+ var currentItem = null, self = this, nodes = $(event.target).parents().each(function() {
+ if($.data(this, 'sortable-item') == self) {
+ currentItem = $(this);
+ return false;
+ }
+ });
+ if($.data(event.target, 'sortable-item') == self) currentItem = $(event.target);
+
+ if(!currentItem) return false;
+ if(this.options.handle && !overrideHandle) {
+ var validHandle = false;
+
+ $(this.options.handle, currentItem).find("*").andSelf().each(function() { if(this == event.target) validHandle = true; });
+ if(!validHandle) return false;
+ }
+
+ this.currentItem = currentItem;
+ this._removeCurrentsFromItems();
+ return true;
+
},
+
+ _mouseStart: function(event, overrideHandle, noActivation) {
+
+ var o = this.options, self = this;
+ this.currentContainer = this;
+
+ //We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture
+ this.refreshPositions();
+
+ //Create and append the visible helper
+ this.helper = this._createHelper(event);
+
+ //Cache the helper size
+ this._cacheHelperProportions();
+
+ /*
+ * - Position generation -
+ * This block generates everything position related - it's the core of draggables.
+ */
+
+ //Cache the margins of the original element
+ this._cacheMargins();
+
+ //Get the next scrolling parent
+ this.scrollParent = this.helper.scrollParent();
+
+ //The element's absolute position on the page minus margins
+ this.offset = this.currentItem.offset();
+ this.offset = {
+ top: this.offset.top - this.margins.top,
+ left: this.offset.left - this.margins.left
+ };
+
+ // Only after we got the offset, we can change the helper's position to absolute
+ // TODO: Still need to figure out a way to make relative sorting possible
+ this.helper.css("position", "absolute");
+ this.cssPosition = this.helper.css("position");
+
+ $.extend(this.offset, {
+ click: { //Where the click happened, relative to the element
+ left: event.pageX - this.offset.left,
+ top: event.pageY - this.offset.top
+ },
+ parent: this._getParentOffset(),
+ relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper
+ });
+
+ //Generate the original position
+ this.originalPosition = this._generatePosition(event);
+ this.originalPageX = event.pageX;
+ this.originalPageY = event.pageY;
+
+ //Adjust the mouse offset relative to the helper if 'cursorAt' is supplied
+ if(o.cursorAt)
+ this._adjustOffsetFromHelper(o.cursorAt);
+
+ //Cache the former DOM position
+ this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] };
+
+ //If the helper is not the original, hide the original so it's not playing any role during the drag, won't cause anything bad this way
+ if(this.helper[0] != this.currentItem[0]) {
+ this.currentItem.hide();
+ }
+
+ //Create the placeholder
+ this._createPlaceholder();
+
+ //Set a containment if given in the options
+ if(o.containment)
+ this._setContainment();
+
+ if(o.cursor) { // cursor option
+ if ($('body').css("cursor")) this._storedCursor = $('body').css("cursor");
+ $('body').css("cursor", o.cursor);
+ }
+
+ if(o.opacity) { // opacity option
+ if (this.helper.css("opacity")) this._storedOpacity = this.helper.css("opacity");
+ this.helper.css("opacity", o.opacity);
+ }
+
+ if(o.zIndex) { // zIndex option
+ if (this.helper.css("zIndex")) this._storedZIndex = this.helper.css("zIndex");
+ this.helper.css("zIndex", o.zIndex);
+ }
+
+ //Prepare scrolling
+ if(this.scrollParent[0] != document && this.scrollParent[0].tagName != 'HTML')
+ this.overflowOffset = this.scrollParent.offset();
+
+ //Call callbacks
+ this._trigger("start", event, this._uiHash());
+
+ //Recache the helper size
+ if(!this._preserveHelperProportions)
+ this._cacheHelperProportions();
+
+
+ //Post 'activate' events to possible containers
+ if(!noActivation) {
+ for (var i = this.containers.length - 1; i >= 0; i--) { this.containers[i]._trigger("activate", event, self._uiHash(this)); }
+ }
+
+ //Prepare possible droppables
+ if($.ui.ddmanager)
+ $.ui.ddmanager.current = this;
+
+ if ($.ui.ddmanager && !o.dropBehaviour)
+ $.ui.ddmanager.prepareOffsets(this, event);
+
+ this.dragging = true;
+
+ this.helper.addClass("ui-sortable-helper");
+ this._mouseDrag(event); //Execute the drag once - this causes the helper not to be visible before getting its correct position
+ return true;
+
+ },
+
+ _mouseDrag: function(event) {
+
+ //Compute the helpers position
+ this.position = this._generatePosition(event);
+ this.positionAbs = this._convertPositionTo("absolute");
+
+ if (!this.lastPositionAbs) {
+ this.lastPositionAbs = this.positionAbs;
+ }
+
+ //Do scrolling
+ if(this.options.scroll) {
+ var o = this.options, scrolled = false;
+ if(this.scrollParent[0] != document && this.scrollParent[0].tagName != 'HTML') {
+
+ if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity)
+ this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed;
+ else if(event.pageY - this.overflowOffset.top < o.scrollSensitivity)
+ this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed;
+
+ if((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity)
+ this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed;
+ else if(event.pageX - this.overflowOffset.left < o.scrollSensitivity)
+ this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed;
+
+ } else {
+
+ if(event.pageY - $(document).scrollTop() < o.scrollSensitivity)
+ scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
+ else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity)
+ scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
+
+ if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity)
+ scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
+ else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity)
+ scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
+
+ }
+
+ if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour)
+ $.ui.ddmanager.prepareOffsets(this, event);
+ }
+
+ //Regenerate the absolute position used for position checks
+ this.positionAbs = this._convertPositionTo("absolute");
+
+ //Set the helper position
+ if(!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left+'px';
+ if(!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top+'px';
+
+ //Rearrange
+ for (var i = this.items.length - 1; i >= 0; i--) {
+
+ //Cache variables and intersection, continue if no intersection
+ var item = this.items[i], itemElement = item.item[0], intersection = this._intersectsWithPointer(item);
+ if (!intersection) continue;
+
+ if(itemElement != this.currentItem[0] //cannot intersect with itself
+ && this.placeholder[intersection == 1 ? "next" : "prev"]()[0] != itemElement //no useless actions that have been done before
+ && !$.ui.contains(this.placeholder[0], itemElement) //no action if the item moved is the parent of the item checked
+ && (this.options.type == 'semi-dynamic' ? !$.ui.contains(this.element[0], itemElement) : true)
+ ) {
+
+ this.direction = intersection == 1 ? "down" : "up";
+
+ if (this.options.tolerance == "pointer" || this._intersectsWithSides(item)) {
+ this._rearrange(event, item);
+ } else {
+ break;
+ }
+
+ this._trigger("change", event, this._uiHash());
+ break;
+ }
+ }
+
+ //Post events to containers
+ this._contactContainers(event);
+
+ //Interconnect with droppables
+ if($.ui.ddmanager) $.ui.ddmanager.drag(this, event);
+
+ //Call callbacks
+ this._trigger('sort', event, this._uiHash());
+
+ this.lastPositionAbs = this.positionAbs;
+ return false;
+
+ },
+
+ _mouseStop: function(event, noPropagation) {
+
+ if(!event) return;
+
+ //If we are using droppables, inform the manager about the drop
+ if ($.ui.ddmanager && !this.options.dropBehaviour)
+ $.ui.ddmanager.drop(this, event);
+
+ if(this.options.revert) {
+ var self = this;
+ var cur = self.placeholder.offset();
+
+ self.reverting = true;
+
+ $(this.helper).animate({
+ left: cur.left - this.offset.parent.left - self.margins.left + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollLeft),
+ top: cur.top - this.offset.parent.top - self.margins.top + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollTop)
+ }, parseInt(this.options.revert, 10) || 500, function() {
+ self._clear(event);
+ });
+ } else {
+ this._clear(event, noPropagation);
+ }
+
+ return false;
+
+ },
+
+ cancel: function() {
+
+ var self = this;
+
+ if(this.dragging) {
+
+ this._mouseUp();
+
+ if(this.options.helper == "original")
+ this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
+ else
+ this.currentItem.show();
+
+ //Post deactivating events to containers
+ for (var i = this.containers.length - 1; i >= 0; i--){
+ this.containers[i]._trigger("deactivate", null, self._uiHash(this));
+ if(this.containers[i].containerCache.over) {
+ this.containers[i]._trigger("out", null, self._uiHash(this));
+ this.containers[i].containerCache.over = 0;
+ }
+ }
+
+ }
+
+ //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
+ if(this.placeholder[0].parentNode) this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
+ if(this.options.helper != "original" && this.helper && this.helper[0].parentNode) this.helper.remove();
+
+ $.extend(this, {
+ helper: null,
+ dragging: false,
+ reverting: false,
+ _noFinalSort: null
+ });
+
+ if(this.domPosition.prev) {
+ $(this.domPosition.prev).after(this.currentItem);
+ } else {
+ $(this.domPosition.parent).prepend(this.currentItem);
+ }
+
+ return true;
+
+ },
+
serialize: function(o) {
- var items = ($.isFunction(this.options.items) ? this.options.items.call(this.element) : $(this.options.items, this.element)).not('.ui-sortable-helper'); //Only the items of the sortable itself
+ var items = this._getItemsAsjQuery(o && o.connected);
var str = []; o = o || {};
-
- items.each(function() {
- var res = ($(this).attr(o.attribute || 'id') || '').match(o.expression || (/(.+)[-=_](.+)/));
- if(res) str.push((o.key || res[1])+'[]='+(o.key && o.expression ? res[1] : res[2]));
+
+ $(items).each(function() {
+ var res = ($(o.item || this).attr(o.attribute || 'id') || '').match(o.expression || (/(.+)[-=_](.+)/));
+ if(res) str.push((o.key || res[1]+'[]')+'='+(o.key && o.expression ? res[1] : res[2]));
});
-
+
return str.join('&');
-
+
},
- toArray: function(attr) {
-
- var items = ($.isFunction(this.options.items) ? this.options.items.call(this.element) : $(this.options.items, this.element)).not('.ui-sortable-helper'); //Only the items of the sortable itself
- var ret = [];
- items.each(function() { ret.push($(this).attr(attr || 'id')); });
+ toArray: function(o) {
+
+ var items = this._getItemsAsjQuery(o && o.connected);
+ var ret = []; o = o || {};
+
+ items.each(function() { ret.push($(o.item || this).attr(o.attribute || 'id') || ''); });
return ret;
-
+
},
+
/* Be careful with the following core functions */
- intersectsWith: function(item) {
-
- var x1 = this.positionAbs.left, x2 = x1 + this.helperProportions.width,
- y1 = this.positionAbs.top, y2 = y1 + this.helperProportions.height;
- var l = item.left, r = l + item.width,
- t = item.top, b = t + item.height;
-
- if(this.options.tolerance == "pointer" || this.options.forcePointerForContainers || (this.options.tolerance == "guess" && this.helperProportions[this.floating ? 'width' : 'height'] > item[this.floating ? 'width' : 'height'])) {
- return (y1 + this.offset.click.top > t && y1 + this.offset.click.top < b && x1 + this.offset.click.left > l && x1 + this.offset.click.left < r);
+ _intersectsWith: function(item) {
+
+ var x1 = this.positionAbs.left,
+ x2 = x1 + this.helperProportions.width,
+ y1 = this.positionAbs.top,
+ y2 = y1 + this.helperProportions.height;
+
+ var l = item.left,
+ r = l + item.width,
+ t = item.top,
+ b = t + item.height;
+
+ var dyClick = this.offset.click.top,
+ dxClick = this.offset.click.left;
+
+ var isOverElement = (y1 + dyClick) > t && (y1 + dyClick) < b && (x1 + dxClick) > l && (x1 + dxClick) < r;
+
+ if( this.options.tolerance == "pointer"
+ || this.options.forcePointerForContainers
+ || (this.options.tolerance != "pointer" && this.helperProportions[this.floating ? 'width' : 'height'] > item[this.floating ? 'width' : 'height'])
+ ) {
+ return isOverElement;
} else {
-
+
return (l < x1 + (this.helperProportions.width / 2) // Right Half
&& x2 - (this.helperProportions.width / 2) < r // Left Half
&& t < y1 + (this.helperProportions.height / 2) // Bottom Half
&& y2 - (this.helperProportions.height / 2) < b ); // Top Half
-
+
}
-
},
- intersectsWithEdge: function(item) {
- var x1 = this.positionAbs.left, x2 = x1 + this.helperProportions.width,
- y1 = this.positionAbs.top, y2 = y1 + this.helperProportions.height;
- var l = item.left, r = l + item.width,
- t = item.top, b = t + item.height;
- if(this.options.tolerance == "pointer" || (this.options.tolerance == "guess" && this.helperProportions[this.floating ? 'width' : 'height'] > item[this.floating ? 'width' : 'height'])) {
+ _intersectsWithPointer: function(item) {
- if(!(y1 + this.offset.click.top > t && y1 + this.offset.click.top < b && x1 + this.offset.click.left > l && x1 + this.offset.click.left < r)) return false;
-
- if(this.floating) {
- if(x1 + this.offset.click.left > l && x1 + this.offset.click.left < l + item.width/2) return 2;
- if(x1 + this.offset.click.left > l+item.width/2 && x1 + this.offset.click.left < r) return 1;
- } else {
- if(y1 + this.offset.click.top > t && y1 + this.offset.click.top < t + item.height/2) return 2;
- if(y1 + this.offset.click.top > t+item.height/2 && y1 + this.offset.click.top < b) return 1;
- }
+ var isOverElementHeight = $.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height),
+ isOverElementWidth = $.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width),
+ isOverElement = isOverElementHeight && isOverElementWidth,
+ verticalDirection = this._getDragVerticalDirection(),
+ horizontalDirection = this._getDragHorizontalDirection();
+ if (!isOverElement)
+ return false;
+
+ return this.floating ?
+ ( ((horizontalDirection && horizontalDirection == "right") || verticalDirection == "down") ? 2 : 1 )
+ : ( verticalDirection && (verticalDirection == "down" ? 2 : 1) );
+
+ },
+
+ _intersectsWithSides: function(item) {
+
+ var isOverBottomHalf = $.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height),
+ isOverRightHalf = $.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width),
+ verticalDirection = this._getDragVerticalDirection(),
+ horizontalDirection = this._getDragHorizontalDirection();
+
+ if (this.floating && horizontalDirection) {
+ return ((horizontalDirection == "right" && isOverRightHalf) || (horizontalDirection == "left" && !isOverRightHalf));
} else {
-
- if (!(l < x1 + (this.helperProportions.width / 2) // Right Half
- && x2 - (this.helperProportions.width / 2) < r // Left Half
- && t < y1 + (this.helperProportions.height / 2) // Bottom Half
- && y2 - (this.helperProportions.height / 2) < b )) return false; // Top Half
-
- if(this.floating) {
- if(x2 > l && x1 < l) return 2; //Crosses left edge
- if(x1 < r && x2 > r) return 1; //Crosses right edge
- } else {
- if(y2 > t && y1 < t) return 1; //Crosses top edge
- if(y1 < b && y2 > b) return 2; //Crosses bottom edge
- }
-
+ return verticalDirection && ((verticalDirection == "down" && isOverBottomHalf) || (verticalDirection == "up" && !isOverBottomHalf));
}
-
- return false;
-
+
+ },
+
+ _getDragVerticalDirection: function() {
+ var delta = this.positionAbs.top - this.lastPositionAbs.top;
+ return delta != 0 && (delta > 0 ? "down" : "up");
},
- refresh: function() {
- this.refreshItems();
+
+ _getDragHorizontalDirection: function() {
+ var delta = this.positionAbs.left - this.lastPositionAbs.left;
+ return delta != 0 && (delta > 0 ? "right" : "left");
+ },
+
+ refresh: function(event) {
+ this._refreshItems(event);
this.refreshPositions();
},
- refreshItems: function() {
-
+
+ _connectWith: function() {
+ var options = this.options;
+ return options.connectWith.constructor == String
+ ? [options.connectWith]
+ : options.connectWith;
+ },
+
+ _getItemsAsjQuery: function(connected) {
+
+ var self = this;
+ var items = [];
+ var queries = [];
+ var connectWith = this._connectWith();
+
+ if(connectWith && connected) {
+ for (var i = connectWith.length - 1; i >= 0; i--){
+ var cur = $(connectWith[i]);
+ for (var j = cur.length - 1; j >= 0; j--){
+ var inst = $.data(cur[j], 'sortable');
+ if(inst && inst != this && !inst.options.disabled) {
+ queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element).not(".ui-sortable-helper"), inst]);
+ }
+ };
+ };
+ }
+
+ queries.push([$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element).not(".ui-sortable-helper"), this]);
+
+ for (var i = queries.length - 1; i >= 0; i--){
+ queries[i][0].each(function() {
+ items.push(this);
+ });
+ };
+
+ return $(items);
+
+ },
+
+ _removeCurrentsFromItems: function() {
+
+ var list = this.currentItem.find(":data(sortable-item)");
+
+ for (var i=0; i < this.items.length; i++) {
+
+ for (var j=0; j < list.length; j++) {
+ if(list[j] == this.items[i].item[0])
+ this.items.splice(i,1);
+ };
+
+ };
+
+ },
+
+ _refreshItems: function(event) {
+
this.items = [];
this.containers = [this];
var items = this.items;
var self = this;
- var queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element), this]];
-
- if(this.options.connectWith) {
- for (var i = this.options.connectWith.length - 1; i >= 0; i--){
- var cur = $(this.options.connectWith[i]);
+ var queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]];
+ var connectWith = this._connectWith();
+
+ if(connectWith) {
+ for (var i = connectWith.length - 1; i >= 0; i--){
+ var cur = $(connectWith[i]);
for (var j = cur.length - 1; j >= 0; j--){
var inst = $.data(cur[j], 'sortable');
- if(inst && !inst.options.disabled) {
- queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element), inst]);
+ if(inst && inst != this && !inst.options.disabled) {
+ queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]);
this.containers.push(inst);
}
};
};
}
- for (var i = queries.length - 1; i >= 0; i--){
- queries[i][0].each(function() {
- $.data(this, 'sortable-item', queries[i][1]); // Data for target checking (mouse manager)
+ for (var i = queries.length - 1; i >= 0; i--) {
+ var targetData = queries[i][1];
+ var _queries = queries[i][0];
+
+ for (var j=0, queriesLength = _queries.length; j < queriesLength; j++) {
+ var item = $(_queries[j]);
+
+ item.data('sortable-item', targetData); // Data for target checking (mouse manager)
+
items.push({
- item: $(this),
- instance: queries[i][1],
+ item: item,
+ instance: targetData,
width: 0, height: 0,
left: 0, top: 0
});
- });
+ };
};
},
+
refreshPositions: function(fast) {
//This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change
- if(this.offsetParent) {
- var po = this.offsetParent.offset();
- this.offset.parent = { top: po.top + this.offsetParentBorders.top, left: po.left + this.offsetParentBorders.left };
+ if(this.offsetParent && this.helper) {
+ this.offset.parent = this._getParentOffset();
}
- for (var i = this.items.length - 1; i >= 0; i--){
-
+ for (var i = this.items.length - 1; i >= 0; i--){
+ var item = this.items[i];
+
//We ignore calculating positions of all connected containers when we're not over them
- if(this.items[i].instance != this.currentContainer && this.currentContainer && this.items[i].item[0] != this.currentItem[0])
+ if(item.instance != this.currentContainer && this.currentContainer && item.item[0] != this.currentItem[0])
continue;
-
- var t = this.options.toleranceElement ? $(this.options.toleranceElement, this.items[i].item) : this.items[i].item;
-
- if(!fast) {
- this.items[i].width = t[0].offsetWidth;
- this.items[i].height = t[0].offsetHeight;
+
+ var t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item;
+
+ if (!fast) {
+ item.width = t.outerWidth();
+ item.height = t.outerHeight();
}
-
+
var p = t.offset();
- this.items[i].left = p.left;
- this.items[i].top = p.top;
-
+ item.left = p.left;
+ item.top = p.top;
};
if(this.options.custom && this.options.custom.refreshContainers) {
this.options.custom.refreshContainers.call(this);
} else {
for (var i = this.containers.length - 1; i >= 0; i--){
- var p =this.containers[i].element.offset();
+ var p = this.containers[i].element.offset();
this.containers[i].containerCache.left = p.left;
this.containers[i].containerCache.top = p.top;
this.containers[i].containerCache.width = this.containers[i].element.outerWidth();
@@ -220,331 +596,284 @@ $.widget("ui.sortable", $.extend({}, $.ui.mouse, {
}
},
- destroy: function() {
- this.element
- .removeClass("ui-sortable ui-sortable-disabled")
- .removeData("sortable")
- .unbind(".sortable");
- this.mouseDestroy();
-
- for ( var i = this.items.length - 1; i >= 0; i-- )
- this.items[i].item.removeData("sortable-item");
- },
- createPlaceholder: function(that) {
-
+
+ _createPlaceholder: function(that) {
+
var self = that || this, o = self.options;
- if(o.placeholder.constructor == String) {
+ if(!o.placeholder || o.placeholder.constructor == String) {
var className = o.placeholder;
o.placeholder = {
element: function() {
- return $('<div></div>').addClass(className)[0];
+
+ var el = $(document.createElement(self.currentItem[0].nodeName))
+ .addClass(className || self.currentItem[0].className+" ui-sortable-placeholder")
+ .removeClass("ui-sortable-helper")[0];
+
+ if(!className)
+ el.style.visibility = "hidden";
+
+ return el;
},
- update: function(i, p) {
- p.css(i.offset()).css({ width: i.outerWidth(), height: i.outerHeight() });
+ update: function(container, p) {
+
+ // 1. If a className is set as 'placeholder option, we don't force sizes - the class is responsible for that
+ // 2. The option 'forcePlaceholderSize can be enabled to force it even if a class name is specified
+ if(className && !o.forcePlaceholderSize) return;
+
+ //If the element doesn't have a actual height by itself (without styles coming from a stylesheet), it receives the inline height from the dragged item
+ if(!p.height()) { p.height(self.currentItem.innerHeight() - parseInt(self.currentItem.css('paddingTop')||0, 10) - parseInt(self.currentItem.css('paddingBottom')||0, 10)); };
+ if(!p.width()) { p.width(self.currentItem.innerWidth() - parseInt(self.currentItem.css('paddingLeft')||0, 10) - parseInt(self.currentItem.css('paddingRight')||0, 10)); };
}
};
}
-
- self.placeholder = $(o.placeholder.element.call(self.element, self.currentItem)).appendTo('body').css({ position: 'absolute' });
- o.placeholder.update.call(self.element, self.currentItem, self.placeholder);
+
+ //Create the placeholder
+ self.placeholder = $(o.placeholder.element.call(self.element, self.currentItem));
+
+ //Append it after the actual current item
+ self.currentItem.after(self.placeholder);
+
+ //Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317)
+ o.placeholder.update(self, self.placeholder);
+
},
- contactContainers: function(e) {
+
+ _contactContainers: function(event) {
for (var i = this.containers.length - 1; i >= 0; i--){
- if(this.intersectsWith(this.containers[i].containerCache)) {
+ if(this._intersectsWith(this.containers[i].containerCache)) {
if(!this.containers[i].containerCache.over) {
-
if(this.currentContainer != this.containers[i]) {
-
+
//When entering a new container, we will find the item with the least distance and append our item near it
var dist = 10000; var itemWithLeastDistance = null; var base = this.positionAbs[this.containers[i].floating ? 'left' : 'top'];
for (var j = this.items.length - 1; j >= 0; j--) {
- if(!contains(this.containers[i].element[0], this.items[j].item[0])) continue;
+ if(!$.ui.contains(this.containers[i].element[0], this.items[j].item[0])) continue;
var cur = this.items[j][this.containers[i].floating ? 'left' : 'top'];
if(Math.abs(cur - base) < dist) {
dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j];
}
}
-
+
if(!itemWithLeastDistance && !this.options.dropOnEmpty) //Check if dropOnEmpty is enabled
continue;
-
- //We also need to exchange the placeholder
- if(this.placeholder) this.placeholder.remove();
- if(this.containers[i].options.placeholder) {
- this.containers[i].createPlaceholder(this);
- } else {
- this.placeholder = null;;
- }
-
+
this.currentContainer = this.containers[i];
- itemWithLeastDistance ? this.rearrange(e, itemWithLeastDistance, null, true) : this.rearrange(e, null, this.containers[i].element, true);
- this.propagate("change", e); //Call plugins and callbacks
- this.containers[i].propagate("change", e, this); //Call plugins and callbacks
+ itemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[i].element, true);
+ this._trigger("change", event, this._uiHash());
+ this.containers[i]._trigger("change", event, this._uiHash(this));
+
+ //Update the placeholder
+ this.options.placeholder.update(this.currentContainer, this.placeholder);
}
-
- this.containers[i].propagate("over", e, this);
+
+ this.containers[i]._trigger("over", event, this._uiHash(this));
this.containers[i].containerCache.over = 1;
}
} else {
if(this.containers[i].containerCache.over) {
- this.containers[i].propagate("out", e, this);
+ this.containers[i]._trigger("out", event, this._uiHash(this));
this.containers[i].containerCache.over = 0;
}
}
-
- };
+
+ };
},
- mouseCapture: function(e, overrideHandle) {
-
- if(this.options.disabled || this.options.type == 'static') return false;
- //We have to refresh the items data once first
- this.refreshItems();
+ _createHelper: function(event) {
- //Find out if the clicked node (or one of its parents) is a actual item in this.items
- var currentItem = null, self = this, nodes = $(e.target).parents().each(function() {
- if($.data(this, 'sortable-item') == self) {
- currentItem = $(this);
- return false;
- }
- });
- if($.data(e.target, 'sortable-item') == self) currentItem = $(e.target);
+ var o = this.options;
+ var helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper == 'clone' ? this.currentItem.clone() : this.currentItem);
+
+ if(!helper.parents('body').length) //Add the helper to the DOM if that didn't happen already
+ $(o.appendTo != 'parent' ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]);
+
+ if(helper[0] == this.currentItem[0])
+ this._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left") };
+
+ if(helper[0].style.width == '' || o.forceHelperSize) helper.width(this.currentItem.width());
+ if(helper[0].style.height == '' || o.forceHelperSize) helper.height(this.currentItem.height());
+
+ return helper;
- if(!currentItem) return false;
- if(this.options.handle && !overrideHandle) {
- var validHandle = false;
-
- $(this.options.handle, currentItem).find("*").andSelf().each(function() { if(this == e.target) validHandle = true; });
- if(!validHandle) return false;
- }
-
- this.currentItem = currentItem;
- return true;
-
},
- mouseStart: function(e, overrideHandle, noActivation) {
- var o = this.options;
- this.currentContainer = this;
+ _adjustOffsetFromHelper: function(obj) {
+ if(obj.left != undefined) this.offset.click.left = obj.left + this.margins.left;
+ if(obj.right != undefined) this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
+ if(obj.top != undefined) this.offset.click.top = obj.top + this.margins.top;
+ if(obj.bottom != undefined) this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
+ },
- //We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture
- this.refreshPositions();
+ _getParentOffset: function() {
- //Create and append the visible helper
- this.helper = typeof o.helper == 'function' ? $(o.helper.apply(this.element[0], [e, this.currentItem])) : this.currentItem.clone();
- if (!this.helper.parents('body').length) $(o.appendTo != 'parent' ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(this.helper[0]); //Add the helper to the DOM if that didn't happen already
- this.helper.css({ position: 'absolute', clear: 'both' }).addClass('ui-sortable-helper'); //Position it absolutely and add a helper class
- /*
- * - Position generation -
- * This block generates everything position related - it's the core of draggables.
- */
+ //Get the offsetParent and cache its position
+ this.offsetParent = this.helper.offsetParent();
+ var po = this.offsetParent.offset();
- this.margins = { //Cache the margins
- left: (parseInt(this.currentItem.css("marginLeft"),10) || 0),
- top: (parseInt(this.currentItem.css("marginTop"),10) || 0)
- };
-
- this.offset = this.currentItem.offset(); //The element's absolute position on the page
- this.offset = { //Substract the margins from the element's absolute offset
- top: this.offset.top - this.margins.top,
- left: this.offset.left - this.margins.left
- };
-
- this.offset.click = { //Where the click happened, relative to the element
- left: e.pageX - this.offset.left,
- top: e.pageY - this.offset.top
- };
-
- this.offsetParent = this.helper.offsetParent(); //Get the offsetParent and cache its position
- var po = this.offsetParent.offset();
+ // This is a special case where we need to modify a offset calculated on start, since the following happened:
+ // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
+ // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
+ // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
+ if(this.cssPosition == 'absolute' && this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) {
+ po.left += this.scrollParent.scrollLeft();
+ po.top += this.scrollParent.scrollTop();
+ }
- this.offsetParentBorders = {
- top: (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
- left: (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
- };
- this.offset.parent = { //Store its position plus border
- top: po.top + this.offsetParentBorders.top,
- left: po.left + this.offsetParentBorders.left
+ if((this.offsetParent[0] == document.body) //This needs to be actually done for all browsers, since pageX/pageY includes this information
+ || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.browser.msie)) //Ugly IE fix
+ po = { top: 0, left: 0 };
+
+ return {
+ top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
+ left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
};
-
- this.originalPosition = this.generatePosition(e); //Generate the original position
- this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] }; //Cache the former DOM position
-
- //If o.placeholder is used, create a new element at the given position with the class
- this.helperProportions = { width: this.helper.outerWidth(), height: this.helper.outerHeight() };//Cache the helper size
- if(o.placeholder) this.createPlaceholder();
-
- //Call plugins and callbacks
- this.propagate("start", e);
- this.helperProportions = { width: this.helper.outerWidth(), height: this.helper.outerHeight() };//Recache the helper size
-
- if(o.cursorAt) {
- if(o.cursorAt.left != undefined) this.offset.click.left = o.cursorAt.left;
- if(o.cursorAt.right != undefined) this.offset.click.left = this.helperProportions.width - o.cursorAt.right;
- if(o.cursorAt.top != undefined) this.offset.click.top = o.cursorAt.top;
- if(o.cursorAt.bottom != undefined) this.offset.click.top = this.helperProportions.height - o.cursorAt.bottom;
- }
- /*
- * - Position constraining -
- * Here we prepare position constraining like grid and containment.
- */
-
- if(o.containment) {
- if(o.containment == 'parent') o.containment = this.helper[0].parentNode;
- if(o.containment == 'document' || o.containment == 'window') this.containment = [
- 0 - this.offset.parent.left,
- 0 - this.offset.parent.top,
- $(o.containment == 'document' ? document : window).width() - this.offset.parent.left - this.helperProportions.width - this.margins.left - (parseInt(this.element.css("marginRight"),10) || 0),
- ($(o.containment == 'document' ? document : window).height() || document.body.parentNode.scrollHeight) - this.offset.parent.top - this.helperProportions.height - this.margins.top - (parseInt(this.element.css("marginBottom"),10) || 0)
- ];
+ },
- if(!(/^(document|window|parent)$/).test(o.containment)) {
- var ce = $(o.containment)[0];
- var co = $(o.containment).offset();
-
- this.containment = [
- co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) - this.offset.parent.left,
- co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) - this.offset.parent.top,
- co.left+Math.max(ce.scrollWidth,ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - this.offset.parent.left - this.helperProportions.width - this.margins.left - (parseInt(this.currentItem.css("marginRight"),10) || 0),
- co.top+Math.max(ce.scrollHeight,ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - this.offset.parent.top - this.helperProportions.height - this.margins.top - (parseInt(this.currentItem.css("marginBottom"),10) || 0)
- ];
- }
- }
+ _getRelativeOffset: function() {
- //Set the original element visibility to hidden to still fill out the white space
- if(this.options.placeholder != 'clone')
- this.currentItem.css('visibility', 'hidden');
-
- //Post 'activate' events to possible containers
- if(!noActivation) {
- for (var i = this.containers.length - 1; i >= 0; i--) { this.containers[i].propagate("activate", e, this); }
+ if(this.cssPosition == "relative") {
+ var p = this.currentItem.position();
+ return {
+ top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(),
+ left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft()
+ };
+ } else {
+ return { top: 0, left: 0 };
}
-
- //Prepare possible droppables
- if($.ui.ddmanager) $.ui.ddmanager.current = this;
- if ($.ui.ddmanager && !o.dropBehaviour) $.ui.ddmanager.prepareOffsets(this, e);
- this.dragging = true;
+ },
- this.mouseDrag(e); //Execute the drag once - this causes the helper not to be visible before getting its correct position
- return true;
+ _cacheMargins: function() {
+ this.margins = {
+ left: (parseInt(this.currentItem.css("marginLeft"),10) || 0),
+ top: (parseInt(this.currentItem.css("marginTop"),10) || 0)
+ };
+ },
+ _cacheHelperProportions: function() {
+ this.helperProportions = {
+ width: this.helper.outerWidth(),
+ height: this.helper.outerHeight()
+ };
+ },
+
+ _setContainment: function() {
+
+ var o = this.options;
+ if(o.containment == 'parent') o.containment = this.helper[0].parentNode;
+ if(o.containment == 'document' || o.containment == 'window') this.containment = [
+ 0 - this.offset.relative.left - this.offset.parent.left,
+ 0 - this.offset.relative.top - this.offset.parent.top,
+ $(o.containment == 'document' ? document : window).width() - this.helperProportions.width - this.margins.left,
+ ($(o.containment == 'document' ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top
+ ];
+
+ if(!(/^(document|window|parent)$/).test(o.containment)) {
+ var ce = $(o.containment)[0];
+ var co = $(o.containment).offset();
+ var over = ($(ce).css("overflow") != 'hidden');
+
+ this.containment = [
+ co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left,
+ co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top,
+ co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left,
+ co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top
+ ];
+ }
},
- convertPositionTo: function(d, pos) {
+
+ _convertPositionTo: function(d, pos) {
+
if(!pos) pos = this.position;
var mod = d == "absolute" ? 1 : -1;
+ var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
+
return {
top: (
- pos.top // the calculated relative position
+ pos.top // The absolute mouse position
+ + this.offset.relative.top * mod // Only for relative positioned nodes: Relative offset from element to offset parent
+ this.offset.parent.top * mod // The offsetParent's offset without borders (offset + border)
- - (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollTop) * mod // The offsetParent's scroll position
- + this.margins.top * mod //Add the margin (you don't want the margin counting in intersection methods)
+ - ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
),
left: (
- pos.left // the calculated relative position
+ pos.left // The absolute mouse position
+ + this.offset.relative.left * mod // Only for relative positioned nodes: Relative offset from element to offset parent
+ this.offset.parent.left * mod // The offsetParent's offset without borders (offset + border)
- - (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollLeft) * mod // The offsetParent's scroll position
- + this.margins.left * mod //Add the margin (you don't want the margin counting in intersection methods)
+ - ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
)
};
+
},
- generatePosition: function(e) {
-
- var o = this.options;
- var position = {
+
+ _generatePosition: function(event) {
+
+ var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
+
+ // This is another very weird special case that only happens for relative elements:
+ // 1. If the css position is relative
+ // 2. and the scroll parent is the document or similar to the offset parent
+ // we have to refresh the relative offset during the scroll so there are no jumps
+ if(this.cssPosition == 'relative' && !(this.scrollParent[0] != document && this.scrollParent[0] != this.offsetParent[0])) {
+ this.offset.relative = this._getRelativeOffset();
+ }
+
+ var pageX = event.pageX;
+ var pageY = event.pageY;
+
+ /*
+ * - Position constraining -
+ * Constrain the position to a mix of grid, containment.
+ */
+
+ if(this.originalPosition) { //If we are not dragging yet, we won't check for options
+
+ if(this.containment) {
+ if(event.pageX - this.offset.click.left < this.containment[0]) pageX = this.containment[0] + this.offset.click.left;
+ if(event.pageY - this.offset.click.top < this.containment[1]) pageY = this.containment[1] + this.offset.click.top;
+ if(event.pageX - this.offset.click.left > this.containment[2]) pageX = this.containment[2] + this.offset.click.left;
+ if(event.pageY - this.offset.click.top > this.containment[3]) pageY = this.containment[3] + this.offset.click.top;
+ }
+
+ if(o.grid) {
+ var top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1];
+ pageY = this.containment ? (!(top - this.offset.click.top < this.containment[1] || top - this.offset.click.top > this.containment[3]) ? top : (!(top - this.offset.click.top < this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
+
+ var left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0];
+ pageX = this.containment ? (!(left - this.offset.click.left < this.containment[0] || left - this.offset.click.left > this.containment[2]) ? left : (!(left - this.offset.click.left < this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
+ }
+
+ }
+
+ return {
top: (
- e.pageY // The absolute mouse position
+ pageY // The absolute mouse position
- this.offset.click.top // Click offset (relative to the element)
+ - this.offset.relative.top // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.top // The offsetParent's offset without borders (offset + border)
- + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollTop) // The offsetParent's scroll position, not if the element is fixed
+ + ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
),
left: (
- e.pageX // The absolute mouse position
+ pageX // The absolute mouse position
- this.offset.click.left // Click offset (relative to the element)
+ - this.offset.relative.left // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.left // The offsetParent's offset without borders (offset + border)
- + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollLeft) // The offsetParent's scroll position, not if the element is fixed
+ + ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
)
};
-
- if(!this.originalPosition) return position; //If we are not dragging yet, we won't check for options
-
- /*
- * - Position constraining -
- * Constrain the position to a mix of grid, containment.
- */
- if(this.containment) {
- if(position.left < this.containment[0]) position.left = this.containment[0];
- if(position.top < this.containment[1]) position.top = this.containment[1];
- if(position.left > this.containment[2]) position.left = this.containment[2];
- if(position.top > this.containment[3]) position.top = this.containment[3];
- }
-
- if(o.grid) {
- var top = this.originalPosition.top + Math.round((position.top - this.originalPosition.top) / o.grid[1]) * o.grid[1];
- position.top = this.containment ? (!(top < this.containment[1] || top > this.containment[3]) ? top : (!(top < this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
-
- var left = this.originalPosition.left + Math.round((position.left - this.originalPosition.left) / o.grid[0]) * o.grid[0];
- position.left = this.containment ? (!(left < this.containment[0] || left > this.containment[2]) ? left : (!(left < this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
- }
-
- return position;
+
},
- mouseDrag: function(e) {
- //Compute the helpers position
- this.position = this.generatePosition(e);
- this.positionAbs = this.convertPositionTo("absolute");
+ _rearrange: function(event, i, a, hardRefresh) {
- //Call the internal plugins
- $.ui.plugin.call(this, "sort", [e, this.ui()]);
-
- //Regenerate the absolute position used for position checks
- this.positionAbs = this.convertPositionTo("absolute");
-
- //Set the helper's position
- this.helper[0].style.left = this.position.left+'px';
- this.helper[0].style.top = this.position.top+'px';
+ a ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction == 'down' ? i.item[0] : i.item[0].nextSibling));
- //Rearrange
- for (var i = this.items.length - 1; i >= 0; i--) {
- var intersection = this.intersectsWithEdge(this.items[i]);
- if(!intersection) continue;
-
- if(this.items[i].item[0] != this.currentItem[0] //cannot intersect with itself
- && this.currentItem[intersection == 1 ? "next" : "prev"]()[0] != this.items[i].item[0] //no useless actions that have been done before
- && !contains(this.currentItem[0], this.items[i].item[0]) //no action if the item moved is the parent of the item checked
- && (this.options.type == 'semi-dynamic' ? !contains(this.element[0], this.items[i].item[0]) : true)
- ) {
-
- this.direction = intersection == 1 ? "down" : "up";
- this.rearrange(e, this.items[i]);
- this.propagate("change", e); //Call plugins and callbacks
- break;
- }
- }
-
- //Post events to containers
- this.contactContainers(e);
-
- //Interconnect with droppables
- if($.ui.ddmanager) $.ui.ddmanager.drag(this, e);
-
- //Call callbacks
- this.element.triggerHandler("sort", [e, this.ui()], this.options["sort"]);
-
- return false;
-
- },
- rearrange: function(e, i, a, hardRefresh) {
- a ? a[0].appendChild(this.currentItem[0]) : i.item[0].parentNode.insertBefore(this.currentItem[0], (this.direction == 'down' ? i.item[0] : i.item[0].nextSibling));
-
//Various things done here to improve the performance:
// 1. we create a setTimeout, that calls refreshPositions
// 2. on the instance, we have a counter variable, that get's higher after every append
@@ -556,187 +885,134 @@ $.widget("ui.sortable", $.extend({}, $.ui.mouse, {
window.setTimeout(function() {
if(counter == self.counter) self.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove
},0);
-
- if(this.options.placeholder)
- this.options.placeholder.update.call(this.element, this.currentItem, this.placeholder);
+
},
- mouseStop: function(e, noPropagation) {
- //If we are using droppables, inform the manager about the drop
- if ($.ui.ddmanager && !this.options.dropBehaviour)
- $.ui.ddmanager.drop(this, e);
-
- if(this.options.revert) {
- var self = this;
- var cur = self.currentItem.offset();
+ _clear: function(event, noPropagation) {
- //Also animate the placeholder if we have one
- if(self.placeholder) self.placeholder.animate({ opacity: 'hide' }, (parseInt(this.options.revert, 10) || 500)-50);
+ this.reverting = false;
+ // We delay all events that have to be triggered to after the point where the placeholder has been removed and
+ // everything else normalized again
+ var delayedTriggers = [], self = this;
- $(this.helper).animate({
- left: cur.left - this.offset.parent.left - self.margins.left + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollLeft),
- top: cur.top - this.offset.parent.top - self.margins.top + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollTop)
- }, parseInt(this.options.revert, 10) || 500, function() {
- self.clear(e);
- });
+ // We first have to update the dom position of the actual currentItem
+ // Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088)
+ if(!this._noFinalSort && this.currentItem[0].parentNode) this.placeholder.before(this.currentItem);
+ this._noFinalSort = null;
+
+ if(this.helper[0] == this.currentItem[0]) {
+ for(var i in this._storedCSS) {
+ if(this._storedCSS[i] == 'auto' || this._storedCSS[i] == 'static') this._storedCSS[i] = '';
+ }
+ this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
} else {
- this.clear(e, noPropagation);
+ this.currentItem.show();
}
- return false;
-
- },
- clear: function(e, noPropagation) {
-
- if(this.domPosition.prev != this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent != this.currentItem.parent()[0]) this.propagate("update", e, null, noPropagation); //Trigger update callback if the DOM position has changed
- if(!contains(this.element[0], this.currentItem[0])) { //Node was moved out of the current element
- this.propagate("remove", e, null, noPropagation);
+ if(this.fromOutside && !noPropagation) delayedTriggers.push(function(event) { this._trigger("receive", event, this._uiHash(this.fromOutside)); });
+ if((this.fromOutside || this.domPosition.prev != this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent != this.currentItem.parent()[0]) && !noPropagation) delayedTriggers.push(function(event) { this._trigger("update", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed
+ if(!$.ui.contains(this.element[0], this.currentItem[0])) { //Node was moved out of the current element
+ if(!noPropagation) delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); });
for (var i = this.containers.length - 1; i >= 0; i--){
- if(contains(this.containers[i].element[0], this.currentItem[0])) {
- this.containers[i].propagate("update", e, this, noPropagation);
- this.containers[i].propagate("receive", e, this, noPropagation);
+ if($.ui.contains(this.containers[i].element[0], this.currentItem[0]) && !noPropagation) {
+ delayedTriggers.push((function(c) { return function(event) { c._trigger("receive", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
+ delayedTriggers.push((function(c) { return function(event) { c._trigger("update", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
}
};
};
-
+
//Post events to containers
for (var i = this.containers.length - 1; i >= 0; i--){
- this.containers[i].propagate("deactivate", e, this, noPropagation);
+ if(!noPropagation) delayedTriggers.push((function(c) { return function(event) { c._trigger("deactivate", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
if(this.containers[i].containerCache.over) {
- this.containers[i].propagate("out", e, this);
+ delayedTriggers.push((function(c) { return function(event) { c._trigger("out", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
this.containers[i].containerCache.over = 0;
}
}
-
+
+ //Do what was originally in plugins
+ if(this._storedCursor) $('body').css("cursor", this._storedCursor); //Reset cursor
+ if(this._storedOpacity) this.helper.css("opacity", this._storedOpacity); //Reset cursor
+ if(this._storedZIndex) this.helper.css("zIndex", this._storedZIndex == 'auto' ? '' : this._storedZIndex); //Reset z-index
+
this.dragging = false;
if(this.cancelHelperRemoval) {
- this.propagate("stop", e, null, noPropagation);
+ if(!noPropagation) {
+ this._trigger("beforeStop", event, this._uiHash());
+ for (var i=0; i < delayedTriggers.length; i++) { delayedTriggers[i].call(this, event); }; //Trigger all delayed events
+ this._trigger("stop", event, this._uiHash());
+ }
return false;
}
-
- $(this.currentItem).css('visibility', '');
- if(this.placeholder) this.placeholder.remove();
- this.helper.remove(); this.helper = null;
- this.propagate("stop", e, null, noPropagation);
-
+
+ if(!noPropagation) this._trigger("beforeStop", event, this._uiHash());
+
+ //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
+ this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
+
+ if(this.helper[0] != this.currentItem[0]) this.helper.remove(); this.helper = null;
+
+ if(!noPropagation) {
+ for (var i=0; i < delayedTriggers.length; i++) { delayedTriggers[i].call(this, event); }; //Trigger all delayed events
+ this._trigger("stop", event, this._uiHash());
+ }
+
+ this.fromOutside = false;
return true;
-
+
+ },
+
+ _trigger: function() {
+ if ($.widget.prototype._trigger.apply(this, arguments) === false) {
+ this.cancel();
+ }
+ },
+
+ _uiHash: function(inst) {
+ var self = inst || this;
+ return {
+ helper: self.helper,
+ placeholder: self.placeholder || $([]),
+ position: self.position,
+ absolutePosition: self.positionAbs, //deprecated
+ offset: self.positionAbs,
+ item: self.currentItem,
+ sender: inst ? inst.element : null
+ };
}
+
}));
$.extend($.ui.sortable, {
getter: "serialize toArray",
+ version: "1.7.2",
+ eventPrefix: "sort",
defaults: {
- helper: "clone",
- tolerance: "guess",
- distance: 1,
+ appendTo: "parent",
+ axis: false,
+ cancel: ":input,option",
+ connectWith: false,
+ containment: false,
+ cursor: 'auto',
+ cursorAt: false,
delay: 0,
+ distance: 1,
+ dropOnEmpty: true,
+ forcePlaceholderSize: false,
+ forceHelperSize: false,
+ grid: false,
+ handle: false,
+ helper: "original",
+ items: '> *',
+ opacity: false,
+ placeholder: false,
+ revert: false,
scroll: true,
scrollSensitivity: 20,
scrollSpeed: 20,
- cancel: ":input",
- items: '> *',
- zIndex: 1000,
- dropOnEmpty: true,
- appendTo: "parent"
- }
-});
-
-/*
- * Sortable Extensions
- */
-
-$.ui.plugin.add("sortable", "cursor", {
- start: function(e, ui) {
- var t = $('body');
- if (t.css("cursor")) ui.options._cursor = t.css("cursor");
- t.css("cursor", ui.options.cursor);
- },
- stop: function(e, ui) {
- if (ui.options._cursor) $('body').css("cursor", ui.options._cursor);
- }
-});
-
-$.ui.plugin.add("sortable", "zIndex", {
- start: function(e, ui) {
- var t = ui.helper;
- if(t.css("zIndex")) ui.options._zIndex = t.css("zIndex");
- t.css('zIndex', ui.options.zIndex);
- },
- stop: function(e, ui) {
- if(ui.options._zIndex) $(ui.helper).css('zIndex', ui.options._zIndex);
- }
-});
-
-$.ui.plugin.add("sortable", "opacity", {
- start: function(e, ui) {
- var t = ui.helper;
- if(t.css("opacity")) ui.options._opacity = t.css("opacity");
- t.css('opacity', ui.options.opacity);
- },
- stop: function(e, ui) {
- if(ui.options._opacity) $(ui.helper).css('opacity', ui.options._opacity);
- }
-});
-
-$.ui.plugin.add("sortable", "scroll", {
- start: function(e, ui) {
- var o = ui.options;
- var i = $(this).data("sortable");
-
- i.overflowY = function(el) {
- do { if(/auto|scroll/.test(el.css('overflow')) || (/auto|scroll/).test(el.css('overflow-y'))) return el; el = el.parent(); } while (el[0].parentNode);
- return $(document);
- }(i.currentItem);
- i.overflowX = function(el) {
- do { if(/auto|scroll/.test(el.css('overflow')) || (/auto|scroll/).test(el.css('overflow-x'))) return el; el = el.parent(); } while (el[0].parentNode);
- return $(document);
- }(i.currentItem);
-
- if(i.overflowY[0] != document && i.overflowY[0].tagName != 'HTML') i.overflowYOffset = i.overflowY.offset();
- if(i.overflowX[0] != document && i.overflowX[0].tagName != 'HTML') i.overflowXOffset = i.overflowX.offset();
-
- },
- sort: function(e, ui) {
-
- var o = ui.options;
- var i = $(this).data("sortable");
-
- if(i.overflowY[0] != document && i.overflowY[0].tagName != 'HTML') {
- if((i.overflowYOffset.top + i.overflowY[0].offsetHeight) - e.pageY < o.scrollSensitivity)
- i.overflowY[0].scrollTop = i.overflowY[0].scrollTop + o.scrollSpeed;
- if(e.pageY - i.overflowYOffset.top < o.scrollSensitivity)
- i.overflowY[0].scrollTop = i.overflowY[0].scrollTop - o.scrollSpeed;
- } else {
- if(e.pageY - $(document).scrollTop() < o.scrollSensitivity)
- $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
- if($(window).height() - (e.pageY - $(document).scrollTop()) < o.scrollSensitivity)
- $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
- }
-
- if(i.overflowX[0] != document && i.overflowX[0].tagName != 'HTML') {
- if((i.overflowXOffset.left + i.overflowX[0].offsetWidth) - e.pageX < o.scrollSensitivity)
- i.overflowX[0].scrollLeft = i.overflowX[0].scrollLeft + o.scrollSpeed;
- if(e.pageX - i.overflowXOffset.left < o.scrollSensitivity)
- i.overflowX[0].scrollLeft = i.overflowX[0].scrollLeft - o.scrollSpeed;
- } else {
- if(e.pageX - $(document).scrollLeft() < o.scrollSensitivity)
- $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
- if($(window).width() - (e.pageX - $(document).scrollLeft()) < o.scrollSensitivity)
- $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
- }
-
- }
-});
-
-$.ui.plugin.add("sortable", "axis", {
- sort: function(e, ui) {
-
- var i = $(this).data("sortable");
-
- if(ui.options.axis == "y") i.position.left = i.originalPosition.left;
- if(ui.options.axis == "x") i.position.top = i.originalPosition.top;
-
+ scope: "default",
+ tolerance: "intersect",
+ zIndex: 1000
}
});
diff --git a/template-common/lib/ui/ui.tabs.js b/template-common/lib/ui/ui.tabs.js
index a7099d0be..d914b3e4f 100644
--- a/template-common/lib/ui/ui.tabs.js
+++ b/template-common/lib/ui/ui.tabs.js
@@ -1,7 +1,7 @@
/*
- * jQuery UI Tabs
+ * jQuery UI Tabs 1.7.2
*
- * Copyright (c) 2007, 2008 Klaus Hartl (stilbuero.de)
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
@@ -13,74 +13,125 @@
(function($) {
$.widget("ui.tabs", {
- init: function() {
- this.options.event += '.tabs'; // namespace event
-
- // create tabs
- this.tabify(true);
+
+ _init: function() {
+ if (this.options.deselectable !== undefined) {
+ this.options.collapsible = this.options.deselectable;
+ }
+ this._tabify(true);
},
- setData: function(key, value) {
- if ((/^selected/).test(key))
+
+ _setData: function(key, value) {
+ if (key == 'selected') {
+ if (this.options.collapsible && value == this.options.selected) {
+ return;
+ }
this.select(value);
+ }
else {
this.options[key] = value;
- this.tabify();
+ if (key == 'deselectable') {
+ this.options.collapsible = value;
+ }
+ this._tabify();
}
},
- length: function() {
- return this.$tabs.length;
+
+ _tabId: function(a) {
+ return a.title && a.title.replace(/\s/g, '_').replace(/[^A-Za-z0-9\-_:\.]/g, '') ||
+ this.options.idPrefix + $.data(a);
},
- tabId: function(a) {
- return a.title && a.title.replace(/\s/g, '_').replace(/[^A-Za-z0-9\-_:\.]/g, '')
- || this.options.idPrefix + $.data(a);
+
+ _sanitizeSelector: function(hash) {
+ return hash.replace(/:/g, '\\:'); // we need this because an id may contain a ":"
+ },
+
+ _cookie: function() {
+ var cookie = this.cookie || (this.cookie = this.options.cookie.name || 'ui-tabs-' + $.data(this.list[0]));
+ return $.cookie.apply(null, [cookie].concat($.makeArray(arguments)));
},
- ui: function(tab, panel) {
+
+ _ui: function(tab, panel) {
return {
- options: this.options,
tab: tab,
panel: panel,
- index: this.$tabs.index(tab)
+ index: this.anchors.index(tab)
};
},
- tabify: function(init) {
- this.$lis = $('li:has(a[href])', this.element);
- this.$tabs = this.$lis.map(function() { return $('a', this)[0]; });
- this.$panels = $([]);
+ _cleanup: function() {
+ // restore all former loading tabs labels
+ this.lis.filter('.ui-state-processing').removeClass('ui-state-processing')
+ .find('span:data(label.tabs)')
+ .each(function() {
+ var el = $(this);
+ el.html(el.data('label.tabs')).removeData('label.tabs');
+ });
+ },
+
+ _tabify: function(init) {
+
+ this.list = this.element.children('ul:first');
+ this.lis = $('li:has(a[href])', this.list);
+ this.anchors = this.lis.map(function() { return $('a', this)[0]; });
+ this.panels = $([]);
var self = this, o = this.options;
- this.$tabs.each(function(i, a) {
+ var fragmentId = /^#.+/; // Safari 2 reports '#' for an empty hash
+ this.anchors.each(function(i, a) {
+ var href = $(a).attr('href');
+
+ // For dynamically created HTML that contains a hash as href IE < 8 expands
+ // such href to the full page url with hash and then misinterprets tab as ajax.
+ // Same consideration applies for an added tab with a fragment identifier
+ // since a[href=#fragment-identifier] does unexpectedly not match.
+ // Thus normalize href attribute...
+ var hrefBase = href.split('#')[0], baseEl;
+ if (hrefBase && (hrefBase === location.toString().split('#')[0] ||
+ (baseEl = $('base')[0]) && hrefBase === baseEl.href)) {
+ href = a.hash;
+ a.href = href;
+ }
+
// inline tab
- if (a.hash && a.hash.replace('#', '')) // Safari 2 reports '#' for an empty hash
- self.$panels = self.$panels.add(a.hash);
+ if (fragmentId.test(href)) {
+ self.panels = self.panels.add(self._sanitizeSelector(href));
+ }
+
// remote tab
- else if ($(a).attr('href') != '#') { // prevent loading the page itself if href is just "#"
- $.data(a, 'href.tabs', a.href); // required for restore on destroy
- $.data(a, 'load.tabs', a.href); // mutable
- var id = self.tabId(a);
+ else if (href != '#') { // prevent loading the page itself if href is just "#"
+ $.data(a, 'href.tabs', href); // required for restore on destroy
+
+ // TODO until #3808 is fixed strip fragment identifier from url
+ // (IE fails to load from such url)
+ $.data(a, 'load.tabs', href.replace(/#.*$/, '')); // mutable data
+
+ var id = self._tabId(a);
a.href = '#' + id;
var $panel = $('#' + id);
if (!$panel.length) {
- $panel = $(o.panelTemplate).attr('id', id).addClass(o.panelClass)
- .insertAfter( self.$panels[i - 1] || self.element );
+ $panel = $(o.panelTemplate).attr('id', id).addClass('ui-tabs-panel ui-widget-content ui-corner-bottom')
+ .insertAfter(self.panels[i - 1] || self.list);
$panel.data('destroy.tabs', true);
}
- self.$panels = self.$panels.add( $panel );
+ self.panels = self.panels.add($panel);
}
+
// invalid tab href
- else
- o.disabled.push(i + 1);
+ else {
+ o.disabled.push(i);
+ }
});
+ // initialization from scratch
if (init) {
- // attach necessary classes for styling if not present
- this.element.addClass(o.navClass);
- this.$panels.each(function() {
- var $this = $(this);
- $this.addClass(o.panelClass);
- });
+ // attach necessary classes for styling
+ this.element.addClass('ui-tabs ui-widget ui-widget-content ui-corner-all');
+ this.list.addClass('ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all');
+ this.lis.addClass('ui-state-default ui-corner-top');
+ this.panels.addClass('ui-tabs-panel ui-widget-content ui-corner-bottom');
// Selected tab
// use "selected" option or try to retrieve:
@@ -89,464 +140,494 @@ $.widget("ui.tabs", {
// 3. from selected class attribute on <li>
if (o.selected === undefined) {
if (location.hash) {
- this.$tabs.each(function(i, a) {
+ this.anchors.each(function(i, a) {
if (a.hash == location.hash) {
o.selected = i;
- // prevent page scroll to fragment
- if ($.browser.msie || $.browser.opera) { // && !o.remote
- var $toShow = $(location.hash), toShowId = $toShow.attr('id');
- $toShow.attr('id', '');
- setTimeout(function() {
- $toShow.attr('id', toShowId); // restore id
- }, 500);
- }
- scrollTo(0, 0);
return false; // break
}
});
}
- else if (o.cookie) {
- var index = parseInt($.cookie('ui-tabs' + $.data(self.element)),10);
- if (index && self.$tabs[index])
- o.selected = index;
+ if (typeof o.selected != 'number' && o.cookie) {
+ o.selected = parseInt(self._cookie(), 10);
}
- else if (self.$lis.filter('.' + o.selectedClass).length)
- o.selected = self.$lis.index( self.$lis.filter('.' + o.selectedClass)[0] );
+ if (typeof o.selected != 'number' && this.lis.filter('.ui-tabs-selected').length) {
+ o.selected = this.lis.index(this.lis.filter('.ui-tabs-selected'));
+ }
+ o.selected = o.selected || 0;
+ }
+ else if (o.selected === null) { // usage of null is deprecated, TODO remove in next release
+ o.selected = -1;
}
- o.selected = o.selected === null || o.selected !== undefined ? o.selected : 0; // first tab selected by default
+
+ // sanity check - default to first tab...
+ o.selected = ((o.selected >= 0 && this.anchors[o.selected]) || o.selected < 0) ? o.selected : 0;
// Take disabling tabs via class attribute from HTML
// into account and update option properly.
// A selected tab cannot become disabled.
o.disabled = $.unique(o.disabled.concat(
- $.map(this.$lis.filter('.' + o.disabledClass),
- function(n, i) { return self.$lis.index(n); } )
+ $.map(this.lis.filter('.ui-state-disabled'),
+ function(n, i) { return self.lis.index(n); } )
)).sort();
- if ($.inArray(o.selected, o.disabled) != -1)
+
+ if ($.inArray(o.selected, o.disabled) != -1) {
o.disabled.splice($.inArray(o.selected, o.disabled), 1);
-
+ }
+
// highlight selected tab
- this.$panels.addClass(o.hideClass);
- this.$lis.removeClass(o.selectedClass);
- if (o.selected !== null) {
- this.$panels.eq(o.selected).show().removeClass(o.hideClass); // use show and remove class to show in any case no matter how it has been hidden before
- this.$lis.eq(o.selected).addClass(o.selectedClass);
-
+ this.panels.addClass('ui-tabs-hide');
+ this.lis.removeClass('ui-tabs-selected ui-state-active');
+ if (o.selected >= 0 && this.anchors.length) { // check for length avoids error when initializing empty list
+ this.panels.eq(o.selected).removeClass('ui-tabs-hide');
+ this.lis.eq(o.selected).addClass('ui-tabs-selected ui-state-active');
+
// seems to be expected behavior that the show callback is fired
- var onShow = function() {
- $(self.element).triggerHandler('tabsshow',
- [self.fakeEvent('tabsshow'), self.ui(self.$tabs[o.selected], self.$panels[o.selected])], o.show);
- };
-
- // load if remote tab
- if ($.data(this.$tabs[o.selected], 'load.tabs'))
- this.load(o.selected, onShow);
- // just trigger show event
- else
- onShow();
+ self.element.queue("tabs", function() {
+ self._trigger('show', null, self._ui(self.anchors[o.selected], self.panels[o.selected]));
+ });
+ this.load(o.selected);
}
-
+
// clean up to avoid memory leaks in certain versions of IE 6
$(window).bind('unload', function() {
- self.$tabs.unbind('.tabs');
- self.$lis = self.$tabs = self.$panels = null;
+ self.lis.add(self.anchors).unbind('.tabs');
+ self.lis = self.anchors = self.panels = null;
});
}
+ // update selected after add/remove
+ else {
+ o.selected = this.lis.index(this.lis.filter('.ui-tabs-selected'));
+ }
+
+ // update collapsible
+ this.element[o.collapsible ? 'addClass' : 'removeClass']('ui-tabs-collapsible');
+
+ // set or update cookie after init and add/remove respectively
+ if (o.cookie) {
+ this._cookie(o.selected, o.cookie);
+ }
// disable tabs
- for (var i = 0, li; li = this.$lis[i]; i++)
- $(li)[$.inArray(i, o.disabled) != -1 && !$(li).hasClass(o.selectedClass) ? 'addClass' : 'removeClass'](o.disabledClass);
+ for (var i = 0, li; (li = this.lis[i]); i++) {
+ $(li)[$.inArray(i, o.disabled) != -1 &&
+ !$(li).hasClass('ui-tabs-selected') ? 'addClass' : 'removeClass']('ui-state-disabled');
+ }
// reset cache if switching from cached to not cached
- if (o.cache === false)
- this.$tabs.removeData('cache.tabs');
-
- // set up animations
- var hideFx, showFx, baseFx = { 'min-width': 0, duration: 1 }, baseDuration = 'normal';
- if (o.fx && o.fx.constructor == Array)
- hideFx = o.fx[0] || baseFx, showFx = o.fx[1] || baseFx;
- else
- hideFx = showFx = o.fx || baseFx;
-
- // reset some styles to maintain print style sheets etc.
- var resetCSS = { display: '', overflow: '', height: '' };
- if (!$.browser.msie) // not in IE to prevent ClearType font issue
- resetCSS.opacity = '';
-
- // Hide a tab, animation prevents browser scrolling to fragment,
- // $show is optional.
- function hideTab(clicked, $hide, $show) {
- $hide.animate(hideFx, hideFx.duration || baseDuration, function() { //
- $hide.addClass(o.hideClass).css(resetCSS); // maintain flexible height and accessibility in print etc.
- if ($.browser.msie && hideFx.opacity)
- $hide[0].style.filter = '';
- if ($show)
- showTab(clicked, $show, $hide);
- });
+ if (o.cache === false) {
+ this.anchors.removeData('cache.tabs');
}
- // Show a tab, animation prevents browser scrolling to fragment,
- // $hide is optional.
- function showTab(clicked, $show, $hide) {
- if (showFx === baseFx)
- $show.css('display', 'block'); // prevent occasionally occuring flicker in Firefox cause by gap between showing and hiding the tab panels
- $show.animate(showFx, showFx.duration || baseDuration, function() {
- $show.removeClass(o.hideClass).css(resetCSS); // maintain flexible height and accessibility in print etc.
- if ($.browser.msie && showFx.opacity)
- $show[0].style.filter = '';
-
- // callback
- $(self.element).triggerHandler('tabsshow',
- [self.fakeEvent('tabsshow'), self.ui(clicked, $show[0])], o.show);
+ // remove all handlers before, tabify may run on existing tabs after add or option change
+ this.lis.add(this.anchors).unbind('.tabs');
+ if (o.event != 'mouseover') {
+ var addState = function(state, el) {
+ if (el.is(':not(.ui-state-disabled)')) {
+ el.addClass('ui-state-' + state);
+ }
+ };
+ var removeState = function(state, el) {
+ el.removeClass('ui-state-' + state);
+ };
+ this.lis.bind('mouseover.tabs', function() {
+ addState('hover', $(this));
+ });
+ this.lis.bind('mouseout.tabs', function() {
+ removeState('hover', $(this));
+ });
+ this.anchors.bind('focus.tabs', function() {
+ addState('focus', $(this).closest('li'));
+ });
+ this.anchors.bind('blur.tabs', function() {
+ removeState('focus', $(this).closest('li'));
});
}
- // switch a tab
- function switchTab(clicked, $li, $hide, $show) {
- /*if (o.bookmarkable && trueClick) { // add to history only if true click occured, not a triggered click
- $.ajaxHistory.update(clicked.hash);
- }*/
- $li.addClass(o.selectedClass)
- .siblings().removeClass(o.selectedClass);
- hideTab(clicked, $hide, $show);
+ // set up animations
+ var hideFx, showFx;
+ if (o.fx) {
+ if ($.isArray(o.fx)) {
+ hideFx = o.fx[0];
+ showFx = o.fx[1];
+ }
+ else {
+ hideFx = showFx = o.fx;
+ }
}
- // attach tab event handler, unbind to avoid duplicates from former tabifying...
- this.$tabs.unbind('.tabs').bind(o.event, function() {
+ // Reset certain styles left over from animation
+ // and prevent IE's ClearType bug...
+ function resetStyle($el, fx) {
+ $el.css({ display: '' });
+ if ($.browser.msie && fx.opacity) {
+ $el[0].style.removeAttribute('filter');
+ }
+ }
- //var trueClick = e.clientX; // add to history only if true click occured, not a triggered click
- var $li = $(this).parents('li:eq(0)'),
- $hide = self.$panels.filter(':visible'),
- $show = $(this.hash);
+ // Show a tab...
+ var showTab = showFx ?
+ function(clicked, $show) {
+ $(clicked).closest('li').removeClass('ui-state-default').addClass('ui-tabs-selected ui-state-active');
+ $show.hide().removeClass('ui-tabs-hide') // avoid flicker that way
+ .animate(showFx, showFx.duration || 'normal', function() {
+ resetStyle($show, showFx);
+ self._trigger('show', null, self._ui(clicked, $show[0]));
+ });
+ } :
+ function(clicked, $show) {
+ $(clicked).closest('li').removeClass('ui-state-default').addClass('ui-tabs-selected ui-state-active');
+ $show.removeClass('ui-tabs-hide');
+ self._trigger('show', null, self._ui(clicked, $show[0]));
+ };
+
+ // Hide a tab, $show is optional...
+ var hideTab = hideFx ?
+ function(clicked, $hide) {
+ $hide.animate(hideFx, hideFx.duration || 'normal', function() {
+ self.lis.removeClass('ui-tabs-selected ui-state-active').addClass('ui-state-default');
+ $hide.addClass('ui-tabs-hide');
+ resetStyle($hide, hideFx);
+ self.element.dequeue("tabs");
+ });
+ } :
+ function(clicked, $hide, $show) {
+ self.lis.removeClass('ui-tabs-selected ui-state-active').addClass('ui-state-default');
+ $hide.addClass('ui-tabs-hide');
+ self.element.dequeue("tabs");
+ };
+
+ // attach tab event handler, unbind to avoid duplicates from former tabifying...
+ this.anchors.bind(o.event + '.tabs', function() {
+ var el = this, $li = $(this).closest('li'), $hide = self.panels.filter(':not(.ui-tabs-hide)'),
+ $show = $(self._sanitizeSelector(this.hash));
- // If tab is already selected and not unselectable or tab disabled or
+ // If tab is already selected and not collapsible or tab disabled or
// or is already loading or click callback returns false stop here.
// Check if click handler returns false last so that it is not executed
// for a disabled or loading tab!
- if (($li.hasClass(o.selectedClass) && !o.unselect)
- || $li.hasClass(o.disabledClass)
- || $(this).hasClass(o.loadingClass)
- || $(self.element).triggerHandler('tabsselect', [self.fakeEvent('tabsselect'), self.ui(this, $show[0])], o.select) === false
- ) {
+ if (($li.hasClass('ui-tabs-selected') && !o.collapsible) ||
+ $li.hasClass('ui-state-disabled') ||
+ $li.hasClass('ui-state-processing') ||
+ self._trigger('select', null, self._ui(this, $show[0])) === false) {
this.blur();
return false;
}
- self.options.selected = self.$tabs.index(this);
+ o.selected = self.anchors.index(this);
+
+ self.abort();
// if tab may be closed
- if (o.unselect) {
- if ($li.hasClass(o.selectedClass)) {
- self.options.selected = null;
- $li.removeClass(o.selectedClass);
- self.$panels.stop();
- hideTab(this, $hide);
+ if (o.collapsible) {
+ if ($li.hasClass('ui-tabs-selected')) {
+ o.selected = -1;
+
+ if (o.cookie) {
+ self._cookie(o.selected, o.cookie);
+ }
+
+ self.element.queue("tabs", function() {
+ hideTab(el, $hide);
+ }).dequeue("tabs");
+
this.blur();
return false;
- } else if (!$hide.length) {
- self.$panels.stop();
- var a = this;
- self.load(self.$tabs.index(this), function() {
- $li.addClass(o.selectedClass).addClass(o.unselectClass);
- showTab(a, $show);
+ }
+ else if (!$hide.length) {
+ if (o.cookie) {
+ self._cookie(o.selected, o.cookie);
+ }
+
+ self.element.queue("tabs", function() {
+ showTab(el, $show);
});
+
+ self.load(self.anchors.index(this)); // TODO make passing in node possible, see also http://dev.jqueryui.com/ticket/3171
+
this.blur();
return false;
}
}
- if (o.cookie)
- $.cookie('ui-tabs' + $.data(self.element), self.options.selected, o.cookie);
-
- // stop possibly running animations
- self.$panels.stop();
+ if (o.cookie) {
+ self._cookie(o.selected, o.cookie);
+ }
// show new tab
if ($show.length) {
-
- // prevent scrollbar scrolling to 0 and than back in IE7, happens only if bookmarking/history is enabled
- /*if ($.browser.msie && o.bookmarkable) {
- var showId = this.hash.replace('#', '');
- $show.attr('id', '');
- setTimeout(function() {
- $show.attr('id', showId); // restore id
- }, 0);
- }*/
-
- var a = this;
- self.load(self.$tabs.index(this), $hide.length ?
- function() {
- switchTab(a, $li, $hide, $show);
- } :
- function() {
- $li.addClass(o.selectedClass);
- showTab(a, $show);
- }
- );
-
- // Set scrollbar to saved position - need to use timeout with 0 to prevent browser scroll to target of hash
- /*var scrollX = window.pageXOffset || document.documentElement && document.documentElement.scrollLeft || document.body.scrollLeft || 0;
- var scrollY = window.pageYOffset || document.documentElement && document.documentElement.scrollTop || document.body.scrollTop || 0;
- setTimeout(function() {
- scrollTo(scrollX, scrollY);
- }, 0);*/
-
- } else
+ if ($hide.length) {
+ self.element.queue("tabs", function() {
+ hideTab(el, $hide);
+ });
+ }
+ self.element.queue("tabs", function() {
+ showTab(el, $show);
+ });
+
+ self.load(self.anchors.index(this));
+ }
+ else {
throw 'jQuery UI Tabs: Mismatching fragment identifier.';
+ }
// Prevent IE from keeping other link focussed when using the back button
- // and remove dotted border from clicked link. This is controlled in modern
- // browsers via CSS, also blur removes focus from address bar in Firefox
- // which can become a usability and annoying problem with tabsRotate.
- if ($.browser.msie)
+ // and remove dotted border from clicked link. This is controlled via CSS
+ // in modern browsers; blur() removes focus from address bar in Firefox
+ // which can become a usability and annoying problem with tabs('rotate').
+ if ($.browser.msie) {
this.blur();
+ }
+
+ });
+
+ // disable click in any case
+ this.anchors.bind('click.tabs', function(){return false;});
+
+ },
- //return o.bookmarkable && !!trueClick; // convert trueClick == undefined to Boolean required in IE
- return false;
+ destroy: function() {
+ var o = this.options;
+
+ this.abort();
+
+ this.element.unbind('.tabs')
+ .removeClass('ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible')
+ .removeData('tabs');
+ this.list.removeClass('ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all');
+
+ this.anchors.each(function() {
+ var href = $.data(this, 'href.tabs');
+ if (href) {
+ this.href = href;
+ }
+ var $this = $(this).unbind('.tabs');
+ $.each(['href', 'load', 'cache'], function(i, prefix) {
+ $this.removeData(prefix + '.tabs');
+ });
});
- // disable click if event is configured to something else
- if (!(/^click/).test(o.event))
- this.$tabs.bind('click.tabs', function() { return false; });
+ this.lis.unbind('.tabs').add(this.panels).each(function() {
+ if ($.data(this, 'destroy.tabs')) {
+ $(this).remove();
+ }
+ else {
+ $(this).removeClass([
+ 'ui-state-default',
+ 'ui-corner-top',
+ 'ui-tabs-selected',
+ 'ui-state-active',
+ 'ui-state-hover',
+ 'ui-state-focus',
+ 'ui-state-disabled',
+ 'ui-tabs-panel',
+ 'ui-widget-content',
+ 'ui-corner-bottom',
+ 'ui-tabs-hide'
+ ].join(' '));
+ }
+ });
+ if (o.cookie) {
+ this._cookie(null, o.cookie);
+ }
},
+
add: function(url, label, index) {
- if (index == undefined)
- index = this.$tabs.length; // append by default
+ if (index === undefined) {
+ index = this.anchors.length; // append by default
+ }
- var o = this.options;
- var $li = $(o.tabTemplate.replace(/#\{href\}/g, url).replace(/#\{label\}/g, label));
- $li.data('destroy.tabs', true);
+ var self = this, o = this.options,
+ $li = $(o.tabTemplate.replace(/#\{href\}/g, url).replace(/#\{label\}/g, label)),
+ id = !url.indexOf('#') ? url.replace('#', '') : this._tabId($('a', $li)[0]);
- var id = url.indexOf('#') == 0 ? url.replace('#', '') : this.tabId( $('a:first-child', $li)[0] );
+ $li.addClass('ui-state-default ui-corner-top').data('destroy.tabs', true);
// try to find an existing element before creating a new one
var $panel = $('#' + id);
if (!$panel.length) {
- $panel = $(o.panelTemplate).attr('id', id)
- .addClass(o.hideClass)
- .data('destroy.tabs', true);
+ $panel = $(o.panelTemplate).attr('id', id).data('destroy.tabs', true);
}
- $panel.addClass(o.panelClass);
- if (index >= this.$lis.length) {
- $li.appendTo(this.element);
- $panel.appendTo(this.element[0].parentNode);
- } else {
- $li.insertBefore(this.$lis[index]);
- $panel.insertBefore(this.$panels[index]);
+ $panel.addClass('ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide');
+
+ if (index >= this.lis.length) {
+ $li.appendTo(this.list);
+ $panel.appendTo(this.list[0].parentNode);
}
-
+ else {
+ $li.insertBefore(this.lis[index]);
+ $panel.insertBefore(this.panels[index]);
+ }
+
o.disabled = $.map(o.disabled,
- function(n, i) { return n >= index ? ++n : n });
-
- this.tabify();
-
- if (this.$tabs.length == 1) {
- $li.addClass(o.selectedClass);
- $panel.removeClass(o.hideClass);
- var href = $.data(this.$tabs[0], 'load.tabs');
- if (href)
- this.load(index, href);
+ function(n, i) { return n >= index ? ++n : n; });
+
+ this._tabify();
+
+ if (this.anchors.length == 1) { // after tabify
+ $li.addClass('ui-tabs-selected ui-state-active');
+ $panel.removeClass('ui-tabs-hide');
+ this.element.queue("tabs", function() {
+ self._trigger('show', null, self._ui(self.anchors[0], self.panels[0]));
+ });
+
+ this.load(0);
}
// callback
- this.element.triggerHandler('tabsadd',
- [this.fakeEvent('tabsadd'), this.ui(this.$tabs[index], this.$panels[index])], o.add
- );
+ this._trigger('add', null, this._ui(this.anchors[index], this.panels[index]));
},
+
remove: function(index) {
- var o = this.options, $li = this.$lis.eq(index).remove(),
- $panel = this.$panels.eq(index).remove();
+ var o = this.options, $li = this.lis.eq(index).remove(),
+ $panel = this.panels.eq(index).remove();
// If selected tab was removed focus tab to the right or
// in case the last tab was removed the tab to the left.
- if ($li.hasClass(o.selectedClass) && this.$tabs.length > 1)
- this.select(index + (index + 1 < this.$tabs.length ? 1 : -1));
+ if ($li.hasClass('ui-tabs-selected') && this.anchors.length > 1) {
+ this.select(index + (index + 1 < this.anchors.length ? 1 : -1));
+ }
o.disabled = $.map($.grep(o.disabled, function(n, i) { return n != index; }),
- function(n, i) { return n >= index ? --n : n });
+ function(n, i) { return n >= index ? --n : n; });
- this.tabify();
+ this._tabify();
// callback
- this.element.triggerHandler('tabsremove',
- [this.fakeEvent('tabsremove'), this.ui($li.find('a')[0], $panel[0])], o.remove
- );
+ this._trigger('remove', null, this._ui($li.find('a')[0], $panel[0]));
},
+
enable: function(index) {
var o = this.options;
- if ($.inArray(index, o.disabled) == -1)
+ if ($.inArray(index, o.disabled) == -1) {
return;
-
- var $li = this.$lis.eq(index).removeClass(o.disabledClass);
- if ($.browser.safari) { // fix disappearing tab (that used opacity indicating disabling) after enabling in Safari 2...
- $li.css('display', 'inline-block');
- setTimeout(function() {
- $li.css('display', 'block');
- }, 0);
}
+ this.lis.eq(index).removeClass('ui-state-disabled');
o.disabled = $.grep(o.disabled, function(n, i) { return n != index; });
// callback
- this.element.triggerHandler('tabsenable',
- [this.fakeEvent('tabsenable'), this.ui(this.$tabs[index], this.$panels[index])], o.enable
- );
-
+ this._trigger('enable', null, this._ui(this.anchors[index], this.panels[index]));
},
+
disable: function(index) {
var self = this, o = this.options;
if (index != o.selected) { // cannot disable already selected tab
- this.$lis.eq(index).addClass(o.disabledClass);
+ this.lis.eq(index).addClass('ui-state-disabled');
o.disabled.push(index);
o.disabled.sort();
// callback
- this.element.triggerHandler('tabsdisable',
- [this.fakeEvent('tabsdisable'), this.ui(this.$tabs[index], this.$panels[index])], o.disable
- );
+ this._trigger('disable', null, this._ui(this.anchors[index], this.panels[index]));
}
},
+
select: function(index) {
- if (typeof index == 'string')
- index = this.$tabs.index( this.$tabs.filter('[href$=' + index + ']')[0] );
- this.$tabs.eq(index).trigger(this.options.event);
+ if (typeof index == 'string') {
+ index = this.anchors.index(this.anchors.filter('[href$=' + index + ']'));
+ }
+ else if (index === null) { // usage of null is deprecated, TODO remove in next release
+ index = -1;
+ }
+ if (index == -1 && this.options.collapsible) {
+ index = this.options.selected;
+ }
+
+ this.anchors.eq(index).trigger(this.options.event + '.tabs');
},
- load: function(index, callback) { // callback is for internal usage only
-
- var self = this, o = this.options, $a = this.$tabs.eq(index), a = $a[0],
- bypassCache = callback == undefined || callback === false, url = $a.data('load.tabs');
- callback = callback || function() {};
-
- // no remote or from cache - just finish with callback
- if (!url || !bypassCache && $.data(a, 'cache.tabs')) {
- callback();
+ load: function(index) {
+ var self = this, o = this.options, a = this.anchors.eq(index)[0], url = $.data(a, 'load.tabs');
+
+ this.abort();
+
+ // not remote or from cache
+ if (!url || this.element.queue("tabs").length !== 0 && $.data(a, 'cache.tabs')) {
+ this.element.dequeue("tabs");
return;
}
// load remote from here on
-
- var inner = function(parent) {
- var $parent = $(parent), $inner = $parent.find('*:last');
- return $inner.length && $inner.is(':not(img)') && $inner || $parent;
- };
- var cleanup = function() {
- self.$tabs.filter('.' + o.loadingClass).removeClass(o.loadingClass)
- .each(function() {
- if (o.spinner)
- inner(this).parent().html(inner(this).data('label.tabs'));
- });
- self.xhr = null;
- };
-
+ this.lis.eq(index).addClass('ui-state-processing');
+
if (o.spinner) {
- var label = inner(a).html();
- inner(a).wrapInner('<em></em>')
- .find('em').data('label.tabs', label).html(o.spinner);
+ var span = $('span', a);
+ span.data('label.tabs', span.html()).html(o.spinner);
}
- var ajaxOptions = $.extend({}, o.ajaxOptions, {
+ this.xhr = $.ajax($.extend({}, o.ajaxOptions, {
url: url,
success: function(r, s) {
- $(a.hash).html(r);
- cleanup();
-
- if (o.cache)
+ $(self._sanitizeSelector(a.hash)).html(r);
+
+ // take care of tab labels
+ self._cleanup();
+
+ if (o.cache) {
$.data(a, 'cache.tabs', true); // if loaded once do not load them again
+ }
// callbacks
- $(self.element).triggerHandler('tabsload',
- [self.fakeEvent('tabsload'), self.ui(self.$tabs[index], self.$panels[index])], o.load
- );
- o.ajaxOptions.success && o.ajaxOptions.success(r, s);
-
- // This callback is required because the switch has to take
- // place after loading has completed. Call last in order to
- // fire load before show callback...
- callback();
+ self._trigger('load', null, self._ui(self.anchors[index], self.panels[index]));
+ try {
+ o.ajaxOptions.success(r, s);
+ }
+ catch (e) {}
+
+ // last, so that load event is fired before show...
+ self.element.dequeue("tabs");
}
- });
+ }));
+ },
+
+ abort: function() {
+ // stop possibly running animations
+ this.element.queue([]);
+ this.panels.stop(false, true);
+
+ // terminate pending requests from other tabs
if (this.xhr) {
- // terminate pending requests from other tabs and restore tab label
this.xhr.abort();
- cleanup();
+ delete this.xhr;
}
- $a.addClass(o.loadingClass);
- setTimeout(function() { // timeout is again required in IE, "wait" for id being restored
- self.xhr = $.ajax(ajaxOptions);
- }, 0);
+
+ // take care of tab labels
+ this._cleanup();
},
+
url: function(index, url) {
- this.$tabs.eq(index).removeData('cache.tabs').data('load.tabs', url);
+ this.anchors.eq(index).removeData('cache.tabs').data('load.tabs', url);
},
- destroy: function() {
- var o = this.options;
- this.element.unbind('.tabs')
- .removeClass(o.navClass).removeData('tabs');
- this.$tabs.each(function() {
- var href = $.data(this, 'href.tabs');
- if (href)
- this.href = href;
- var $this = $(this).unbind('.tabs');
- $.each(['href', 'load', 'cache'], function(i, prefix) {
- $this.removeData(prefix + '.tabs');
- });
- });
- this.$lis.add(this.$panels).each(function() {
- if ($.data(this, 'destroy.tabs'))
- $(this).remove();
- else
- $(this).removeClass([o.selectedClass, o.unselectClass,
- o.disabledClass, o.panelClass, o.hideClass].join(' '));
- });
- },
- fakeEvent: function(type) {
- return $.event.fix({
- type: type,
- target: this.element[0]
- });
+
+ length: function() {
+ return this.anchors.length;
}
+
});
-$.ui.tabs.defaults = {
- // basic setup
- unselect: false,
- event: 'click',
- disabled: [],
- cookie: null, // e.g. { expires: 7, path: '/', domain: 'jquery.com', secure: true }
- // TODO history: false,
-
- // Ajax
- spinner: 'Loading&#8230;',
- cache: false,
- idPrefix: 'ui-tabs-',
- ajaxOptions: {},
-
- // animations
- fx: null, // e.g. { height: 'toggle', opacity: 'toggle', duration: 200 }
-
- // templates
- tabTemplate: '<li><a href="#{href}"><span>#{label}</span></a></li>',
- panelTemplate: '<div></div>',
-
- // CSS classes
- navClass: 'ui-tabs-nav',
- selectedClass: 'ui-tabs-selected',
- unselectClass: 'ui-tabs-unselect',
- disabledClass: 'ui-tabs-disabled',
- panelClass: 'ui-tabs-panel',
- hideClass: 'ui-tabs-hide',
- loadingClass: 'ui-tabs-loading'
-};
-
-$.ui.tabs.getter = "length";
+$.extend($.ui.tabs, {
+ version: '1.7.2',
+ getter: 'length',
+ defaults: {
+ ajaxOptions: null,
+ cache: false,
+ cookie: null, // e.g. { expires: 7, path: '/', domain: 'jquery.com', secure: true }
+ collapsible: false,
+ disabled: [],
+ event: 'click',
+ fx: null, // e.g. { height: 'toggle', opacity: 'toggle', duration: 200 }
+ idPrefix: 'ui-tabs-',
+ panelTemplate: '<div></div>',
+ spinner: '<em>Loading&#8230;</em>',
+ tabTemplate: '<li><a href="#{href}"><span>#{label}</span></a></li>'
+ }
+});
/*
* Tabs Extensions
@@ -558,40 +639,45 @@ $.ui.tabs.getter = "length";
$.extend($.ui.tabs.prototype, {
rotation: null,
rotate: function(ms, continuing) {
+
+ var self = this, o = this.options;
- continuing = continuing || false;
-
- var self = this, t = this.options.selected;
-
- function start() {
- self.rotation = setInterval(function() {
- t = ++t < self.$tabs.length ? t : 0;
- self.select(t);
- }, ms);
- }
-
- function stop(e) {
- if (!e || e.clientX) { // only in case of a true click
- clearInterval(self.rotation);
+ var rotate = self._rotate || (self._rotate = function(e) {
+ clearTimeout(self.rotation);
+ self.rotation = setTimeout(function() {
+ var t = o.selected;
+ self.select( ++t < self.anchors.length ? t : 0 );
+ }, ms);
+
+ if (e) {
+ e.stopPropagation();
}
- }
+ });
- // start interval
+ var stop = self._unrotate || (self._unrotate = !continuing ?
+ function(e) {
+ if (e.clientX) { // in case of a true click
+ self.rotate(null);
+ }
+ } :
+ function(e) {
+ t = o.selected;
+ rotate();
+ });
+
+ // start rotation
if (ms) {
- start();
- if (!continuing)
- this.$tabs.bind(this.options.event, stop);
- else
- this.$tabs.bind(this.options.event, function() {
- stop();
- t = self.options.selected;
- start();
- });
+ this.element.bind('tabsshow', rotate);
+ this.anchors.bind(o.event + '.tabs', stop);
+ rotate();
}
- // stop interval
+ // stop rotation
else {
- stop();
- this.$tabs.unbind(this.options.event, stop);
+ clearTimeout(self.rotation);
+ this.element.unbind('tabsshow', rotate);
+ this.anchors.unbind(o.event + '.tabs', stop);
+ delete this._rotate;
+ delete this._unrotate;
}
}
});