Update jQuery to 1.5 and jQuery UI to 1.8.9
git-svn-id: http://piwigo.org/svn/trunk@9172 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
1d6681d9b0
commit
d37ec3ddfd
222 changed files with 25066 additions and 5314 deletions
|
@ -1,5 +1,5 @@
|
|||
{combine_script id='jquery.ui' load='header' require='jquery' path='themes/default/js/ui/packed/ui.core.packed.js' }
|
||||
{combine_script id='jquery.ui.accordion' load='header' require='jquery.ui' path='themes/default/js/ui/packed/ui.accordion.packed.js' }
|
||||
{combine_script id='jquery.ui' load='header' require='jquery' path='themes/default/js/jquery.ui.min.js' }
|
||||
{combine_script id='jquery.ui.accordion' load='header' require='jquery.ui' path='themes/default/js/ui/minified/jquery.ui.accordion.min.js' }
|
||||
{footer_script require='jquery.ui.accordion'}
|
||||
jQuery(document).ready(function(){ldelim}
|
||||
jQuery('#menubar').accordion({ldelim}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{combine_script id='jquery.ui' load='async' require='jquery' path='themes/default/js/ui/packed/ui.core.packed.js' }
|
||||
{combine_script id='jquery.ui.sortable' load='async' require='jquery.ui' path='themes/default/js/ui/packed/ui.sortable.packed.js' }
|
||||
{combine_script id='jquery.ui' load='async' require='jquery' path='themes/default/js/jquery.ui.min.js' }
|
||||
{combine_script id='jquery.ui.sortable' load='async' require='jquery.ui' path='themes/default/js/ui/minified/jquery.ui.sortable.min.js' }
|
||||
{footer_script require='jquery.ui.sortable'}
|
||||
jQuery(document).ready(function(){ldelim}
|
||||
jQuery(".catPos").hide();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{combine_script id='jquery.ui' load='async' require='jquery' path='themes/default/js/ui/packed/ui.core.packed.js' }
|
||||
{combine_script id='jquery.ui.sortable' load='async' require='jquery.ui' path='themes/default/js/ui/packed/ui.sortable.packed.js' }
|
||||
{combine_script id='jquery.ui' load='async' require='jquery' path='themes/default/js/jquery.ui.min.js' }
|
||||
{combine_script id='jquery.ui.sortable' load='async' require='jquery.ui' path='themes/default/js/ui/minified/jquery.ui.sortable.min.js' }
|
||||
{footer_script require='jquery.ui.sortable'}{literal}
|
||||
jQuery(document).ready(function() {
|
||||
function checkOrderOptions() {
|
||||
|
|
|
@ -1,17 +1,15 @@
|
|||
{combine_script id='jquery' load='footer' path='themes/default/js/jquery.min.js'}
|
||||
{combine_script id='jquery.ui' load='footer' require='jquery' path='themes/default/js/ui/packed/ui.core.packed.js'}
|
||||
{combine_script id='jquery.ui.datepicker' load='footer' require='jquery.ui' path='themes/default/js/ui/packed/ui.datepicker.packed.js'}
|
||||
{combine_script id='jquery.ui' load='footer' require='jquery' path='themes/default/js/jquery.ui.min.js'}
|
||||
{combine_script id='jquery.ui.datepicker' load='footer' require='jquery.ui' path='themes/default/js/ui/minified/jquery.ui.datepicker.min.js'}
|
||||
{combine_script id='datepicker.js' load='footer' require='jquery.ui.datepicker' path='themes/default/js/datepicker.js'}
|
||||
|
||||
{assign var="datepicker_language" value="themes/default/js/ui/i18n/ui.datepicker-`$lang_info.code`.js"}
|
||||
{assign var="datepicker_language" value="themes/default/js/ui/i18n/jquery.ui.datepicker-`$lang_info.code`.js"}
|
||||
|
||||
{if "PHPWG_ROOT_PATH"|@constant|@cat:$datepicker_language|@file_exists}
|
||||
{combine_script id="jquery.ui.datepicker-$lang_info.code" load='footer' path=$datepicker_language}
|
||||
{/if}
|
||||
|
||||
{html_head}
|
||||
<link rel="stylesheet" type="text/css" href="{$ROOT_URL}themes/default/js/ui/theme/ui.datepicker.css">
|
||||
{/html_head}
|
||||
{combine_css path="themes/default/js/ui/theme/jquery.ui.datepicker.css"}
|
||||
|
||||
{footer_script}
|
||||
function pwg_initialization_datepicker(day, month, year, linked_date, checked_on_change, min_linked_date, max_linked_date)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{combine_script id='jquery' load='async' path='themes/default/js/jquery.min.js'}
|
||||
{combine_script id='jquery.ui' load='async' require='jquery' path='themes/default/js/ui/packed/ui.core.packed.js' }
|
||||
{combine_script id='jquery.ui.resizable' load='async' require='jquery.ui' path='themes/default/js/ui/packed/ui.resizable.packed.js' }
|
||||
{combine_script id='jquery.ui' load='async' require='jquery' path='themes/default/js/jquery.ui.min.js' }
|
||||
{combine_script id='jquery.ui.resizable' load='async' require='jquery.ui' path='themes/default/js/ui/minified/jquery.ui.resizable.min.js' }
|
||||
{footer_script require='jquery.ui.resizable'}{literal}
|
||||
jQuery(document).ready(function(){
|
||||
// Resize possible for double select list
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{combine_script id='jquery' load='async' path='themes/default/js/jquery.min.js'}
|
||||
{combine_script id='jquery.ui' load='async' require='jquery' path='themes/default/js/ui/packed/ui.core.packed.js'}
|
||||
{combine_script id='jquery.ui.resizable' load='async' require='jquery.ui' path='themes/default/js/ui/packed/ui.resizable.packed.js'}
|
||||
{combine_script id='jquery.ui' load='async' require='jquery' path='themes/default/js/jquery.ui.min.js'}
|
||||
{combine_script id='jquery.ui.resizable' load='async' require='jquery.ui' path='themes/default/js/ui/minified/jquery.ui.resizable.min.js'}
|
||||
|
||||
{* Resize possible *}
|
||||
{footer_script require='jquery.ui.resizable'}{literal}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{combine_script id='jquery.ui' load='async' require='jquery' path='themes/default/js/ui/packed/ui.core.packed.js' }
|
||||
{combine_script id='jquery.ui.sortable' load='async' require='jquery.ui' path='themes/default/js/ui/packed/ui.sortable.packed.js' }
|
||||
{combine_script id='jquery.ui' load='async' require='jquery' path='themes/default/js/jquery.ui.min.js' }
|
||||
{combine_script id='jquery.ui.sortable' load='async' require='jquery.ui' path='themes/default/js/ui/minified/jquery.ui.sortable.min.js' }
|
||||
{footer_script require='jquery.ui.sortable'}
|
||||
jQuery(document).ready(function(){ldelim}
|
||||
jQuery(".menuPos").hide();
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{combine_script id='jquery.ui' load='async' require='jquery' path='themes/default/js/ui/packed/ui.core.packed.js' }
|
||||
{combine_script id='jquery.ui.effects' load='async' require='jquery.ui' path='themes/default/js/ui/packed/effects.core.packed.js' }
|
||||
{combine_script id='jquery.ui.effects.blind' load='async' require='jquery.ui.effects' path='themes/default/js/ui/packed/effects.blind.packed.js' }
|
||||
{combine_script id='jquery.ui' load='async' require='jquery' path='themes/default/js/jquery.ui.min.js' }
|
||||
{combine_script id='jquery.ui.effects' load='async' require='jquery.ui' path='themes/default/js/ui/minified/jquery.effects.core.min.js' }
|
||||
{combine_script id='jquery.ui.effects.blind' load='async' require='jquery.ui.effects' path='themes/default/js/ui/minified/jquery.effects.blind.min.js' }
|
||||
|
||||
{footer_script require='jquery.ui.effects.blind'}
|
||||
jQuery(document).ready(function(){ldelim}
|
||||
|
|
|
@ -902,7 +902,7 @@ class ScriptLoader
|
|||
private static $known_paths = array(
|
||||
'core.scripts' => 'themes/default/js/scripts.js',
|
||||
'jquery' => 'themes/default/js/jquery.min.js',
|
||||
'jquery.ui' => 'themes/default/js/ui/packed/ui.core.packed.js'
|
||||
'jquery.ui' => 'themes/default/js/jquery.ui.min.js'
|
||||
);
|
||||
|
||||
function __construct()
|
||||
|
|
2825
themes/default/js/jquery.js
vendored
2825
themes/default/js/jquery.js
vendored
File diff suppressed because it is too large
Load diff
161
themes/default/js/jquery.min.js
vendored
161
themes/default/js/jquery.min.js
vendored
File diff suppressed because one or more lines are too long
951
themes/default/js/jquery.ui.js
Normal file
951
themes/default/js/jquery.ui.js
Normal file
|
@ -0,0 +1,951 @@
|
|||
/*!
|
||||
* jQuery UI 1.8.9
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI
|
||||
*/
|
||||
|
||||
/* BEGIN jquery.ui.core.js */
|
||||
(function( $, undefined ) {
|
||||
|
||||
// prevent duplicate loading
|
||||
// this is only a problem because we proxy existing functions
|
||||
// and we don't want to double proxy them
|
||||
$.ui = $.ui || {};
|
||||
if ( $.ui.version ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$.extend( $.ui, {
|
||||
version: "1.8.9",
|
||||
|
||||
keyCode: {
|
||||
ALT: 18,
|
||||
BACKSPACE: 8,
|
||||
CAPS_LOCK: 20,
|
||||
COMMA: 188,
|
||||
COMMAND: 91,
|
||||
COMMAND_LEFT: 91, // COMMAND
|
||||
COMMAND_RIGHT: 93,
|
||||
CONTROL: 17,
|
||||
DELETE: 46,
|
||||
DOWN: 40,
|
||||
END: 35,
|
||||
ENTER: 13,
|
||||
ESCAPE: 27,
|
||||
HOME: 36,
|
||||
INSERT: 45,
|
||||
LEFT: 37,
|
||||
MENU: 93, // COMMAND_RIGHT
|
||||
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,
|
||||
WINDOWS: 91 // COMMAND
|
||||
}
|
||||
});
|
||||
|
||||
// plugins
|
||||
$.fn.extend({
|
||||
_focus: $.fn.focus,
|
||||
focus: function( delay, fn ) {
|
||||
return typeof delay === "number" ?
|
||||
this.each(function() {
|
||||
var elem = this;
|
||||
setTimeout(function() {
|
||||
$( elem ).focus();
|
||||
if ( fn ) {
|
||||
fn.call( elem );
|
||||
}
|
||||
}, delay );
|
||||
}) :
|
||||
this._focus.apply( this, arguments );
|
||||
},
|
||||
|
||||
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;
|
||||
},
|
||||
|
||||
zIndex: function( zIndex ) {
|
||||
if ( zIndex !== undefined ) {
|
||||
return this.css( "zIndex", zIndex );
|
||||
}
|
||||
|
||||
if ( this.length ) {
|
||||
var elem = $( this[ 0 ] ), position, value;
|
||||
while ( elem.length && elem[ 0 ] !== document ) {
|
||||
// Ignore z-index if position is set to a value where z-index is ignored by the browser
|
||||
// This makes behavior of this function consistent across browsers
|
||||
// WebKit always returns auto if the element is positioned
|
||||
position = elem.css( "position" );
|
||||
if ( position === "absolute" || position === "relative" || position === "fixed" ) {
|
||||
// IE returns 0 when zIndex is not specified
|
||||
// other browsers return a string
|
||||
// we ignore the case of nested elements with an explicit value of 0
|
||||
// <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
|
||||
value = parseInt( elem.css( "zIndex" ), 10 );
|
||||
if ( !isNaN( value ) && value !== 0 ) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
elem = elem.parent();
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
},
|
||||
|
||||
disableSelection: function() {
|
||||
return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) +
|
||||
".ui-disableSelection", function( event ) {
|
||||
event.preventDefault();
|
||||
});
|
||||
},
|
||||
|
||||
enableSelection: function() {
|
||||
return this.unbind( ".ui-disableSelection" );
|
||||
}
|
||||
});
|
||||
|
||||
$.each( [ "Width", "Height" ], function( i, name ) {
|
||||
var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
|
||||
type = name.toLowerCase(),
|
||||
orig = {
|
||||
innerWidth: $.fn.innerWidth,
|
||||
innerHeight: $.fn.innerHeight,
|
||||
outerWidth: $.fn.outerWidth,
|
||||
outerHeight: $.fn.outerHeight
|
||||
};
|
||||
|
||||
function reduce( elem, size, border, margin ) {
|
||||
$.each( side, function() {
|
||||
size -= parseFloat( $.curCSS( elem, "padding" + this, true) ) || 0;
|
||||
if ( border ) {
|
||||
size -= parseFloat( $.curCSS( elem, "border" + this + "Width", true) ) || 0;
|
||||
}
|
||||
if ( margin ) {
|
||||
size -= parseFloat( $.curCSS( elem, "margin" + this, true) ) || 0;
|
||||
}
|
||||
});
|
||||
return size;
|
||||
}
|
||||
|
||||
$.fn[ "inner" + name ] = function( size ) {
|
||||
if ( size === undefined ) {
|
||||
return orig[ "inner" + name ].call( this );
|
||||
}
|
||||
|
||||
return this.each(function() {
|
||||
$( this ).css( type, reduce( this, size ) + "px" );
|
||||
});
|
||||
};
|
||||
|
||||
$.fn[ "outer" + name] = function( size, margin ) {
|
||||
if ( typeof size !== "number" ) {
|
||||
return orig[ "outer" + name ].call( this, size );
|
||||
}
|
||||
|
||||
return this.each(function() {
|
||||
$( this).css( type, reduce( this, size, true, margin ) + "px" );
|
||||
});
|
||||
};
|
||||
});
|
||||
|
||||
// selectors
|
||||
function visible( element ) {
|
||||
return !$( element ).parents().andSelf().filter(function() {
|
||||
return $.curCSS( this, "visibility" ) === "hidden" ||
|
||||
$.expr.filters.hidden( this );
|
||||
}).length;
|
||||
}
|
||||
|
||||
$.extend( $.expr[ ":" ], {
|
||||
data: function( elem, i, match ) {
|
||||
return !!$.data( elem, match[ 3 ] );
|
||||
},
|
||||
|
||||
focusable: function( element ) {
|
||||
var nodeName = element.nodeName.toLowerCase(),
|
||||
tabIndex = $.attr( element, "tabindex" );
|
||||
if ( "area" === nodeName ) {
|
||||
var map = element.parentNode,
|
||||
mapName = map.name,
|
||||
img;
|
||||
if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
|
||||
return false;
|
||||
}
|
||||
img = $( "img[usemap=#" + mapName + "]" )[0];
|
||||
return !!img && visible( img );
|
||||
}
|
||||
return ( /input|select|textarea|button|object/.test( nodeName )
|
||||
? !element.disabled
|
||||
: "a" == nodeName
|
||||
? element.href || !isNaN( tabIndex )
|
||||
: !isNaN( tabIndex ))
|
||||
// the element and all of its ancestors must be visible
|
||||
&& visible( element );
|
||||
},
|
||||
|
||||
tabbable: function( element ) {
|
||||
var tabIndex = $.attr( element, "tabindex" );
|
||||
return ( isNaN( tabIndex ) || tabIndex >= 0 ) && $( element ).is( ":focusable" );
|
||||
}
|
||||
});
|
||||
|
||||
// support
|
||||
$(function() {
|
||||
var body = document.body,
|
||||
div = body.appendChild( div = document.createElement( "div" ) );
|
||||
|
||||
$.extend( div.style, {
|
||||
minHeight: "100px",
|
||||
height: "auto",
|
||||
padding: 0,
|
||||
borderWidth: 0
|
||||
});
|
||||
|
||||
$.support.minHeight = div.offsetHeight === 100;
|
||||
$.support.selectstart = "onselectstart" in div;
|
||||
|
||||
// set display to none to avoid a layout bug in IE
|
||||
// http://dev.jquery.com/ticket/4014
|
||||
body.removeChild( div ).style.display = "none";
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// deprecated
|
||||
$.extend( $.ui, {
|
||||
// $.ui.plugin is deprecated. Use the proxy pattern instead.
|
||||
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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// will be deprecated when we switch to jQuery 1.4 - use jQuery.contains()
|
||||
contains: function( a, b ) {
|
||||
return document.compareDocumentPosition ?
|
||||
a.compareDocumentPosition( b ) & 16 :
|
||||
a !== b && a.contains( b );
|
||||
},
|
||||
|
||||
// only used by resizable
|
||||
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;
|
||||
},
|
||||
|
||||
// these are odd functions, fix the API or move into individual plugins
|
||||
isOverAxis: function( x, reference, size ) {
|
||||
//Determines when x coordinate is over "b" element axis
|
||||
return ( x > reference ) && ( x < ( reference + size ) );
|
||||
},
|
||||
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 );
|
||||
}
|
||||
});
|
||||
|
||||
})( jQuery );
|
||||
|
||||
/* BEGIN jquery.ui.widjet.js */
|
||||
(function( $, undefined ) {
|
||||
|
||||
// jQuery 1.4+
|
||||
if ( $.cleanData ) {
|
||||
var _cleanData = $.cleanData;
|
||||
$.cleanData = function( elems ) {
|
||||
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
|
||||
$( elem ).triggerHandler( "remove" );
|
||||
}
|
||||
_cleanData( elems );
|
||||
};
|
||||
} else {
|
||||
var _remove = $.fn.remove;
|
||||
$.fn.remove = function( selector, keepData ) {
|
||||
return this.each(function() {
|
||||
if ( !keepData ) {
|
||||
if ( !selector || $.filter( selector, [ this ] ).length ) {
|
||||
$( "*", this ).add( [ this ] ).each(function() {
|
||||
$( this ).triggerHandler( "remove" );
|
||||
});
|
||||
}
|
||||
}
|
||||
return _remove.call( $(this), selector, keepData );
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
$.widget = function( name, base, prototype ) {
|
||||
var namespace = name.split( "." )[ 0 ],
|
||||
fullName;
|
||||
name = name.split( "." )[ 1 ];
|
||||
fullName = namespace + "-" + name;
|
||||
|
||||
if ( !prototype ) {
|
||||
prototype = base;
|
||||
base = $.Widget;
|
||||
}
|
||||
|
||||
// create selector for plugin
|
||||
$.expr[ ":" ][ fullName ] = function( elem ) {
|
||||
return !!$.data( elem, name );
|
||||
};
|
||||
|
||||
$[ namespace ] = $[ namespace ] || {};
|
||||
$[ namespace ][ name ] = function( options, element ) {
|
||||
// allow instantiation without initializing for simple inheritance
|
||||
if ( arguments.length ) {
|
||||
this._createWidget( options, element );
|
||||
}
|
||||
};
|
||||
|
||||
var basePrototype = new base();
|
||||
// we need to make the options hash a property directly on the new instance
|
||||
// otherwise we'll modify the options hash on the prototype that we're
|
||||
// inheriting from
|
||||
// $.each( basePrototype, function( key, val ) {
|
||||
// if ( $.isPlainObject(val) ) {
|
||||
// basePrototype[ key ] = $.extend( {}, val );
|
||||
// }
|
||||
// });
|
||||
basePrototype.options = $.extend( true, {}, basePrototype.options );
|
||||
$[ namespace ][ name ].prototype = $.extend( true, basePrototype, {
|
||||
namespace: namespace,
|
||||
widgetName: name,
|
||||
widgetEventPrefix: $[ namespace ][ name ].prototype.widgetEventPrefix || name,
|
||||
widgetBaseClass: fullName
|
||||
}, prototype );
|
||||
|
||||
$.widget.bridge( name, $[ namespace ][ name ] );
|
||||
};
|
||||
|
||||
$.widget.bridge = function( name, object ) {
|
||||
$.fn[ name ] = function( options ) {
|
||||
var isMethodCall = typeof options === "string",
|
||||
args = Array.prototype.slice.call( arguments, 1 ),
|
||||
returnValue = this;
|
||||
|
||||
// allow multiple hashes to be passed on init
|
||||
options = !isMethodCall && args.length ?
|
||||
$.extend.apply( null, [ true, options ].concat(args) ) :
|
||||
options;
|
||||
|
||||
// prevent calls to internal methods
|
||||
if ( isMethodCall && options.charAt( 0 ) === "_" ) {
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
if ( isMethodCall ) {
|
||||
this.each(function() {
|
||||
var instance = $.data( this, name ),
|
||||
methodValue = instance && $.isFunction( instance[options] ) ?
|
||||
instance[ options ].apply( instance, args ) :
|
||||
instance;
|
||||
// TODO: add this back in 1.9 and use $.error() (see #5972)
|
||||
// if ( !instance ) {
|
||||
// throw "cannot call methods on " + name + " prior to initialization; " +
|
||||
// "attempted to call method '" + options + "'";
|
||||
// }
|
||||
// if ( !$.isFunction( instance[options] ) ) {
|
||||
// throw "no such method '" + options + "' for " + name + " widget instance";
|
||||
// }
|
||||
// var methodValue = instance[ options ].apply( instance, args );
|
||||
if ( methodValue !== instance && methodValue !== undefined ) {
|
||||
returnValue = methodValue;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.each(function() {
|
||||
var instance = $.data( this, name );
|
||||
if ( instance ) {
|
||||
instance.option( options || {} )._init();
|
||||
} else {
|
||||
$.data( this, name, new object( options, this ) );
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return returnValue;
|
||||
};
|
||||
};
|
||||
|
||||
$.Widget = function( options, element ) {
|
||||
// allow instantiation without initializing for simple inheritance
|
||||
if ( arguments.length ) {
|
||||
this._createWidget( options, element );
|
||||
}
|
||||
};
|
||||
|
||||
$.Widget.prototype = {
|
||||
widgetName: "widget",
|
||||
widgetEventPrefix: "",
|
||||
options: {
|
||||
disabled: false
|
||||
},
|
||||
_createWidget: function( options, element ) {
|
||||
// $.widget.bridge stores the plugin instance, but we do it anyway
|
||||
// so that it's stored even before the _create function runs
|
||||
$.data( element, this.widgetName, this );
|
||||
this.element = $( element );
|
||||
this.options = $.extend( true, {},
|
||||
this.options,
|
||||
this._getCreateOptions(),
|
||||
options );
|
||||
|
||||
var self = this;
|
||||
this.element.bind( "remove." + this.widgetName, function() {
|
||||
self.destroy();
|
||||
});
|
||||
|
||||
this._create();
|
||||
this._trigger( "create" );
|
||||
this._init();
|
||||
},
|
||||
_getCreateOptions: function() {
|
||||
return $.metadata && $.metadata.get( this.element[0] )[ this.widgetName ];
|
||||
},
|
||||
_create: function() {},
|
||||
_init: function() {},
|
||||
|
||||
destroy: function() {
|
||||
this.element
|
||||
.unbind( "." + this.widgetName )
|
||||
.removeData( this.widgetName );
|
||||
this.widget()
|
||||
.unbind( "." + this.widgetName )
|
||||
.removeAttr( "aria-disabled" )
|
||||
.removeClass(
|
||||
this.widgetBaseClass + "-disabled " +
|
||||
"ui-state-disabled" );
|
||||
},
|
||||
|
||||
widget: function() {
|
||||
return this.element;
|
||||
},
|
||||
|
||||
option: function( key, value ) {
|
||||
var options = key;
|
||||
|
||||
if ( arguments.length === 0 ) {
|
||||
// don't return a reference to the internal hash
|
||||
return $.extend( {}, this.options );
|
||||
}
|
||||
|
||||
if (typeof key === "string" ) {
|
||||
if ( value === undefined ) {
|
||||
return this.options[ key ];
|
||||
}
|
||||
options = {};
|
||||
options[ key ] = value;
|
||||
}
|
||||
|
||||
this._setOptions( options );
|
||||
|
||||
return this;
|
||||
},
|
||||
_setOptions: function( options ) {
|
||||
var self = this;
|
||||
$.each( options, function( key, value ) {
|
||||
self._setOption( key, value );
|
||||
});
|
||||
|
||||
return this;
|
||||
},
|
||||
_setOption: function( key, value ) {
|
||||
this.options[ key ] = value;
|
||||
|
||||
if ( key === "disabled" ) {
|
||||
this.widget()
|
||||
[ value ? "addClass" : "removeClass"](
|
||||
this.widgetBaseClass + "-disabled" + " " +
|
||||
"ui-state-disabled" )
|
||||
.attr( "aria-disabled", value );
|
||||
}
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
enable: function() {
|
||||
return this._setOption( "disabled", false );
|
||||
},
|
||||
disable: function() {
|
||||
return this._setOption( "disabled", true );
|
||||
},
|
||||
|
||||
_trigger: function( type, event, data ) {
|
||||
var callback = this.options[ type ];
|
||||
|
||||
event = $.Event( event );
|
||||
event.type = ( type === this.widgetEventPrefix ?
|
||||
type :
|
||||
this.widgetEventPrefix + type ).toLowerCase();
|
||||
data = data || {};
|
||||
|
||||
// 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() );
|
||||
}
|
||||
};
|
||||
|
||||
})( jQuery );
|
||||
|
||||
/* BEGIN jquery.ui.mouse.js */
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.widget("ui.mouse", {
|
||||
options: {
|
||||
cancel: ':input,option',
|
||||
distance: 1,
|
||||
delay: 0
|
||||
},
|
||||
_mouseInit: function() {
|
||||
var self = this;
|
||||
|
||||
this.element
|
||||
.bind('mousedown.'+this.widgetName, function(event) {
|
||||
return self._mouseDown(event);
|
||||
})
|
||||
.bind('click.'+this.widgetName, function(event) {
|
||||
if (true === $.data(event.target, self.widgetName + '.preventClickEvent')) {
|
||||
$.removeData(event.target, self.widgetName + '.preventClickEvent');
|
||||
event.stopImmediatePropagation();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
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);
|
||||
},
|
||||
|
||||
_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(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;
|
||||
}
|
||||
}
|
||||
|
||||
// these delegates are required to keep context
|
||||
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);
|
||||
|
||||
event.preventDefault();
|
||||
event.originalEvent.mouseHandled = true;
|
||||
return true;
|
||||
},
|
||||
|
||||
_mouseMove: function(event) {
|
||||
// IE mouseup check - mouseup happened when mouse was out of window
|
||||
if ($.browser.msie && !(document.documentMode >= 9) && !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;
|
||||
|
||||
if (event.target == this._mouseDownEvent.target) {
|
||||
$.data(event.target, this.widgetName + '.preventClickEvent', true);
|
||||
}
|
||||
|
||||
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;
|
||||
},
|
||||
|
||||
// These are placeholder methods, to be overriden by extending plugin
|
||||
_mouseStart: function(event) {},
|
||||
_mouseDrag: function(event) {},
|
||||
_mouseStop: function(event) {},
|
||||
_mouseCapture: function(event) { return true; }
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
|
||||
/* BEGIN jquery.ui.position.js */
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.ui = $.ui || {};
|
||||
|
||||
var horizontalPositions = /left|center|right/,
|
||||
verticalPositions = /top|center|bottom/,
|
||||
center = "center",
|
||||
_position = $.fn.position,
|
||||
_offset = $.fn.offset;
|
||||
|
||||
$.fn.position = function( options ) {
|
||||
if ( !options || !options.of ) {
|
||||
return _position.apply( this, arguments );
|
||||
}
|
||||
|
||||
// make a copy, we don't want to modify arguments
|
||||
options = $.extend( {}, options );
|
||||
|
||||
var target = $( options.of ),
|
||||
targetElem = target[0],
|
||||
collision = ( options.collision || "flip" ).split( " " ),
|
||||
offset = options.offset ? options.offset.split( " " ) : [ 0, 0 ],
|
||||
targetWidth,
|
||||
targetHeight,
|
||||
basePosition;
|
||||
|
||||
if ( targetElem.nodeType === 9 ) {
|
||||
targetWidth = target.width();
|
||||
targetHeight = target.height();
|
||||
basePosition = { top: 0, left: 0 };
|
||||
// TODO: use $.isWindow() in 1.9
|
||||
} else if ( targetElem.setTimeout ) {
|
||||
targetWidth = target.width();
|
||||
targetHeight = target.height();
|
||||
basePosition = { top: target.scrollTop(), left: target.scrollLeft() };
|
||||
} else if ( targetElem.preventDefault ) {
|
||||
// force left top to allow flipping
|
||||
options.at = "left top";
|
||||
targetWidth = targetHeight = 0;
|
||||
basePosition = { top: options.of.pageY, left: options.of.pageX };
|
||||
} else {
|
||||
targetWidth = target.outerWidth();
|
||||
targetHeight = target.outerHeight();
|
||||
basePosition = target.offset();
|
||||
}
|
||||
|
||||
// force my and at to have valid horizontal and veritcal positions
|
||||
// if a value is missing or invalid, it will be converted to center
|
||||
$.each( [ "my", "at" ], function() {
|
||||
var pos = ( options[this] || "" ).split( " " );
|
||||
if ( pos.length === 1) {
|
||||
pos = horizontalPositions.test( pos[0] ) ?
|
||||
pos.concat( [center] ) :
|
||||
verticalPositions.test( pos[0] ) ?
|
||||
[ center ].concat( pos ) :
|
||||
[ center, center ];
|
||||
}
|
||||
pos[ 0 ] = horizontalPositions.test( pos[0] ) ? pos[ 0 ] : center;
|
||||
pos[ 1 ] = verticalPositions.test( pos[1] ) ? pos[ 1 ] : center;
|
||||
options[ this ] = pos;
|
||||
});
|
||||
|
||||
// normalize collision option
|
||||
if ( collision.length === 1 ) {
|
||||
collision[ 1 ] = collision[ 0 ];
|
||||
}
|
||||
|
||||
// normalize offset option
|
||||
offset[ 0 ] = parseInt( offset[0], 10 ) || 0;
|
||||
if ( offset.length === 1 ) {
|
||||
offset[ 1 ] = offset[ 0 ];
|
||||
}
|
||||
offset[ 1 ] = parseInt( offset[1], 10 ) || 0;
|
||||
|
||||
if ( options.at[0] === "right" ) {
|
||||
basePosition.left += targetWidth;
|
||||
} else if ( options.at[0] === center ) {
|
||||
basePosition.left += targetWidth / 2;
|
||||
}
|
||||
|
||||
if ( options.at[1] === "bottom" ) {
|
||||
basePosition.top += targetHeight;
|
||||
} else if ( options.at[1] === center ) {
|
||||
basePosition.top += targetHeight / 2;
|
||||
}
|
||||
|
||||
basePosition.left += offset[ 0 ];
|
||||
basePosition.top += offset[ 1 ];
|
||||
|
||||
return this.each(function() {
|
||||
var elem = $( this ),
|
||||
elemWidth = elem.outerWidth(),
|
||||
elemHeight = elem.outerHeight(),
|
||||
marginLeft = parseInt( $.curCSS( this, "marginLeft", true ) ) || 0,
|
||||
marginTop = parseInt( $.curCSS( this, "marginTop", true ) ) || 0,
|
||||
collisionWidth = elemWidth + marginLeft +
|
||||
( parseInt( $.curCSS( this, "marginRight", true ) ) || 0 ),
|
||||
collisionHeight = elemHeight + marginTop +
|
||||
( parseInt( $.curCSS( this, "marginBottom", true ) ) || 0 ),
|
||||
position = $.extend( {}, basePosition ),
|
||||
collisionPosition;
|
||||
|
||||
if ( options.my[0] === "right" ) {
|
||||
position.left -= elemWidth;
|
||||
} else if ( options.my[0] === center ) {
|
||||
position.left -= elemWidth / 2;
|
||||
}
|
||||
|
||||
if ( options.my[1] === "bottom" ) {
|
||||
position.top -= elemHeight;
|
||||
} else if ( options.my[1] === center ) {
|
||||
position.top -= elemHeight / 2;
|
||||
}
|
||||
|
||||
// prevent fractions (see #5280)
|
||||
position.left = Math.round( position.left );
|
||||
position.top = Math.round( position.top );
|
||||
|
||||
collisionPosition = {
|
||||
left: position.left - marginLeft,
|
||||
top: position.top - marginTop
|
||||
};
|
||||
|
||||
$.each( [ "left", "top" ], function( i, dir ) {
|
||||
if ( $.ui.position[ collision[i] ] ) {
|
||||
$.ui.position[ collision[i] ][ dir ]( position, {
|
||||
targetWidth: targetWidth,
|
||||
targetHeight: targetHeight,
|
||||
elemWidth: elemWidth,
|
||||
elemHeight: elemHeight,
|
||||
collisionPosition: collisionPosition,
|
||||
collisionWidth: collisionWidth,
|
||||
collisionHeight: collisionHeight,
|
||||
offset: offset,
|
||||
my: options.my,
|
||||
at: options.at
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
if ( $.fn.bgiframe ) {
|
||||
elem.bgiframe();
|
||||
}
|
||||
elem.offset( $.extend( position, { using: options.using } ) );
|
||||
});
|
||||
};
|
||||
|
||||
$.ui.position = {
|
||||
fit: {
|
||||
left: function( position, data ) {
|
||||
var win = $( window ),
|
||||
over = data.collisionPosition.left + data.collisionWidth - win.width() - win.scrollLeft();
|
||||
position.left = over > 0 ? position.left - over : Math.max( position.left - data.collisionPosition.left, position.left );
|
||||
},
|
||||
top: function( position, data ) {
|
||||
var win = $( window ),
|
||||
over = data.collisionPosition.top + data.collisionHeight - win.height() - win.scrollTop();
|
||||
position.top = over > 0 ? position.top - over : Math.max( position.top - data.collisionPosition.top, position.top );
|
||||
}
|
||||
},
|
||||
|
||||
flip: {
|
||||
left: function( position, data ) {
|
||||
if ( data.at[0] === center ) {
|
||||
return;
|
||||
}
|
||||
var win = $( window ),
|
||||
over = data.collisionPosition.left + data.collisionWidth - win.width() - win.scrollLeft(),
|
||||
myOffset = data.my[ 0 ] === "left" ?
|
||||
-data.elemWidth :
|
||||
data.my[ 0 ] === "right" ?
|
||||
data.elemWidth :
|
||||
0,
|
||||
atOffset = data.at[ 0 ] === "left" ?
|
||||
data.targetWidth :
|
||||
-data.targetWidth,
|
||||
offset = -2 * data.offset[ 0 ];
|
||||
position.left += data.collisionPosition.left < 0 ?
|
||||
myOffset + atOffset + offset :
|
||||
over > 0 ?
|
||||
myOffset + atOffset + offset :
|
||||
0;
|
||||
},
|
||||
top: function( position, data ) {
|
||||
if ( data.at[1] === center ) {
|
||||
return;
|
||||
}
|
||||
var win = $( window ),
|
||||
over = data.collisionPosition.top + data.collisionHeight - win.height() - win.scrollTop(),
|
||||
myOffset = data.my[ 1 ] === "top" ?
|
||||
-data.elemHeight :
|
||||
data.my[ 1 ] === "bottom" ?
|
||||
data.elemHeight :
|
||||
0,
|
||||
atOffset = data.at[ 1 ] === "top" ?
|
||||
data.targetHeight :
|
||||
-data.targetHeight,
|
||||
offset = -2 * data.offset[ 1 ];
|
||||
position.top += data.collisionPosition.top < 0 ?
|
||||
myOffset + atOffset + offset :
|
||||
over > 0 ?
|
||||
myOffset + atOffset + offset :
|
||||
0;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// offset setter from jQuery 1.4
|
||||
if ( !$.offset.setOffset ) {
|
||||
$.offset.setOffset = function( elem, options ) {
|
||||
// set position first, in-case top/left are set even on static elem
|
||||
if ( /static/.test( $.curCSS( elem, "position" ) ) ) {
|
||||
elem.style.position = "relative";
|
||||
}
|
||||
var curElem = $( elem ),
|
||||
curOffset = curElem.offset(),
|
||||
curTop = parseInt( $.curCSS( elem, "top", true ), 10 ) || 0,
|
||||
curLeft = parseInt( $.curCSS( elem, "left", true ), 10) || 0,
|
||||
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 );
|
||||
}
|
||||
};
|
||||
|
||||
$.fn.offset = function( options ) {
|
||||
var elem = this[ 0 ];
|
||||
if ( !elem || !elem.ownerDocument ) { return null; }
|
||||
if ( options ) {
|
||||
return this.each(function() {
|
||||
$.offset.setOffset( this, options );
|
||||
});
|
||||
}
|
||||
return _offset.call( this );
|
||||
};
|
||||
}
|
||||
|
||||
}( jQuery ));
|
43
themes/default/js/jquery.ui.min.js
vendored
Normal file
43
themes/default/js/jquery.ui.min.js
vendored
Normal file
|
@ -0,0 +1,43 @@
|
|||
/*!
|
||||
* jQuery UI 1.8.9
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI
|
||||
*/
|
||||
|
||||
/* BEGIN jquery.ui.core.min.js */
|
||||
(function(c,j){function k(a){return!c(a).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.9",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,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,WINDOWS:91}});c.fn.extend({_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d=this;setTimeout(function(){c(d).focus();b&&b.call(d)},a)}):this._focus.apply(this,arguments)},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?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):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"))||!a.length?c(document):a},zIndex:function(a){if(a!==j)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position");
|
||||
if(b==="absolute"||b==="relative"||b==="fixed"){b=parseInt(a.css("zIndex"),10);if(!isNaN(b)&&b!==0)return b}a=a.parent()}}return 0},disableSelection:function(){return this.bind((c.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});c.each(["Width","Height"],function(a,b){function d(f,g,l,m){c.each(e,function(){g-=parseFloat(c.curCSS(f,"padding"+this,true))||0;if(l)g-=parseFloat(c.curCSS(f,
|
||||
"border"+this+"Width",true))||0;if(m)g-=parseFloat(c.curCSS(f,"margin"+this,true))||0});return g}var e=b==="Width"?["Left","Right"]:["Top","Bottom"],h=b.toLowerCase(),i={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight,outerWidth:c.fn.outerWidth,outerHeight:c.fn.outerHeight};c.fn["inner"+b]=function(f){if(f===j)return i["inner"+b].call(this);return this.each(function(){c(this).css(h,d(this,f)+"px")})};c.fn["outer"+b]=function(f,g){if(typeof f!=="number")return i["outer"+b].call(this,f);return this.each(function(){c(this).css(h,
|
||||
d(this,f,true,g)+"px")})}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){var b=a.nodeName.toLowerCase(),d=c.attr(a,"tabindex");if("area"===b){b=a.parentNode;d=b.name;if(!a.href||!d||b.nodeName.toLowerCase()!=="map")return false;a=c("img[usemap=#"+d+"]")[0];return!!a&&k(a)}return(/input|select|textarea|button|object/.test(b)?!a.disabled:"a"==b?a.href||!isNaN(d):!isNaN(d))&&k(a)},tabbable:function(a){var b=c.attr(a,"tabindex");return(isNaN(b)||b>=0)&&c(a).is(":focusable")}});
|
||||
c(function(){var a=document.body,b=a.appendChild(b=document.createElement("div"));c.extend(b.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});c.support.minHeight=b.offsetHeight===100;c.support.selectstart="onselectstart"in b;a.removeChild(b).style.display="none"});c.extend(c.ui,{plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&&a.element[0].parentNode)for(var e=0;e<b.length;e++)a.options[b[e][0]]&&
|
||||
b[e][1].apply(a.element,d)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(a,b){if(c(a).css("overflow")==="hidden")return false;b=b&&b==="left"?"scrollLeft":"scrollTop";var d=false;if(a[b]>0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a<b+d},isOver:function(a,b,d,e,h,i){return c.ui.isOverAxis(a,d,h)&&c.ui.isOverAxis(b,e,i)}})}})(jQuery);
|
||||
|
||||
/* BEGIN jquery.ui.widjet.min.js */
|
||||
(function(b,j){if(b.cleanData){var k=b.cleanData;b.cleanData=function(a){for(var c=0,d;(d=a[c])!=null;c++)b(d).triggerHandler("remove");k(a)}}else{var l=b.fn.remove;b.fn.remove=function(a,c){return this.each(function(){if(!c)if(!a||b.filter(a,[this]).length)b("*",this).add([this]).each(function(){b(this).triggerHandler("remove")});return l.call(b(this),a,c)})}}b.widget=function(a,c,d){var e=a.split(".")[0],f;a=a.split(".")[1];f=e+"-"+a;if(!d){d=c;c=b.Widget}b.expr[":"][f]=function(h){return!!b.data(h,
|
||||
a)};b[e]=b[e]||{};b[e][a]=function(h,g){arguments.length&&this._createWidget(h,g)};c=new c;c.options=b.extend(true,{},c.options);b[e][a].prototype=b.extend(true,c,{namespace:e,widgetName:a,widgetEventPrefix:b[e][a].prototype.widgetEventPrefix||a,widgetBaseClass:f},d);b.widget.bridge(a,b[e][a])};b.widget.bridge=function(a,c){b.fn[a]=function(d){var e=typeof d==="string",f=Array.prototype.slice.call(arguments,1),h=this;d=!e&&f.length?b.extend.apply(null,[true,d].concat(f)):d;if(e&&d.charAt(0)==="_")return h;
|
||||
e?this.each(function(){var g=b.data(this,a),i=g&&b.isFunction(g[d])?g[d].apply(g,f):g;if(i!==g&&i!==j){h=i;return false}}):this.each(function(){var g=b.data(this,a);g?g.option(d||{})._init():b.data(this,a,new c(d,this))});return h}};b.Widget=function(a,c){arguments.length&&this._createWidget(a,c)};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(a,c){b.data(c,this.widgetName,this);this.element=b(c);this.options=b.extend(true,{},this.options,
|
||||
this._getCreateOptions(),a);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},
|
||||
widget:function(){return this.element},option:function(a,c){var d=a;if(arguments.length===0)return b.extend({},this.options);if(typeof a==="string"){if(c===j)return this.options[a];d={};d[a]=c}this._setOptions(d);return this},_setOptions:function(a){var c=this;b.each(a,function(d,e){c._setOption(d,e)});return this},_setOption:function(a,c){this.options[a]=c;if(a==="disabled")this.widget()[c?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",c);return this},
|
||||
enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(a,c,d){var e=this.options[a];c=b.Event(c);c.type=(a===this.widgetEventPrefix?a:this.widgetEventPrefix+a).toLowerCase();d=d||{};if(c.originalEvent){a=b.event.props.length;for(var f;a;){f=b.event.props[--a];c[f]=c.originalEvent[f]}}this.element.trigger(c,d);return!(b.isFunction(e)&&e.call(this.element[0],c,d)===false||c.isDefaultPrevented())}}})(jQuery);
|
||||
|
||||
/* BEGIN jquery.ui.mouse.min.js */
|
||||
(function(c){c.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var a=this;this.element.bind("mousedown."+this.widgetName,function(b){return a._mouseDown(b)}).bind("click."+this.widgetName,function(b){if(true===c.data(b.target,a.widgetName+".preventClickEvent")){c.removeData(b.target,a.widgetName+".preventClickEvent");b.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(a){a.originalEvent=
|
||||
a.originalEvent||{};if(!a.originalEvent.mouseHandled){this._mouseStarted&&this._mouseUp(a);this._mouseDownEvent=a;var b=this,e=a.which==1,f=typeof this.options.cancel=="string"?c(a.target).parents().add(a.target).filter(this.options.cancel).length:false;if(!e||f||!this._mouseCapture(a))return true;this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){b.mouseDelayMet=true},this.options.delay);if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a)){this._mouseStarted=
|
||||
this._mouseStart(a)!==false;if(!this._mouseStarted){a.preventDefault();return true}}this._mouseMoveDelegate=function(d){return b._mouseMove(d)};this._mouseUpDelegate=function(d){return b._mouseUp(d)};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);a.preventDefault();return a.originalEvent.mouseHandled=true}},_mouseMove:function(a){if(c.browser.msie&&!(document.documentMode>=9)&&!a.button)return this._mouseUp(a);if(this._mouseStarted){this._mouseDrag(a);
|
||||
return a.preventDefault()}if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,a)!==false)?this._mouseDrag(a):this._mouseUp(a);return!this._mouseStarted},_mouseUp:function(a){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;a.target==this._mouseDownEvent.target&&c.data(a.target,this.widgetName+".preventClickEvent",
|
||||
true);this._mouseStop(a)}return false},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery);
|
||||
|
||||
/* BEGIN jquery.ui.position.min.js */
|
||||
(function(c){c.ui=c.ui||{};var n=/left|center|right/,o=/top|center|bottom/,t=c.fn.position,u=c.fn.offset;c.fn.position=function(b){if(!b||!b.of)return t.apply(this,arguments);b=c.extend({},b);var a=c(b.of),d=a[0],g=(b.collision||"flip").split(" "),e=b.offset?b.offset.split(" "):[0,0],h,k,j;if(d.nodeType===9){h=a.width();k=a.height();j={top:0,left:0}}else if(d.setTimeout){h=a.width();k=a.height();j={top:a.scrollTop(),left:a.scrollLeft()}}else if(d.preventDefault){b.at="left top";h=k=0;j={top:b.of.pageY,
|
||||
left:b.of.pageX}}else{h=a.outerWidth();k=a.outerHeight();j=a.offset()}c.each(["my","at"],function(){var f=(b[this]||"").split(" ");if(f.length===1)f=n.test(f[0])?f.concat(["center"]):o.test(f[0])?["center"].concat(f):["center","center"];f[0]=n.test(f[0])?f[0]:"center";f[1]=o.test(f[1])?f[1]:"center";b[this]=f});if(g.length===1)g[1]=g[0];e[0]=parseInt(e[0],10)||0;if(e.length===1)e[1]=e[0];e[1]=parseInt(e[1],10)||0;if(b.at[0]==="right")j.left+=h;else if(b.at[0]==="center")j.left+=h/2;if(b.at[1]==="bottom")j.top+=
|
||||
k;else if(b.at[1]==="center")j.top+=k/2;j.left+=e[0];j.top+=e[1];return this.each(function(){var f=c(this),l=f.outerWidth(),m=f.outerHeight(),p=parseInt(c.curCSS(this,"marginLeft",true))||0,q=parseInt(c.curCSS(this,"marginTop",true))||0,v=l+p+(parseInt(c.curCSS(this,"marginRight",true))||0),w=m+q+(parseInt(c.curCSS(this,"marginBottom",true))||0),i=c.extend({},j),r;if(b.my[0]==="right")i.left-=l;else if(b.my[0]==="center")i.left-=l/2;if(b.my[1]==="bottom")i.top-=m;else if(b.my[1]==="center")i.top-=
|
||||
m/2;i.left=Math.round(i.left);i.top=Math.round(i.top);r={left:i.left-p,top:i.top-q};c.each(["left","top"],function(s,x){c.ui.position[g[s]]&&c.ui.position[g[s]][x](i,{targetWidth:h,targetHeight:k,elemWidth:l,elemHeight:m,collisionPosition:r,collisionWidth:v,collisionHeight:w,offset:e,my:b.my,at:b.at})});c.fn.bgiframe&&f.bgiframe();f.offset(c.extend(i,{using:b.using}))})};c.ui.position={fit:{left:function(b,a){var d=c(window);d=a.collisionPosition.left+a.collisionWidth-d.width()-d.scrollLeft();b.left=
|
||||
d>0?b.left-d:Math.max(b.left-a.collisionPosition.left,b.left)},top:function(b,a){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();b.top=d>0?b.top-d:Math.max(b.top-a.collisionPosition.top,b.top)}},flip:{left:function(b,a){if(a.at[0]!=="center"){var d=c(window);d=a.collisionPosition.left+a.collisionWidth-d.width()-d.scrollLeft();var g=a.my[0]==="left"?-a.elemWidth:a.my[0]==="right"?a.elemWidth:0,e=a.at[0]==="left"?a.targetWidth:-a.targetWidth,h=-2*a.offset[0];b.left+=
|
||||
a.collisionPosition.left<0?g+e+h:d>0?g+e+h:0}},top:function(b,a){if(a.at[1]!=="center"){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();var g=a.my[1]==="top"?-a.elemHeight:a.my[1]==="bottom"?a.elemHeight:0,e=a.at[1]==="top"?a.targetHeight:-a.targetHeight,h=-2*a.offset[1];b.top+=a.collisionPosition.top<0?g+e+h:d>0?g+e+h:0}}}};if(!c.offset.setOffset){c.offset.setOffset=function(b,a){if(/static/.test(c.curCSS(b,"position")))b.style.position="relative";var d=c(b),
|
||||
g=d.offset(),e=parseInt(c.curCSS(b,"top",true),10)||0,h=parseInt(c.curCSS(b,"left",true),10)||0;g={top:a.top-g.top+e,left:a.left-g.left+h};"using"in a?a.using.call(b,g):d.css(g)};c.fn.offset=function(b){var a=this[0];if(!a||!a.ownerDocument)return null;if(b)return this.each(function(){c.offset.setOffset(this,b)});return u.call(this)}}})(jQuery);
|
|
@ -1,48 +0,0 @@
|
|||
/*
|
||||
* jQuery UI Effects Highlight 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/Effects/Highlight
|
||||
*
|
||||
* 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" && $.browser.msie) this.style.removeAttribute('filter');
|
||||
if(o.callback) o.callback.apply(this, arguments);
|
||||
el.dequeue();
|
||||
}});
|
||||
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
})(jQuery);
|
|
@ -1,56 +0,0 @@
|
|||
/*
|
||||
* 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/Effects/Pulsate
|
||||
*
|
||||
* 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
|
||||
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}, duration, o.options.easing);
|
||||
times = times-2;
|
||||
}
|
||||
|
||||
// Animate
|
||||
for (var i = 0; i < times; i++) { // Pulsate
|
||||
el.animate({opacity: 0}, duration, o.options.easing).animate({opacity: 1}, duration, o.options.easing);
|
||||
};
|
||||
if (mode == 'hide') { // Last Pulse
|
||||
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}, 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);
|
1357
themes/default/js/ui/i18n/jquery-ui-i18n.js
vendored
Normal file
1357
themes/default/js/ui/i18n/jquery-ui-i18n.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
23
themes/default/js/ui/i18n/jquery.ui.datepicker-af.js
vendored
Normal file
23
themes/default/js/ui/i18n/jquery.ui.datepicker-af.js
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
/* Afrikaans initialisation for the jQuery UI date picker plugin. */
|
||||
/* Written by Renier Pretorius. */
|
||||
jQuery(function($){
|
||||
$.datepicker.regional['af'] = {
|
||||
closeText: 'Selekteer',
|
||||
prevText: 'Vorige',
|
||||
nextText: 'Volgende',
|
||||
currentText: 'Vandag',
|
||||
monthNames: ['Januarie','Februarie','Maart','April','Mei','Junie',
|
||||
'Julie','Augustus','September','Oktober','November','Desember'],
|
||||
monthNamesShort: ['Jan', 'Feb', 'Mrt', 'Apr', 'Mei', 'Jun',
|
||||
'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Des'],
|
||||
dayNames: ['Sondag', 'Maandag', 'Dinsdag', 'Woensdag', 'Donderdag', 'Vrydag', 'Saterdag'],
|
||||
dayNamesShort: ['Son', 'Maa', 'Din', 'Woe', 'Don', 'Vry', 'Sat'],
|
||||
dayNamesMin: ['So','Ma','Di','Wo','Do','Vr','Sa'],
|
||||
weekHeader: 'Wk',
|
||||
dateFormat: 'dd/mm/yy',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['af']);
|
||||
});
|
23
themes/default/js/ui/i18n/jquery.ui.datepicker-ar-DZ.js
vendored
Normal file
23
themes/default/js/ui/i18n/jquery.ui.datepicker-ar-DZ.js
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
/* Algerian Arabic Translation for jQuery UI date picker plugin. (can be used for Tunisia)*/
|
||||
/* Mohamed Cherif BOUCHELAGHEM -- cherifbouchelaghem@yahoo.fr */
|
||||
|
||||
jQuery(function($){
|
||||
$.datepicker.regional['ar-DZ'] = {
|
||||
closeText: 'إغلاق',
|
||||
prevText: '<السابق',
|
||||
nextText: 'التالي>',
|
||||
currentText: 'اليوم',
|
||||
monthNames: ['جانفي', 'فيفري', 'مارس', 'أفريل', 'ماي', 'جوان',
|
||||
'جويلية', 'أوت', 'سبتمبر','أكتوبر', 'نوفمبر', 'ديسمبر'],
|
||||
monthNamesShort: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
|
||||
dayNames: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
|
||||
dayNamesShort: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
|
||||
dayNamesMin: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
|
||||
weekHeader: 'أسبوع',
|
||||
dateFormat: 'dd/mm/yy',
|
||||
firstDay: 6,
|
||||
isRTL: true,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['ar-DZ']);
|
||||
});
|
|
@ -1,6 +1,5 @@
|
|||
/* Arabic Translation for jQuery UI date picker plugin. */
|
||||
/* Khaled Al Horani -- koko.dw@gmail.com */
|
||||
/* خالد الحوراني -- koko.dw@gmail.com */
|
||||
/* Khaled Alhourani -- me@khaledalhourani.com */
|
||||
/* 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'] = {
|
||||
|
@ -10,11 +9,15 @@ jQuery(function($){
|
|||
currentText: 'اليوم',
|
||||
monthNames: ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'آذار', 'حزيران',
|
||||
'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'],
|
||||
monthNamesShort: ['1','2','3','4','5','6','7','8','9','10','11','12'],
|
||||
dayNames: ['السبت', 'الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة'],
|
||||
dayNamesShort: ['سبت', 'أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة'],
|
||||
dayNamesMin: ['سبت', 'أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة'],
|
||||
dateFormat: 'dd/mm/yy', firstDay: 0,
|
||||
isRTL: true};
|
||||
monthNamesShort: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
|
||||
dayNames: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
|
||||
dayNamesShort: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
|
||||
dayNamesMin: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
|
||||
weekHeader: 'أسبوع',
|
||||
dateFormat: 'dd/mm/yy',
|
||||
firstDay: 6,
|
||||
isRTL: true,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['ar']);
|
||||
});
|
23
themes/default/js/ui/i18n/jquery.ui.datepicker-az.js
vendored
Normal file
23
themes/default/js/ui/i18n/jquery.ui.datepicker-az.js
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
/* Azerbaijani (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
||||
/* Written by Jamil Najafov (necefov33@gmail.com). */
|
||||
jQuery(function($) {
|
||||
$.datepicker.regional['az'] = {
|
||||
closeText: 'Bağla',
|
||||
prevText: '<Geri',
|
||||
nextText: 'İrəli>',
|
||||
currentText: 'Bugün',
|
||||
monthNames: ['Yanvar','Fevral','Mart','Aprel','May','İyun',
|
||||
'İyul','Avqust','Sentyabr','Oktyabr','Noyabr','Dekabr'],
|
||||
monthNamesShort: ['Yan','Fev','Mar','Apr','May','İyun',
|
||||
'İyul','Avq','Sen','Okt','Noy','Dek'],
|
||||
dayNames: ['Bazar','Bazar ertəsi','Çərşənbə axşamı','Çərşənbə','Cümə axşamı','Cümə','Şənbə'],
|
||||
dayNamesShort: ['B','Be','Ça','Ç','Ca','C','Ş'],
|
||||
dayNamesMin: ['B','B','Ç','С','Ç','C','Ş'],
|
||||
weekHeader: 'Hf',
|
||||
dateFormat: 'dd.mm.yy',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['az']);
|
||||
});
|
|
@ -14,7 +14,11 @@ jQuery(function($){
|
|||
dayNames: ['Неделя','Понеделник','Вторник','Сряда','Четвъртък','Петък','Събота'],
|
||||
dayNamesShort: ['Нед','Пон','Вто','Сря','Чет','Пет','Съб'],
|
||||
dayNamesMin: ['Не','По','Вт','Ср','Че','Пе','Съ'],
|
||||
dateFormat: 'dd.mm.yy', firstDay: 1,
|
||||
isRTL: false};
|
||||
weekHeader: 'Wk',
|
||||
dateFormat: 'dd.mm.yy',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['bg']);
|
||||
});
|
23
themes/default/js/ui/i18n/jquery.ui.datepicker-bs.js
vendored
Normal file
23
themes/default/js/ui/i18n/jquery.ui.datepicker-bs.js
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
/* Bosnian i18n for the jQuery UI date picker plugin. */
|
||||
/* Written by Kenan Konjo. */
|
||||
jQuery(function($){
|
||||
$.datepicker.regional['bs'] = {
|
||||
closeText: 'Zatvori',
|
||||
prevText: '<',
|
||||
nextText: '>',
|
||||
currentText: 'Danas',
|
||||
monthNames: ['Januar','Februar','Mart','April','Maj','Juni',
|
||||
'Juli','August','Septembar','Oktobar','Novembar','Decembar'],
|
||||
monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
|
||||
'Jul','Aug','Sep','Okt','Nov','Dec'],
|
||||
dayNames: ['Nedelja','Ponedeljak','Utorak','Srijeda','Četvrtak','Petak','Subota'],
|
||||
dayNamesShort: ['Ned','Pon','Uto','Sri','Čet','Pet','Sub'],
|
||||
dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'],
|
||||
weekHeader: 'Wk',
|
||||
dateFormat: 'dd.mm.yy',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['bs']);
|
||||
});
|
|
@ -1,4 +1,4 @@
|
|||
/* Inicialitzaci<EFBFBD> en catal<61> per a l'extenci<63> 'calendar' per jQuery. */
|
||||
/* Inicialització en català per a l'extenció 'calendar' per jQuery. */
|
||||
/* Writers: (joan.leon@gmail.com). */
|
||||
jQuery(function($){
|
||||
$.datepicker.regional['ca'] = {
|
||||
|
@ -13,7 +13,11 @@ jQuery(function($){
|
|||
dayNames: ['Diumenge','Dilluns','Dimarts','Dimecres','Dijous','Divendres','Dissabte'],
|
||||
dayNamesShort: ['Dug','Dln','Dmt','Dmc','Djs','Dvn','Dsb'],
|
||||
dayNamesMin: ['Dg','Dl','Dt','Dc','Dj','Dv','Ds'],
|
||||
dateFormat: 'mm/dd/yy', firstDay: 0,
|
||||
isRTL: false};
|
||||
weekHeader: 'Sm',
|
||||
dateFormat: 'dd/mm/yy',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['ca']);
|
||||
});
|
|
@ -13,7 +13,11 @@ jQuery(function($){
|
|||
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'],
|
||||
dateFormat: 'dd.mm.yy', firstDay: 1,
|
||||
isRTL: false};
|
||||
weekHeader: 'Týd',
|
||||
dateFormat: 'dd.mm.yy',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['cs']);
|
||||
});
|
|
@ -13,7 +13,11 @@ jQuery(function($){
|
|||
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ø'],
|
||||
dateFormat: 'dd-mm-yy', firstDay: 0,
|
||||
isRTL: false};
|
||||
weekHeader: 'Uge',
|
||||
dateFormat: 'dd-mm-yy',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['da']);
|
||||
});
|
|
@ -13,7 +13,11 @@ jQuery(function($){
|
|||
dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'],
|
||||
dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'],
|
||||
dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'],
|
||||
dateFormat: 'dd.mm.yy', firstDay: 1,
|
||||
isRTL: false};
|
||||
weekHeader: 'Wo',
|
||||
dateFormat: 'dd.mm.yy',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['de']);
|
||||
});
|
23
themes/default/js/ui/i18n/jquery.ui.datepicker-el.js
vendored
Normal file
23
themes/default/js/ui/i18n/jquery.ui.datepicker-el.js
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
/* Greek (el) initialisation for the jQuery UI date picker plugin. */
|
||||
/* Written by Alex Cicovic (http://www.alexcicovic.com) */
|
||||
jQuery(function($){
|
||||
$.datepicker.regional['el'] = {
|
||||
closeText: 'Κλείσιμο',
|
||||
prevText: 'Προηγούμενος',
|
||||
nextText: 'Επόμενος',
|
||||
currentText: 'Τρέχων Μήνας',
|
||||
monthNames: ['Ιανουάριος','Φεβρουάριος','Μάρτιος','Απρίλιος','Μάιος','Ιούνιος',
|
||||
'Ιούλιος','Αύγουστος','Σεπτέμβριος','Οκτώβριος','Νοέμβριος','Δεκέμβριος'],
|
||||
monthNamesShort: ['Ιαν','Φεβ','Μαρ','Απρ','Μαι','Ιουν',
|
||||
'Ιουλ','Αυγ','Σεπ','Οκτ','Νοε','Δεκ'],
|
||||
dayNames: ['Κυριακή','Δευτέρα','Τρίτη','Τετάρτη','Πέμπτη','Παρασκευή','Σάββατο'],
|
||||
dayNamesShort: ['Κυρ','Δευ','Τρι','Τετ','Πεμ','Παρ','Σαβ'],
|
||||
dayNamesMin: ['Κυ','Δε','Τρ','Τε','Πε','Πα','Σα'],
|
||||
weekHeader: 'Εβδ',
|
||||
dateFormat: 'dd/mm/yy',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['el']);
|
||||
});
|
23
themes/default/js/ui/i18n/jquery.ui.datepicker-en-AU.js
vendored
Normal file
23
themes/default/js/ui/i18n/jquery.ui.datepicker-en-AU.js
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
/* English/Australia initialisation for the jQuery UI date picker plugin. */
|
||||
/* Based on the en-GB initialisation. */
|
||||
jQuery(function($){
|
||||
$.datepicker.regional['en-AU'] = {
|
||||
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'],
|
||||
weekHeader: 'Wk',
|
||||
dateFormat: 'dd/mm/yy',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['en-AU']);
|
||||
});
|
23
themes/default/js/ui/i18n/jquery.ui.datepicker-en-GB.js
vendored
Normal file
23
themes/default/js/ui/i18n/jquery.ui.datepicker-en-GB.js
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
/* English/UK initialisation for the jQuery UI date picker plugin. */
|
||||
/* Written by Stuart. */
|
||||
jQuery(function($){
|
||||
$.datepicker.regional['en-GB'] = {
|
||||
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'],
|
||||
weekHeader: 'Wk',
|
||||
dateFormat: 'dd/mm/yy',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['en-GB']);
|
||||
});
|
23
themes/default/js/ui/i18n/jquery.ui.datepicker-en-NZ.js
vendored
Normal file
23
themes/default/js/ui/i18n/jquery.ui.datepicker-en-NZ.js
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
/* English/New Zealand initialisation for the jQuery UI date picker plugin. */
|
||||
/* Based on the en-GB initialisation. */
|
||||
jQuery(function($){
|
||||
$.datepicker.regional['en-NZ'] = {
|
||||
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'],
|
||||
weekHeader: 'Wk',
|
||||
dateFormat: 'dd/mm/yy',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['en-NZ']);
|
||||
});
|
23
themes/default/js/ui/i18n/jquery.ui.datepicker-eo.js
vendored
Normal file
23
themes/default/js/ui/i18n/jquery.ui.datepicker-eo.js
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
/* Esperanto initialisation for the jQuery UI date picker plugin. */
|
||||
/* Written by Olivier M. (olivierweb@ifrance.com). */
|
||||
jQuery(function($){
|
||||
$.datepicker.regional['eo'] = {
|
||||
closeText: 'Fermi',
|
||||
prevText: '<Anta',
|
||||
nextText: 'Sekv>',
|
||||
currentText: 'Nuna',
|
||||
monthNames: ['Januaro','Februaro','Marto','Aprilo','Majo','Junio',
|
||||
'Julio','Aŭgusto','Septembro','Oktobro','Novembro','Decembro'],
|
||||
monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
|
||||
'Jul','Aŭg','Sep','Okt','Nov','Dec'],
|
||||
dayNames: ['Dimanĉo','Lundo','Mardo','Merkredo','Ĵaŭdo','Vendredo','Sabato'],
|
||||
dayNamesShort: ['Dim','Lun','Mar','Mer','Ĵaŭ','Ven','Sab'],
|
||||
dayNamesMin: ['Di','Lu','Ma','Me','Ĵa','Ve','Sa'],
|
||||
weekHeader: 'Sb',
|
||||
dateFormat: 'dd/mm/yy',
|
||||
firstDay: 0,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['eo']);
|
||||
});
|
|
@ -1,4 +1,4 @@
|
|||
/* Inicializaci<EFBFBD>n en espa<70>ol para la extensi<73>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'] = {
|
||||
|
@ -13,7 +13,11 @@ jQuery(function($){
|
|||
dayNames: ['Domingo','Lunes','Martes','Miércoles','Jueves','Viernes','Sábado'],
|
||||
dayNamesShort: ['Dom','Lun','Mar','Mié','Juv','Vie','Sáb'],
|
||||
dayNamesMin: ['Do','Lu','Ma','Mi','Ju','Vi','Sá'],
|
||||
dateFormat: 'dd/mm/yy', firstDay: 0,
|
||||
isRTL: false};
|
||||
weekHeader: 'Sm',
|
||||
dateFormat: 'dd/mm/yy',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['es']);
|
||||
});
|
23
themes/default/js/ui/i18n/jquery.ui.datepicker-et.js
vendored
Normal file
23
themes/default/js/ui/i18n/jquery.ui.datepicker-et.js
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
/* Estonian initialisation for the jQuery UI date picker plugin. */
|
||||
/* Written by Mart Sõmermaa (mrts.pydev at gmail com). */
|
||||
jQuery(function($){
|
||||
$.datepicker.regional['et'] = {
|
||||
closeText: 'Sulge',
|
||||
prevText: 'Eelnev',
|
||||
nextText: 'Järgnev',
|
||||
currentText: 'Täna',
|
||||
monthNames: ['Jaanuar','Veebruar','Märts','Aprill','Mai','Juuni',
|
||||
'Juuli','August','September','Oktoober','November','Detsember'],
|
||||
monthNamesShort: ['Jaan', 'Veebr', 'Märts', 'Apr', 'Mai', 'Juuni',
|
||||
'Juuli', 'Aug', 'Sept', 'Okt', 'Nov', 'Dets'],
|
||||
dayNames: ['Pühapäev', 'Esmaspäev', 'Teisipäev', 'Kolmapäev', 'Neljapäev', 'Reede', 'Laupäev'],
|
||||
dayNamesShort: ['Pühap', 'Esmasp', 'Teisip', 'Kolmap', 'Neljap', 'Reede', 'Laup'],
|
||||
dayNamesMin: ['P','E','T','K','N','R','L'],
|
||||
weekHeader: 'Sm',
|
||||
dateFormat: 'dd.mm.yy',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['et']);
|
||||
});
|
23
themes/default/js/ui/i18n/jquery.ui.datepicker-eu.js
vendored
Normal file
23
themes/default/js/ui/i18n/jquery.ui.datepicker-eu.js
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
/* Euskarako oinarria 'UI date picker' jquery-ko extentsioarentzat */
|
||||
/* Karrikas-ek itzulia (karrikas@karrikas.com) */
|
||||
jQuery(function($){
|
||||
$.datepicker.regional['eu'] = {
|
||||
closeText: 'Egina',
|
||||
prevText: '<Aur',
|
||||
nextText: 'Hur>',
|
||||
currentText: 'Gaur',
|
||||
monthNames: ['Urtarrila','Otsaila','Martxoa','Apirila','Maiatza','Ekaina',
|
||||
'Uztaila','Abuztua','Iraila','Urria','Azaroa','Abendua'],
|
||||
monthNamesShort: ['Urt','Ots','Mar','Api','Mai','Eka',
|
||||
'Uzt','Abu','Ira','Urr','Aza','Abe'],
|
||||
dayNames: ['Igandea','Astelehena','Asteartea','Asteazkena','Osteguna','Ostirala','Larunbata'],
|
||||
dayNamesShort: ['Iga','Ast','Ast','Ast','Ost','Ost','Lar'],
|
||||
dayNamesMin: ['Ig','As','As','As','Os','Os','La'],
|
||||
weekHeader: 'Wk',
|
||||
dateFormat: 'yy/mm/dd',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['eu']);
|
||||
});
|
23
themes/default/js/ui/i18n/jquery.ui.datepicker-fa.js
vendored
Normal file
23
themes/default/js/ui/i18n/jquery.ui.datepicker-fa.js
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
/* Persian (Farsi) Translation for the jQuery UI date picker plugin. */
|
||||
/* Javad Mowlanezhad -- jmowla@gmail.com */
|
||||
/* Jalali calendar should supported soon! (Its implemented but I have to test it) */
|
||||
jQuery(function($) {
|
||||
$.datepicker.regional['fa'] = {
|
||||
closeText: 'بستن',
|
||||
prevText: '<قبلي',
|
||||
nextText: 'بعدي>',
|
||||
currentText: 'امروز',
|
||||
monthNames: ['فروردين','ارديبهشت','خرداد','تير','مرداد','شهريور',
|
||||
'مهر','آبان','آذر','دي','بهمن','اسفند'],
|
||||
monthNamesShort: ['1','2','3','4','5','6','7','8','9','10','11','12'],
|
||||
dayNames: ['يکشنبه','دوشنبه','سهشنبه','چهارشنبه','پنجشنبه','جمعه','شنبه'],
|
||||
dayNamesShort: ['ي','د','س','چ','پ','ج', 'ش'],
|
||||
dayNamesMin: ['ي','د','س','چ','پ','ج', 'ش'],
|
||||
weekHeader: 'هف',
|
||||
dateFormat: 'yy/mm/dd',
|
||||
firstDay: 6,
|
||||
isRTL: true,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['fa']);
|
||||
});
|
|
@ -13,7 +13,11 @@ jQuery(function($){
|
|||
dayNamesShort: ['Su','Ma','Ti','Ke','To','Pe','Su'],
|
||||
dayNames: ['Sunnuntai','Maanantai','Tiistai','Keskiviikko','Torstai','Perjantai','Lauantai'],
|
||||
dayNamesMin: ['Su','Ma','Ti','Ke','To','Pe','La'],
|
||||
dateFormat: 'dd.mm.yy', firstDay: 1,
|
||||
isRTL: false};
|
||||
weekHeader: 'Vk',
|
||||
dateFormat: 'dd.mm.yy',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['fi']);
|
||||
});
|
23
themes/default/js/ui/i18n/jquery.ui.datepicker-fo.js
vendored
Normal file
23
themes/default/js/ui/i18n/jquery.ui.datepicker-fo.js
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
/* Faroese initialisation for the jQuery UI date picker plugin */
|
||||
/* Written by Sverri Mohr Olsen, sverrimo@gmail.com */
|
||||
jQuery(function($){
|
||||
$.datepicker.regional['fo'] = {
|
||||
closeText: 'Lat aftur',
|
||||
prevText: '<Fyrra',
|
||||
nextText: 'Næsta>',
|
||||
currentText: 'Í dag',
|
||||
monthNames: ['Januar','Februar','Mars','Apríl','Mei','Juni',
|
||||
'Juli','August','September','Oktober','November','Desember'],
|
||||
monthNamesShort: ['Jan','Feb','Mar','Apr','Mei','Jun',
|
||||
'Jul','Aug','Sep','Okt','Nov','Des'],
|
||||
dayNames: ['Sunnudagur','Mánadagur','Týsdagur','Mikudagur','Hósdagur','Fríggjadagur','Leyardagur'],
|
||||
dayNamesShort: ['Sun','Mán','Týs','Mik','Hós','Frí','Ley'],
|
||||
dayNamesMin: ['Su','Má','Tý','Mi','Hó','Fr','Le'],
|
||||
weekHeader: 'Vk',
|
||||
dateFormat: 'dd-mm-yy',
|
||||
firstDay: 0,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['fo']);
|
||||
});
|
|
@ -1,7 +1,7 @@
|
|||
/* French initialisation for the jQuery UI date picker plugin. */
|
||||
/* Written by Keith Wood (kbwood@virginbroadband.com.au) and Stéphane Nahmani (sholby@sholby.net). */
|
||||
/* Swiss-French initialisation for the jQuery UI date picker plugin. */
|
||||
/* Written Martin Voelkle (martin.voelkle@e-tc.ch). */
|
||||
jQuery(function($){
|
||||
$.datepicker.regional['fr'] = {
|
||||
$.datepicker.regional['fr-CH'] = {
|
||||
closeText: 'Fermer',
|
||||
prevText: '<Préc',
|
||||
nextText: 'Suiv>',
|
||||
|
@ -13,7 +13,11 @@ jQuery(function($){
|
|||
dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'],
|
||||
dayNamesShort: ['Dim','Lun','Mar','Mer','Jeu','Ven','Sam'],
|
||||
dayNamesMin: ['Di','Lu','Ma','Me','Je','Ve','Sa'],
|
||||
dateFormat: 'dd/mm/yy', firstDay: 1,
|
||||
isRTL: false};
|
||||
$.datepicker.setDefaults($.datepicker.regional['fr']);
|
||||
weekHeader: 'Sm',
|
||||
dateFormat: 'dd.mm.yy',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['fr-CH']);
|
||||
});
|
25
themes/default/js/ui/i18n/jquery.ui.datepicker-fr.js
vendored
Normal file
25
themes/default/js/ui/i18n/jquery.ui.datepicker-fr.js
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
/* French initialisation for the jQuery UI date picker plugin. */
|
||||
/* Written by Keith Wood (kbwood{at}iinet.com.au),
|
||||
Stéphane Nahmani (sholby@sholby.net),
|
||||
Stéphane Raimbault <stephane.raimbault@gmail.com> */
|
||||
jQuery(function($){
|
||||
$.datepicker.regional['fr'] = {
|
||||
closeText: 'Fermer',
|
||||
prevText: 'Précédent',
|
||||
nextText: 'Suivant',
|
||||
currentText: 'Aujourd\'hui',
|
||||
monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin',
|
||||
'Juillet','Août','Septembre','Octobre','Novembre','Décembre'],
|
||||
monthNamesShort: ['Janv.','Févr.','Mars','Avril','Mai','Juin',
|
||||
'Juil.','Août','Sept.','Oct.','Nov.','Déc.'],
|
||||
dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'],
|
||||
dayNamesShort: ['Dim.','Lun.','Mar.','Mer.','Jeu.','Ven.','Sam.'],
|
||||
dayNamesMin: ['D','L','M','M','J','V','S'],
|
||||
weekHeader: 'Sem.',
|
||||
dateFormat: 'dd/mm/yy',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['fr']);
|
||||
});
|
23
themes/default/js/ui/i18n/jquery.ui.datepicker-gl.js
vendored
Normal file
23
themes/default/js/ui/i18n/jquery.ui.datepicker-gl.js
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
/* Galician localization for 'UI date picker' jQuery extension. */
|
||||
/* Translated by Jorge Barreiro <yortx.barry@gmail.com>. */
|
||||
jQuery(function($){
|
||||
$.datepicker.regional['gl'] = {
|
||||
closeText: 'Pechar',
|
||||
prevText: '<Ant',
|
||||
nextText: 'Seg>',
|
||||
currentText: 'Hoxe',
|
||||
monthNames: ['Xaneiro','Febreiro','Marzo','Abril','Maio','Xuño',
|
||||
'Xullo','Agosto','Setembro','Outubro','Novembro','Decembro'],
|
||||
monthNamesShort: ['Xan','Feb','Mar','Abr','Mai','Xuñ',
|
||||
'Xul','Ago','Set','Out','Nov','Dec'],
|
||||
dayNames: ['Domingo','Luns','Martes','Mércores','Xoves','Venres','Sábado'],
|
||||
dayNamesShort: ['Dom','Lun','Mar','Mér','Xov','Ven','Sáb'],
|
||||
dayNamesMin: ['Do','Lu','Ma','Mé','Xo','Ve','Sá'],
|
||||
weekHeader: 'Sm',
|
||||
dateFormat: 'dd/mm/yy',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['gl']);
|
||||
});
|
|
@ -13,7 +13,11 @@ jQuery(function($){
|
|||
dayNames: ['ראשון','שני','שלישי','רביעי','חמישי','שישי','שבת'],
|
||||
dayNamesShort: ['א\'','ב\'','ג\'','ד\'','ה\'','ו\'','שבת'],
|
||||
dayNamesMin: ['א\'','ב\'','ג\'','ד\'','ה\'','ו\'','שבת'],
|
||||
dateFormat: 'dd/mm/yy', firstDay: 0,
|
||||
isRTL: true};
|
||||
weekHeader: 'Wk',
|
||||
dateFormat: 'dd/mm/yy',
|
||||
firstDay: 0,
|
||||
isRTL: true,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['he']);
|
||||
});
|
23
themes/default/js/ui/i18n/jquery.ui.datepicker-hr.js
vendored
Normal file
23
themes/default/js/ui/i18n/jquery.ui.datepicker-hr.js
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
/* Croatian i18n for the jQuery UI date picker plugin. */
|
||||
/* Written by Vjekoslav Nesek. */
|
||||
jQuery(function($){
|
||||
$.datepicker.regional['hr'] = {
|
||||
closeText: 'Zatvori',
|
||||
prevText: '<',
|
||||
nextText: '>',
|
||||
currentText: 'Danas',
|
||||
monthNames: ['Siječanj','Veljača','Ožujak','Travanj','Svibanj','Lipanj',
|
||||
'Srpanj','Kolovoz','Rujan','Listopad','Studeni','Prosinac'],
|
||||
monthNamesShort: ['Sij','Velj','Ožu','Tra','Svi','Lip',
|
||||
'Srp','Kol','Ruj','Lis','Stu','Pro'],
|
||||
dayNames: ['Nedjelja','Ponedjeljak','Utorak','Srijeda','Četvrtak','Petak','Subota'],
|
||||
dayNamesShort: ['Ned','Pon','Uto','Sri','Čet','Pet','Sub'],
|
||||
dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'],
|
||||
weekHeader: 'Tje',
|
||||
dateFormat: 'dd.mm.yy.',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['hr']);
|
||||
});
|
|
@ -1,5 +1,5 @@
|
|||
/* Hungarian initialisation for the jQuery UI date picker plugin. */
|
||||
/* Written by Istvan Karaszi (jquerycalendar@spam.raszi.hu). */
|
||||
/* Written by Istvan Karaszi (jquery@spam.raszi.hu). */
|
||||
jQuery(function($){
|
||||
$.datepicker.regional['hu'] = {
|
||||
closeText: 'bezárás',
|
||||
|
@ -10,10 +10,14 @@ jQuery(function($){
|
|||
'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'],
|
||||
dayNames: ['Vasámap', 'Hétfö', 'Kedd', 'Szerda', 'Csütörtök', 'Péntek', 'Szombat'],
|
||||
dayNames: ['Vasárnap', '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'],
|
||||
dateFormat: 'yy-mm-dd', firstDay: 1,
|
||||
isRTL: false};
|
||||
weekHeader: 'Hé',
|
||||
dateFormat: 'yy-mm-dd',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['hu']);
|
||||
});
|
|
@ -13,7 +13,11 @@ jQuery(function($){
|
|||
dayNames: ['կիրակի','եկուշաբթի','երեքշաբթի','չորեքշաբթի','հինգշաբթի','ուրբաթ','շաբաթ'],
|
||||
dayNamesShort: ['կիր','երկ','երք','չրք','հնգ','ուրբ','շբթ'],
|
||||
dayNamesMin: ['կիր','երկ','երք','չրք','հնգ','ուրբ','շբթ'],
|
||||
dateFormat: 'dd.mm.yy', firstDay: 1,
|
||||
isRTL: false};
|
||||
weekHeader: 'ՇԲՏ',
|
||||
dateFormat: 'dd.mm.yy',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['hy']);
|
||||
});
|
|
@ -13,7 +13,11 @@ jQuery(function($){
|
|||
dayNames: ['Minggu','Senin','Selasa','Rabu','Kamis','Jumat','Sabtu'],
|
||||
dayNamesShort: ['Min','Sen','Sel','Rab','kam','Jum','Sab'],
|
||||
dayNamesMin: ['Mg','Sn','Sl','Rb','Km','jm','Sb'],
|
||||
dateFormat: 'dd/mm/yy', firstDay: 0,
|
||||
isRTL: false};
|
||||
weekHeader: 'Mg',
|
||||
dateFormat: 'dd/mm/yy',
|
||||
firstDay: 0,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['id']);
|
||||
});
|
|
@ -13,7 +13,11 @@ jQuery(function($){
|
|||
dayNames: ['Sunnudagur','Mánudagur','Þriðjudagur','Miðvikudagur','Fimmtudagur','Föstudagur','Laugardagur'],
|
||||
dayNamesShort: ['Sun','Mán','Þri','Mið','Fim','Fös','Lau'],
|
||||
dayNamesMin: ['Su','Má','Þr','Mi','Fi','Fö','La'],
|
||||
dateFormat: 'dd/mm/yy', firstDay: 0,
|
||||
isRTL: false};
|
||||
weekHeader: 'Vika',
|
||||
dateFormat: 'dd/mm/yy',
|
||||
firstDay: 0,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['is']);
|
||||
});
|
|
@ -1,5 +1,5 @@
|
|||
/* Italian initialisation for the jQuery UI date picker plugin. */
|
||||
/* Written by Apaella (apaella@gmail.com). */
|
||||
/* Written by Antonello Pasella (antonello.pasella@gmail.com). */
|
||||
jQuery(function($){
|
||||
$.datepicker.regional['it'] = {
|
||||
closeText: 'Chiudi',
|
||||
|
@ -7,13 +7,17 @@ jQuery(function($){
|
|||
nextText: 'Succ>',
|
||||
currentText: 'Oggi',
|
||||
monthNames: ['Gennaio','Febbraio','Marzo','Aprile','Maggio','Giugno',
|
||||
'Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre'],
|
||||
'Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre'],
|
||||
monthNamesShort: ['Gen','Feb','Mar','Apr','Mag','Giu',
|
||||
'Lug','Ago','Set','Ott','Nov','Dic'],
|
||||
'Lug','Ago','Set','Ott','Nov','Dic'],
|
||||
dayNames: ['Domenica','Lunedì','Martedì','Mercoledì','Giovedì','Venerdì','Sabato'],
|
||||
dayNamesShort: ['Dom','Lun','Mar','Mer','Gio','Ven','Sab'],
|
||||
dayNamesMin: ['Do','Lu','Ma','Me','Gio','Ve','Sa'],
|
||||
dateFormat: 'dd/mm/yy', firstDay: 1,
|
||||
isRTL: false};
|
||||
dayNamesMin: ['Do','Lu','Ma','Me','Gi','Ve','Sa'],
|
||||
weekHeader: 'Sm',
|
||||
dateFormat: 'dd/mm/yy',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['it']);
|
||||
});
|
|
@ -13,8 +13,11 @@ jQuery(function($){
|
|||
dayNames: ['日曜日','月曜日','火曜日','水曜日','木曜日','金曜日','土曜日'],
|
||||
dayNamesShort: ['日','月','火','水','木','金','土'],
|
||||
dayNamesMin: ['日','月','火','水','木','金','土'],
|
||||
dateFormat: 'yy/mm/dd', firstDay: 0,
|
||||
weekHeader: '週',
|
||||
dateFormat: 'yy/mm/dd',
|
||||
firstDay: 0,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: true};
|
||||
showMonthAfterYear: true,
|
||||
yearSuffix: '年'};
|
||||
$.datepicker.setDefaults($.datepicker.regional['ja']);
|
||||
});
|
|
@ -13,7 +13,11 @@ jQuery(function($){
|
|||
dayNames: ['일','월','화','수','목','금','토'],
|
||||
dayNamesShort: ['일','월','화','수','목','금','토'],
|
||||
dayNamesMin: ['일','월','화','수','목','금','토'],
|
||||
dateFormat: 'yy-mm-dd', firstDay: 0,
|
||||
isRTL: false};
|
||||
weekHeader: 'Wk',
|
||||
dateFormat: 'yy-mm-dd',
|
||||
firstDay: 0,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: '년'};
|
||||
$.datepicker.setDefaults($.datepicker.regional['ko']);
|
||||
});
|
23
themes/default/js/ui/i18n/jquery.ui.datepicker-kz.js
vendored
Normal file
23
themes/default/js/ui/i18n/jquery.ui.datepicker-kz.js
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
/* Kazakh (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
||||
/* Written by Dmitriy Karasyov (dmitriy.karasyov@gmail.com). */
|
||||
jQuery(function($){
|
||||
$.datepicker.regional['kz'] = {
|
||||
closeText: 'Жабу',
|
||||
prevText: '<Алдыңғы',
|
||||
nextText: 'Келесі>',
|
||||
currentText: 'Бүгін',
|
||||
monthNames: ['Қаңтар','Ақпан','Наурыз','Сәуір','Мамыр','Маусым',
|
||||
'Шілде','Тамыз','Қыркүйек','Қазан','Қараша','Желтоқсан'],
|
||||
monthNamesShort: ['Қаң','Ақп','Нау','Сәу','Мам','Мау',
|
||||
'Шіл','Там','Қыр','Қаз','Қар','Жел'],
|
||||
dayNames: ['Жексенбі','Дүйсенбі','Сейсенбі','Сәрсенбі','Бейсенбі','Жұма','Сенбі'],
|
||||
dayNamesShort: ['жкс','дсн','ссн','срс','бсн','жма','снб'],
|
||||
dayNamesMin: ['Жк','Дс','Сс','Ср','Бс','Жм','Сн'],
|
||||
weekHeader: 'Не',
|
||||
dateFormat: 'dd.mm.yy',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['kz']);
|
||||
});
|
|
@ -13,7 +13,11 @@ jQuery(function($){
|
|||
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'],
|
||||
dateFormat: 'yy-mm-dd', firstDay: 1,
|
||||
isRTL: false};
|
||||
weekHeader: 'Wk',
|
||||
dateFormat: 'yy-mm-dd',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['lt']);
|
||||
});
|
|
@ -13,7 +13,11 @@ jQuery(function($){
|
|||
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'],
|
||||
dateFormat: 'dd-mm-yy', firstDay: 1,
|
||||
isRTL: false};
|
||||
weekHeader: 'Nav',
|
||||
dateFormat: 'dd-mm-yy',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['lv']);
|
||||
});
|
23
themes/default/js/ui/i18n/jquery.ui.datepicker-ml.js
vendored
Normal file
23
themes/default/js/ui/i18n/jquery.ui.datepicker-ml.js
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
/* Malayalam (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
||||
/* Written by Saji Nediyanchath (saji89@gmail.com). */
|
||||
jQuery(function($){
|
||||
$.datepicker.regional['ml'] = {
|
||||
closeText: 'ശരി',
|
||||
prevText: 'മുന്നത്തെ',
|
||||
nextText: 'അടുത്തത് ',
|
||||
currentText: 'ഇന്ന്',
|
||||
monthNames: ['ജനുവരി','ഫെബ്രുവരി','മാര്ച്ച്','ഏപ്രില്','മേയ്','ജൂണ്',
|
||||
'ജൂലൈ','ആഗസ്റ്റ്','സെപ്റ്റംബര്','ഒക്ടോബര്','നവംബര്','ഡിസംബര്'],
|
||||
monthNamesShort: ['ജനു', 'ഫെബ്', 'മാര്', 'ഏപ്രി', 'മേയ്', 'ജൂണ്',
|
||||
'ജൂലാ', 'ആഗ', 'സെപ്', 'ഒക്ടോ', 'നവം', 'ഡിസ'],
|
||||
dayNames: ['ഞായര്', 'തിങ്കള്', 'ചൊവ്വ', 'ബുധന്', 'വ്യാഴം', 'വെള്ളി', 'ശനി'],
|
||||
dayNamesShort: ['ഞായ', 'തിങ്ക', 'ചൊവ്വ', 'ബുധ', 'വ്യാഴം', 'വെള്ളി', 'ശനി'],
|
||||
dayNamesMin: ['ഞാ','തി','ചൊ','ബു','വ്യാ','വെ','ശ'],
|
||||
weekHeader: 'ആ',
|
||||
dateFormat: 'dd/mm/yy',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['ml']);
|
||||
});
|
23
themes/default/js/ui/i18n/jquery.ui.datepicker-ms.js
vendored
Normal file
23
themes/default/js/ui/i18n/jquery.ui.datepicker-ms.js
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
/* Malaysian initialisation for the jQuery UI date picker plugin. */
|
||||
/* Written by Mohd Nawawi Mohamad Jamili (nawawi@ronggeng.net). */
|
||||
jQuery(function($){
|
||||
$.datepicker.regional['ms'] = {
|
||||
closeText: 'Tutup',
|
||||
prevText: '<Sebelum',
|
||||
nextText: 'Selepas>',
|
||||
currentText: 'hari ini',
|
||||
monthNames: ['Januari','Februari','Mac','April','Mei','Jun',
|
||||
'Julai','Ogos','September','Oktober','November','Disember'],
|
||||
monthNamesShort: ['Jan','Feb','Mac','Apr','Mei','Jun',
|
||||
'Jul','Ogo','Sep','Okt','Nov','Dis'],
|
||||
dayNames: ['Ahad','Isnin','Selasa','Rabu','Khamis','Jumaat','Sabtu'],
|
||||
dayNamesShort: ['Aha','Isn','Sel','Rab','kha','Jum','Sab'],
|
||||
dayNamesMin: ['Ah','Is','Se','Ra','Kh','Ju','Sa'],
|
||||
weekHeader: 'Mg',
|
||||
dateFormat: 'dd/mm/yy',
|
||||
firstDay: 0,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['ms']);
|
||||
});
|
|
@ -13,7 +13,11 @@ jQuery(function($){
|
|||
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};
|
||||
weekHeader: 'Wk',
|
||||
dateFormat: 'dd/mm/yy',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional.nl);
|
||||
});
|
|
@ -13,7 +13,11 @@ jQuery(function($){
|
|||
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ø'],
|
||||
dateFormat: 'yy-mm-dd', firstDay: 0,
|
||||
isRTL: false};
|
||||
weekHeader: 'Uke',
|
||||
dateFormat: 'dd.mm.yy',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['no']);
|
||||
});
|
|
@ -10,10 +10,14 @@ jQuery(function($){
|
|||
'Lipiec','Sierpień','Wrzesień','Październik','Listopad','Grudzień'],
|
||||
monthNamesShort: ['Sty','Lu','Mar','Kw','Maj','Cze',
|
||||
'Lip','Sie','Wrz','Pa','Lis','Gru'],
|
||||
dayNames: ['Niedziela','Poniedzialek','Wtorek','Środa','Czwartek','Piątek','Sobota'],
|
||||
dayNames: ['Niedziela','Poniedziałek','Wtorek','Środa','Czwartek','Piątek','Sobota'],
|
||||
dayNamesShort: ['Nie','Pn','Wt','Śr','Czw','Pt','So'],
|
||||
dayNamesMin: ['N','Pn','Wt','Śr','Cz','Pt','So'],
|
||||
dateFormat: 'yy-mm-dd', firstDay: 1,
|
||||
isRTL: false};
|
||||
weekHeader: 'Tydz',
|
||||
dateFormat: 'dd.mm.yy',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['pl']);
|
||||
});
|
|
@ -10,10 +10,14 @@ jQuery(function($){
|
|||
'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
|
||||
monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun',
|
||||
'Jul','Ago','Set','Out','Nov','Dez'],
|
||||
dayNames: ['Domingo','Segunda-feira','Terç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'],
|
||||
dateFormat: 'dd/mm/yy', firstDay: 0,
|
||||
isRTL: false};
|
||||
dayNames: ['Domingo','Segunda-feira','Terça-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sábado'],
|
||||
dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
|
||||
dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
|
||||
weekHeader: 'Sm',
|
||||
dateFormat: 'dd/mm/yy',
|
||||
firstDay: 0,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['pt-BR']);
|
||||
});
|
22
themes/default/js/ui/i18n/jquery.ui.datepicker-pt.js
vendored
Normal file
22
themes/default/js/ui/i18n/jquery.ui.datepicker-pt.js
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
/* Portuguese initialisation for the jQuery UI date picker plugin. */
|
||||
jQuery(function($){
|
||||
$.datepicker.regional['pt'] = {
|
||||
closeText: 'Fechar',
|
||||
prevText: '<Anterior',
|
||||
nextText: 'Seguinte',
|
||||
currentText: 'Hoje',
|
||||
monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho',
|
||||
'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
|
||||
monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun',
|
||||
'Jul','Ago','Set','Out','Nov','Dez'],
|
||||
dayNames: ['Domingo','Segunda-feira','Terça-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sábado'],
|
||||
dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
|
||||
dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
|
||||
weekHeader: 'Sem',
|
||||
dateFormat: 'dd/mm/yy',
|
||||
firstDay: 0,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['pt']);
|
||||
});
|
21
themes/default/js/ui/i18n/jquery.ui.datepicker-rm.js
vendored
Normal file
21
themes/default/js/ui/i18n/jquery.ui.datepicker-rm.js
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
/* Romansh initialisation for the jQuery UI date picker plugin. */
|
||||
/* Written by Yvonne Gienal (yvonne.gienal@educa.ch). */
|
||||
jQuery(function($){
|
||||
$.datepicker.regional['rm'] = {
|
||||
closeText: 'Serrar',
|
||||
prevText: '<Suandant',
|
||||
nextText: 'Precedent>',
|
||||
currentText: 'Actual',
|
||||
monthNames: ['Schaner','Favrer','Mars','Avrigl','Matg','Zercladur', 'Fanadur','Avust','Settember','October','November','December'],
|
||||
monthNamesShort: ['Scha','Fev','Mar','Avr','Matg','Zer', 'Fan','Avu','Sett','Oct','Nov','Dec'],
|
||||
dayNames: ['Dumengia','Glindesdi','Mardi','Mesemna','Gievgia','Venderdi','Sonda'],
|
||||
dayNamesShort: ['Dum','Gli','Mar','Mes','Gie','Ven','Som'],
|
||||
dayNamesMin: ['Du','Gl','Ma','Me','Gi','Ve','So'],
|
||||
weekHeader: 'emna',
|
||||
dateFormat: 'dd/mm/yy',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['rm']);
|
||||
});
|
|
@ -1,4 +1,4 @@
|
|||
/* Romanian initialisation for the jQuery UI date picker plugin.
|
||||
/* 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)
|
||||
|
@ -16,7 +16,11 @@ jQuery(function($){
|
|||
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};
|
||||
weekHeader: 'Săpt',
|
||||
dateFormat: 'dd.mm.yy',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['ro']);
|
||||
});
|
|
@ -13,7 +13,11 @@ jQuery(function($){
|
|||
dayNames: ['воскресенье','понедельник','вторник','среда','четверг','пятница','суббота'],
|
||||
dayNamesShort: ['вск','пнд','втр','срд','чтв','птн','сбт'],
|
||||
dayNamesMin: ['Вс','Пн','Вт','Ср','Чт','Пт','Сб'],
|
||||
dateFormat: 'dd.mm.yy', firstDay: 1,
|
||||
isRTL: false};
|
||||
weekHeader: 'Нед',
|
||||
dateFormat: 'dd.mm.yy',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['ru']);
|
||||
});
|
|
@ -13,7 +13,11 @@ jQuery(function($){
|
|||
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'],
|
||||
dateFormat: 'dd.mm.yy', firstDay: 0,
|
||||
isRTL: false};
|
||||
weekHeader: 'Ty',
|
||||
dateFormat: 'dd.mm.yy',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['sk']);
|
||||
});
|
24
themes/default/js/ui/i18n/jquery.ui.datepicker-sl.js
vendored
Normal file
24
themes/default/js/ui/i18n/jquery.ui.datepicker-sl.js
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
/* Slovenian initialisation for the jQuery UI date picker plugin. */
|
||||
/* Written by Jaka Jancar (jaka@kubje.org). */
|
||||
/* c = č, s = š z = ž C = Č S = Š Z = Ž */
|
||||
jQuery(function($){
|
||||
$.datepicker.regional['sl'] = {
|
||||
closeText: 'Zapri',
|
||||
prevText: '<Prejšnji',
|
||||
nextText: 'Naslednji>',
|
||||
currentText: 'Trenutni',
|
||||
monthNames: ['Januar','Februar','Marec','April','Maj','Junij',
|
||||
'Julij','Avgust','September','Oktober','November','December'],
|
||||
monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
|
||||
'Jul','Avg','Sep','Okt','Nov','Dec'],
|
||||
dayNames: ['Nedelja','Ponedeljek','Torek','Sreda','Četrtek','Petek','Sobota'],
|
||||
dayNamesShort: ['Ned','Pon','Tor','Sre','Čet','Pet','Sob'],
|
||||
dayNamesMin: ['Ne','Po','To','Sr','Če','Pe','So'],
|
||||
weekHeader: 'Teden',
|
||||
dateFormat: 'dd.mm.yy',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['sl']);
|
||||
});
|
23
themes/default/js/ui/i18n/jquery.ui.datepicker-sq.js
vendored
Normal file
23
themes/default/js/ui/i18n/jquery.ui.datepicker-sq.js
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
/* Albanian initialisation for the jQuery UI date picker plugin. */
|
||||
/* Written by Flakron Bytyqi (flakron@gmail.com). */
|
||||
jQuery(function($){
|
||||
$.datepicker.regional['sq'] = {
|
||||
closeText: 'mbylle',
|
||||
prevText: '<mbrapa',
|
||||
nextText: 'Përpara>',
|
||||
currentText: 'sot',
|
||||
monthNames: ['Janar','Shkurt','Mars','Prill','Maj','Qershor',
|
||||
'Korrik','Gusht','Shtator','Tetor','Nëntor','Dhjetor'],
|
||||
monthNamesShort: ['Jan','Shk','Mar','Pri','Maj','Qer',
|
||||
'Kor','Gus','Sht','Tet','Nën','Dhj'],
|
||||
dayNames: ['E Diel','E Hënë','E Martë','E Mërkurë','E Enjte','E Premte','E Shtune'],
|
||||
dayNamesShort: ['Di','Hë','Ma','Më','En','Pr','Sh'],
|
||||
dayNamesMin: ['Di','Hë','Ma','Më','En','Pr','Sh'],
|
||||
weekHeader: 'Ja',
|
||||
dateFormat: 'dd.mm.yy',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['sq']);
|
||||
});
|
23
themes/default/js/ui/i18n/jquery.ui.datepicker-sr-SR.js
vendored
Normal file
23
themes/default/js/ui/i18n/jquery.ui.datepicker-sr-SR.js
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
/* Serbian i18n for the jQuery UI date picker plugin. */
|
||||
/* Written by Dejan Dimić. */
|
||||
jQuery(function($){
|
||||
$.datepicker.regional['sr-SR'] = {
|
||||
closeText: 'Zatvori',
|
||||
prevText: '<',
|
||||
nextText: '>',
|
||||
currentText: 'Danas',
|
||||
monthNames: ['Januar','Februar','Mart','April','Maj','Jun',
|
||||
'Jul','Avgust','Septembar','Oktobar','Novembar','Decembar'],
|
||||
monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
|
||||
'Jul','Avg','Sep','Okt','Nov','Dec'],
|
||||
dayNames: ['Nedelja','Ponedeljak','Utorak','Sreda','Četvrtak','Petak','Subota'],
|
||||
dayNamesShort: ['Ned','Pon','Uto','Sre','Čet','Pet','Sub'],
|
||||
dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'],
|
||||
weekHeader: 'Sed',
|
||||
dateFormat: 'dd/mm/yy',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['sr-SR']);
|
||||
});
|
23
themes/default/js/ui/i18n/jquery.ui.datepicker-sr.js
vendored
Normal file
23
themes/default/js/ui/i18n/jquery.ui.datepicker-sr.js
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
/* Serbian i18n for the jQuery UI date picker plugin. */
|
||||
/* Written by Dejan Dimić. */
|
||||
jQuery(function($){
|
||||
$.datepicker.regional['sr'] = {
|
||||
closeText: 'Затвори',
|
||||
prevText: '<',
|
||||
nextText: '>',
|
||||
currentText: 'Данас',
|
||||
monthNames: ['Јануар','Фебруар','Март','Април','Мај','Јун',
|
||||
'Јул','Август','Септембар','Октобар','Новембар','Децембар'],
|
||||
monthNamesShort: ['Јан','Феб','Мар','Апр','Мај','Јун',
|
||||
'Јул','Авг','Сеп','Окт','Нов','Дец'],
|
||||
dayNames: ['Недеља','Понедељак','Уторак','Среда','Четвртак','Петак','Субота'],
|
||||
dayNamesShort: ['Нед','Пон','Уто','Сре','Чет','Пет','Суб'],
|
||||
dayNamesMin: ['Не','По','Ут','Ср','Че','Пе','Су'],
|
||||
weekHeader: 'Сед',
|
||||
dateFormat: 'dd/mm/yy',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['sr']);
|
||||
});
|
|
@ -13,7 +13,11 @@ jQuery(function($){
|
|||
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ö'],
|
||||
dateFormat: 'yy-mm-dd', firstDay: 1,
|
||||
isRTL: false};
|
||||
weekHeader: 'Ve',
|
||||
dateFormat: 'yy-mm-dd',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['sv']);
|
||||
});
|
23
themes/default/js/ui/i18n/jquery.ui.datepicker-ta.js
vendored
Normal file
23
themes/default/js/ui/i18n/jquery.ui.datepicker-ta.js
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
/* Tamil (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
||||
/* Written by S A Sureshkumar (saskumar@live.com). */
|
||||
jQuery(function($){
|
||||
$.datepicker.regional['ta'] = {
|
||||
closeText: 'மூடு',
|
||||
prevText: 'முன்னையது',
|
||||
nextText: 'அடுத்தது',
|
||||
currentText: 'இன்று',
|
||||
monthNames: ['தை','மாசி','பங்குனி','சித்திரை','வைகாசி','ஆனி',
|
||||
'ஆடி','ஆவணி','புரட்டாசி','ஐப்பசி','கார்த்திகை','மார்கழி'],
|
||||
monthNamesShort: ['தை','மாசி','பங்','சித்','வைகா','ஆனி',
|
||||
'ஆடி','ஆவ','புர','ஐப்','கார்','மார்'],
|
||||
dayNames: ['ஞாயிற்றுக்கிழமை','திங்கட்கிழமை','செவ்வாய்க்கிழமை','புதன்கிழமை','வியாழக்கிழமை','வெள்ளிக்கிழமை','சனிக்கிழமை'],
|
||||
dayNamesShort: ['ஞாயிறு','திங்கள்','செவ்வாய்','புதன்','வியாழன்','வெள்ளி','சனி'],
|
||||
dayNamesMin: ['ஞா','தி','செ','பு','வி','வெ','ச'],
|
||||
weekHeader: 'Не',
|
||||
dateFormat: 'dd/mm/yy',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['ta']);
|
||||
});
|
|
@ -7,13 +7,17 @@ jQuery(function($){
|
|||
nextText: 'ถัดไป »',
|
||||
currentText: 'วันนี้',
|
||||
monthNames: ['มกราคม','กุมภาพันธ์','มีนาคม','เมษายน','พฤษภาคม','มิถุนายน',
|
||||
'กรกฏาคม','สิงหาคม','กันยายน','ตุลาคม','พฤศจิกายน','ธันวาคม'],
|
||||
'กรกฎาคม','สิงหาคม','กันยายน','ตุลาคม','พฤศจิกายน','ธันวาคม'],
|
||||
monthNamesShort: ['ม.ค.','ก.พ.','มี.ค.','เม.ย.','พ.ค.','มิ.ย.',
|
||||
'ก.ค.','ส.ค.','ก.ย.','ต.ค.','พ.ย.','ธ.ค.'],
|
||||
dayNames: ['อาทิตย์','จันทร์','อังคาร','พุธ','พฤหัสบดี','ศุกร์','เสาร์'],
|
||||
dayNamesShort: ['อา.','จ.','อ.','พ.','พฤ.','ศ.','ส.'],
|
||||
dayNamesMin: ['อา.','จ.','อ.','พ.','พฤ.','ศ.','ส.'],
|
||||
dateFormat: 'dd/mm/yy', firstDay: 0,
|
||||
isRTL: false};
|
||||
weekHeader: 'Wk',
|
||||
dateFormat: 'dd/mm/yy',
|
||||
firstDay: 0,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['th']);
|
||||
});
|
|
@ -13,7 +13,11 @@ jQuery(function($){
|
|||
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'],
|
||||
dateFormat: 'dd.mm.yy', firstDay: 1,
|
||||
isRTL: false};
|
||||
weekHeader: 'Hf',
|
||||
dateFormat: 'dd.mm.yy',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['tr']);
|
||||
});
|
|
@ -2,24 +2,22 @@
|
|||
/* Written by Maxim Drogobitskiy (maxdao@gmail.com). */
|
||||
jQuery(function($){
|
||||
$.datepicker.regional['uk'] = {
|
||||
clearText: 'Очистити', clearStatus: '',
|
||||
closeText: 'Закрити', closeStatus: '',
|
||||
prevText: '<', prevStatus: '',
|
||||
prevBigText: '<<', prevBigStatus: '',
|
||||
nextText: '>', nextStatus: '',
|
||||
nextBigText: '>>', nextBigStatus: '',
|
||||
currentText: 'Сьогодні', currentStatus: '',
|
||||
closeText: 'Закрити',
|
||||
prevText: '<',
|
||||
nextText: '>',
|
||||
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};
|
||||
weekHeader: 'Не',
|
||||
dateFormat: 'dd/mm/yy',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['uk']);
|
||||
});
|
23
themes/default/js/ui/i18n/jquery.ui.datepicker-vi.js
vendored
Normal file
23
themes/default/js/ui/i18n/jquery.ui.datepicker-vi.js
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
/* Vietnamese initialisation for the jQuery UI date picker plugin. */
|
||||
/* Translated by Le Thanh Huy (lthanhhuy@cit.ctu.edu.vn). */
|
||||
jQuery(function($){
|
||||
$.datepicker.regional['vi'] = {
|
||||
closeText: 'Đóng',
|
||||
prevText: '<Trước',
|
||||
nextText: 'Tiếp>',
|
||||
currentText: 'Hôm nay',
|
||||
monthNames: ['Tháng Một', 'Tháng Hai', 'Tháng Ba', 'Tháng Tư', 'Tháng Năm', 'Tháng Sáu',
|
||||
'Tháng Bảy', 'Tháng Tám', 'Tháng Chín', 'Tháng Mười', 'Tháng Mười Một', 'Tháng Mười Hai'],
|
||||
monthNamesShort: ['Tháng 1', 'Tháng 2', 'Tháng 3', 'Tháng 4', 'Tháng 5', 'Tháng 6',
|
||||
'Tháng 7', 'Tháng 8', 'Tháng 9', 'Tháng 10', 'Tháng 11', 'Tháng 12'],
|
||||
dayNames: ['Chủ Nhật', 'Thứ Hai', 'Thứ Ba', 'Thứ Tư', 'Thứ Năm', 'Thứ Sáu', 'Thứ Bảy'],
|
||||
dayNamesShort: ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'],
|
||||
dayNamesMin: ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'],
|
||||
weekHeader: 'Tu',
|
||||
dateFormat: 'dd/mm/yy',
|
||||
firstDay: 0,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['vi']);
|
||||
});
|
|
@ -13,7 +13,11 @@ jQuery(function($){
|
|||
dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
|
||||
dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
|
||||
dayNamesMin: ['日','一','二','三','四','五','六'],
|
||||
dateFormat: 'yy-mm-dd', firstDay: 1,
|
||||
isRTL: false};
|
||||
weekHeader: '周',
|
||||
dateFormat: 'yy-mm-dd',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: true,
|
||||
yearSuffix: '年'};
|
||||
$.datepicker.setDefaults($.datepicker.regional['zh-CN']);
|
||||
});
|
23
themes/default/js/ui/i18n/jquery.ui.datepicker-zh-HK.js
vendored
Normal file
23
themes/default/js/ui/i18n/jquery.ui.datepicker-zh-HK.js
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
/* Chinese initialisation for the jQuery UI date picker plugin. */
|
||||
/* Written by SCCY (samuelcychan@gmail.com). */
|
||||
jQuery(function($){
|
||||
$.datepicker.regional['zh-HK'] = {
|
||||
closeText: '關閉',
|
||||
prevText: '<上月',
|
||||
nextText: '下月>',
|
||||
currentText: '今天',
|
||||
monthNames: ['一月','二月','三月','四月','五月','六月',
|
||||
'七月','八月','九月','十月','十一月','十二月'],
|
||||
monthNamesShort: ['一','二','三','四','五','六',
|
||||
'七','八','九','十','十一','十二'],
|
||||
dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
|
||||
dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
|
||||
dayNamesMin: ['日','一','二','三','四','五','六'],
|
||||
weekHeader: '周',
|
||||
dateFormat: 'dd-mm-yy',
|
||||
firstDay: 0,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: true,
|
||||
yearSuffix: '年'};
|
||||
$.datepicker.setDefaults($.datepicker.regional['zh-HK']);
|
||||
});
|
|
@ -13,7 +13,11 @@ jQuery(function($){
|
|||
dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
|
||||
dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
|
||||
dayNamesMin: ['日','一','二','三','四','五','六'],
|
||||
dateFormat: 'yy/mm/dd', firstDay: 1,
|
||||
isRTL: false};
|
||||
weekHeader: '周',
|
||||
dateFormat: 'yy/mm/dd',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: true,
|
||||
yearSuffix: '年'};
|
||||
$.datepicker.setDefaults($.datepicker.regional['zh-TW']);
|
||||
});
|
|
@ -1,23 +1,23 @@
|
|||
/*
|
||||
* jQuery UI Effects Blind 1.7.2
|
||||
* jQuery UI Effects Blind 1.8.9
|
||||
*
|
||||
* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt)
|
||||
* and GPL (GPL-LICENSE.txt) licenses.
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Effects/Blind
|
||||
*
|
||||
* Depends:
|
||||
* effects.core.js
|
||||
* jquery.effects.core.js
|
||||
*/
|
||||
(function($) {
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.effects.blind = function(o) {
|
||||
|
||||
return this.queue(function() {
|
||||
|
||||
// Create element
|
||||
var el = $(this), props = ['position','top','left'];
|
||||
var el = $(this), props = ['position','top','bottom','left','right'];
|
||||
|
||||
// Set options
|
||||
var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
|
|
@ -1,23 +1,23 @@
|
|||
/*
|
||||
* jQuery UI Effects Bounce 1.7.2
|
||||
* jQuery UI Effects Bounce 1.8.9
|
||||
*
|
||||
* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt)
|
||||
* and GPL (GPL-LICENSE.txt) licenses.
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Effects/Bounce
|
||||
*
|
||||
* Depends:
|
||||
* effects.core.js
|
||||
* jquery.effects.core.js
|
||||
*/
|
||||
(function($) {
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.effects.bounce = function(o) {
|
||||
|
||||
return this.queue(function() {
|
||||
|
||||
// Create element
|
||||
var el = $(this), props = ['position','top','left'];
|
||||
var el = $(this), props = ['position','top','bottom','left','right'];
|
||||
|
||||
// Set options
|
||||
var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode
|
|
@ -1,23 +1,23 @@
|
|||
/*
|
||||
* jQuery UI Effects Clip 1.7.2
|
||||
* jQuery UI Effects Clip 1.8.9
|
||||
*
|
||||
* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt)
|
||||
* and GPL (GPL-LICENSE.txt) licenses.
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Effects/Clip
|
||||
*
|
||||
* Depends:
|
||||
* effects.core.js
|
||||
* jquery.effects.core.js
|
||||
*/
|
||||
(function($) {
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.effects.clip = function(o) {
|
||||
|
||||
return this.queue(function() {
|
||||
|
||||
// Create element
|
||||
var el = $(this), props = ['position','top','left','height','width'];
|
||||
var el = $(this), props = ['position','top','bottom','left','right','height','width'];
|
||||
|
||||
// Set options
|
||||
var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
|
|
@ -1,236 +1,38 @@
|
|||
/*
|
||||
* jQuery UI Effects 1.7.2
|
||||
* jQuery UI Effects 1.8.9
|
||||
*
|
||||
* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt)
|
||||
* and GPL (GPL-LICENSE.txt) licenses.
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Effects/
|
||||
*/
|
||||
;jQuery.effects || (function($) {
|
||||
;jQuery.effects || (function($, undefined) {
|
||||
|
||||
$.effects = {
|
||||
version: "1.7.2",
|
||||
$.effects = {};
|
||||
|
||||
// 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]]);
|
||||
}
|
||||
},
|
||||
|
||||
// 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;
|
||||
},
|
||||
/******************************************************************************/
|
||||
/****************************** COLOR ANIMATIONS ******************************/
|
||||
/******************************************************************************/
|
||||
|
||||
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};
|
||||
},
|
||||
|
||||
// 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 = 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 });
|
||||
// override the animation for color styles
|
||||
$.each(['backgroundColor', 'borderBottomColor', 'borderLeftColor',
|
||||
'borderRightColor', 'borderTopColor', 'borderColor', 'color', 'outlineColor'],
|
||||
function(i, attr) {
|
||||
$.fx.step[attr] = function(fx) {
|
||||
if (!fx.colorInit) {
|
||||
fx.start = getColor(fx.elem, attr);
|
||||
fx.end = getRGB(fx.end);
|
||||
fx.colorInit = true;
|
||||
}
|
||||
|
||||
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;
|
||||
},
|
||||
|
||||
//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 == "string" ? 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);
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
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,
|
||||
__toggle: $.fn.toggle,
|
||||
_addClass: $.fn.addClass,
|
||||
_removeClass: $.fn.removeClass,
|
||||
_toggleClass: $.fn.toggleClass,
|
||||
|
||||
// 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])))
|
||||
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);
|
||||
},
|
||||
|
||||
// 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
|
||||
$.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(",") + ")";
|
||||
};
|
||||
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) + ')';
|
||||
};
|
||||
});
|
||||
|
||||
// Color Conversion functions from highlightFade
|
||||
|
@ -336,6 +138,406 @@ var colors = {
|
|||
transparent: [255,255,255]
|
||||
};
|
||||
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
/****************************** CLASS ANIMATIONS ******************************/
|
||||
/******************************************************************************/
|
||||
|
||||
var classAnimationActions = ['add', 'remove', 'toggle'],
|
||||
shorthandStyles = {
|
||||
border: 1,
|
||||
borderBottom: 1,
|
||||
borderColor: 1,
|
||||
borderLeft: 1,
|
||||
borderRight: 1,
|
||||
borderTop: 1,
|
||||
borderWidth: 1,
|
||||
margin: 1,
|
||||
padding: 1
|
||||
};
|
||||
|
||||
function getElementStyles() {
|
||||
var style = document.defaultView
|
||||
? document.defaultView.getComputedStyle(this, null)
|
||||
: this.currentStyle,
|
||||
newStyle = {},
|
||||
key,
|
||||
camelCase;
|
||||
|
||||
// webkit enumerates style porperties
|
||||
if (style && style.length && style[0] && style[style[0]]) {
|
||||
var len = style.length;
|
||||
while (len--) {
|
||||
key = style[len];
|
||||
if (typeof style[key] == 'string') {
|
||||
camelCase = key.replace(/\-(\w)/g, function(all, letter){
|
||||
return letter.toUpperCase();
|
||||
});
|
||||
newStyle[camelCase] = style[key];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (key in style) {
|
||||
if (typeof style[key] === 'string') {
|
||||
newStyle[key] = style[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return newStyle;
|
||||
}
|
||||
|
||||
function filterStyles(styles) {
|
||||
var name, value;
|
||||
for (name in styles) {
|
||||
value = styles[name];
|
||||
if (
|
||||
// ignore null and undefined values
|
||||
value == null ||
|
||||
// ignore functions (when does this occur?)
|
||||
$.isFunction(value) ||
|
||||
// shorthand styles that need to be expanded
|
||||
name in shorthandStyles ||
|
||||
// ignore scrollbars (break in IE)
|
||||
(/scrollbar/).test(name) ||
|
||||
|
||||
// only colors or values that can be converted to numbers
|
||||
(!(/color/i).test(name) && isNaN(parseFloat(value)))
|
||||
) {
|
||||
delete styles[name];
|
||||
}
|
||||
}
|
||||
|
||||
return styles;
|
||||
}
|
||||
|
||||
function styleDifference(oldStyle, newStyle) {
|
||||
var diff = { _: 0 }, // http://dev.jquery.com/ticket/5459
|
||||
name;
|
||||
|
||||
for (name in newStyle) {
|
||||
if (oldStyle[name] != newStyle[name]) {
|
||||
diff[name] = newStyle[name];
|
||||
}
|
||||
}
|
||||
|
||||
return diff;
|
||||
}
|
||||
|
||||
$.effects.animateClass = function(value, duration, easing, callback) {
|
||||
if ($.isFunction(easing)) {
|
||||
callback = easing;
|
||||
easing = null;
|
||||
}
|
||||
|
||||
return this.queue('fx', function() {
|
||||
var that = $(this),
|
||||
originalStyleAttr = that.attr('style') || ' ',
|
||||
originalStyle = filterStyles(getElementStyles.call(this)),
|
||||
newStyle,
|
||||
className = that.attr('className');
|
||||
|
||||
$.each(classAnimationActions, function(i, action) {
|
||||
if (value[action]) {
|
||||
that[action + 'Class'](value[action]);
|
||||
}
|
||||
});
|
||||
newStyle = filterStyles(getElementStyles.call(this));
|
||||
that.attr('className', className);
|
||||
|
||||
that.animate(styleDifference(originalStyle, newStyle), duration, easing, function() {
|
||||
$.each(classAnimationActions, function(i, action) {
|
||||
if (value[action]) { that[action + 'Class'](value[action]); }
|
||||
});
|
||||
// work around bug in IE by clearing the cssText before setting it
|
||||
if (typeof that.attr('style') == 'object') {
|
||||
that.attr('style').cssText = '';
|
||||
that.attr('style').cssText = originalStyleAttr;
|
||||
} else {
|
||||
that.attr('style', originalStyleAttr);
|
||||
}
|
||||
if (callback) { callback.apply(this, arguments); }
|
||||
});
|
||||
|
||||
// $.animate adds a function to the end of the queue
|
||||
// but we want it at the front
|
||||
var queue = $.queue(this),
|
||||
anim = queue.splice(queue.length - 1, 1)[0];
|
||||
queue.splice(1, 0, anim);
|
||||
$.dequeue(this);
|
||||
});
|
||||
};
|
||||
|
||||
$.fn.extend({
|
||||
_addClass: $.fn.addClass,
|
||||
addClass: function(classNames, speed, easing, callback) {
|
||||
return speed ? $.effects.animateClass.apply(this, [{ add: classNames },speed,easing,callback]) : this._addClass(classNames);
|
||||
},
|
||||
|
||||
_removeClass: $.fn.removeClass,
|
||||
removeClass: function(classNames,speed,easing,callback) {
|
||||
return speed ? $.effects.animateClass.apply(this, [{ remove: classNames },speed,easing,callback]) : this._removeClass(classNames);
|
||||
},
|
||||
|
||||
_toggleClass: $.fn.toggleClass,
|
||||
toggleClass: function(classNames, force, speed, easing, callback) {
|
||||
if ( typeof force == "boolean" || force === undefined ) {
|
||||
if ( !speed ) {
|
||||
// without speed parameter;
|
||||
return this._toggleClass(classNames, force);
|
||||
} else {
|
||||
return $.effects.animateClass.apply(this, [(force?{add:classNames}:{remove:classNames}),speed,easing,callback]);
|
||||
}
|
||||
} else {
|
||||
// without switch parameter;
|
||||
return $.effects.animateClass.apply(this, [{ toggle: classNames },force,speed,easing]);
|
||||
}
|
||||
},
|
||||
|
||||
switchClass: function(remove,add,speed,easing,callback) {
|
||||
return $.effects.animateClass.apply(this, [{ add: add, remove: remove },speed,easing,callback]);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
/*********************************** EFFECTS **********************************/
|
||||
/******************************************************************************/
|
||||
|
||||
$.extend($.effects, {
|
||||
version: "1.8.9",
|
||||
|
||||
// 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]]);
|
||||
}
|
||||
},
|
||||
|
||||
// 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;
|
||||
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};
|
||||
},
|
||||
|
||||
// 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();
|
||||
}
|
||||
|
||||
// wrap the element
|
||||
var props = {
|
||||
width: element.outerWidth(true),
|
||||
height: element.outerHeight(true),
|
||||
'float': element.css('float')
|
||||
},
|
||||
wrapper = $('<div></div>')
|
||||
.addClass('ui-effects-wrapper')
|
||||
.css({
|
||||
fontSize: '100%',
|
||||
background: 'transparent',
|
||||
border: 'none',
|
||||
margin: 0,
|
||||
padding: 0
|
||||
});
|
||||
|
||||
element.wrap(wrapper);
|
||||
wrapper = element.parent(); //Hotfix for jQuery 1.4 since some change in wrap() seems to actually loose the reference to the wrapped element
|
||||
|
||||
// transfer positioning properties to the wrapper
|
||||
if (element.css('position') == 'static') {
|
||||
wrapper.css({ position: 'relative' });
|
||||
element.css({ position: 'relative' });
|
||||
} else {
|
||||
$.extend(props, {
|
||||
position: element.css('position'),
|
||||
zIndex: element.css('z-index')
|
||||
});
|
||||
$.each(['top', 'left', 'bottom', 'right'], function(i, pos) {
|
||||
props[pos] = element.css(pos);
|
||||
if (isNaN(parseInt(props[pos], 10))) {
|
||||
props[pos] = 'auto';
|
||||
}
|
||||
});
|
||||
element.css({position: 'relative', top: 0, left: 0, right: 'auto', bottom: 'auto' });
|
||||
}
|
||||
|
||||
return wrapper.css(props).show();
|
||||
},
|
||||
|
||||
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;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
function _normalizeArguments(effect, options, speed, callback) {
|
||||
// shift params for method overloading
|
||||
if (typeof effect == 'object') {
|
||||
callback = options;
|
||||
speed = null;
|
||||
options = effect;
|
||||
effect = options.effect;
|
||||
}
|
||||
if ($.isFunction(options)) {
|
||||
callback = options;
|
||||
speed = null;
|
||||
options = {};
|
||||
}
|
||||
if (typeof options == 'number' || $.fx.speeds[options]) {
|
||||
callback = speed;
|
||||
speed = options;
|
||||
options = {};
|
||||
}
|
||||
if ($.isFunction(speed)) {
|
||||
callback = speed;
|
||||
speed = null;
|
||||
}
|
||||
|
||||
options = options || {};
|
||||
|
||||
speed = speed || options.duration;
|
||||
speed = $.fx.off ? 0 : typeof speed == 'number'
|
||||
? speed : speed in $.fx.speeds ? $.fx.speeds[speed] : $.fx.speeds._default;
|
||||
|
||||
callback = callback || options.complete;
|
||||
|
||||
return [effect, options, speed, callback];
|
||||
}
|
||||
|
||||
function standardSpeed( speed ) {
|
||||
// valid standard speeds
|
||||
if ( !speed || typeof speed === "number" || $.fx.speeds[ speed ] ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// invalid strings - treat as "normal" speed
|
||||
if ( typeof speed === "string" && !$.effects[ speed ] ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
$.fn.extend({
|
||||
effect: function(effect, options, speed, callback) {
|
||||
var args = _normalizeArguments.apply(this, arguments),
|
||||
// TODO: make effects take actual parameters instead of a hash
|
||||
args2 = {
|
||||
options: args[1],
|
||||
duration: args[2],
|
||||
callback: args[3]
|
||||
},
|
||||
mode = args2.options.mode,
|
||||
effectMethod = $.effects[effect];
|
||||
|
||||
if ( $.fx.off || !effectMethod ) {
|
||||
// delegate to the original method (e.g., .show()) if possible
|
||||
if ( mode ) {
|
||||
return this[ mode ]( args2.duration, args2.callback );
|
||||
} else {
|
||||
return this.each(function() {
|
||||
if ( args2.callback ) {
|
||||
args2.callback.call( this );
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return effectMethod.call(this, args2);
|
||||
},
|
||||
|
||||
_show: $.fn.show,
|
||||
show: function(speed) {
|
||||
if ( standardSpeed( speed ) ) {
|
||||
return this._show.apply(this, arguments);
|
||||
} else {
|
||||
var args = _normalizeArguments.apply(this, arguments);
|
||||
args[1].mode = 'show';
|
||||
return this.effect.apply(this, args);
|
||||
}
|
||||
},
|
||||
|
||||
_hide: $.fn.hide,
|
||||
hide: function(speed) {
|
||||
if ( standardSpeed( speed ) ) {
|
||||
return this._hide.apply(this, arguments);
|
||||
} else {
|
||||
var args = _normalizeArguments.apply(this, arguments);
|
||||
args[1].mode = 'hide';
|
||||
return this.effect.apply(this, args);
|
||||
}
|
||||
},
|
||||
|
||||
// jQuery core overloads toggle and creates _toggle
|
||||
__toggle: $.fn.toggle,
|
||||
toggle: function(speed) {
|
||||
if ( standardSpeed( speed ) || typeof speed === "boolean" || $.isFunction( speed ) ) {
|
||||
return this.__toggle.apply(this, arguments);
|
||||
} else {
|
||||
var args = _normalizeArguments.apply(this, arguments);
|
||||
args[1].mode = 'toggle';
|
||||
return this.effect.apply(this, args);
|
||||
}
|
||||
},
|
||||
|
||||
// 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;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
/*********************************** EASING ***********************************/
|
||||
/******************************************************************************/
|
||||
|
||||
/*
|
||||
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
|
||||
*
|
|
@ -1,23 +1,23 @@
|
|||
/*
|
||||
* jQuery UI Effects Drop 1.7.2
|
||||
* jQuery UI Effects Drop 1.8.9
|
||||
*
|
||||
* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt)
|
||||
* and GPL (GPL-LICENSE.txt) licenses.
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Effects/Drop
|
||||
*
|
||||
* Depends:
|
||||
* effects.core.js
|
||||
* jquery.effects.core.js
|
||||
*/
|
||||
(function($) {
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.effects.drop = function(o) {
|
||||
|
||||
return this.queue(function() {
|
||||
|
||||
// Create element
|
||||
var el = $(this), props = ['position','top','left','opacity'];
|
||||
var el = $(this), props = ['position','top','bottom','left','right','opacity'];
|
||||
|
||||
// Set options
|
||||
var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
|
|
@ -1,16 +1,16 @@
|
|||
/*
|
||||
* jQuery UI Effects Explode 1.7.2
|
||||
* jQuery UI Effects Explode 1.8.9
|
||||
*
|
||||
* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt)
|
||||
* and GPL (GPL-LICENSE.txt) licenses.
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Effects/Explode
|
||||
*
|
||||
* Depends:
|
||||
* effects.core.js
|
||||
* jquery.effects.core.js
|
||||
*/
|
||||
(function($) {
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.effects.explode = function(o) {
|
||||
|
32
themes/default/js/ui/jquery.effects.fade.js
vendored
Normal file
32
themes/default/js/ui/jquery.effects.fade.js
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* jQuery UI Effects Fade 1.8.9
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Effects/Fade
|
||||
*
|
||||
* Depends:
|
||||
* jquery.effects.core.js
|
||||
*/
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.effects.fade = function(o) {
|
||||
return this.queue(function() {
|
||||
var elem = $(this),
|
||||
mode = $.effects.setMode(elem, o.options.mode || 'hide');
|
||||
|
||||
elem.animate({ opacity: mode }, {
|
||||
queue: false,
|
||||
duration: o.duration,
|
||||
easing: o.options.easing,
|
||||
complete: function() {
|
||||
(o.callback && o.callback.apply(this, arguments));
|
||||
elem.dequeue();
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
})(jQuery);
|
|
@ -1,23 +1,23 @@
|
|||
/*
|
||||
* jQuery UI Effects Fold 1.7.2
|
||||
* jQuery UI Effects Fold 1.8.9
|
||||
*
|
||||
* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt)
|
||||
* and GPL (GPL-LICENSE.txt) licenses.
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Effects/Fold
|
||||
*
|
||||
* Depends:
|
||||
* effects.core.js
|
||||
* jquery.effects.core.js
|
||||
*/
|
||||
(function($) {
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.effects.fold = function(o) {
|
||||
|
||||
return this.queue(function() {
|
||||
|
||||
// Create element
|
||||
var el = $(this), props = ['position','top','left'];
|
||||
var el = $(this), props = ['position','top','bottom','left','right'];
|
||||
|
||||
// Set options
|
||||
var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
|
50
themes/default/js/ui/jquery.effects.highlight.js
vendored
Normal file
50
themes/default/js/ui/jquery.effects.highlight.js
vendored
Normal file
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
* jQuery UI Effects Highlight 1.8.9
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Effects/Highlight
|
||||
*
|
||||
* Depends:
|
||||
* jquery.effects.core.js
|
||||
*/
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.effects.highlight = function(o) {
|
||||
return this.queue(function() {
|
||||
var elem = $(this),
|
||||
props = ['backgroundImage', 'backgroundColor', 'opacity'],
|
||||
mode = $.effects.setMode(elem, o.options.mode || 'show'),
|
||||
animation = {
|
||||
backgroundColor: elem.css('backgroundColor')
|
||||
};
|
||||
|
||||
if (mode == 'hide') {
|
||||
animation.opacity = 0;
|
||||
}
|
||||
|
||||
$.effects.save(elem, props);
|
||||
elem
|
||||
.show()
|
||||
.css({
|
||||
backgroundImage: 'none',
|
||||
backgroundColor: o.options.color || '#ffff99'
|
||||
})
|
||||
.animate(animation, {
|
||||
queue: false,
|
||||
duration: o.duration,
|
||||
easing: o.options.easing,
|
||||
complete: function() {
|
||||
(mode == 'hide' && elem.hide());
|
||||
$.effects.restore(elem, props);
|
||||
(mode == 'show' && !$.support.opacity && this.style.removeAttribute('filter'));
|
||||
(o.callback && o.callback.apply(this, arguments));
|
||||
elem.dequeue();
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
})(jQuery);
|
51
themes/default/js/ui/jquery.effects.pulsate.js
vendored
Normal file
51
themes/default/js/ui/jquery.effects.pulsate.js
vendored
Normal file
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* jQuery UI Effects Pulsate 1.8.9
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Effects/Pulsate
|
||||
*
|
||||
* Depends:
|
||||
* jquery.effects.core.js
|
||||
*/
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.effects.pulsate = function(o) {
|
||||
return this.queue(function() {
|
||||
var elem = $(this),
|
||||
mode = $.effects.setMode(elem, o.options.mode || 'show');
|
||||
times = ((o.options.times || 5) * 2) - 1;
|
||||
duration = o.duration ? o.duration / 2 : $.fx.speeds._default / 2,
|
||||
isVisible = elem.is(':visible'),
|
||||
animateTo = 0;
|
||||
|
||||
if (!isVisible) {
|
||||
elem.css('opacity', 0).show();
|
||||
animateTo = 1;
|
||||
}
|
||||
|
||||
if ((mode == 'hide' && isVisible) || (mode == 'show' && !isVisible)) {
|
||||
times--;
|
||||
}
|
||||
|
||||
for (var i = 0; i < times; i++) {
|
||||
elem.animate({ opacity: animateTo }, duration, o.options.easing);
|
||||
animateTo = (animateTo + 1) % 2;
|
||||
}
|
||||
|
||||
elem.animate({ opacity: animateTo }, duration, o.options.easing, function() {
|
||||
if (animateTo == 0) {
|
||||
elem.hide();
|
||||
}
|
||||
(o.callback && o.callback.apply(this, arguments));
|
||||
});
|
||||
|
||||
elem
|
||||
.queue('fx', function() { elem.dequeue(); })
|
||||
.dequeue();
|
||||
});
|
||||
};
|
||||
|
||||
})(jQuery);
|
|
@ -1,45 +1,40 @@
|
|||
/*
|
||||
* jQuery UI Effects Scale 1.7.2
|
||||
* jQuery UI Effects Scale 1.8.9
|
||||
*
|
||||
* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt)
|
||||
* and GPL (GPL-LICENSE.txt) licenses.
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Effects/Scale
|
||||
*
|
||||
* Depends:
|
||||
* effects.core.js
|
||||
* jquery.effects.core.js
|
||||
*/
|
||||
(function($) {
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.effects.puff = function(o) {
|
||||
|
||||
return this.queue(function() {
|
||||
var elem = $(this),
|
||||
mode = $.effects.setMode(elem, o.options.mode || 'hide'),
|
||||
percent = parseInt(o.options.percent, 10) || 150,
|
||||
factor = percent / 100,
|
||||
original = { height: elem.height(), width: elem.width() };
|
||||
|
||||
// Create element
|
||||
var el = $(this);
|
||||
$.extend(o.options, {
|
||||
fade: true,
|
||||
mode: mode,
|
||||
percent: mode == 'hide' ? percent : 100,
|
||||
from: mode == 'hide'
|
||||
? original
|
||||
: {
|
||||
height: original.height * factor,
|
||||
width: original.width * factor
|
||||
}
|
||||
});
|
||||
|
||||
// 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,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();
|
||||
elem.effect('scale', o.options, o.duration, o.callback);
|
||||
elem.dequeue();
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
$.effects.scale = function(o) {
|
||||
|
@ -89,8 +84,8 @@ $.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 el = $(this), props = ['position','top','bottom','left','right','width','height','overflow','opacity'];
|
||||
var props1 = ['position','top','bottom','left','right','overflow','opacity']; // Always restore
|
||||
var props2 = ['width','height','overflow']; // Copy for children
|
||||
var cProps = ['fontSize'];
|
||||
var vProps = ['borderTopWidth', 'borderBottomWidth', 'paddingTop', 'paddingBottom'];
|
||||
|
@ -167,6 +162,9 @@ $.effects.size = function(o) {
|
|||
|
||||
// Animate
|
||||
el.animate(el.to, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() {
|
||||
if (el.to.opacity === 0) {
|
||||
el.css('opacity', el.from.opacity);
|
||||
}
|
||||
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
|
|
@ -1,23 +1,23 @@
|
|||
/*
|
||||
* jQuery UI Effects Shake 1.7.2
|
||||
* jQuery UI Effects Shake 1.8.9
|
||||
*
|
||||
* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt)
|
||||
* and GPL (GPL-LICENSE.txt) licenses.
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Effects/Shake
|
||||
*
|
||||
* Depends:
|
||||
* effects.core.js
|
||||
* jquery.effects.core.js
|
||||
*/
|
||||
(function($) {
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.effects.shake = function(o) {
|
||||
|
||||
return this.queue(function() {
|
||||
|
||||
// Create element
|
||||
var el = $(this), props = ['position','top','left'];
|
||||
var el = $(this), props = ['position','top','bottom','left','right'];
|
||||
|
||||
// Set options
|
||||
var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode
|
|
@ -1,23 +1,23 @@
|
|||
/*
|
||||
* jQuery UI Effects Slide 1.7.2
|
||||
* jQuery UI Effects Slide 1.8.9
|
||||
*
|
||||
* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt)
|
||||
* and GPL (GPL-LICENSE.txt) licenses.
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Effects/Slide
|
||||
*
|
||||
* Depends:
|
||||
* effects.core.js
|
||||
* jquery.effects.core.js
|
||||
*/
|
||||
(function($) {
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.effects.slide = function(o) {
|
||||
|
||||
return this.queue(function() {
|
||||
|
||||
// Create element
|
||||
var el = $(this), props = ['position','top','left'];
|
||||
var el = $(this), props = ['position','top','bottom','left','right'];
|
||||
|
||||
// Set options
|
||||
var mode = $.effects.setMode(el, o.options.mode || 'show'); // Set Mode
|
||||
|
@ -29,7 +29,7 @@ $.effects.slide = function(o) {
|
|||
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
|
||||
if (mode == 'show') el.css(ref, motion == 'pos' ? (isNaN(distance) ? "-" + distance : -distance) : distance); // Shift
|
||||
|
||||
// Animation
|
||||
var animation = {};
|
|
@ -1,16 +1,16 @@
|
|||
/*
|
||||
* jQuery UI Effects Transfer 1.7.2
|
||||
* jQuery UI Effects Transfer 1.8.9
|
||||
*
|
||||
* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt)
|
||||
* and GPL (GPL-LICENSE.txt) licenses.
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Effects/Transfer
|
||||
*
|
||||
* Depends:
|
||||
* effects.core.js
|
||||
* jquery.effects.core.js
|
||||
*/
|
||||
(function($) {
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.effects.transfer = function(o) {
|
||||
return this.queue(function() {
|
606
themes/default/js/ui/jquery.ui.accordion.js
vendored
Normal file
606
themes/default/js/ui/jquery.ui.accordion.js
vendored
Normal file
|
@ -0,0 +1,606 @@
|
|||
/*
|
||||
* jQuery UI Accordion 1.8.9
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Accordion
|
||||
*
|
||||
* Depends:
|
||||
* jquery.ui.core.js
|
||||
* jquery.ui.widget.js
|
||||
*/
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.widget( "ui.accordion", {
|
||||
options: {
|
||||
active: 0,
|
||||
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();
|
||||
}
|
||||
},
|
||||
|
||||
_create: function() {
|
||||
var self = this,
|
||||
options = self.options;
|
||||
|
||||
self.running = 0;
|
||||
|
||||
self.element
|
||||
.addClass( "ui-accordion ui-widget ui-helper-reset" )
|
||||
// in lack of child-selectors in CSS
|
||||
// we need to mark top-LIs in a UL-accordion for some IE-fix
|
||||
.children( "li" )
|
||||
.addClass( "ui-accordion-li-fix" );
|
||||
|
||||
self.headers = self.element.find( options.header )
|
||||
.addClass( "ui-accordion-header ui-helper-reset ui-state-default ui-corner-all" )
|
||||
.bind( "mouseenter.accordion", function() {
|
||||
if ( options.disabled ) {
|
||||
return;
|
||||
}
|
||||
$( this ).addClass( "ui-state-hover" );
|
||||
})
|
||||
.bind( "mouseleave.accordion", function() {
|
||||
if ( options.disabled ) {
|
||||
return;
|
||||
}
|
||||
$( this ).removeClass( "ui-state-hover" );
|
||||
})
|
||||
.bind( "focus.accordion", function() {
|
||||
if ( options.disabled ) {
|
||||
return;
|
||||
}
|
||||
$( this ).addClass( "ui-state-focus" );
|
||||
})
|
||||
.bind( "blur.accordion", function() {
|
||||
if ( options.disabled ) {
|
||||
return;
|
||||
}
|
||||
$( this ).removeClass( "ui-state-focus" );
|
||||
});
|
||||
|
||||
self.headers.next()
|
||||
.addClass( "ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" );
|
||||
|
||||
if ( options.navigation ) {
|
||||
var current = self.element.find( "a" ).filter( options.navigationFilter ).eq( 0 );
|
||||
if ( current.length ) {
|
||||
var header = current.closest( ".ui-accordion-header" );
|
||||
if ( header.length ) {
|
||||
// anchor within header
|
||||
self.active = header;
|
||||
} else {
|
||||
// anchor within content
|
||||
self.active = current.closest( ".ui-accordion-content" ).prev();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
self.active = self._findActive( self.active || options.active )
|
||||
.addClass( "ui-state-default ui-state-active" )
|
||||
.toggleClass( "ui-corner-all" )
|
||||
.toggleClass( "ui-corner-top" );
|
||||
self.active.next().addClass( "ui-accordion-content-active" );
|
||||
|
||||
self._createIcons();
|
||||
self.resize();
|
||||
|
||||
// ARIA
|
||||
self.element.attr( "role", "tablist" );
|
||||
|
||||
self.headers
|
||||
.attr( "role", "tab" )
|
||||
.bind( "keydown.accordion", function( event ) {
|
||||
return self._keydown( event );
|
||||
})
|
||||
.next()
|
||||
.attr( "role", "tabpanel" );
|
||||
|
||||
self.headers
|
||||
.not( self.active || "" )
|
||||
.attr({
|
||||
"aria-expanded": "false",
|
||||
tabIndex: -1
|
||||
})
|
||||
.next()
|
||||
.hide();
|
||||
|
||||
// make sure at least one header is in the tab order
|
||||
if ( !self.active.length ) {
|
||||
self.headers.eq( 0 ).attr( "tabIndex", 0 );
|
||||
} else {
|
||||
self.active
|
||||
.attr({
|
||||
"aria-expanded": "true",
|
||||
tabIndex: 0
|
||||
});
|
||||
}
|
||||
|
||||
// only need links in tab order for Safari
|
||||
if ( !$.browser.safari ) {
|
||||
self.headers.find( "a" ).attr( "tabIndex", -1 );
|
||||
}
|
||||
|
||||
if ( options.event ) {
|
||||
self.headers.bind( options.event.split(" ").join(".accordion ") + ".accordion", function(event) {
|
||||
self._clickHandler.call( self, event, this );
|
||||
event.preventDefault();
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
_createIcons: function() {
|
||||
var options = this.options;
|
||||
if ( options.icons ) {
|
||||
$( "<span></span>" )
|
||||
.addClass( "ui-icon " + options.icons.header )
|
||||
.prependTo( this.headers );
|
||||
this.active.children( ".ui-icon" )
|
||||
.toggleClass(options.icons.header)
|
||||
.toggleClass(options.icons.headerSelected);
|
||||
this.element.addClass( "ui-accordion-icons" );
|
||||
}
|
||||
},
|
||||
|
||||
_destroyIcons: function() {
|
||||
this.headers.children( ".ui-icon" ).remove();
|
||||
this.element.removeClass( "ui-accordion-icons" );
|
||||
},
|
||||
|
||||
destroy: function() {
|
||||
var options = this.options;
|
||||
|
||||
this.element
|
||||
.removeClass( "ui-accordion ui-widget ui-helper-reset" )
|
||||
.removeAttr( "role" );
|
||||
|
||||
this.headers
|
||||
.unbind( ".accordion" )
|
||||
.removeClass( "ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top" )
|
||||
.removeAttr( "role" )
|
||||
.removeAttr( "aria-expanded" )
|
||||
.removeAttr( "tabIndex" );
|
||||
|
||||
this.headers.find( "a" ).removeAttr( "tabIndex" );
|
||||
this._destroyIcons();
|
||||
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 ui-accordion-disabled ui-state-disabled" );
|
||||
if ( options.autoHeight || options.fillHeight ) {
|
||||
contents.css( "height", "" );
|
||||
}
|
||||
|
||||
return $.Widget.prototype.destroy.call( this );
|
||||
},
|
||||
|
||||
_setOption: function( key, value ) {
|
||||
$.Widget.prototype._setOption.apply( this, arguments );
|
||||
|
||||
if ( key == "active" ) {
|
||||
this.activate( value );
|
||||
}
|
||||
if ( key == "icons" ) {
|
||||
this._destroyIcons();
|
||||
if ( value ) {
|
||||
this._createIcons();
|
||||
}
|
||||
}
|
||||
// #5332 - opacity doesn't cascade to positioned elements in IE
|
||||
// so we need to add the disabled class to the headers and panels
|
||||
if ( key == "disabled" ) {
|
||||
this.headers.add(this.headers.next())
|
||||
[ value ? "addClass" : "removeClass" ](
|
||||
"ui-accordion-disabled ui-state-disabled" );
|
||||
}
|
||||
},
|
||||
|
||||
_keydown: function( event ) {
|
||||
if ( this.options.disabled || event.altKey || event.ctrlKey ) {
|
||||
return;
|
||||
}
|
||||
|
||||
var keyCode = $.ui.keyCode,
|
||||
length = this.headers.length,
|
||||
currentIndex = this.headers.index( event.target ),
|
||||
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:
|
||||
this._clickHandler( { target: event.target }, event.target );
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
if ( toFocus ) {
|
||||
$( event.target ).attr( "tabIndex", -1 );
|
||||
$( toFocus ).attr( "tabIndex", 0 );
|
||||
toFocus.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
resize: function() {
|
||||
var options = this.options,
|
||||
maxHeight;
|
||||
|
||||
if ( options.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( true );
|
||||
});
|
||||
|
||||
this.headers.next()
|
||||
.each(function() {
|
||||
$( this ).height( Math.max( 0, maxHeight -
|
||||
$( this ).innerHeight() + $( this ).height() ) );
|
||||
})
|
||||
.css( "overflow", "auto" );
|
||||
} else if ( options.autoHeight ) {
|
||||
maxHeight = 0;
|
||||
this.headers.next()
|
||||
.each(function() {
|
||||
maxHeight = Math.max( maxHeight, $( this ).height( "" ).height() );
|
||||
})
|
||||
.height( maxHeight );
|
||||
}
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
activate: function( index ) {
|
||||
// TODO this gets called on init, changing the option without an explicit call for that
|
||||
this.options.active = index;
|
||||
// call clickHandler with custom event
|
||||
var active = this._findActive( index )[ 0 ];
|
||||
this._clickHandler( { target: active }, active );
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
_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)" );
|
||||
},
|
||||
|
||||
// TODO isn't event.target enough? why the separate target argument?
|
||||
_clickHandler: function( event, target ) {
|
||||
var options = this.options;
|
||||
if ( options.disabled ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// called only when using activate(false) to close all parts programmatically
|
||||
if ( !event.target ) {
|
||||
if ( !options.collapsible ) {
|
||||
return;
|
||||
}
|
||||
this.active
|
||||
.removeClass( "ui-state-active ui-corner-top" )
|
||||
.addClass( "ui-state-default ui-corner-all" )
|
||||
.children( ".ui-icon" )
|
||||
.removeClass( options.icons.headerSelected )
|
||||
.addClass( options.icons.header );
|
||||
this.active.next().addClass( "ui-accordion-content-active" );
|
||||
var toHide = this.active.next(),
|
||||
data = {
|
||||
options: options,
|
||||
newHeader: $( [] ),
|
||||
oldHeader: options.active,
|
||||
newContent: $( [] ),
|
||||
oldContent: toHide
|
||||
},
|
||||
toShow = ( this.active = $( [] ) );
|
||||
this._toggle( toShow, toHide, data );
|
||||
return;
|
||||
}
|
||||
|
||||
// get the click target
|
||||
var clicked = $( event.currentTarget || target ),
|
||||
clickedIsActive = clicked[0] === this.active[0];
|
||||
|
||||
// TODO the option is changed, is that correct?
|
||||
// TODO if it is correct, shouldn't that happen after determining that the click is valid?
|
||||
options.active = options.collapsible && clickedIsActive ?
|
||||
false :
|
||||
this.headers.index( clicked );
|
||||
|
||||
// if animations are still active, or the active header is the target, ignore click
|
||||
if ( this.running || ( !options.collapsible && clickedIsActive ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// find elements to show and hide
|
||||
var active = this.active,
|
||||
toShow = clicked.next(),
|
||||
toHide = this.active.next(),
|
||||
data = {
|
||||
options: options,
|
||||
newHeader: clickedIsActive && options.collapsible ? $([]) : clicked,
|
||||
oldHeader: this.active,
|
||||
newContent: clickedIsActive && options.collapsible ? $([]) : toShow,
|
||||
oldContent: toHide
|
||||
},
|
||||
down = this.headers.index( this.active[0] ) > this.headers.index( clicked[0] );
|
||||
|
||||
// when the call to ._toggle() comes after the class changes
|
||||
// it causes a very odd bug in IE 8 (see #6720)
|
||||
this.active = clickedIsActive ? $([]) : clicked;
|
||||
this._toggle( toShow, toHide, data, clickedIsActive, down );
|
||||
|
||||
// switch classes
|
||||
active
|
||||
.removeClass( "ui-state-active ui-corner-top" )
|
||||
.addClass( "ui-state-default ui-corner-all" )
|
||||
.children( ".ui-icon" )
|
||||
.removeClass( options.icons.headerSelected )
|
||||
.addClass( options.icons.header );
|
||||
if ( !clickedIsActive ) {
|
||||
clicked
|
||||
.removeClass( "ui-state-default ui-corner-all" )
|
||||
.addClass( "ui-state-active ui-corner-top" )
|
||||
.children( ".ui-icon" )
|
||||
.removeClass( options.icons.header )
|
||||
.addClass( options.icons.headerSelected );
|
||||
clicked
|
||||
.next()
|
||||
.addClass( "ui-accordion-content-active" );
|
||||
}
|
||||
|
||||
return;
|
||||
},
|
||||
|
||||
_toggle: function( toShow, toHide, data, clickedIsActive, down ) {
|
||||
var self = this,
|
||||
options = self.options;
|
||||
|
||||
self.toShow = toShow;
|
||||
self.toHide = toHide;
|
||||
self.data = data;
|
||||
|
||||
var complete = function() {
|
||||
if ( !self ) {
|
||||
return;
|
||||
}
|
||||
return self._completed.apply( self, arguments );
|
||||
};
|
||||
|
||||
// trigger changestart event
|
||||
self._trigger( "changestart", null, self.data );
|
||||
|
||||
// count elements to animate
|
||||
self.running = toHide.size() === 0 ? toShow.size() : toHide.size();
|
||||
|
||||
if ( options.animated ) {
|
||||
var animOptions = {};
|
||||
|
||||
if ( options.collapsible && clickedIsActive ) {
|
||||
animOptions = {
|
||||
toShow: $( [] ),
|
||||
toHide: toHide,
|
||||
complete: complete,
|
||||
down: down,
|
||||
autoHeight: options.autoHeight || options.fillSpace
|
||||
};
|
||||
} else {
|
||||
animOptions = {
|
||||
toShow: toShow,
|
||||
toHide: toHide,
|
||||
complete: complete,
|
||||
down: down,
|
||||
autoHeight: options.autoHeight || options.fillSpace
|
||||
};
|
||||
}
|
||||
|
||||
if ( !options.proxied ) {
|
||||
options.proxied = options.animated;
|
||||
}
|
||||
|
||||
if ( !options.proxiedDuration ) {
|
||||
options.proxiedDuration = options.duration;
|
||||
}
|
||||
|
||||
options.animated = $.isFunction( options.proxied ) ?
|
||||
options.proxied( animOptions ) :
|
||||
options.proxied;
|
||||
|
||||
options.duration = $.isFunction( options.proxiedDuration ) ?
|
||||
options.proxiedDuration( animOptions ) :
|
||||
options.proxiedDuration;
|
||||
|
||||
var animations = $.ui.accordion.animations,
|
||||
duration = options.duration,
|
||||
easing = options.animated;
|
||||
|
||||
if ( easing && !animations[ easing ] && !$.easing[ easing ] ) {
|
||||
easing = "slide";
|
||||
}
|
||||
if ( !animations[ easing ] ) {
|
||||
animations[ easing ] = function( options ) {
|
||||
this.slide( options, {
|
||||
easing: easing,
|
||||
duration: duration || 700
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
animations[ easing ]( animOptions );
|
||||
} else {
|
||||
if ( options.collapsible && clickedIsActive ) {
|
||||
toShow.toggle();
|
||||
} else {
|
||||
toHide.hide();
|
||||
toShow.show();
|
||||
}
|
||||
|
||||
complete( true );
|
||||
}
|
||||
|
||||
// TODO assert that the blur and focus triggers are really necessary, remove otherwise
|
||||
toHide.prev()
|
||||
.attr({
|
||||
"aria-expanded": "false",
|
||||
tabIndex: -1
|
||||
})
|
||||
.blur();
|
||||
toShow.prev()
|
||||
.attr({
|
||||
"aria-expanded": "true",
|
||||
tabIndex: 0
|
||||
})
|
||||
.focus();
|
||||
},
|
||||
|
||||
_completed: function( cancel ) {
|
||||
this.running = cancel ? 0 : --this.running;
|
||||
if ( this.running ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( this.options.clearStyle ) {
|
||||
this.toShow.add( this.toHide ).css({
|
||||
height: "",
|
||||
overflow: ""
|
||||
});
|
||||
}
|
||||
|
||||
// other classes are removed before the animation; this one needs to stay until completed
|
||||
this.toHide.removeClass( "ui-accordion-content-active" );
|
||||
// Work around for rendering bug in IE (#5421)
|
||||
if ( this.toHide.length ) {
|
||||
this.toHide.parent()[0].className = this.toHide.parent()[0].className;
|
||||
}
|
||||
|
||||
this._trigger( "change", null, this.data );
|
||||
}
|
||||
});
|
||||
|
||||
$.extend( $.ui.accordion, {
|
||||
version: "1.8.9",
|
||||
animations: {
|
||||
slide: function( options, additions ) {
|
||||
options = $.extend({
|
||||
easing: "swing",
|
||||
duration: 300
|
||||
}, options, additions );
|
||||
if ( !options.toHide.size() ) {
|
||||
options.toShow.animate({
|
||||
height: "show",
|
||||
paddingTop: "show",
|
||||
paddingBottom: "show"
|
||||
}, options );
|
||||
return;
|
||||
}
|
||||
if ( !options.toShow.size() ) {
|
||||
options.toHide.animate({
|
||||
height: "hide",
|
||||
paddingTop: "hide",
|
||||
paddingBottom: "hide"
|
||||
}, options );
|
||||
return;
|
||||
}
|
||||
var overflow = options.toShow.css( "overflow" ),
|
||||
percentDone = 0,
|
||||
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( 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.end - settings.start === 0 ) ? 0 :
|
||||
( 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,
|
||||
overflow: overflow
|
||||
});
|
||||
options.complete();
|
||||
}
|
||||
});
|
||||
},
|
||||
bounceslide: function( options ) {
|
||||
this.slide( options, {
|
||||
easing: options.down ? "easeOutBounce" : "swing",
|
||||
duration: options.down ? 1000 : 200
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
})( jQuery );
|
11536
themes/default/js/ui/jquery.ui.all.js
vendored
11536
themes/default/js/ui/jquery.ui.all.js
vendored
File diff suppressed because one or more lines are too long
605
themes/default/js/ui/jquery.ui.autocomplete.js
vendored
Normal file
605
themes/default/js/ui/jquery.ui.autocomplete.js
vendored
Normal file
|
@ -0,0 +1,605 @@
|
|||
/*
|
||||
* jQuery UI Autocomplete 1.8.9
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Autocomplete
|
||||
*
|
||||
* Depends:
|
||||
* jquery.ui.core.js
|
||||
* jquery.ui.widget.js
|
||||
* jquery.ui.position.js
|
||||
*/
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.widget( "ui.autocomplete", {
|
||||
options: {
|
||||
appendTo: "body",
|
||||
delay: 300,
|
||||
minLength: 1,
|
||||
position: {
|
||||
my: "left top",
|
||||
at: "left bottom",
|
||||
collision: "none"
|
||||
},
|
||||
source: null
|
||||
},
|
||||
|
||||
pending: 0,
|
||||
|
||||
_create: function() {
|
||||
var self = this,
|
||||
doc = this.element[ 0 ].ownerDocument,
|
||||
suppressKeyPress;
|
||||
|
||||
this.element
|
||||
.addClass( "ui-autocomplete-input" )
|
||||
.attr( "autocomplete", "off" )
|
||||
// TODO verify these actually work as intended
|
||||
.attr({
|
||||
role: "textbox",
|
||||
"aria-autocomplete": "list",
|
||||
"aria-haspopup": "true"
|
||||
})
|
||||
.bind( "keydown.autocomplete", function( event ) {
|
||||
if ( self.options.disabled || self.element.attr( "readonly" ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
suppressKeyPress = false;
|
||||
var keyCode = $.ui.keyCode;
|
||||
switch( event.keyCode ) {
|
||||
case keyCode.PAGE_UP:
|
||||
self._move( "previousPage", event );
|
||||
break;
|
||||
case keyCode.PAGE_DOWN:
|
||||
self._move( "nextPage", event );
|
||||
break;
|
||||
case keyCode.UP:
|
||||
self._move( "previous", event );
|
||||
// prevent moving cursor to beginning of text field in some browsers
|
||||
event.preventDefault();
|
||||
break;
|
||||
case keyCode.DOWN:
|
||||
self._move( "next", event );
|
||||
// prevent moving cursor to end of text field in some browsers
|
||||
event.preventDefault();
|
||||
break;
|
||||
case keyCode.ENTER:
|
||||
case keyCode.NUMPAD_ENTER:
|
||||
// when menu is open and has focus
|
||||
if ( self.menu.active ) {
|
||||
// #6055 - Opera still allows the keypress to occur
|
||||
// which causes forms to submit
|
||||
suppressKeyPress = true;
|
||||
event.preventDefault();
|
||||
}
|
||||
//passthrough - ENTER and TAB both select the current element
|
||||
case keyCode.TAB:
|
||||
if ( !self.menu.active ) {
|
||||
return;
|
||||
}
|
||||
self.menu.select( event );
|
||||
break;
|
||||
case keyCode.ESCAPE:
|
||||
self.element.val( self.term );
|
||||
self.close( event );
|
||||
break;
|
||||
default:
|
||||
// keypress is triggered before the input value is changed
|
||||
clearTimeout( self.searching );
|
||||
self.searching = setTimeout(function() {
|
||||
// only search if the value has changed
|
||||
if ( self.term != self.element.val() ) {
|
||||
self.selectedItem = null;
|
||||
self.search( null, event );
|
||||
}
|
||||
}, self.options.delay );
|
||||
break;
|
||||
}
|
||||
})
|
||||
.bind( "keypress.autocomplete", function( event ) {
|
||||
if ( suppressKeyPress ) {
|
||||
suppressKeyPress = false;
|
||||
event.preventDefault();
|
||||
}
|
||||
})
|
||||
.bind( "focus.autocomplete", function() {
|
||||
if ( self.options.disabled ) {
|
||||
return;
|
||||
}
|
||||
|
||||
self.selectedItem = null;
|
||||
self.previous = self.element.val();
|
||||
})
|
||||
.bind( "blur.autocomplete", function( event ) {
|
||||
if ( self.options.disabled ) {
|
||||
return;
|
||||
}
|
||||
|
||||
clearTimeout( self.searching );
|
||||
// clicks on the menu (or a button to trigger a search) will cause a blur event
|
||||
self.closing = setTimeout(function() {
|
||||
self.close( event );
|
||||
self._change( event );
|
||||
}, 150 );
|
||||
});
|
||||
this._initSource();
|
||||
this.response = function() {
|
||||
return self._response.apply( self, arguments );
|
||||
};
|
||||
this.menu = $( "<ul></ul>" )
|
||||
.addClass( "ui-autocomplete" )
|
||||
.appendTo( $( this.options.appendTo || "body", doc )[0] )
|
||||
// prevent the close-on-blur in case of a "slow" click on the menu (long mousedown)
|
||||
.mousedown(function( event ) {
|
||||
// clicking on the scrollbar causes focus to shift to the body
|
||||
// but we can't detect a mouseup or a click immediately afterward
|
||||
// so we have to track the next mousedown and close the menu if
|
||||
// the user clicks somewhere outside of the autocomplete
|
||||
var menuElement = self.menu.element[ 0 ];
|
||||
if ( !$( event.target ).closest( ".ui-menu-item" ).length ) {
|
||||
setTimeout(function() {
|
||||
$( document ).one( 'mousedown', function( event ) {
|
||||
if ( event.target !== self.element[ 0 ] &&
|
||||
event.target !== menuElement &&
|
||||
!$.ui.contains( menuElement, event.target ) ) {
|
||||
self.close();
|
||||
}
|
||||
});
|
||||
}, 1 );
|
||||
}
|
||||
|
||||
// use another timeout to make sure the blur-event-handler on the input was already triggered
|
||||
setTimeout(function() {
|
||||
clearTimeout( self.closing );
|
||||
}, 13);
|
||||
})
|
||||
.menu({
|
||||
focus: function( event, ui ) {
|
||||
var item = ui.item.data( "item.autocomplete" );
|
||||
if ( false !== self._trigger( "focus", event, { item: item } ) ) {
|
||||
// use value to match what will end up in the input, if it was a key event
|
||||
if ( /^key/.test(event.originalEvent.type) ) {
|
||||
self.element.val( item.value );
|
||||
}
|
||||
}
|
||||
},
|
||||
selected: function( event, ui ) {
|
||||
var item = ui.item.data( "item.autocomplete" ),
|
||||
previous = self.previous;
|
||||
|
||||
// only trigger when focus was lost (click on menu)
|
||||
if ( self.element[0] !== doc.activeElement ) {
|
||||
self.element.focus();
|
||||
self.previous = previous;
|
||||
// #6109 - IE triggers two focus events and the second
|
||||
// is asynchronous, so we need to reset the previous
|
||||
// term synchronously and asynchronously :-(
|
||||
setTimeout(function() {
|
||||
self.previous = previous;
|
||||
self.selectedItem = item;
|
||||
}, 1);
|
||||
}
|
||||
|
||||
if ( false !== self._trigger( "select", event, { item: item } ) ) {
|
||||
self.element.val( item.value );
|
||||
}
|
||||
// reset the term after the select event
|
||||
// this allows custom select handling to work properly
|
||||
self.term = self.element.val();
|
||||
|
||||
self.close( event );
|
||||
self.selectedItem = item;
|
||||
},
|
||||
blur: function( event, ui ) {
|
||||
// don't set the value of the text field if it's already correct
|
||||
// this prevents moving the cursor unnecessarily
|
||||
if ( self.menu.element.is(":visible") &&
|
||||
( self.element.val() !== self.term ) ) {
|
||||
self.element.val( self.term );
|
||||
}
|
||||
}
|
||||
})
|
||||
.zIndex( this.element.zIndex() + 1 )
|
||||
// workaround for jQuery bug #5781 http://dev.jquery.com/ticket/5781
|
||||
.css({ top: 0, left: 0 })
|
||||
.hide()
|
||||
.data( "menu" );
|
||||
if ( $.fn.bgiframe ) {
|
||||
this.menu.element.bgiframe();
|
||||
}
|
||||
},
|
||||
|
||||
destroy: function() {
|
||||
this.element
|
||||
.removeClass( "ui-autocomplete-input" )
|
||||
.removeAttr( "autocomplete" )
|
||||
.removeAttr( "role" )
|
||||
.removeAttr( "aria-autocomplete" )
|
||||
.removeAttr( "aria-haspopup" );
|
||||
this.menu.element.remove();
|
||||
$.Widget.prototype.destroy.call( this );
|
||||
},
|
||||
|
||||
_setOption: function( key, value ) {
|
||||
$.Widget.prototype._setOption.apply( this, arguments );
|
||||
if ( key === "source" ) {
|
||||
this._initSource();
|
||||
}
|
||||
if ( key === "appendTo" ) {
|
||||
this.menu.element.appendTo( $( value || "body", this.element[0].ownerDocument )[0] )
|
||||
}
|
||||
if ( key === "disabled" && value && this.xhr ) {
|
||||
this.xhr.abort();
|
||||
}
|
||||
},
|
||||
|
||||
_initSource: function() {
|
||||
var self = this,
|
||||
array,
|
||||
url;
|
||||
if ( $.isArray(this.options.source) ) {
|
||||
array = this.options.source;
|
||||
this.source = function( request, response ) {
|
||||
response( $.ui.autocomplete.filter(array, request.term) );
|
||||
};
|
||||
} else if ( typeof this.options.source === "string" ) {
|
||||
url = this.options.source;
|
||||
this.source = function( request, response ) {
|
||||
if ( self.xhr ) {
|
||||
self.xhr.abort();
|
||||
}
|
||||
self.xhr = $.ajax({
|
||||
url: url,
|
||||
data: request,
|
||||
dataType: "json",
|
||||
success: function( data, status, xhr ) {
|
||||
if ( xhr === self.xhr ) {
|
||||
response( data );
|
||||
}
|
||||
self.xhr = null;
|
||||
},
|
||||
error: function( xhr ) {
|
||||
if ( xhr === self.xhr ) {
|
||||
response( [] );
|
||||
}
|
||||
self.xhr = null;
|
||||
}
|
||||
});
|
||||
};
|
||||
} else {
|
||||
this.source = this.options.source;
|
||||
}
|
||||
},
|
||||
|
||||
search: function( value, event ) {
|
||||
value = value != null ? value : this.element.val();
|
||||
|
||||
// always save the actual value, not the one passed as an argument
|
||||
this.term = this.element.val();
|
||||
|
||||
if ( value.length < this.options.minLength ) {
|
||||
return this.close( event );
|
||||
}
|
||||
|
||||
clearTimeout( this.closing );
|
||||
if ( this._trigger( "search", event ) === false ) {
|
||||
return;
|
||||
}
|
||||
|
||||
return this._search( value );
|
||||
},
|
||||
|
||||
_search: function( value ) {
|
||||
this.pending++;
|
||||
this.element.addClass( "ui-autocomplete-loading" );
|
||||
|
||||
this.source( { term: value }, this.response );
|
||||
},
|
||||
|
||||
_response: function( content ) {
|
||||
if ( !this.options.disabled && content && content.length ) {
|
||||
content = this._normalize( content );
|
||||
this._suggest( content );
|
||||
this._trigger( "open" );
|
||||
} else {
|
||||
this.close();
|
||||
}
|
||||
this.pending--;
|
||||
if ( !this.pending ) {
|
||||
this.element.removeClass( "ui-autocomplete-loading" );
|
||||
}
|
||||
},
|
||||
|
||||
close: function( event ) {
|
||||
clearTimeout( this.closing );
|
||||
if ( this.menu.element.is(":visible") ) {
|
||||
this.menu.element.hide();
|
||||
this.menu.deactivate();
|
||||
this._trigger( "close", event );
|
||||
}
|
||||
},
|
||||
|
||||
_change: function( event ) {
|
||||
if ( this.previous !== this.element.val() ) {
|
||||
this._trigger( "change", event, { item: this.selectedItem } );
|
||||
}
|
||||
},
|
||||
|
||||
_normalize: function( items ) {
|
||||
// assume all items have the right format when the first item is complete
|
||||
if ( items.length && items[0].label && items[0].value ) {
|
||||
return items;
|
||||
}
|
||||
return $.map( items, function(item) {
|
||||
if ( typeof item === "string" ) {
|
||||
return {
|
||||
label: item,
|
||||
value: item
|
||||
};
|
||||
}
|
||||
return $.extend({
|
||||
label: item.label || item.value,
|
||||
value: item.value || item.label
|
||||
}, item );
|
||||
});
|
||||
},
|
||||
|
||||
_suggest: function( items ) {
|
||||
var ul = this.menu.element
|
||||
.empty()
|
||||
.zIndex( this.element.zIndex() + 1 );
|
||||
this._renderMenu( ul, items );
|
||||
// TODO refresh should check if the active item is still in the dom, removing the need for a manual deactivate
|
||||
this.menu.deactivate();
|
||||
this.menu.refresh();
|
||||
|
||||
// size and position menu
|
||||
ul.show();
|
||||
this._resizeMenu();
|
||||
ul.position( $.extend({
|
||||
of: this.element
|
||||
}, this.options.position ));
|
||||
},
|
||||
|
||||
_resizeMenu: function() {
|
||||
var ul = this.menu.element;
|
||||
ul.outerWidth( Math.max(
|
||||
ul.width( "" ).outerWidth(),
|
||||
this.element.outerWidth()
|
||||
) );
|
||||
},
|
||||
|
||||
_renderMenu: function( ul, items ) {
|
||||
var self = this;
|
||||
$.each( items, function( index, item ) {
|
||||
self._renderItem( ul, item );
|
||||
});
|
||||
},
|
||||
|
||||
_renderItem: function( ul, item) {
|
||||
return $( "<li></li>" )
|
||||
.data( "item.autocomplete", item )
|
||||
.append( $( "<a></a>" ).text( item.label ) )
|
||||
.appendTo( ul );
|
||||
},
|
||||
|
||||
_move: function( direction, event ) {
|
||||
if ( !this.menu.element.is(":visible") ) {
|
||||
this.search( null, event );
|
||||
return;
|
||||
}
|
||||
if ( this.menu.first() && /^previous/.test(direction) ||
|
||||
this.menu.last() && /^next/.test(direction) ) {
|
||||
this.element.val( this.term );
|
||||
this.menu.deactivate();
|
||||
return;
|
||||
}
|
||||
this.menu[ direction ]( event );
|
||||
},
|
||||
|
||||
widget: function() {
|
||||
return this.menu.element;
|
||||
}
|
||||
});
|
||||
|
||||
$.extend( $.ui.autocomplete, {
|
||||
escapeRegex: function( value ) {
|
||||
return value.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
||||
},
|
||||
filter: function(array, term) {
|
||||
var matcher = new RegExp( $.ui.autocomplete.escapeRegex(term), "i" );
|
||||
return $.grep( array, function(value) {
|
||||
return matcher.test( value.label || value.value || value );
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
}( jQuery ));
|
||||
|
||||
/*
|
||||
* jQuery UI Menu (not officially released)
|
||||
*
|
||||
* This widget isn't yet finished and the API is subject to change. We plan to finish
|
||||
* it for the next release. You're welcome to give it a try anyway and give us feedback,
|
||||
* as long as you're okay with migrating your code later on. We can help with that, too.
|
||||
*
|
||||
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Menu
|
||||
*
|
||||
* Depends:
|
||||
* jquery.ui.core.js
|
||||
* jquery.ui.widget.js
|
||||
*/
|
||||
(function($) {
|
||||
|
||||
$.widget("ui.menu", {
|
||||
_create: function() {
|
||||
var self = this;
|
||||
this.element
|
||||
.addClass("ui-menu ui-widget ui-widget-content ui-corner-all")
|
||||
.attr({
|
||||
role: "listbox",
|
||||
"aria-activedescendant": "ui-active-menuitem"
|
||||
})
|
||||
.click(function( event ) {
|
||||
if ( !$( event.target ).closest( ".ui-menu-item a" ).length ) {
|
||||
return;
|
||||
}
|
||||
// temporary
|
||||
event.preventDefault();
|
||||
self.select( event );
|
||||
});
|
||||
this.refresh();
|
||||
},
|
||||
|
||||
refresh: function() {
|
||||
var self = this;
|
||||
|
||||
// don't refresh list items that are already adapted
|
||||
var items = this.element.children("li:not(.ui-menu-item):has(a)")
|
||||
.addClass("ui-menu-item")
|
||||
.attr("role", "menuitem");
|
||||
|
||||
items.children("a")
|
||||
.addClass("ui-corner-all")
|
||||
.attr("tabindex", -1)
|
||||
// mouseenter doesn't work with event delegation
|
||||
.mouseenter(function( event ) {
|
||||
self.activate( event, $(this).parent() );
|
||||
})
|
||||
.mouseleave(function() {
|
||||
self.deactivate();
|
||||
});
|
||||
},
|
||||
|
||||
activate: function( event, item ) {
|
||||
this.deactivate();
|
||||
if (this.hasScroll()) {
|
||||
var offset = item.offset().top - this.element.offset().top,
|
||||
scroll = this.element.attr("scrollTop"),
|
||||
elementHeight = this.element.height();
|
||||
if (offset < 0) {
|
||||
this.element.attr("scrollTop", scroll + offset);
|
||||
} else if (offset >= elementHeight) {
|
||||
this.element.attr("scrollTop", scroll + offset - elementHeight + item.height());
|
||||
}
|
||||
}
|
||||
this.active = item.eq(0)
|
||||
.children("a")
|
||||
.addClass("ui-state-hover")
|
||||
.attr("id", "ui-active-menuitem")
|
||||
.end();
|
||||
this._trigger("focus", event, { item: item });
|
||||
},
|
||||
|
||||
deactivate: function() {
|
||||
if (!this.active) { return; }
|
||||
|
||||
this.active.children("a")
|
||||
.removeClass("ui-state-hover")
|
||||
.removeAttr("id");
|
||||
this._trigger("blur");
|
||||
this.active = null;
|
||||
},
|
||||
|
||||
next: function(event) {
|
||||
this.move("next", ".ui-menu-item:first", event);
|
||||
},
|
||||
|
||||
previous: function(event) {
|
||||
this.move("prev", ".ui-menu-item:last", event);
|
||||
},
|
||||
|
||||
first: function() {
|
||||
return this.active && !this.active.prevAll(".ui-menu-item").length;
|
||||
},
|
||||
|
||||
last: function() {
|
||||
return this.active && !this.active.nextAll(".ui-menu-item").length;
|
||||
},
|
||||
|
||||
move: function(direction, edge, event) {
|
||||
if (!this.active) {
|
||||
this.activate(event, this.element.children(edge));
|
||||
return;
|
||||
}
|
||||
var next = this.active[direction + "All"](".ui-menu-item").eq(0);
|
||||
if (next.length) {
|
||||
this.activate(event, next);
|
||||
} else {
|
||||
this.activate(event, this.element.children(edge));
|
||||
}
|
||||
},
|
||||
|
||||
// TODO merge with previousPage
|
||||
nextPage: function(event) {
|
||||
if (this.hasScroll()) {
|
||||
// TODO merge with no-scroll-else
|
||||
if (!this.active || this.last()) {
|
||||
this.activate(event, this.element.children(".ui-menu-item:first"));
|
||||
return;
|
||||
}
|
||||
var base = this.active.offset().top,
|
||||
height = this.element.height(),
|
||||
result = this.element.children(".ui-menu-item").filter(function() {
|
||||
var close = $(this).offset().top - base - height + $(this).height();
|
||||
// TODO improve approximation
|
||||
return close < 10 && close > -10;
|
||||
});
|
||||
|
||||
// TODO try to catch this earlier when scrollTop indicates the last page anyway
|
||||
if (!result.length) {
|
||||
result = this.element.children(".ui-menu-item:last");
|
||||
}
|
||||
this.activate(event, result);
|
||||
} else {
|
||||
this.activate(event, this.element.children(".ui-menu-item")
|
||||
.filter(!this.active || this.last() ? ":first" : ":last"));
|
||||
}
|
||||
},
|
||||
|
||||
// TODO merge with nextPage
|
||||
previousPage: function(event) {
|
||||
if (this.hasScroll()) {
|
||||
// TODO merge with no-scroll-else
|
||||
if (!this.active || this.first()) {
|
||||
this.activate(event, this.element.children(".ui-menu-item:last"));
|
||||
return;
|
||||
}
|
||||
|
||||
var base = this.active.offset().top,
|
||||
height = this.element.height();
|
||||
result = this.element.children(".ui-menu-item").filter(function() {
|
||||
var close = $(this).offset().top - base + height - $(this).height();
|
||||
// TODO improve approximation
|
||||
return close < 10 && close > -10;
|
||||
});
|
||||
|
||||
// TODO try to catch this earlier when scrollTop indicates the last page anyway
|
||||
if (!result.length) {
|
||||
result = this.element.children(".ui-menu-item:first");
|
||||
}
|
||||
this.activate(event, result);
|
||||
} else {
|
||||
this.activate(event, this.element.children(".ui-menu-item")
|
||||
.filter(!this.active || this.first() ? ":last" : ":first"));
|
||||
}
|
||||
},
|
||||
|
||||
hasScroll: function() {
|
||||
return this.element.height() < this.element.attr("scrollHeight");
|
||||
},
|
||||
|
||||
select: function( event ) {
|
||||
this._trigger("selected", event, { item: this.active });
|
||||
}
|
||||
});
|
||||
|
||||
}(jQuery));
|
373
themes/default/js/ui/jquery.ui.button.js
vendored
Normal file
373
themes/default/js/ui/jquery.ui.button.js
vendored
Normal file
|
@ -0,0 +1,373 @@
|
|||
/*
|
||||
* jQuery UI Button 1.8.9
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Button
|
||||
*
|
||||
* Depends:
|
||||
* jquery.ui.core.js
|
||||
* jquery.ui.widget.js
|
||||
*/
|
||||
(function( $, undefined ) {
|
||||
|
||||
var lastActive,
|
||||
baseClasses = "ui-button ui-widget ui-state-default ui-corner-all",
|
||||
stateClasses = "ui-state-hover ui-state-active ",
|
||||
typeClasses = "ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",
|
||||
formResetHandler = function( event ) {
|
||||
$( ":ui-button", event.target.form ).each(function() {
|
||||
var inst = $( this ).data( "button" );
|
||||
setTimeout(function() {
|
||||
inst.refresh();
|
||||
}, 1 );
|
||||
});
|
||||
},
|
||||
radioGroup = function( radio ) {
|
||||
var name = radio.name,
|
||||
form = radio.form,
|
||||
radios = $( [] );
|
||||
if ( name ) {
|
||||
if ( form ) {
|
||||
radios = $( form ).find( "[name='" + name + "']" );
|
||||
} else {
|
||||
radios = $( "[name='" + name + "']", radio.ownerDocument )
|
||||
.filter(function() {
|
||||
return !this.form;
|
||||
});
|
||||
}
|
||||
}
|
||||
return radios;
|
||||
};
|
||||
|
||||
$.widget( "ui.button", {
|
||||
options: {
|
||||
disabled: null,
|
||||
text: true,
|
||||
label: null,
|
||||
icons: {
|
||||
primary: null,
|
||||
secondary: null
|
||||
}
|
||||
},
|
||||
_create: function() {
|
||||
this.element.closest( "form" )
|
||||
.unbind( "reset.button" )
|
||||
.bind( "reset.button", formResetHandler );
|
||||
|
||||
if ( typeof this.options.disabled !== "boolean" ) {
|
||||
this.options.disabled = this.element.attr( "disabled" );
|
||||
}
|
||||
|
||||
this._determineButtonType();
|
||||
this.hasTitle = !!this.buttonElement.attr( "title" );
|
||||
|
||||
var self = this,
|
||||
options = this.options,
|
||||
toggleButton = this.type === "checkbox" || this.type === "radio",
|
||||
hoverClass = "ui-state-hover" + ( !toggleButton ? " ui-state-active" : "" ),
|
||||
focusClass = "ui-state-focus";
|
||||
|
||||
if ( options.label === null ) {
|
||||
options.label = this.buttonElement.html();
|
||||
}
|
||||
|
||||
if ( this.element.is( ":disabled" ) ) {
|
||||
options.disabled = true;
|
||||
}
|
||||
|
||||
this.buttonElement
|
||||
.addClass( baseClasses )
|
||||
.attr( "role", "button" )
|
||||
.bind( "mouseenter.button", function() {
|
||||
if ( options.disabled ) {
|
||||
return;
|
||||
}
|
||||
$( this ).addClass( "ui-state-hover" );
|
||||
if ( this === lastActive ) {
|
||||
$( this ).addClass( "ui-state-active" );
|
||||
}
|
||||
})
|
||||
.bind( "mouseleave.button", function() {
|
||||
if ( options.disabled ) {
|
||||
return;
|
||||
}
|
||||
$( this ).removeClass( hoverClass );
|
||||
})
|
||||
.bind( "focus.button", function() {
|
||||
// no need to check disabled, focus won't be triggered anyway
|
||||
$( this ).addClass( focusClass );
|
||||
})
|
||||
.bind( "blur.button", function() {
|
||||
$( this ).removeClass( focusClass );
|
||||
});
|
||||
|
||||
if ( toggleButton ) {
|
||||
this.element.bind( "change.button", function() {
|
||||
self.refresh();
|
||||
});
|
||||
}
|
||||
|
||||
if ( this.type === "checkbox" ) {
|
||||
this.buttonElement.bind( "click.button", function() {
|
||||
if ( options.disabled ) {
|
||||
return false;
|
||||
}
|
||||
$( this ).toggleClass( "ui-state-active" );
|
||||
self.buttonElement.attr( "aria-pressed", self.element[0].checked );
|
||||
});
|
||||
} else if ( this.type === "radio" ) {
|
||||
this.buttonElement.bind( "click.button", function() {
|
||||
if ( options.disabled ) {
|
||||
return false;
|
||||
}
|
||||
$( this ).addClass( "ui-state-active" );
|
||||
self.buttonElement.attr( "aria-pressed", true );
|
||||
|
||||
var radio = self.element[ 0 ];
|
||||
radioGroup( radio )
|
||||
.not( radio )
|
||||
.map(function() {
|
||||
return $( this ).button( "widget" )[ 0 ];
|
||||
})
|
||||
.removeClass( "ui-state-active" )
|
||||
.attr( "aria-pressed", false );
|
||||
});
|
||||
} else {
|
||||
this.buttonElement
|
||||
.bind( "mousedown.button", function() {
|
||||
if ( options.disabled ) {
|
||||
return false;
|
||||
}
|
||||
$( this ).addClass( "ui-state-active" );
|
||||
lastActive = this;
|
||||
$( document ).one( "mouseup", function() {
|
||||
lastActive = null;
|
||||
});
|
||||
})
|
||||
.bind( "mouseup.button", function() {
|
||||
if ( options.disabled ) {
|
||||
return false;
|
||||
}
|
||||
$( this ).removeClass( "ui-state-active" );
|
||||
})
|
||||
.bind( "keydown.button", function(event) {
|
||||
if ( options.disabled ) {
|
||||
return false;
|
||||
}
|
||||
if ( event.keyCode == $.ui.keyCode.SPACE || event.keyCode == $.ui.keyCode.ENTER ) {
|
||||
$( this ).addClass( "ui-state-active" );
|
||||
}
|
||||
})
|
||||
.bind( "keyup.button", function() {
|
||||
$( this ).removeClass( "ui-state-active" );
|
||||
});
|
||||
|
||||
if ( this.buttonElement.is("a") ) {
|
||||
this.buttonElement.keyup(function(event) {
|
||||
if ( event.keyCode === $.ui.keyCode.SPACE ) {
|
||||
// TODO pass through original event correctly (just as 2nd argument doesn't work)
|
||||
$( this ).click();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: pull out $.Widget's handling for the disabled option into
|
||||
// $.Widget.prototype._setOptionDisabled so it's easy to proxy and can
|
||||
// be overridden by individual plugins
|
||||
this._setOption( "disabled", options.disabled );
|
||||
},
|
||||
|
||||
_determineButtonType: function() {
|
||||
|
||||
if ( this.element.is(":checkbox") ) {
|
||||
this.type = "checkbox";
|
||||
} else {
|
||||
if ( this.element.is(":radio") ) {
|
||||
this.type = "radio";
|
||||
} else {
|
||||
if ( this.element.is("input") ) {
|
||||
this.type = "input";
|
||||
} else {
|
||||
this.type = "button";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( this.type === "checkbox" || this.type === "radio" ) {
|
||||
// we don't search against the document in case the element
|
||||
// is disconnected from the DOM
|
||||
this.buttonElement = this.element.parents().last()
|
||||
.find( "label[for=" + this.element.attr("id") + "]" );
|
||||
this.element.addClass( "ui-helper-hidden-accessible" );
|
||||
|
||||
var checked = this.element.is( ":checked" );
|
||||
if ( checked ) {
|
||||
this.buttonElement.addClass( "ui-state-active" );
|
||||
}
|
||||
this.buttonElement.attr( "aria-pressed", checked );
|
||||
} else {
|
||||
this.buttonElement = this.element;
|
||||
}
|
||||
},
|
||||
|
||||
widget: function() {
|
||||
return this.buttonElement;
|
||||
},
|
||||
|
||||
destroy: function() {
|
||||
this.element
|
||||
.removeClass( "ui-helper-hidden-accessible" );
|
||||
this.buttonElement
|
||||
.removeClass( baseClasses + " " + stateClasses + " " + typeClasses )
|
||||
.removeAttr( "role" )
|
||||
.removeAttr( "aria-pressed" )
|
||||
.html( this.buttonElement.find(".ui-button-text").html() );
|
||||
|
||||
if ( !this.hasTitle ) {
|
||||
this.buttonElement.removeAttr( "title" );
|
||||
}
|
||||
|
||||
$.Widget.prototype.destroy.call( this );
|
||||
},
|
||||
|
||||
_setOption: function( key, value ) {
|
||||
$.Widget.prototype._setOption.apply( this, arguments );
|
||||
if ( key === "disabled" ) {
|
||||
if ( value ) {
|
||||
this.element.attr( "disabled", true );
|
||||
} else {
|
||||
this.element.removeAttr( "disabled" );
|
||||
}
|
||||
}
|
||||
this._resetButton();
|
||||
},
|
||||
|
||||
refresh: function() {
|
||||
var isDisabled = this.element.is( ":disabled" );
|
||||
if ( isDisabled !== this.options.disabled ) {
|
||||
this._setOption( "disabled", isDisabled );
|
||||
}
|
||||
if ( this.type === "radio" ) {
|
||||
radioGroup( this.element[0] ).each(function() {
|
||||
if ( $( this ).is( ":checked" ) ) {
|
||||
$( this ).button( "widget" )
|
||||
.addClass( "ui-state-active" )
|
||||
.attr( "aria-pressed", true );
|
||||
} else {
|
||||
$( this ).button( "widget" )
|
||||
.removeClass( "ui-state-active" )
|
||||
.attr( "aria-pressed", false );
|
||||
}
|
||||
});
|
||||
} else if ( this.type === "checkbox" ) {
|
||||
if ( this.element.is( ":checked" ) ) {
|
||||
this.buttonElement
|
||||
.addClass( "ui-state-active" )
|
||||
.attr( "aria-pressed", true );
|
||||
} else {
|
||||
this.buttonElement
|
||||
.removeClass( "ui-state-active" )
|
||||
.attr( "aria-pressed", false );
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
_resetButton: function() {
|
||||
if ( this.type === "input" ) {
|
||||
if ( this.options.label ) {
|
||||
this.element.val( this.options.label );
|
||||
}
|
||||
return;
|
||||
}
|
||||
var buttonElement = this.buttonElement.removeClass( typeClasses ),
|
||||
buttonText = $( "<span></span>" )
|
||||
.addClass( "ui-button-text" )
|
||||
.html( this.options.label )
|
||||
.appendTo( buttonElement.empty() )
|
||||
.text(),
|
||||
icons = this.options.icons,
|
||||
multipleIcons = icons.primary && icons.secondary;
|
||||
if ( icons.primary || icons.secondary ) {
|
||||
buttonElement.addClass( "ui-button-text-icon" +
|
||||
( multipleIcons ? "s" : ( icons.primary ? "-primary" : "-secondary" ) ) );
|
||||
if ( icons.primary ) {
|
||||
buttonElement.prepend( "<span class='ui-button-icon-primary ui-icon " + icons.primary + "'></span>" );
|
||||
}
|
||||
if ( icons.secondary ) {
|
||||
buttonElement.append( "<span class='ui-button-icon-secondary ui-icon " + icons.secondary + "'></span>" );
|
||||
}
|
||||
if ( !this.options.text ) {
|
||||
buttonElement
|
||||
.addClass( multipleIcons ? "ui-button-icons-only" : "ui-button-icon-only" )
|
||||
.removeClass( "ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary" );
|
||||
if ( !this.hasTitle ) {
|
||||
buttonElement.attr( "title", buttonText );
|
||||
}
|
||||
}
|
||||
} else {
|
||||
buttonElement.addClass( "ui-button-text-only" );
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$.widget( "ui.buttonset", {
|
||||
options: {
|
||||
items: ":button, :submit, :reset, :checkbox, :radio, a, :data(button)"
|
||||
},
|
||||
|
||||
_create: function() {
|
||||
this.element.addClass( "ui-buttonset" );
|
||||
},
|
||||
|
||||
_init: function() {
|
||||
this.refresh();
|
||||
},
|
||||
|
||||
_setOption: function( key, value ) {
|
||||
if ( key === "disabled" ) {
|
||||
this.buttons.button( "option", key, value );
|
||||
}
|
||||
|
||||
$.Widget.prototype._setOption.apply( this, arguments );
|
||||
},
|
||||
|
||||
refresh: function() {
|
||||
this.buttons = this.element.find( this.options.items )
|
||||
.filter( ":ui-button" )
|
||||
.button( "refresh" )
|
||||
.end()
|
||||
.not( ":ui-button" )
|
||||
.button()
|
||||
.end()
|
||||
.map(function() {
|
||||
return $( this ).button( "widget" )[ 0 ];
|
||||
})
|
||||
.removeClass( "ui-corner-all ui-corner-left ui-corner-right" )
|
||||
.filter( ":first" )
|
||||
.addClass( "ui-corner-left" )
|
||||
.end()
|
||||
.filter( ":last" )
|
||||
.addClass( "ui-corner-right" )
|
||||
.end()
|
||||
.end();
|
||||
},
|
||||
|
||||
destroy: function() {
|
||||
this.element.removeClass( "ui-buttonset" );
|
||||
this.buttons
|
||||
.map(function() {
|
||||
return $( this ).button( "widget" )[ 0 ];
|
||||
})
|
||||
.removeClass( "ui-corner-left ui-corner-right" )
|
||||
.end()
|
||||
.button( "destroy" );
|
||||
|
||||
$.Widget.prototype.destroy.call( this );
|
||||
}
|
||||
});
|
||||
|
||||
}( jQuery ) );
|
308
themes/default/js/ui/jquery.ui.core.js
vendored
Normal file
308
themes/default/js/ui/jquery.ui.core.js
vendored
Normal file
|
@ -0,0 +1,308 @@
|
|||
/*!
|
||||
* jQuery UI 1.8.9
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI
|
||||
*/
|
||||
(function( $, undefined ) {
|
||||
|
||||
// prevent duplicate loading
|
||||
// this is only a problem because we proxy existing functions
|
||||
// and we don't want to double proxy them
|
||||
$.ui = $.ui || {};
|
||||
if ( $.ui.version ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$.extend( $.ui, {
|
||||
version: "1.8.9",
|
||||
|
||||
keyCode: {
|
||||
ALT: 18,
|
||||
BACKSPACE: 8,
|
||||
CAPS_LOCK: 20,
|
||||
COMMA: 188,
|
||||
COMMAND: 91,
|
||||
COMMAND_LEFT: 91, // COMMAND
|
||||
COMMAND_RIGHT: 93,
|
||||
CONTROL: 17,
|
||||
DELETE: 46,
|
||||
DOWN: 40,
|
||||
END: 35,
|
||||
ENTER: 13,
|
||||
ESCAPE: 27,
|
||||
HOME: 36,
|
||||
INSERT: 45,
|
||||
LEFT: 37,
|
||||
MENU: 93, // COMMAND_RIGHT
|
||||
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,
|
||||
WINDOWS: 91 // COMMAND
|
||||
}
|
||||
});
|
||||
|
||||
// plugins
|
||||
$.fn.extend({
|
||||
_focus: $.fn.focus,
|
||||
focus: function( delay, fn ) {
|
||||
return typeof delay === "number" ?
|
||||
this.each(function() {
|
||||
var elem = this;
|
||||
setTimeout(function() {
|
||||
$( elem ).focus();
|
||||
if ( fn ) {
|
||||
fn.call( elem );
|
||||
}
|
||||
}, delay );
|
||||
}) :
|
||||
this._focus.apply( this, arguments );
|
||||
},
|
||||
|
||||
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;
|
||||
},
|
||||
|
||||
zIndex: function( zIndex ) {
|
||||
if ( zIndex !== undefined ) {
|
||||
return this.css( "zIndex", zIndex );
|
||||
}
|
||||
|
||||
if ( this.length ) {
|
||||
var elem = $( this[ 0 ] ), position, value;
|
||||
while ( elem.length && elem[ 0 ] !== document ) {
|
||||
// Ignore z-index if position is set to a value where z-index is ignored by the browser
|
||||
// This makes behavior of this function consistent across browsers
|
||||
// WebKit always returns auto if the element is positioned
|
||||
position = elem.css( "position" );
|
||||
if ( position === "absolute" || position === "relative" || position === "fixed" ) {
|
||||
// IE returns 0 when zIndex is not specified
|
||||
// other browsers return a string
|
||||
// we ignore the case of nested elements with an explicit value of 0
|
||||
// <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
|
||||
value = parseInt( elem.css( "zIndex" ), 10 );
|
||||
if ( !isNaN( value ) && value !== 0 ) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
elem = elem.parent();
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
},
|
||||
|
||||
disableSelection: function() {
|
||||
return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) +
|
||||
".ui-disableSelection", function( event ) {
|
||||
event.preventDefault();
|
||||
});
|
||||
},
|
||||
|
||||
enableSelection: function() {
|
||||
return this.unbind( ".ui-disableSelection" );
|
||||
}
|
||||
});
|
||||
|
||||
$.each( [ "Width", "Height" ], function( i, name ) {
|
||||
var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
|
||||
type = name.toLowerCase(),
|
||||
orig = {
|
||||
innerWidth: $.fn.innerWidth,
|
||||
innerHeight: $.fn.innerHeight,
|
||||
outerWidth: $.fn.outerWidth,
|
||||
outerHeight: $.fn.outerHeight
|
||||
};
|
||||
|
||||
function reduce( elem, size, border, margin ) {
|
||||
$.each( side, function() {
|
||||
size -= parseFloat( $.curCSS( elem, "padding" + this, true) ) || 0;
|
||||
if ( border ) {
|
||||
size -= parseFloat( $.curCSS( elem, "border" + this + "Width", true) ) || 0;
|
||||
}
|
||||
if ( margin ) {
|
||||
size -= parseFloat( $.curCSS( elem, "margin" + this, true) ) || 0;
|
||||
}
|
||||
});
|
||||
return size;
|
||||
}
|
||||
|
||||
$.fn[ "inner" + name ] = function( size ) {
|
||||
if ( size === undefined ) {
|
||||
return orig[ "inner" + name ].call( this );
|
||||
}
|
||||
|
||||
return this.each(function() {
|
||||
$( this ).css( type, reduce( this, size ) + "px" );
|
||||
});
|
||||
};
|
||||
|
||||
$.fn[ "outer" + name] = function( size, margin ) {
|
||||
if ( typeof size !== "number" ) {
|
||||
return orig[ "outer" + name ].call( this, size );
|
||||
}
|
||||
|
||||
return this.each(function() {
|
||||
$( this).css( type, reduce( this, size, true, margin ) + "px" );
|
||||
});
|
||||
};
|
||||
});
|
||||
|
||||
// selectors
|
||||
function visible( element ) {
|
||||
return !$( element ).parents().andSelf().filter(function() {
|
||||
return $.curCSS( this, "visibility" ) === "hidden" ||
|
||||
$.expr.filters.hidden( this );
|
||||
}).length;
|
||||
}
|
||||
|
||||
$.extend( $.expr[ ":" ], {
|
||||
data: function( elem, i, match ) {
|
||||
return !!$.data( elem, match[ 3 ] );
|
||||
},
|
||||
|
||||
focusable: function( element ) {
|
||||
var nodeName = element.nodeName.toLowerCase(),
|
||||
tabIndex = $.attr( element, "tabindex" );
|
||||
if ( "area" === nodeName ) {
|
||||
var map = element.parentNode,
|
||||
mapName = map.name,
|
||||
img;
|
||||
if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
|
||||
return false;
|
||||
}
|
||||
img = $( "img[usemap=#" + mapName + "]" )[0];
|
||||
return !!img && visible( img );
|
||||
}
|
||||
return ( /input|select|textarea|button|object/.test( nodeName )
|
||||
? !element.disabled
|
||||
: "a" == nodeName
|
||||
? element.href || !isNaN( tabIndex )
|
||||
: !isNaN( tabIndex ))
|
||||
// the element and all of its ancestors must be visible
|
||||
&& visible( element );
|
||||
},
|
||||
|
||||
tabbable: function( element ) {
|
||||
var tabIndex = $.attr( element, "tabindex" );
|
||||
return ( isNaN( tabIndex ) || tabIndex >= 0 ) && $( element ).is( ":focusable" );
|
||||
}
|
||||
});
|
||||
|
||||
// support
|
||||
$(function() {
|
||||
var body = document.body,
|
||||
div = body.appendChild( div = document.createElement( "div" ) );
|
||||
|
||||
$.extend( div.style, {
|
||||
minHeight: "100px",
|
||||
height: "auto",
|
||||
padding: 0,
|
||||
borderWidth: 0
|
||||
});
|
||||
|
||||
$.support.minHeight = div.offsetHeight === 100;
|
||||
$.support.selectstart = "onselectstart" in div;
|
||||
|
||||
// set display to none to avoid a layout bug in IE
|
||||
// http://dev.jquery.com/ticket/4014
|
||||
body.removeChild( div ).style.display = "none";
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// deprecated
|
||||
$.extend( $.ui, {
|
||||
// $.ui.plugin is deprecated. Use the proxy pattern instead.
|
||||
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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// will be deprecated when we switch to jQuery 1.4 - use jQuery.contains()
|
||||
contains: function( a, b ) {
|
||||
return document.compareDocumentPosition ?
|
||||
a.compareDocumentPosition( b ) & 16 :
|
||||
a !== b && a.contains( b );
|
||||
},
|
||||
|
||||
// only used by resizable
|
||||
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;
|
||||
},
|
||||
|
||||
// these are odd functions, fix the API or move into individual plugins
|
||||
isOverAxis: function( x, reference, size ) {
|
||||
//Determines when x coordinate is over "b" element axis
|
||||
return ( x > reference ) && ( x < ( reference + size ) );
|
||||
},
|
||||
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 );
|
||||
}
|
||||
});
|
||||
|
||||
})( jQuery );
|
File diff suppressed because it is too large
Load diff
857
themes/default/js/ui/jquery.ui.dialog.js
vendored
Normal file
857
themes/default/js/ui/jquery.ui.dialog.js
vendored
Normal file
|
@ -0,0 +1,857 @@
|
|||
/*
|
||||
* jQuery UI Dialog 1.8.9
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Dialog
|
||||
*
|
||||
* Depends:
|
||||
* jquery.ui.core.js
|
||||
* jquery.ui.widget.js
|
||||
* jquery.ui.button.js
|
||||
* jquery.ui.draggable.js
|
||||
* jquery.ui.mouse.js
|
||||
* jquery.ui.position.js
|
||||
* jquery.ui.resizable.js
|
||||
*/
|
||||
(function( $, undefined ) {
|
||||
|
||||
var uiDialogClasses =
|
||||
'ui-dialog ' +
|
||||
'ui-widget ' +
|
||||
'ui-widget-content ' +
|
||||
'ui-corner-all ',
|
||||
sizeRelatedOptions = {
|
||||
buttons: true,
|
||||
height: true,
|
||||
maxHeight: true,
|
||||
maxWidth: true,
|
||||
minHeight: true,
|
||||
minWidth: true,
|
||||
width: true
|
||||
},
|
||||
resizableRelatedOptions = {
|
||||
maxHeight: true,
|
||||
maxWidth: true,
|
||||
minHeight: true,
|
||||
minWidth: true
|
||||
};
|
||||
|
||||
$.widget("ui.dialog", {
|
||||
options: {
|
||||
autoOpen: true,
|
||||
buttons: {},
|
||||
closeOnEscape: true,
|
||||
closeText: 'close',
|
||||
dialogClass: '',
|
||||
draggable: true,
|
||||
hide: null,
|
||||
height: 'auto',
|
||||
maxHeight: false,
|
||||
maxWidth: false,
|
||||
minHeight: 150,
|
||||
minWidth: 150,
|
||||
modal: false,
|
||||
position: {
|
||||
my: 'center',
|
||||
at: 'center',
|
||||
collision: 'fit',
|
||||
// ensure that the titlebar is never outside the document
|
||||
using: function(pos) {
|
||||
var topOffset = $(this).css(pos).offset().top;
|
||||
if (topOffset < 0) {
|
||||
$(this).css('top', pos.top - topOffset);
|
||||
}
|
||||
}
|
||||
},
|
||||
resizable: true,
|
||||
show: null,
|
||||
stack: true,
|
||||
title: '',
|
||||
width: 300,
|
||||
zIndex: 1000
|
||||
},
|
||||
|
||||
_create: function() {
|
||||
this.originalTitle = this.element.attr('title');
|
||||
// #5742 - .attr() might return a DOMElement
|
||||
if ( typeof this.originalTitle !== "string" ) {
|
||||
this.originalTitle = "";
|
||||
}
|
||||
|
||||
this.options.title = this.options.title || this.originalTitle;
|
||||
var self = this,
|
||||
options = self.options,
|
||||
|
||||
title = options.title || ' ',
|
||||
titleId = $.ui.dialog.getTitleId(self.element),
|
||||
|
||||
uiDialog = (self.uiDialog = $('<div></div>'))
|
||||
.appendTo(document.body)
|
||||
.hide()
|
||||
.addClass(uiDialogClasses + options.dialogClass)
|
||||
.css({
|
||||
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(event) {
|
||||
if (options.closeOnEscape && event.keyCode &&
|
||||
event.keyCode === $.ui.keyCode.ESCAPE) {
|
||||
|
||||
self.close(event);
|
||||
event.preventDefault();
|
||||
}
|
||||
})
|
||||
.attr({
|
||||
role: 'dialog',
|
||||
'aria-labelledby': titleId
|
||||
})
|
||||
.mousedown(function(event) {
|
||||
self.moveToTop(false, event);
|
||||
}),
|
||||
|
||||
uiDialogContent = self.element
|
||||
.show()
|
||||
.removeAttr('title')
|
||||
.addClass(
|
||||
'ui-dialog-content ' +
|
||||
'ui-widget-content')
|
||||
.appendTo(uiDialog),
|
||||
|
||||
uiDialogTitlebar = (self.uiDialogTitlebar = $('<div></div>'))
|
||||
.addClass(
|
||||
'ui-dialog-titlebar ' +
|
||||
'ui-widget-header ' +
|
||||
'ui-corner-all ' +
|
||||
'ui-helper-clearfix'
|
||||
)
|
||||
.prependTo(uiDialog),
|
||||
|
||||
uiDialogTitlebarClose = $('<a href="#"></a>')
|
||||
.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');
|
||||
})
|
||||
.click(function(event) {
|
||||
self.close(event);
|
||||
return false;
|
||||
})
|
||||
.appendTo(uiDialogTitlebar),
|
||||
|
||||
uiDialogTitlebarCloseText = (self.uiDialogTitlebarCloseText = $('<span></span>'))
|
||||
.addClass(
|
||||
'ui-icon ' +
|
||||
'ui-icon-closethick'
|
||||
)
|
||||
.text(options.closeText)
|
||||
.appendTo(uiDialogTitlebarClose),
|
||||
|
||||
uiDialogTitle = $('<span></span>')
|
||||
.addClass('ui-dialog-title')
|
||||
.attr('id', titleId)
|
||||
.html(title)
|
||||
.prependTo(uiDialogTitlebar);
|
||||
|
||||
//handling of deprecated beforeclose (vs beforeClose) option
|
||||
//Ticket #4669 http://dev.jqueryui.com/ticket/4669
|
||||
//TODO: remove in 1.9pre
|
||||
if ($.isFunction(options.beforeclose) && !$.isFunction(options.beforeClose)) {
|
||||
options.beforeClose = options.beforeclose;
|
||||
}
|
||||
|
||||
uiDialogTitlebar.find("*").add(uiDialogTitlebar).disableSelection();
|
||||
|
||||
if (options.draggable && $.fn.draggable) {
|
||||
self._makeDraggable();
|
||||
}
|
||||
if (options.resizable && $.fn.resizable) {
|
||||
self._makeResizable();
|
||||
}
|
||||
|
||||
self._createButtons(options.buttons);
|
||||
self._isOpen = false;
|
||||
|
||||
if ($.fn.bgiframe) {
|
||||
uiDialog.bgiframe();
|
||||
}
|
||||
},
|
||||
|
||||
_init: function() {
|
||||
if ( this.options.autoOpen ) {
|
||||
this.open();
|
||||
}
|
||||
},
|
||||
|
||||
destroy: function() {
|
||||
var self = this;
|
||||
|
||||
if (self.overlay) {
|
||||
self.overlay.destroy();
|
||||
}
|
||||
self.uiDialog.hide();
|
||||
self.element
|
||||
.unbind('.dialog')
|
||||
.removeData('dialog')
|
||||
.removeClass('ui-dialog-content ui-widget-content')
|
||||
.hide().appendTo('body');
|
||||
self.uiDialog.remove();
|
||||
|
||||
if (self.originalTitle) {
|
||||
self.element.attr('title', self.originalTitle);
|
||||
}
|
||||
|
||||
return self;
|
||||
},
|
||||
|
||||
widget: function() {
|
||||
return this.uiDialog;
|
||||
},
|
||||
|
||||
close: function(event) {
|
||||
var self = this,
|
||||
maxZ, thisZ;
|
||||
|
||||
if (false === self._trigger('beforeClose', event)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (self.overlay) {
|
||||
self.overlay.destroy();
|
||||
}
|
||||
self.uiDialog.unbind('keypress.ui-dialog');
|
||||
|
||||
self._isOpen = false;
|
||||
|
||||
if (self.options.hide) {
|
||||
self.uiDialog.hide(self.options.hide, function() {
|
||||
self._trigger('close', event);
|
||||
});
|
||||
} else {
|
||||
self.uiDialog.hide();
|
||||
self._trigger('close', event);
|
||||
}
|
||||
|
||||
$.ui.dialog.overlay.resize();
|
||||
|
||||
// adjust the maxZ to allow other modal dialogs to continue to work (see #4309)
|
||||
if (self.options.modal) {
|
||||
maxZ = 0;
|
||||
$('.ui-dialog').each(function() {
|
||||
if (this !== self.uiDialog[0]) {
|
||||
thisZ = $(this).css('z-index');
|
||||
if(!isNaN(thisZ)) {
|
||||
maxZ = Math.max(maxZ, thisZ);
|
||||
}
|
||||
}
|
||||
});
|
||||
$.ui.dialog.maxZ = maxZ;
|
||||
}
|
||||
|
||||
return self;
|
||||
},
|
||||
|
||||
isOpen: function() {
|
||||
return this._isOpen;
|
||||
},
|
||||
|
||||
// the force parameter allows us to move modal dialogs to their correct
|
||||
// position on open
|
||||
moveToTop: function(force, event) {
|
||||
var self = this,
|
||||
options = self.options,
|
||||
saveScroll;
|
||||
|
||||
if ((options.modal && !force) ||
|
||||
(!options.stack && !options.modal)) {
|
||||
return self._trigger('focus', event);
|
||||
}
|
||||
|
||||
if (options.zIndex > $.ui.dialog.maxZ) {
|
||||
$.ui.dialog.maxZ = options.zIndex;
|
||||
}
|
||||
if (self.overlay) {
|
||||
$.ui.dialog.maxZ += 1;
|
||||
self.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
|
||||
saveScroll = { scrollTop: self.element.attr('scrollTop'), scrollLeft: self.element.attr('scrollLeft') };
|
||||
$.ui.dialog.maxZ += 1;
|
||||
self.uiDialog.css('z-index', $.ui.dialog.maxZ);
|
||||
self.element.attr(saveScroll);
|
||||
self._trigger('focus', event);
|
||||
|
||||
return self;
|
||||
},
|
||||
|
||||
open: function() {
|
||||
if (this._isOpen) { return; }
|
||||
|
||||
var self = this,
|
||||
options = self.options,
|
||||
uiDialog = self.uiDialog;
|
||||
|
||||
self.overlay = options.modal ? new $.ui.dialog.overlay(self) : null;
|
||||
self._size();
|
||||
self._position(options.position);
|
||||
uiDialog.show(options.show);
|
||||
self.moveToTop(true);
|
||||
|
||||
// prevent tabbing out of modal dialogs
|
||||
if (options.modal) {
|
||||
uiDialog.bind('keypress.ui-dialog', function(event) {
|
||||
if (event.keyCode !== $.ui.keyCode.TAB) {
|
||||
return;
|
||||
}
|
||||
|
||||
var tabbables = $(':tabbable', this),
|
||||
first = tabbables.filter(':first'),
|
||||
last = tabbables.filter(':last');
|
||||
|
||||
if (event.target === last[0] && !event.shiftKey) {
|
||||
first.focus(1);
|
||||
return false;
|
||||
} else if (event.target === first[0] && event.shiftKey) {
|
||||
last.focus(1);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 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
|
||||
$(self.element.find(':tabbable').get().concat(
|
||||
uiDialog.find('.ui-dialog-buttonpane :tabbable').get().concat(
|
||||
uiDialog.get()))).eq(0).focus();
|
||||
|
||||
self._isOpen = true;
|
||||
self._trigger('open');
|
||||
|
||||
return self;
|
||||
},
|
||||
|
||||
_createButtons: function(buttons) {
|
||||
var self = this,
|
||||
hasButtons = false,
|
||||
uiDialogButtonPane = $('<div></div>')
|
||||
.addClass(
|
||||
'ui-dialog-buttonpane ' +
|
||||
'ui-widget-content ' +
|
||||
'ui-helper-clearfix'
|
||||
),
|
||||
uiButtonSet = $( "<div></div>" )
|
||||
.addClass( "ui-dialog-buttonset" )
|
||||
.appendTo( uiDialogButtonPane );
|
||||
|
||||
// if we already have a button pane, remove it
|
||||
self.uiDialog.find('.ui-dialog-buttonpane').remove();
|
||||
|
||||
if (typeof buttons === 'object' && buttons !== null) {
|
||||
$.each(buttons, function() {
|
||||
return !(hasButtons = true);
|
||||
});
|
||||
}
|
||||
if (hasButtons) {
|
||||
$.each(buttons, function(name, props) {
|
||||
props = $.isFunction( props ) ?
|
||||
{ click: props, text: name } :
|
||||
props;
|
||||
var button = $('<button type="button"></button>')
|
||||
.attr( props, true )
|
||||
.unbind('click')
|
||||
.click(function() {
|
||||
props.click.apply(self.element[0], arguments);
|
||||
})
|
||||
.appendTo(uiButtonSet);
|
||||
if ($.fn.button) {
|
||||
button.button();
|
||||
}
|
||||
});
|
||||
uiDialogButtonPane.appendTo(self.uiDialog);
|
||||
}
|
||||
},
|
||||
|
||||
_makeDraggable: function() {
|
||||
var self = this,
|
||||
options = self.options,
|
||||
doc = $(document),
|
||||
heightBeforeDrag;
|
||||
|
||||
function filteredUi(ui) {
|
||||
return {
|
||||
position: ui.position,
|
||||
offset: ui.offset
|
||||
};
|
||||
}
|
||||
|
||||
self.uiDialog.draggable({
|
||||
cancel: '.ui-dialog-content, .ui-dialog-titlebar-close',
|
||||
handle: '.ui-dialog-titlebar',
|
||||
containment: 'document',
|
||||
start: function(event, ui) {
|
||||
heightBeforeDrag = options.height === "auto" ? "auto" : $(this).height();
|
||||
$(this).height($(this).height()).addClass("ui-dialog-dragging");
|
||||
self._trigger('dragStart', event, filteredUi(ui));
|
||||
},
|
||||
drag: function(event, ui) {
|
||||
self._trigger('drag', event, filteredUi(ui));
|
||||
},
|
||||
stop: function(event, ui) {
|
||||
options.position = [ui.position.left - doc.scrollLeft(),
|
||||
ui.position.top - doc.scrollTop()];
|
||||
$(this).removeClass("ui-dialog-dragging").height(heightBeforeDrag);
|
||||
self._trigger('dragStop', event, filteredUi(ui));
|
||||
$.ui.dialog.overlay.resize();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
_makeResizable: function(handles) {
|
||||
handles = (handles === undefined ? this.options.resizable : handles);
|
||||
var self = this,
|
||||
options = self.options,
|
||||
// .ui-resizable has position: relative defined in the stylesheet
|
||||
// but dialogs have to use absolute or fixed positioning
|
||||
position = self.uiDialog.css('position'),
|
||||
resizeHandles = (typeof handles === 'string' ?
|
||||
handles :
|
||||
'n,e,s,w,se,sw,ne,nw'
|
||||
);
|
||||
|
||||
function filteredUi(ui) {
|
||||
return {
|
||||
originalPosition: ui.originalPosition,
|
||||
originalSize: ui.originalSize,
|
||||
position: ui.position,
|
||||
size: ui.size
|
||||
};
|
||||
}
|
||||
|
||||
self.uiDialog.resizable({
|
||||
cancel: '.ui-dialog-content',
|
||||
containment: 'document',
|
||||
alsoResize: self.element,
|
||||
maxWidth: options.maxWidth,
|
||||
maxHeight: options.maxHeight,
|
||||
minWidth: options.minWidth,
|
||||
minHeight: self._minHeight(),
|
||||
handles: resizeHandles,
|
||||
start: function(event, ui) {
|
||||
$(this).addClass("ui-dialog-resizing");
|
||||
self._trigger('resizeStart', event, filteredUi(ui));
|
||||
},
|
||||
resize: function(event, ui) {
|
||||
self._trigger('resize', event, filteredUi(ui));
|
||||
},
|
||||
stop: function(event, ui) {
|
||||
$(this).removeClass("ui-dialog-resizing");
|
||||
options.height = $(this).height();
|
||||
options.width = $(this).width();
|
||||
self._trigger('resizeStop', event, filteredUi(ui));
|
||||
$.ui.dialog.overlay.resize();
|
||||
}
|
||||
})
|
||||
.css('position', position)
|
||||
.find('.ui-resizable-se').addClass('ui-icon ui-icon-grip-diagonal-se');
|
||||
},
|
||||
|
||||
_minHeight: function() {
|
||||
var options = this.options;
|
||||
|
||||
if (options.height === 'auto') {
|
||||
return options.minHeight;
|
||||
} else {
|
||||
return Math.min(options.minHeight, options.height);
|
||||
}
|
||||
},
|
||||
|
||||
_position: function(position) {
|
||||
var myAt = [],
|
||||
offset = [0, 0],
|
||||
isVisible;
|
||||
|
||||
if (position) {
|
||||
// deep extending converts arrays to objects in jQuery <= 1.3.2 :-(
|
||||
// if (typeof position == 'string' || $.isArray(position)) {
|
||||
// myAt = $.isArray(position) ? position : position.split(' ');
|
||||
|
||||
if (typeof position === 'string' || (typeof position === 'object' && '0' in position)) {
|
||||
myAt = position.split ? position.split(' ') : [position[0], position[1]];
|
||||
if (myAt.length === 1) {
|
||||
myAt[1] = myAt[0];
|
||||
}
|
||||
|
||||
$.each(['left', 'top'], function(i, offsetPosition) {
|
||||
if (+myAt[i] === myAt[i]) {
|
||||
offset[i] = myAt[i];
|
||||
myAt[i] = offsetPosition;
|
||||
}
|
||||
});
|
||||
|
||||
position = {
|
||||
my: myAt.join(" "),
|
||||
at: myAt.join(" "),
|
||||
offset: offset.join(" ")
|
||||
};
|
||||
}
|
||||
|
||||
position = $.extend({}, $.ui.dialog.prototype.options.position, position);
|
||||
} else {
|
||||
position = $.ui.dialog.prototype.options.position;
|
||||
}
|
||||
|
||||
// need to show the dialog to get the actual offset in the position plugin
|
||||
isVisible = this.uiDialog.is(':visible');
|
||||
if (!isVisible) {
|
||||
this.uiDialog.show();
|
||||
}
|
||||
this.uiDialog
|
||||
// workaround for jQuery bug #5781 http://dev.jquery.com/ticket/5781
|
||||
.css({ top: 0, left: 0 })
|
||||
.position($.extend({ of: window }, position));
|
||||
if (!isVisible) {
|
||||
this.uiDialog.hide();
|
||||
}
|
||||
},
|
||||
|
||||
_setOptions: function( options ) {
|
||||
var self = this,
|
||||
resizableOptions = {},
|
||||
resize = false;
|
||||
|
||||
$.each( options, function( key, value ) {
|
||||
self._setOption( key, value );
|
||||
|
||||
if ( key in sizeRelatedOptions ) {
|
||||
resize = true;
|
||||
}
|
||||
if ( key in resizableRelatedOptions ) {
|
||||
resizableOptions[ key ] = value;
|
||||
}
|
||||
});
|
||||
|
||||
if ( resize ) {
|
||||
this._size();
|
||||
}
|
||||
if ( this.uiDialog.is( ":data(resizable)" ) ) {
|
||||
this.uiDialog.resizable( "option", resizableOptions );
|
||||
}
|
||||
},
|
||||
|
||||
_setOption: function(key, value){
|
||||
var self = this,
|
||||
uiDialog = self.uiDialog;
|
||||
|
||||
switch (key) {
|
||||
//handling of deprecated beforeclose (vs beforeClose) option
|
||||
//Ticket #4669 http://dev.jqueryui.com/ticket/4669
|
||||
//TODO: remove in 1.9pre
|
||||
case "beforeclose":
|
||||
key = "beforeClose";
|
||||
break;
|
||||
case "buttons":
|
||||
self._createButtons(value);
|
||||
break;
|
||||
case "closeText":
|
||||
// ensure that we always pass a string
|
||||
self.uiDialogTitlebarCloseText.text("" + value);
|
||||
break;
|
||||
case "dialogClass":
|
||||
uiDialog
|
||||
.removeClass(self.options.dialogClass)
|
||||
.addClass(uiDialogClasses + value);
|
||||
break;
|
||||
case "disabled":
|
||||
if (value) {
|
||||
uiDialog.addClass('ui-dialog-disabled');
|
||||
} else {
|
||||
uiDialog.removeClass('ui-dialog-disabled');
|
||||
}
|
||||
break;
|
||||
case "draggable":
|
||||
var isDraggable = uiDialog.is( ":data(draggable)" );
|
||||
if ( isDraggable && !value ) {
|
||||
uiDialog.draggable( "destroy" );
|
||||
}
|
||||
|
||||
if ( !isDraggable && value ) {
|
||||
self._makeDraggable();
|
||||
}
|
||||
break;
|
||||
case "position":
|
||||
self._position(value);
|
||||
break;
|
||||
case "resizable":
|
||||
// currently resizable, becoming non-resizable
|
||||
var isResizable = uiDialog.is( ":data(resizable)" );
|
||||
if (isResizable && !value) {
|
||||
uiDialog.resizable('destroy');
|
||||
}
|
||||
|
||||
// currently resizable, changing handles
|
||||
if (isResizable && typeof value === 'string') {
|
||||
uiDialog.resizable('option', 'handles', value);
|
||||
}
|
||||
|
||||
// currently non-resizable, becoming resizable
|
||||
if (!isResizable && value !== false) {
|
||||
self._makeResizable(value);
|
||||
}
|
||||
break;
|
||||
case "title":
|
||||
// convert whatever was passed in o a string, for html() to not throw up
|
||||
$(".ui-dialog-title", self.uiDialogTitlebar).html("" + (value || ' '));
|
||||
break;
|
||||
}
|
||||
|
||||
$.Widget.prototype._setOption.apply(self, arguments);
|
||||
},
|
||||
|
||||
_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,
|
||||
nonContentHeight,
|
||||
minContentHeight,
|
||||
isVisible = this.uiDialog.is( ":visible" );
|
||||
|
||||
// reset content sizing
|
||||
this.element.show().css({
|
||||
width: 'auto',
|
||||
minHeight: 0,
|
||||
height: 0
|
||||
});
|
||||
|
||||
if (options.minWidth > options.width) {
|
||||
options.width = options.minWidth;
|
||||
}
|
||||
|
||||
// reset wrapper sizing
|
||||
// determine the height of all the non-content elements
|
||||
nonContentHeight = this.uiDialog.css({
|
||||
height: 'auto',
|
||||
width: options.width
|
||||
})
|
||||
.height();
|
||||
minContentHeight = Math.max( 0, options.minHeight - nonContentHeight );
|
||||
|
||||
if ( options.height === "auto" ) {
|
||||
// only needed for IE6 support
|
||||
if ( $.support.minHeight ) {
|
||||
this.element.css({
|
||||
minHeight: minContentHeight,
|
||||
height: "auto"
|
||||
});
|
||||
} else {
|
||||
this.uiDialog.show();
|
||||
var autoHeight = this.element.css( "height", "auto" ).height();
|
||||
if ( !isVisible ) {
|
||||
this.uiDialog.hide();
|
||||
}
|
||||
this.element.height( Math.max( autoHeight, minContentHeight ) );
|
||||
}
|
||||
} else {
|
||||
this.element.height( Math.max( options.height - nonContentHeight, 0 ) );
|
||||
}
|
||||
|
||||
if (this.uiDialog.is(':data(resizable)')) {
|
||||
this.uiDialog.resizable('option', 'minHeight', this._minHeight());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$.extend($.ui.dialog, {
|
||||
version: "1.8.9",
|
||||
|
||||
uuid: 0,
|
||||
maxZ: 0,
|
||||
|
||||
getTitleId: function($el) {
|
||||
var id = $el.attr('id');
|
||||
if (!id) {
|
||||
this.uuid += 1;
|
||||
id = this.uuid;
|
||||
}
|
||||
return 'ui-dialog-title-' + id;
|
||||
},
|
||||
|
||||
overlay: function(dialog) {
|
||||
this.$el = $.ui.dialog.overlay.create(dialog);
|
||||
}
|
||||
});
|
||||
|
||||
$.extend($.ui.dialog.overlay, {
|
||||
instances: [],
|
||||
// reuse old instances due to IE memory leak with alpha transparency (see #5185)
|
||||
oldInstances: [],
|
||||
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) {
|
||||
// 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() {
|
||||
// handle $(el).dialog().dialog('close') (see #4065)
|
||||
if ($.ui.dialog.overlay.instances.length) {
|
||||
$(document).bind($.ui.dialog.overlay.events, function(event) {
|
||||
// stop events if the z-index of the target is < the z-index of the overlay
|
||||
// we cannot return true when we don't want to cancel the event (#3523)
|
||||
if ($(event.target).zIndex() < $.ui.dialog.overlay.maxZ) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}, 1);
|
||||
|
||||
// allow closing by pressing the escape key
|
||||
$(document).bind('keydown.dialog-overlay', function(event) {
|
||||
if (dialog.options.closeOnEscape && event.keyCode &&
|
||||
event.keyCode === $.ui.keyCode.ESCAPE) {
|
||||
|
||||
dialog.close(event);
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
// handle window resize
|
||||
$(window).bind('resize.dialog-overlay', $.ui.dialog.overlay.resize);
|
||||
}
|
||||
|
||||
var $el = (this.oldInstances.pop() || $('<div></div>').addClass('ui-widget-overlay'))
|
||||
.appendTo(document.body)
|
||||
.css({
|
||||
width: this.width(),
|
||||
height: this.height()
|
||||
});
|
||||
|
||||
if ($.fn.bgiframe) {
|
||||
$el.bgiframe();
|
||||
}
|
||||
|
||||
this.instances.push($el);
|
||||
return $el;
|
||||
},
|
||||
|
||||
destroy: function($el) {
|
||||
var indexOf = $.inArray($el, this.instances);
|
||||
if (indexOf != -1){
|
||||
this.oldInstances.push(this.instances.splice(indexOf, 1)[0]);
|
||||
}
|
||||
|
||||
if (this.instances.length === 0) {
|
||||
$([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() {
|
||||
var scrollHeight,
|
||||
offsetHeight;
|
||||
// handle IE 6
|
||||
if ($.browser.msie && $.browser.version < 7) {
|
||||
scrollHeight = Math.max(
|
||||
document.documentElement.scrollHeight,
|
||||
document.body.scrollHeight
|
||||
);
|
||||
offsetHeight = Math.max(
|
||||
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() {
|
||||
var scrollWidth,
|
||||
offsetWidth;
|
||||
// handle IE 6
|
||||
if ($.browser.msie && $.browser.version < 7) {
|
||||
scrollWidth = Math.max(
|
||||
document.documentElement.scrollWidth,
|
||||
document.body.scrollWidth
|
||||
);
|
||||
offsetWidth = Math.max(
|
||||
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
|
||||
* 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));
|
|
@ -1,20 +1,48 @@
|
|||
/*
|
||||
* jQuery UI Draggable 1.7.2
|
||||
* jQuery UI Draggable 1.8.9
|
||||
*
|
||||
* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt)
|
||||
* and GPL (GPL-LICENSE.txt) licenses.
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Draggables
|
||||
*
|
||||
* Depends:
|
||||
* ui.core.js
|
||||
* jquery.ui.core.js
|
||||
* jquery.ui.mouse.js
|
||||
* jquery.ui.widget.js
|
||||
*/
|
||||
(function($) {
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.widget("ui.draggable", $.extend({}, $.ui.mouse, {
|
||||
|
||||
_init: function() {
|
||||
$.widget("ui.draggable", $.ui.mouse, {
|
||||
widgetEventPrefix: "drag",
|
||||
options: {
|
||||
addClasses: true,
|
||||
appendTo: "parent",
|
||||
axis: false,
|
||||
connectToSortable: false,
|
||||
containment: false,
|
||||
cursor: "auto",
|
||||
cursorAt: false,
|
||||
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
|
||||
},
|
||||
_create: function() {
|
||||
|
||||
if (this.options.helper == 'original' && !(/^(?:r|a|f)/).test(this.element.css("position")))
|
||||
this.element[0].style.position = 'relative';
|
||||
|
@ -35,12 +63,15 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, {
|
|||
+ " ui-draggable-dragging"
|
||||
+ " ui-draggable-disabled");
|
||||
this._mouseDestroy();
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
_mouseCapture: function(event) {
|
||||
|
||||
var o = this.options;
|
||||
|
||||
// among others, prevent a drag on a resizable-handle
|
||||
if (this.helper || o.disabled || $(event.target).is('.ui-resizable-handle'))
|
||||
return false;
|
||||
|
||||
|
@ -80,7 +111,7 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, {
|
|||
this.scrollParent = this.helper.scrollParent();
|
||||
|
||||
//The element's absolute position on the page minus margins
|
||||
this.offset = this.element.offset();
|
||||
this.offset = this.positionAbs = this.element.offset();
|
||||
this.offset = {
|
||||
top: this.offset.top - this.margins.top,
|
||||
left: this.offset.left - this.margins.left
|
||||
|
@ -96,20 +127,22 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, {
|
|||
});
|
||||
|
||||
//Generate the original position
|
||||
this.originalPosition = this._generatePosition(event);
|
||||
this.originalPosition = this.position = 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);
|
||||
(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);
|
||||
//Trigger event + callbacks
|
||||
if(this._trigger("start", event) === false) {
|
||||
this._clear();
|
||||
return false;
|
||||
}
|
||||
|
||||
//Recache the helper size
|
||||
this._cacheHelperProportions();
|
||||
|
@ -132,7 +165,10 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, {
|
|||
//Call plugins and callbacks and use the resulting position if something is returned
|
||||
if (!noPropagation) {
|
||||
var ui = this._uiHash();
|
||||
this._trigger('drag', event, ui);
|
||||
if(this._trigger('drag', event, ui) === false) {
|
||||
this._mouseUp({});
|
||||
return false;
|
||||
}
|
||||
this.position = ui.position;
|
||||
}
|
||||
|
||||
|
@ -155,20 +191,38 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, {
|
|||
dropped = this.dropped;
|
||||
this.dropped = false;
|
||||
}
|
||||
|
||||
//if the original element is removed, don't bother to continue if helper is set to "original"
|
||||
if((!this.element[0] || !this.element[0].parentNode) && this.options.helper == "original")
|
||||
return 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();
|
||||
if(self._trigger("stop", event) !== false) {
|
||||
self._clear();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this._trigger("stop", event);
|
||||
this._clear();
|
||||
if(this._trigger("stop", event) !== false) {
|
||||
this._clear();
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
},
|
||||
|
||||
cancel: function() {
|
||||
|
||||
if(this.helper.is(".ui-draggable-dragging")) {
|
||||
this._mouseUp({});
|
||||
} else {
|
||||
this._clear();
|
||||
}
|
||||
|
||||
return this;
|
||||
|
||||
},
|
||||
|
||||
_getHandle: function(event) {
|
||||
|
||||
|
@ -200,10 +254,24 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, {
|
|||
},
|
||||
|
||||
_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;
|
||||
if (typeof obj == 'string') {
|
||||
obj = obj.split(' ');
|
||||
}
|
||||
if ($.isArray(obj)) {
|
||||
obj = {left: +obj[0], top: +obj[1] || 0};
|
||||
}
|
||||
if ('left' in obj) {
|
||||
this.offset.click.left = obj.left + this.margins.left;
|
||||
}
|
||||
if ('right' in obj) {
|
||||
this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
|
||||
}
|
||||
if ('top' in obj) {
|
||||
this.offset.click.top = obj.top + this.margins.top;
|
||||
}
|
||||
if ('bottom' in obj) {
|
||||
this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
|
||||
}
|
||||
},
|
||||
|
||||
_getParentOffset: function() {
|
||||
|
@ -265,10 +333,10 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, {
|
|||
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
|
||||
(o.containment == 'document' ? 0 : $(window).scrollLeft()) - this.offset.relative.left - this.offset.parent.left,
|
||||
(o.containment == 'document' ? 0 : $(window).scrollTop()) - this.offset.relative.top - this.offset.parent.top,
|
||||
(o.containment == 'document' ? 0 : $(window).scrollLeft()) + $(o.containment == 'document' ? document : window).width() - this.helperProportions.width - this.margins.left,
|
||||
(o.containment == 'document' ? 0 : $(window).scrollTop()) + ($(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) {
|
||||
|
@ -299,13 +367,13 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, {
|
|||
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)
|
||||
- ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
|
||||
- ($.browser.safari && $.browser.version < 526 && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
|
||||
),
|
||||
left: (
|
||||
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)
|
||||
- ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
|
||||
- ($.browser.safari && $.browser.version < 526 && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
|
||||
)
|
||||
};
|
||||
|
||||
|
@ -314,15 +382,6 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, {
|
|||
_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;
|
||||
|
||||
|
@ -356,14 +415,14 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, {
|
|||
- 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)
|
||||
+ ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
|
||||
+ ($.browser.safari && $.browser.version < 526 && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
|
||||
),
|
||||
left: (
|
||||
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)
|
||||
+ ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
|
||||
+ ($.browser.safari && $.browser.version < 526 && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
|
||||
)
|
||||
};
|
||||
|
||||
|
@ -383,7 +442,7 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, {
|
|||
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);
|
||||
return $.Widget.prototype._trigger.call(this, type, event, ui);
|
||||
},
|
||||
|
||||
plugins: {},
|
||||
|
@ -392,45 +451,15 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, {
|
|||
return {
|
||||
helper: this.helper,
|
||||
position: this.position,
|
||||
absolutePosition: this.positionAbs, //deprecated
|
||||
originalPosition: this.originalPosition,
|
||||
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
|
||||
}
|
||||
version: "1.8.9"
|
||||
});
|
||||
|
||||
$.ui.plugin.add("draggable", "connectToSortable", {
|
||||
|
@ -738,15 +767,17 @@ $.ui.plugin.add("draggable", "stack", {
|
|||
|
||||
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);
|
||||
var group = $.makeArray($(o.stack)).sort(function(a,b) {
|
||||
return (parseInt($(a).css("zIndex"),10) || 0) - (parseInt($(b).css("zIndex"),10) || 0);
|
||||
});
|
||||
|
||||
if (!group.length) { return; }
|
||||
|
||||
var min = parseInt(group[0].style.zIndex) || 0;
|
||||
$(group).each(function(i) {
|
||||
this.style.zIndex = o.stack.min + i;
|
||||
this.style.zIndex = min + i;
|
||||
});
|
||||
|
||||
this[0].style.zIndex = o.stack.min + group.length;
|
||||
this[0].style.zIndex = min + group.length;
|
||||
|
||||
}
|
||||
});
|
|
@ -1,26 +1,37 @@
|
|||
/*
|
||||
* jQuery UI Droppable 1.7.2
|
||||
* jQuery UI Droppable 1.8.9
|
||||
*
|
||||
* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt)
|
||||
* and GPL (GPL-LICENSE.txt) licenses.
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Droppables
|
||||
*
|
||||
* Depends:
|
||||
* ui.core.js
|
||||
* ui.draggable.js
|
||||
* jquery.ui.core.js
|
||||
* jquery.ui.widget.js
|
||||
* jquery.ui.mouse.js
|
||||
* jquery.ui.draggable.js
|
||||
*/
|
||||
(function($) {
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.widget("ui.droppable", {
|
||||
|
||||
_init: function() {
|
||||
widgetEventPrefix: "drop",
|
||||
options: {
|
||||
accept: '*',
|
||||
activeClass: false,
|
||||
addClasses: true,
|
||||
greedy: false,
|
||||
hoverClass: false,
|
||||
scope: 'default',
|
||||
tolerance: 'intersect'
|
||||
},
|
||||
_create: 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) {
|
||||
this.accept = $.isFunction(accept) ? accept : function(d) {
|
||||
return d.is(accept);
|
||||
};
|
||||
|
||||
|
@ -28,10 +39,10 @@ $.widget("ui.droppable", {
|
|||
this.proportions = { width: this.element[0].offsetWidth, height: this.element[0].offsetHeight };
|
||||
|
||||
// Add the reference and positions to the manager
|
||||
$.ui.ddmanager.droppables[this.options.scope] = $.ui.ddmanager.droppables[this.options.scope] || [];
|
||||
$.ui.ddmanager.droppables[this.options.scope].push(this);
|
||||
$.ui.ddmanager.droppables[o.scope] = $.ui.ddmanager.droppables[o.scope] || [];
|
||||
$.ui.ddmanager.droppables[o.scope].push(this);
|
||||
|
||||
(this.options.addClasses && this.element.addClass("ui-droppable"));
|
||||
(o.addClasses && this.element.addClass("ui-droppable"));
|
||||
|
||||
},
|
||||
|
||||
|
@ -45,18 +56,18 @@ $.widget("ui.droppable", {
|
|||
.removeClass("ui-droppable ui-droppable-disabled")
|
||||
.removeData("droppable")
|
||||
.unbind(".droppable");
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
_setData: function(key, value) {
|
||||
_setOption: function(key, value) {
|
||||
|
||||
if(key == 'accept') {
|
||||
this.options.accept = value && $.isFunction(value) ? value : function(d) {
|
||||
this.accept = $.isFunction(value) ? value : function(d) {
|
||||
return d.is(value);
|
||||
};
|
||||
} else {
|
||||
$.widget.prototype._setData.apply(this, arguments);
|
||||
}
|
||||
|
||||
$.Widget.prototype._setOption.apply(this, arguments);
|
||||
},
|
||||
|
||||
_activate: function(event) {
|
||||
|
@ -76,7 +87,7 @@ $.widget("ui.droppable", {
|
|||
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[0],(draggable.currentItem || draggable.element))) {
|
||||
if (this.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));
|
||||
}
|
||||
|
@ -88,7 +99,7 @@ $.widget("ui.droppable", {
|
|||
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[0],(draggable.currentItem || draggable.element))) {
|
||||
if (this.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));
|
||||
}
|
||||
|
@ -103,13 +114,17 @@ $.widget("ui.droppable", {
|
|||
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(
|
||||
inst.options.greedy
|
||||
&& !inst.options.disabled
|
||||
&& inst.options.scope == draggable.options.scope
|
||||
&& inst.accept.call(inst.element[0], (draggable.currentItem || draggable.element))
|
||||
&& $.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.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));
|
||||
|
@ -125,7 +140,6 @@ $.widget("ui.droppable", {
|
|||
draggable: (c.currentItem || c.element),
|
||||
helper: c.helper,
|
||||
position: c.position,
|
||||
absolutePosition: c.positionAbs, //deprecated
|
||||
offset: c.positionAbs
|
||||
};
|
||||
}
|
||||
|
@ -133,17 +147,7 @@ $.widget("ui.droppable", {
|
|||
});
|
||||
|
||||
$.extend($.ui.droppable, {
|
||||
version: "1.7.2",
|
||||
eventPrefix: 'drop',
|
||||
defaults: {
|
||||
accept: '*',
|
||||
activeClass: false,
|
||||
addClasses: true,
|
||||
greedy: false,
|
||||
hoverClass: false,
|
||||
scope: 'default',
|
||||
tolerance: 'intersect'
|
||||
}
|
||||
version: "1.8.9"
|
||||
});
|
||||
|
||||
$.ui.intersect = function(draggable, droppable, toleranceMode) {
|
||||
|
@ -157,8 +161,8 @@ $.ui.intersect = function(draggable, droppable, toleranceMode) {
|
|||
|
||||
switch (toleranceMode) {
|
||||
case 'fit':
|
||||
return (l < x1 && x2 < r
|
||||
&& t < y1 && y2 < b);
|
||||
return (l <= x1 && x2 <= r
|
||||
&& t <= y1 && y2 <= b);
|
||||
break;
|
||||
case 'intersect':
|
||||
return (l < x1 + (draggable.helperProportions.width / 2) // Right Half
|
||||
|
@ -198,13 +202,13 @@ $.ui.ddmanager = {
|
|||
droppables: { 'default': [] },
|
||||
prepareOffsets: function(t, event) {
|
||||
|
||||
var m = $.ui.ddmanager.droppables[t.options.scope];
|
||||
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
|
||||
if(m[i].options.disabled || (t && !m[i].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
|
||||
|
||||
|
@ -219,13 +223,13 @@ $.ui.ddmanager = {
|
|||
drop: function(draggable, event) {
|
||||
|
||||
var dropped = false;
|
||||
$.each($.ui.ddmanager.droppables[draggable.options.scope], 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, event);
|
||||
dropped = dropped || this._drop.call(this, event);
|
||||
|
||||
if (!this.options.disabled && this.visible && this.options.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
|
||||
if (!this.options.disabled && this.visible && this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
|
||||
this.isout = 1; this.isover = 0;
|
||||
this._deactivate.call(this, event);
|
||||
}
|
||||
|
@ -240,8 +244,7 @@ $.ui.ddmanager = {
|
|||
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[draggable.options.scope], 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);
|
151
themes/default/js/ui/jquery.ui.mouse.js
vendored
Normal file
151
themes/default/js/ui/jquery.ui.mouse.js
vendored
Normal file
|
@ -0,0 +1,151 @@
|
|||
/*!
|
||||
* jQuery UI Mouse 1.8.9
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Mouse
|
||||
*
|
||||
* Depends:
|
||||
* jquery.ui.widget.js
|
||||
*/
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.widget("ui.mouse", {
|
||||
options: {
|
||||
cancel: ':input,option',
|
||||
distance: 1,
|
||||
delay: 0
|
||||
},
|
||||
_mouseInit: function() {
|
||||
var self = this;
|
||||
|
||||
this.element
|
||||
.bind('mousedown.'+this.widgetName, function(event) {
|
||||
return self._mouseDown(event);
|
||||
})
|
||||
.bind('click.'+this.widgetName, function(event) {
|
||||
if (true === $.data(event.target, self.widgetName + '.preventClickEvent')) {
|
||||
$.removeData(event.target, self.widgetName + '.preventClickEvent');
|
||||
event.stopImmediatePropagation();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
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);
|
||||
},
|
||||
|
||||
_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(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;
|
||||
}
|
||||
}
|
||||
|
||||
// these delegates are required to keep context
|
||||
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);
|
||||
|
||||
event.preventDefault();
|
||||
event.originalEvent.mouseHandled = true;
|
||||
return true;
|
||||
},
|
||||
|
||||
_mouseMove: function(event) {
|
||||
// IE mouseup check - mouseup happened when mouse was out of window
|
||||
if ($.browser.msie && !(document.documentMode >= 9) && !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;
|
||||
|
||||
if (event.target == this._mouseDownEvent.target) {
|
||||
$.data(event.target, this.widgetName + '.preventClickEvent', true);
|
||||
}
|
||||
|
||||
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;
|
||||
},
|
||||
|
||||
// These are placeholder methods, to be overriden by extending plugin
|
||||
_mouseStart: function(event) {},
|
||||
_mouseDrag: function(event) {},
|
||||
_mouseStop: function(event) {},
|
||||
_mouseCapture: function(event) { return true; }
|
||||
});
|
||||
|
||||
})(jQuery);
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue