feature 2771: upgrade jquery from 1.7.2 to 1.8.2 and jquery.ui from 1.8.16 to 1.9.0
Attention plugins: jquery ui effect script ids change when using combine_script because file names changed ... git-svn-id: http://piwigo.org/svn/trunk@18630 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
267c548896
commit
97294dac5a
159 changed files with 8872 additions and 9395 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{combine_script id='jquery.sort' load='footer' path='themes/default/js/plugins/jquery.sort.js'}
|
||||
|
||||
{footer_script require='jquery.effects.blind,jquery.sort'}{literal}
|
||||
{footer_script require='jquery.ui.effect-blind,jquery.sort'}{literal}
|
||||
var sortOrder = 'date';
|
||||
var sortPlugins = (function(a, b) {
|
||||
if (sortOrder == 'downloads' || sortOrder == 'revision' || sortOrder == 'date')
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
{combine_script id='jquery.jgrowl' load='footer' require='jquery' path='themes/default/js/plugins/jquery.jgrowl_minimized.js'}
|
||||
{combine_css path="admin/themes/default/uploadify.jGrowl.css"}
|
||||
|
||||
{footer_script require='jquery.effects.blind,jquery.ajaxmanager,jquery.jgrowl'}
|
||||
{footer_script require='jquery.ui.effect-blind,jquery.ajaxmanager,jquery.jgrowl'}
|
||||
var pwg_token = '{$PWG_TOKEN}';
|
||||
var extType = '{$EXT_TYPE}';
|
||||
var confirmMsg = '{'Are you sure?'|@translate|@escape:'javascript'}';
|
||||
|
|
|
|||
|
|
@ -936,7 +936,7 @@ class ScriptLoader
|
|||
'core.scripts' => 'themes/default/js/scripts.js',
|
||||
'jquery' => 'themes/default/js/jquery.min.js',
|
||||
'jquery.ui' => 'themes/default/js/ui/minified/jquery.ui.core.min.js',
|
||||
'jquery.effects' => 'themes/default/js/ui/minified/jquery.effects.core.min.js',
|
||||
'jquery.ui.effect' => 'themes/default/js/ui/minified/jquery.ui.effect.min.js',
|
||||
);
|
||||
|
||||
private static $ui_core_dependencies = array(
|
||||
|
|
@ -1153,7 +1153,14 @@ class ScriptLoader
|
|||
{
|
||||
$required_ids = array('jquery');
|
||||
|
||||
if ( strncmp($id, 'jquery.ui.', 10)==0 )
|
||||
if ( strncmp($id, 'jquery.ui.effect-', 17)==0 )
|
||||
{
|
||||
$required_ids = array('jquery', 'jquery.ui.effect');
|
||||
|
||||
if ( empty($script->path) )
|
||||
$script->path = dirname(self::$known_paths['jquery.ui.effect'])."/$id.min.js";
|
||||
}
|
||||
elseif ( strncmp($id, 'jquery.ui.', 10)==0 )
|
||||
{
|
||||
if ( !isset(self::$ui_core_dependencies[$id]) )
|
||||
$required_ids = array_merge(array('jquery', 'jquery.ui'), array_keys(self::$ui_core_dependencies));
|
||||
|
|
@ -1161,13 +1168,6 @@ class ScriptLoader
|
|||
if ( empty($script->path) )
|
||||
$script->path = dirname(self::$known_paths['jquery.ui'])."/$id.min.js";
|
||||
}
|
||||
elseif ( strncmp($id, 'jquery.effects.', 15)==0 )
|
||||
{
|
||||
$required_ids = array('jquery', 'jquery.effects');
|
||||
|
||||
if ( empty($script->path) )
|
||||
$script->path = dirname(self::$known_paths['jquery.effects'])."/$id.min.js";
|
||||
}
|
||||
|
||||
foreach ($required_ids as $required_id)
|
||||
{
|
||||
|
|
@ -1179,7 +1179,7 @@ class ScriptLoader
|
|||
|
||||
private function load_known_required_script($id, $load_mode)
|
||||
{
|
||||
if ( isset(self::$known_paths[$id]) or strncmp($id, 'jquery.ui.', 10)==0 or strncmp($id, 'jquery.effects.', 15)==0 )
|
||||
if ( isset(self::$known_paths[$id]) or strncmp($id, 'jquery.ui.', 10)==0 )
|
||||
{
|
||||
$this->add($id, $load_mode, array(), null);
|
||||
return true;
|
||||
|
|
|
|||
6894
themes/default/js/jquery.js
vendored
6894
themes/default/js/jquery.js
vendored
File diff suppressed because it is too large
Load diff
6
themes/default/js/jquery.min.js
vendored
6
themes/default/js/jquery.min.js
vendored
File diff suppressed because one or more lines are too long
700
themes/default/js/ui/i18n/jquery-ui-i18n.js
vendored
700
themes/default/js/ui/i18n/jquery-ui-i18n.js
vendored
File diff suppressed because it is too large
Load diff
|
|
@ -4,8 +4,8 @@
|
|||
jQuery(function($){
|
||||
$.datepicker.regional['ar-DZ'] = {
|
||||
closeText: 'إغلاق',
|
||||
prevText: '<السابق',
|
||||
nextText: 'التالي>',
|
||||
prevText: '<السابق',
|
||||
nextText: 'التالي>',
|
||||
currentText: 'اليوم',
|
||||
monthNames: ['جانفي', 'فيفري', 'مارس', 'أفريل', 'ماي', 'جوان',
|
||||
'جويلية', 'أوت', 'سبتمبر','أكتوبر', 'نوفمبر', 'ديسمبر'],
|
||||
|
|
|
|||
|
|
@ -4,15 +4,15 @@
|
|||
jQuery(function($){
|
||||
$.datepicker.regional['ar'] = {
|
||||
closeText: 'إغلاق',
|
||||
prevText: '<السابق',
|
||||
nextText: 'التالي>',
|
||||
prevText: '<السابق',
|
||||
nextText: 'التالي>',
|
||||
currentText: 'اليوم',
|
||||
monthNames: ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'مايو', 'حزيران',
|
||||
'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'],
|
||||
monthNamesShort: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
|
||||
dayNames: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
|
||||
dayNamesShort: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
|
||||
dayNamesMin: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
|
||||
dayNamesMin: ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
|
||||
weekHeader: 'أسبوع',
|
||||
dateFormat: 'dd/mm/yy',
|
||||
firstDay: 6,
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
jQuery(function($) {
|
||||
$.datepicker.regional['az'] = {
|
||||
closeText: 'Bağla',
|
||||
prevText: '<Geri',
|
||||
nextText: 'İrəli>',
|
||||
prevText: '<Geri',
|
||||
nextText: 'İrəli>',
|
||||
currentText: 'Bugün',
|
||||
monthNames: ['Yanvar','Fevral','Mart','Aprel','May','İyun',
|
||||
'İyul','Avqust','Sentyabr','Oktyabr','Noyabr','Dekabr'],
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
jQuery(function($){
|
||||
$.datepicker.regional['bg'] = {
|
||||
closeText: 'затвори',
|
||||
prevText: '<назад',
|
||||
nextText: 'напред>',
|
||||
nextBigText: '>>',
|
||||
prevText: '<назад',
|
||||
nextText: 'напред>',
|
||||
nextBigText: '>>',
|
||||
currentText: 'днес',
|
||||
monthNames: ['Януари','Февруари','Март','Април','Май','Юни',
|
||||
'Юли','Август','Септември','Октомври','Ноември','Декември'],
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
jQuery(function($){
|
||||
$.datepicker.regional['bs'] = {
|
||||
closeText: 'Zatvori',
|
||||
prevText: '<',
|
||||
nextText: '>',
|
||||
prevText: '<',
|
||||
nextText: '>',
|
||||
currentText: 'Danas',
|
||||
monthNames: ['Januar','Februar','Mart','April','Maj','Juni',
|
||||
'Juli','August','Septembar','Oktobar','Novembar','Decembar'],
|
||||
|
|
|
|||
|
|
@ -1,19 +1,19 @@
|
|||
/* Inicialització en català per a l'extenció 'calendar' per jQuery. */
|
||||
/* Inicialització en català per a l'extensió 'UI date picker' per jQuery. */
|
||||
/* Writers: (joan.leon@gmail.com). */
|
||||
jQuery(function($){
|
||||
$.datepicker.regional['ca'] = {
|
||||
closeText: 'Tancar',
|
||||
prevText: '<Ant',
|
||||
nextText: 'Seg>',
|
||||
closeText: 'Tanca',
|
||||
prevText: 'Anterior',
|
||||
nextText: 'Següent',
|
||||
currentText: 'Avui',
|
||||
monthNames: ['Gener','Febrer','Març','Abril','Maig','Juny',
|
||||
'Juliol','Agost','Setembre','Octubre','Novembre','Desembre'],
|
||||
monthNamesShort: ['Gen','Feb','Mar','Abr','Mai','Jun',
|
||||
'Jul','Ago','Set','Oct','Nov','Des'],
|
||||
dayNames: ['Diumenge','Dilluns','Dimarts','Dimecres','Dijous','Divendres','Dissabte'],
|
||||
dayNamesShort: ['Dug','Dln','Dmt','Dmc','Djs','Dvn','Dsb'],
|
||||
dayNamesMin: ['Dg','Dl','Dt','Dc','Dj','Dv','Ds'],
|
||||
weekHeader: 'Sm',
|
||||
monthNames: ['gener','febrer','març','abril','maig','juny',
|
||||
'juliol','agost','setembre','octubre','novembre','desembre'],
|
||||
monthNamesShort: ['gen','feb','març','abr','maig','juny',
|
||||
'jul','ag','set','oct','nov','des'],
|
||||
dayNames: ['diumenge','dilluns','dimarts','dimecres','dijous','divendres','dissabte'],
|
||||
dayNamesShort: ['dg','dl','dt','dc','dj','dv','ds'],
|
||||
dayNamesMin: ['dg','dl','dt','dc','dj','dv','ds'],
|
||||
weekHeader: 'Set',
|
||||
dateFormat: 'dd/mm/yy',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
jQuery(function($){
|
||||
$.datepicker.regional['cs'] = {
|
||||
closeText: 'Zavřít',
|
||||
prevText: '<Dříve',
|
||||
nextText: 'Později>',
|
||||
prevText: '<Dříve',
|
||||
nextText: 'Později>',
|
||||
currentText: 'Nyní',
|
||||
monthNames: ['leden','únor','březen','duben','květen','červen',
|
||||
'červenec','srpen','září','říjen','listopad','prosinec'],
|
||||
|
|
|
|||
23
themes/default/js/ui/i18n/jquery.ui.datepicker-cy-GB.js
vendored
Normal file
23
themes/default/js/ui/i18n/jquery.ui.datepicker-cy-GB.js
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
/* Welsh/UK initialisation for the jQuery UI date picker plugin. */
|
||||
/* Written by William Griffiths. */
|
||||
jQuery(function($){
|
||||
$.datepicker.regional['cy-GB'] = {
|
||||
closeText: 'Done',
|
||||
prevText: 'Prev',
|
||||
nextText: 'Next',
|
||||
currentText: 'Today',
|
||||
monthNames: ['Ionawr','Chwefror','Mawrth','Ebrill','Mai','Mehefin',
|
||||
'Gorffennaf','Awst','Medi','Hydref','Tachwedd','Rhagfyr'],
|
||||
monthNamesShort: ['Ion', 'Chw', 'Maw', 'Ebr', 'Mai', 'Meh',
|
||||
'Gor', 'Aws', 'Med', 'Hyd', 'Tac', 'Rha'],
|
||||
dayNames: ['Dydd Sul', 'Dydd Llun', 'Dydd Mawrth', 'Dydd Mercher', 'Dydd Iau', 'Dydd Gwener', 'Dydd Sadwrn'],
|
||||
dayNamesShort: ['Sul', 'Llu', 'Maw', 'Mer', 'Iau', 'Gwe', 'Sad'],
|
||||
dayNamesMin: ['Su','Ll','Ma','Me','Ia','Gw','Sa'],
|
||||
weekHeader: 'Wy',
|
||||
dateFormat: 'dd/mm/yy',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['cy-GB']);
|
||||
});
|
||||
|
|
@ -3,8 +3,8 @@
|
|||
jQuery(function($){
|
||||
$.datepicker.regional['da'] = {
|
||||
closeText: 'Luk',
|
||||
prevText: '<Forrige',
|
||||
nextText: 'Næste>',
|
||||
prevText: '<Forrige',
|
||||
nextText: 'Næste>',
|
||||
currentText: 'Idag',
|
||||
monthNames: ['Januar','Februar','Marts','April','Maj','Juni',
|
||||
'Juli','August','September','Oktober','November','December'],
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
jQuery(function($){
|
||||
$.datepicker.regional['de'] = {
|
||||
closeText: 'schließen',
|
||||
prevText: '<zurück',
|
||||
nextText: 'Vor>',
|
||||
prevText: '<zurück',
|
||||
nextText: 'Vor>',
|
||||
currentText: 'heute',
|
||||
monthNames: ['Januar','Februar','März','April','Mai','Juni',
|
||||
'Juli','August','September','Oktober','November','Dezember'],
|
||||
|
|
@ -13,7 +13,7 @@ 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'],
|
||||
weekHeader: 'Wo',
|
||||
weekHeader: 'KW',
|
||||
dateFormat: 'dd.mm.yy',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
jQuery(function($){
|
||||
$.datepicker.regional['eo'] = {
|
||||
closeText: 'Fermi',
|
||||
prevText: '<Anta',
|
||||
nextText: 'Sekv>',
|
||||
prevText: '<Anta',
|
||||
nextText: 'Sekv>',
|
||||
currentText: 'Nuna',
|
||||
monthNames: ['Januaro','Februaro','Marto','Aprilo','Majo','Junio',
|
||||
'Julio','Aŭgusto','Septembro','Oktobro','Novembro','Decembro'],
|
||||
|
|
|
|||
|
|
@ -3,16 +3,16 @@
|
|||
jQuery(function($){
|
||||
$.datepicker.regional['es'] = {
|
||||
closeText: 'Cerrar',
|
||||
prevText: '<Ant',
|
||||
nextText: 'Sig>',
|
||||
prevText: '<Ant',
|
||||
nextText: 'Sig>',
|
||||
currentText: 'Hoy',
|
||||
monthNames: ['Enero','Febrero','Marzo','Abril','Mayo','Junio',
|
||||
'Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'],
|
||||
monthNamesShort: ['Ene','Feb','Mar','Abr','May','Jun',
|
||||
'Jul','Ago','Sep','Oct','Nov','Dic'],
|
||||
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á'],
|
||||
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á'],
|
||||
weekHeader: 'Sm',
|
||||
dateFormat: 'dd/mm/yy',
|
||||
firstDay: 1,
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ jQuery(function($){
|
|||
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',
|
||||
weekHeader: 'näd',
|
||||
dateFormat: 'dd.mm.yy',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
|
|
|
|||
|
|
@ -3,18 +3,18 @@
|
|||
jQuery(function($){
|
||||
$.datepicker.regional['eu'] = {
|
||||
closeText: 'Egina',
|
||||
prevText: '<Aur',
|
||||
nextText: 'Hur>',
|
||||
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',
|
||||
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: ['ig.','al.','ar.','az.','og.','ol.','lr.'],
|
||||
dayNamesMin: ['ig','al','ar','az','og','ol','lr'],
|
||||
weekHeader: 'As',
|
||||
dateFormat: 'yy-mm-dd',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
|
|
|
|||
|
|
@ -4,15 +4,51 @@
|
|||
jQuery(function($) {
|
||||
$.datepicker.regional['fa'] = {
|
||||
closeText: 'بستن',
|
||||
prevText: '<قبلي',
|
||||
nextText: 'بعدي>',
|
||||
prevText: '<قبلی',
|
||||
nextText: 'بعدی>',
|
||||
currentText: 'امروز',
|
||||
monthNames: ['فروردين','ارديبهشت','خرداد','تير','مرداد','شهريور',
|
||||
'مهر','آبان','آذر','دي','بهمن','اسفند'],
|
||||
monthNames: [
|
||||
'فروردين',
|
||||
'ارديبهشت',
|
||||
'خرداد',
|
||||
'تير',
|
||||
'مرداد',
|
||||
'شهريور',
|
||||
'مهر',
|
||||
'آبان',
|
||||
'آذر',
|
||||
'دی',
|
||||
'بهمن',
|
||||
'اسفند'
|
||||
],
|
||||
monthNamesShort: ['1','2','3','4','5','6','7','8','9','10','11','12'],
|
||||
dayNames: ['يکشنبه','دوشنبه','سهشنبه','چهارشنبه','پنجشنبه','جمعه','شنبه'],
|
||||
dayNamesShort: ['ي','د','س','چ','پ','ج', 'ش'],
|
||||
dayNamesMin: ['ي','د','س','چ','پ','ج', 'ش'],
|
||||
dayNames: [
|
||||
'يکشنبه',
|
||||
'دوشنبه',
|
||||
'سهشنبه',
|
||||
'چهارشنبه',
|
||||
'پنجشنبه',
|
||||
'جمعه',
|
||||
'شنبه'
|
||||
],
|
||||
dayNamesShort: [
|
||||
'ی',
|
||||
'د',
|
||||
'س',
|
||||
'چ',
|
||||
'پ',
|
||||
'ج',
|
||||
'ش'
|
||||
],
|
||||
dayNamesMin: [
|
||||
'ی',
|
||||
'د',
|
||||
'س',
|
||||
'چ',
|
||||
'پ',
|
||||
'ج',
|
||||
'ش'
|
||||
],
|
||||
weekHeader: 'هف',
|
||||
dateFormat: 'yy/mm/dd',
|
||||
firstDay: 6,
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
/* Finnish initialisation for the jQuery UI date picker plugin. */
|
||||
/* Written by Harri Kilpi<EFBFBD> (harrikilpio@gmail.com). */
|
||||
/* Written by Harri Kilpiö (harrikilpio@gmail.com). */
|
||||
jQuery(function($){
|
||||
$.datepicker.regional['fi'] = {
|
||||
closeText: 'Sulje',
|
||||
prevText: '«Edellinen',
|
||||
nextText: 'Seuraava»',
|
||||
currentText: 'Tänään',
|
||||
monthNames: ['Tammikuu','Helmikuu','Maaliskuu','Huhtikuu','Toukokuu','Kesäkuu',
|
||||
'Heinäkuu','Elokuu','Syyskuu','Lokakuu','Marraskuu','Joulukuu'],
|
||||
monthNamesShort: ['Tammi','Helmi','Maalis','Huhti','Touko','Kesä',
|
||||
'Heinä','Elo','Syys','Loka','Marras','Joulu'],
|
||||
dayNamesShort: ['Su','Ma','Ti','Ke','To','Pe','Su'],
|
||||
prevText: '«Edellinen',
|
||||
nextText: 'Seuraava»',
|
||||
currentText: 'Tänään',
|
||||
monthNames: ['Tammikuu','Helmikuu','Maaliskuu','Huhtikuu','Toukokuu','Kesäkuu',
|
||||
'Heinäkuu','Elokuu','Syyskuu','Lokakuu','Marraskuu','Joulukuu'],
|
||||
monthNamesShort: ['Tammi','Helmi','Maalis','Huhti','Touko','Kesä',
|
||||
'Heinä','Elo','Syys','Loka','Marras','Joulu'],
|
||||
dayNamesShort: ['Su','Ma','Ti','Ke','To','Pe','La'],
|
||||
dayNames: ['Sunnuntai','Maanantai','Tiistai','Keskiviikko','Torstai','Perjantai','Lauantai'],
|
||||
dayNamesMin: ['Su','Ma','Ti','Ke','To','Pe','La'],
|
||||
weekHeader: 'Vk',
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
jQuery(function($){
|
||||
$.datepicker.regional['fo'] = {
|
||||
closeText: 'Lat aftur',
|
||||
prevText: '<Fyrra',
|
||||
nextText: 'Næsta>',
|
||||
prevText: '<Fyrra',
|
||||
nextText: 'Næsta>',
|
||||
currentText: 'Í dag',
|
||||
monthNames: ['Januar','Februar','Mars','Apríl','Mei','Juni',
|
||||
'Juli','August','September','Oktober','November','Desember'],
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
jQuery(function($){
|
||||
$.datepicker.regional['fr-CH'] = {
|
||||
closeText: 'Fermer',
|
||||
prevText: '<Préc',
|
||||
nextText: 'Suiv>',
|
||||
prevText: '<Préc',
|
||||
nextText: 'Suiv>',
|
||||
currentText: 'Courant',
|
||||
monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin',
|
||||
'Juillet','Août','Septembre','Octobre','Novembre','Décembre'],
|
||||
|
|
|
|||
|
|
@ -3,16 +3,16 @@
|
|||
jQuery(function($){
|
||||
$.datepicker.regional['gl'] = {
|
||||
closeText: 'Pechar',
|
||||
prevText: '<Ant',
|
||||
nextText: 'Seg>',
|
||||
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á'],
|
||||
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,
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@
|
|||
jQuery(function($){
|
||||
$.datepicker.regional['he'] = {
|
||||
closeText: 'סגור',
|
||||
prevText: '<הקודם',
|
||||
nextText: 'הבא>',
|
||||
prevText: '<הקודם',
|
||||
nextText: 'הבא>',
|
||||
currentText: 'היום',
|
||||
monthNames: ['ינואר','פברואר','מרץ','אפריל','מאי','יוני',
|
||||
'יולי','אוגוסט','ספטמבר','אוקטובר','נובמבר','דצמבר'],
|
||||
monthNamesShort: ['1','2','3','4','5','6',
|
||||
'7','8','9','10','11','12'],
|
||||
monthNamesShort: ['ינו','פבר','מרץ','אפר','מאי','יוני',
|
||||
'יולי','אוג','ספט','אוק','נוב','דצמ'],
|
||||
dayNames: ['ראשון','שני','שלישי','רביעי','חמישי','שישי','שבת'],
|
||||
dayNamesShort: ['א\'','ב\'','ג\'','ד\'','ה\'','ו\'','שבת'],
|
||||
dayNamesMin: ['א\'','ב\'','ג\'','ד\'','ה\'','ו\'','שבת'],
|
||||
|
|
|
|||
23
themes/default/js/ui/i18n/jquery.ui.datepicker-hi.js
vendored
Normal file
23
themes/default/js/ui/i18n/jquery.ui.datepicker-hi.js
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
/* Hindi initialisation for the jQuery UI date picker plugin. */
|
||||
/* Written by Michael Dawart. */
|
||||
jQuery(function($){
|
||||
$.datepicker.regional['hi'] = {
|
||||
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['hi']);
|
||||
});
|
||||
|
|
@ -3,8 +3,8 @@
|
|||
jQuery(function($){
|
||||
$.datepicker.regional['hr'] = {
|
||||
closeText: 'Zatvori',
|
||||
prevText: '<',
|
||||
nextText: '>',
|
||||
prevText: '<',
|
||||
nextText: '>',
|
||||
currentText: 'Danas',
|
||||
monthNames: ['Siječanj','Veljača','Ožujak','Travanj','Svibanj','Lipanj',
|
||||
'Srpanj','Kolovoz','Rujan','Listopad','Studeni','Prosinac'],
|
||||
|
|
|
|||
|
|
@ -2,19 +2,19 @@
|
|||
/* Written by Istvan Karaszi (jquery@spam.raszi.hu). */
|
||||
jQuery(function($){
|
||||
$.datepicker.regional['hu'] = {
|
||||
closeText: 'bezárás',
|
||||
prevText: '« vissza',
|
||||
nextText: 'előre »',
|
||||
closeText: 'bezár',
|
||||
prevText: 'vissza',
|
||||
nextText: 'előre',
|
||||
currentText: 'ma',
|
||||
monthNames: ['Január', 'Február', 'Március', 'Április', 'Május', 'Június',
|
||||
'Július', 'Augusztus', 'Szeptember', 'Október', 'November', 'December'],
|
||||
monthNamesShort: ['Jan', 'Feb', 'Már', 'Ápr', 'Máj', 'Jún',
|
||||
'Júl', 'Aug', 'Szep', 'Okt', 'Nov', 'Dec'],
|
||||
dayNames: ['Vasárnap', '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'],
|
||||
weekHeader: 'Hé',
|
||||
dateFormat: 'yy-mm-dd',
|
||||
weekHeader: 'Hét',
|
||||
dateFormat: 'yy.mm.dd.',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: true,
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
jQuery(function($){
|
||||
$.datepicker.regional['hy'] = {
|
||||
closeText: 'Փակել',
|
||||
prevText: '<Նախ.',
|
||||
nextText: 'Հաջ.>',
|
||||
prevText: '<Նախ.',
|
||||
nextText: 'Հաջ.>',
|
||||
currentText: 'Այսօր',
|
||||
monthNames: ['Հունվար','Փետրվար','Մարտ','Ապրիլ','Մայիս','Հունիս',
|
||||
'Հուլիս','Օգոստոս','Սեպտեմբեր','Հոկտեմբեր','Նոյեմբեր','Դեկտեմբեր'],
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
jQuery(function($){
|
||||
$.datepicker.regional['id'] = {
|
||||
closeText: 'Tutup',
|
||||
prevText: '<mundur',
|
||||
nextText: 'maju>',
|
||||
prevText: '<mundur',
|
||||
nextText: 'maju>',
|
||||
currentText: 'hari ini',
|
||||
monthNames: ['Januari','Februari','Maret','April','Mei','Juni',
|
||||
'Juli','Agustus','September','Oktober','Nopember','Desember'],
|
||||
|
|
|
|||
|
|
@ -3,16 +3,16 @@
|
|||
jQuery(function($){
|
||||
$.datepicker.regional['is'] = {
|
||||
closeText: 'Loka',
|
||||
prevText: '< Fyrri',
|
||||
nextText: 'Næsti >',
|
||||
currentText: 'Í dag',
|
||||
monthNames: ['Janúar','Febrúar','Mars','Apríl','Maí','Júní',
|
||||
'Júlí','Ágúst','September','Október','Nóvember','Desember'],
|
||||
monthNamesShort: ['Jan','Feb','Mar','Apr','Maí','Jún',
|
||||
'Júl','Ágú','Sep','Okt','Nóv','Des'],
|
||||
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'],
|
||||
prevText: '< Fyrri',
|
||||
nextText: 'Næsti >',
|
||||
currentText: 'Í dag',
|
||||
monthNames: ['Janúar','Febrúar','Mars','Apríl','Maí','Júní',
|
||||
'Júlí','Ágúst','September','Október','Nóvember','Desember'],
|
||||
monthNamesShort: ['Jan','Feb','Mar','Apr','Maí','Jún',
|
||||
'Júl','Ágú','Sep','Okt','Nóv','Des'],
|
||||
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'],
|
||||
weekHeader: 'Vika',
|
||||
dateFormat: 'dd/mm/yy',
|
||||
firstDay: 0,
|
||||
|
|
|
|||
|
|
@ -3,14 +3,14 @@
|
|||
jQuery(function($){
|
||||
$.datepicker.regional['it'] = {
|
||||
closeText: 'Chiudi',
|
||||
prevText: '<Prec',
|
||||
nextText: 'Succ>',
|
||||
prevText: '<Prec',
|
||||
nextText: 'Succ>',
|
||||
currentText: 'Oggi',
|
||||
monthNames: ['Gennaio','Febbraio','Marzo','Aprile','Maggio','Giugno',
|
||||
'Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre'],
|
||||
monthNamesShort: ['Gen','Feb','Mar','Apr','Mag','Giu',
|
||||
'Lug','Ago','Set','Ott','Nov','Dic'],
|
||||
dayNames: ['Domenica','Lunedì','Martedì','Mercoledì','Giovedì','Venerdì','Sabato'],
|
||||
dayNames: ['Domenica','Lunedì','Martedì','Mercoledì','Giovedì','Venerdì','Sabato'],
|
||||
dayNamesShort: ['Dom','Lun','Mar','Mer','Gio','Ven','Sab'],
|
||||
dayNamesMin: ['Do','Lu','Ma','Me','Gi','Ve','Sa'],
|
||||
weekHeader: 'Sm',
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
jQuery(function($){
|
||||
$.datepicker.regional['ja'] = {
|
||||
closeText: '閉じる',
|
||||
prevText: '<前',
|
||||
nextText: '次>',
|
||||
prevText: '<前',
|
||||
nextText: '次>',
|
||||
currentText: '今日',
|
||||
monthNames: ['1月','2月','3月','4月','5月','6月',
|
||||
'7月','8月','9月','10月','11月','12月'],
|
||||
|
|
|
|||
21
themes/default/js/ui/i18n/jquery.ui.datepicker-ka.js
vendored
Normal file
21
themes/default/js/ui/i18n/jquery.ui.datepicker-ka.js
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
/* Georgian (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
||||
/* Written by Lado Lomidze (lado.lomidze@gmail.com). */
|
||||
jQuery(function($){
|
||||
$.datepicker.regional['ka'] = {
|
||||
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['ka']);
|
||||
});
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
/* Kazakh (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
||||
/* Written by Dmitriy Karasyov (dmitriy.karasyov@gmail.com). */
|
||||
jQuery(function($){
|
||||
$.datepicker.regional['kz'] = {
|
||||
$.datepicker.regional['kk'] = {
|
||||
closeText: 'Жабу',
|
||||
prevText: '<Алдыңғы',
|
||||
nextText: 'Келесі>',
|
||||
prevText: '<Алдыңғы',
|
||||
nextText: 'Келесі>',
|
||||
currentText: 'Бүгін',
|
||||
monthNames: ['Қаңтар','Ақпан','Наурыз','Сәуір','Мамыр','Маусым',
|
||||
'Шілде','Тамыз','Қыркүйек','Қазан','Қараша','Желтоқсан'],
|
||||
|
|
@ -19,5 +19,5 @@ jQuery(function($){
|
|||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['kz']);
|
||||
$.datepicker.setDefaults($.datepicker.regional['kk']);
|
||||
});
|
||||
23
themes/default/js/ui/i18n/jquery.ui.datepicker-km.js
vendored
Normal file
23
themes/default/js/ui/i18n/jquery.ui.datepicker-km.js
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
/* Khmer initialisation for the jQuery calendar extension. */
|
||||
/* Written by Chandara Om (chandara.teacher@gmail.com). */
|
||||
jQuery(function($){
|
||||
$.datepicker.regional['km'] = {
|
||||
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['km']);
|
||||
});
|
||||
|
|
@ -1,23 +1,23 @@
|
|||
/* Korean initialisation for the jQuery calendar extension. */
|
||||
/* Written by DaeKwon Kang (ncrash.dk@gmail.com). */
|
||||
/* Written by DaeKwon Kang (ncrash.dk@gmail.com), Edited by Genie. */
|
||||
jQuery(function($){
|
||||
$.datepicker.regional['ko'] = {
|
||||
closeText: '닫기',
|
||||
prevText: '이전달',
|
||||
nextText: '다음달',
|
||||
currentText: '오늘',
|
||||
monthNames: ['1월(JAN)','2월(FEB)','3월(MAR)','4월(APR)','5월(MAY)','6월(JUN)',
|
||||
'7월(JUL)','8월(AUG)','9월(SEP)','10월(OCT)','11월(NOV)','12월(DEC)'],
|
||||
monthNamesShort: ['1월(JAN)','2월(FEB)','3월(MAR)','4월(APR)','5월(MAY)','6월(JUN)',
|
||||
'7월(JUL)','8월(AUG)','9월(SEP)','10월(OCT)','11월(NOV)','12월(DEC)'],
|
||||
dayNames: ['일','월','화','수','목','금','토'],
|
||||
monthNames: ['1월','2월','3월','4월','5월','6월',
|
||||
'7월','8월','9월','10월','11월','12월'],
|
||||
monthNamesShort: ['1월','2월','3월','4월','5월','6월',
|
||||
'7월','8월','9월','10월','11월','12월'],
|
||||
dayNames: ['일요일','월요일','화요일','수요일','목요일','금요일','토요일'],
|
||||
dayNamesShort: ['일','월','화','수','목','금','토'],
|
||||
dayNamesMin: ['일','월','화','수','목','금','토'],
|
||||
weekHeader: 'Wk',
|
||||
dateFormat: 'yy-mm-dd',
|
||||
firstDay: 0,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
showMonthAfterYear: true,
|
||||
yearSuffix: '년'};
|
||||
$.datepicker.setDefaults($.datepicker.regional['ko']);
|
||||
});
|
||||
23
themes/default/js/ui/i18n/jquery.ui.datepicker-lb.js
vendored
Normal file
23
themes/default/js/ui/i18n/jquery.ui.datepicker-lb.js
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
/* Luxembourgish initialisation for the jQuery UI date picker plugin. */
|
||||
/* Written by Michel Weimerskirch <michel@weimerskirch.net> */
|
||||
jQuery(function($){
|
||||
$.datepicker.regional['lb'] = {
|
||||
closeText: 'Fäerdeg',
|
||||
prevText: 'Zréck',
|
||||
nextText: 'Weider',
|
||||
currentText: 'Haut',
|
||||
monthNames: ['Januar','Februar','Mäerz','Abrëll','Mee','Juni',
|
||||
'Juli','August','September','Oktober','November','Dezember'],
|
||||
monthNamesShort: ['Jan', 'Feb', 'Mäe', 'Abr', 'Mee', 'Jun',
|
||||
'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'],
|
||||
dayNames: ['Sonndeg', 'Méindeg', 'Dënschdeg', 'Mëttwoch', 'Donneschdeg', 'Freideg', 'Samschdeg'],
|
||||
dayNamesShort: ['Son', 'Méi', 'Dën', 'Mët', 'Don', 'Fre', 'Sam'],
|
||||
dayNamesMin: ['So','Mé','Dë','Më','Do','Fr','Sa'],
|
||||
weekHeader: 'W',
|
||||
dateFormat: 'dd.mm.yy',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['lb']);
|
||||
});
|
||||
|
|
@ -3,8 +3,8 @@
|
|||
jQuery(function($){
|
||||
$.datepicker.regional['lt'] = {
|
||||
closeText: 'Uždaryti',
|
||||
prevText: '<Atgal',
|
||||
nextText: 'Pirmyn>',
|
||||
prevText: '<Atgal',
|
||||
nextText: 'Pirmyn>',
|
||||
currentText: 'Šiandien',
|
||||
monthNames: ['Sausis','Vasaris','Kovas','Balandis','Gegužė','Birželis',
|
||||
'Liepa','Rugpjūtis','Rugsėjis','Spalis','Lapkritis','Gruodis'],
|
||||
|
|
|
|||
23
themes/default/js/ui/i18n/jquery.ui.datepicker-mk.js
vendored
Normal file
23
themes/default/js/ui/i18n/jquery.ui.datepicker-mk.js
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
/* Macedonian i18n for the jQuery UI date picker plugin. */
|
||||
/* Written by Stojce Slavkovski. */
|
||||
jQuery(function($){
|
||||
$.datepicker.regional['mk'] = {
|
||||
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['mk']);
|
||||
});
|
||||
|
|
@ -3,8 +3,8 @@
|
|||
jQuery(function($){
|
||||
$.datepicker.regional['ms'] = {
|
||||
closeText: 'Tutup',
|
||||
prevText: '<Sebelum',
|
||||
nextText: 'Selepas>',
|
||||
prevText: '<Sebelum',
|
||||
nextText: 'Selepas>',
|
||||
currentText: 'hari ini',
|
||||
monthNames: ['Januari','Februari','Mac','April','Mei','Jun',
|
||||
'Julai','Ogos','September','Oktober','November','Disember'],
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
jQuery(function($){
|
||||
$.datepicker.regional['no'] = {
|
||||
closeText: 'Lukk',
|
||||
prevText: '«Forrige',
|
||||
nextText: 'Neste»',
|
||||
prevText: '«Forrige',
|
||||
nextText: 'Neste»',
|
||||
currentText: 'I dag',
|
||||
monthNames: ['januar','februar','mars','april','mai','juni','juli','august','september','oktober','november','desember'],
|
||||
monthNamesShort: ['jan','feb','mar','apr','mai','jun','jul','aug','sep','okt','nov','des'],
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
jQuery(function($){
|
||||
$.datepicker.regional['pl'] = {
|
||||
closeText: 'Zamknij',
|
||||
prevText: '<Poprzedni',
|
||||
nextText: 'Następny>',
|
||||
prevText: '<Poprzedni',
|
||||
nextText: 'Następny>',
|
||||
currentText: 'Dziś',
|
||||
monthNames: ['Styczeń','Luty','Marzec','Kwiecień','Maj','Czerwiec',
|
||||
'Lipiec','Sierpień','Wrzesień','Październik','Listopad','Grudzień'],
|
||||
|
|
|
|||
|
|
@ -3,16 +3,16 @@
|
|||
jQuery(function($){
|
||||
$.datepicker.regional['pt-BR'] = {
|
||||
closeText: 'Fechar',
|
||||
prevText: '<Anterior',
|
||||
nextText: 'Próximo>',
|
||||
prevText: '<Anterior',
|
||||
nextText: 'Próximo>',
|
||||
currentText: 'Hoje',
|
||||
monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho',
|
||||
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'],
|
||||
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,
|
||||
|
|
|
|||
|
|
@ -2,16 +2,16 @@
|
|||
jQuery(function($){
|
||||
$.datepicker.regional['pt'] = {
|
||||
closeText: 'Fechar',
|
||||
prevText: '<Anterior',
|
||||
prevText: '<Anterior',
|
||||
nextText: 'Seguinte',
|
||||
currentText: 'Hoje',
|
||||
monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho',
|
||||
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'],
|
||||
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,
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
jQuery(function($){
|
||||
$.datepicker.regional['rm'] = {
|
||||
closeText: 'Serrar',
|
||||
prevText: '<Suandant',
|
||||
nextText: 'Precedent>',
|
||||
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'],
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@
|
|||
jQuery(function($){
|
||||
$.datepicker.regional['ro'] = {
|
||||
closeText: 'Închide',
|
||||
prevText: '« Luna precedentă',
|
||||
nextText: 'Luna următoare »',
|
||||
prevText: '« Luna precedentă',
|
||||
nextText: 'Luna următoare »',
|
||||
currentText: 'Azi',
|
||||
monthNames: ['Ianuarie','Februarie','Martie','Aprilie','Mai','Iunie',
|
||||
'Iulie','August','Septembrie','Octombrie','Noiembrie','Decembrie'],
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
jQuery(function($){
|
||||
$.datepicker.regional['ru'] = {
|
||||
closeText: 'Закрыть',
|
||||
prevText: '<Пред',
|
||||
nextText: 'След>',
|
||||
prevText: '<Пред',
|
||||
nextText: 'След>',
|
||||
currentText: 'Сегодня',
|
||||
monthNames: ['Январь','Февраль','Март','Апрель','Май','Июнь',
|
||||
'Июль','Август','Сентябрь','Октябрь','Ноябрь','Декабрь'],
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
jQuery(function($){
|
||||
$.datepicker.regional['sk'] = {
|
||||
closeText: 'Zavrieť',
|
||||
prevText: '<Predchádzajúci',
|
||||
nextText: 'Nasledujúci>',
|
||||
prevText: '<Predchádzajúci',
|
||||
nextText: 'Nasledujúci>',
|
||||
currentText: 'Dnes',
|
||||
monthNames: ['Január','Február','Marec','Apríl','Máj','Jún',
|
||||
'Júl','August','September','Október','November','December'],
|
||||
|
|
|
|||
|
|
@ -1,19 +1,19 @@
|
|||
/* Slovenian initialisation for the jQuery UI date picker plugin. */
|
||||
/* Written by Jaka Jancar (jaka@kubje.org). */
|
||||
/* c = č, s = š z = ž C = Č S = Š Z = Ž */
|
||||
/* c = č, s = š z = ž C = Č S = Š Z = Ž */
|
||||
jQuery(function($){
|
||||
$.datepicker.regional['sl'] = {
|
||||
closeText: 'Zapri',
|
||||
prevText: '<Prejšnji',
|
||||
nextText: 'Naslednji>',
|
||||
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'],
|
||||
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,
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
jQuery(function($){
|
||||
$.datepicker.regional['sq'] = {
|
||||
closeText: 'mbylle',
|
||||
prevText: '<mbrapa',
|
||||
nextText: 'Përpara>',
|
||||
prevText: '<mbrapa',
|
||||
nextText: 'Përpara>',
|
||||
currentText: 'sot',
|
||||
monthNames: ['Janar','Shkurt','Mars','Prill','Maj','Qershor',
|
||||
'Korrik','Gusht','Shtator','Tetor','Nëntor','Dhjetor'],
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
jQuery(function($){
|
||||
$.datepicker.regional['sr-SR'] = {
|
||||
closeText: 'Zatvori',
|
||||
prevText: '<',
|
||||
nextText: '>',
|
||||
prevText: '<',
|
||||
nextText: '>',
|
||||
currentText: 'Danas',
|
||||
monthNames: ['Januar','Februar','Mart','April','Maj','Jun',
|
||||
'Jul','Avgust','Septembar','Oktobar','Novembar','Decembar'],
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
jQuery(function($){
|
||||
$.datepicker.regional['sr'] = {
|
||||
closeText: 'Затвори',
|
||||
prevText: '<',
|
||||
nextText: '>',
|
||||
prevText: '<',
|
||||
nextText: '>',
|
||||
currentText: 'Данас',
|
||||
monthNames: ['Јануар','Фебруар','Март','Април','Мај','Јун',
|
||||
'Јул','Август','Септембар','Октобар','Новембар','Децембар'],
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
jQuery(function($){
|
||||
$.datepicker.regional['sv'] = {
|
||||
closeText: 'Stäng',
|
||||
prevText: '«Förra',
|
||||
nextText: 'Nästa»',
|
||||
prevText: '«Förra',
|
||||
nextText: 'Nästa»',
|
||||
currentText: 'Idag',
|
||||
monthNames: ['Januari','Februari','Mars','April','Maj','Juni',
|
||||
'Juli','Augusti','September','Oktober','November','December'],
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
jQuery(function($){
|
||||
$.datepicker.regional['th'] = {
|
||||
closeText: 'ปิด',
|
||||
prevText: '« ย้อน',
|
||||
nextText: 'ถัดไป »',
|
||||
prevText: '« ย้อน',
|
||||
nextText: 'ถัดไป »',
|
||||
currentText: 'วันนี้',
|
||||
monthNames: ['มกราคม','กุมภาพันธ์','มีนาคม','เมษายน','พฤษภาคม','มิถุนายน',
|
||||
'กรกฎาคม','สิงหาคม','กันยายน','ตุลาคม','พฤศจิกายน','ธันวาคม'],
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
jQuery(function($){
|
||||
$.datepicker.regional['tr'] = {
|
||||
closeText: 'kapat',
|
||||
prevText: '<geri',
|
||||
prevText: '<geri',
|
||||
nextText: 'ileri>',
|
||||
currentText: 'bugün',
|
||||
monthNames: ['Ocak','Şubat','Mart','Nisan','Mayıs','Haziran',
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
/* Ukrainian (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
||||
/* Written by Maxim Drogobitskiy (maxdao@gmail.com). */
|
||||
/* Corrected by Igor Milla (igor.fsp.milla@gmail.com). */
|
||||
jQuery(function($){
|
||||
$.datepicker.regional['uk'] = {
|
||||
closeText: 'Закрити',
|
||||
prevText: '<',
|
||||
nextText: '>',
|
||||
prevText: '<',
|
||||
nextText: '>',
|
||||
currentText: 'Сьогодні',
|
||||
monthNames: ['Січень','Лютий','Березень','Квітень','Травень','Червень',
|
||||
'Липень','Серпень','Вересень','Жовтень','Листопад','Грудень'],
|
||||
|
|
@ -13,7 +14,7 @@ jQuery(function($){
|
|||
dayNames: ['неділя','понеділок','вівторок','середа','четвер','п’ятниця','субота'],
|
||||
dayNamesShort: ['нед','пнд','вів','срд','чтв','птн','сбт'],
|
||||
dayNamesMin: ['Нд','Пн','Вт','Ср','Чт','Пт','Сб'],
|
||||
weekHeader: 'Не',
|
||||
weekHeader: 'Тиж',
|
||||
dateFormat: 'dd/mm/yy',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
jQuery(function($){
|
||||
$.datepicker.regional['vi'] = {
|
||||
closeText: 'Đóng',
|
||||
prevText: '<Trước',
|
||||
nextText: 'Tiếp>',
|
||||
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'],
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@
|
|||
jQuery(function($){
|
||||
$.datepicker.regional['zh-CN'] = {
|
||||
closeText: '关闭',
|
||||
prevText: '<上月',
|
||||
nextText: '下月>',
|
||||
prevText: '<上月',
|
||||
nextText: '下月>',
|
||||
currentText: '今天',
|
||||
monthNames: ['一月','二月','三月','四月','五月','六月',
|
||||
'七月','八月','九月','十月','十一月','十二月'],
|
||||
monthNamesShort: ['一','二','三','四','五','六',
|
||||
'七','八','九','十','十一','十二'],
|
||||
monthNamesShort: ['一月','二月','三月','四月','五月','六月',
|
||||
'七月','八月','九月','十月','十一月','十二月'],
|
||||
dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
|
||||
dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
|
||||
dayNamesMin: ['日','一','二','三','四','五','六'],
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@
|
|||
jQuery(function($){
|
||||
$.datepicker.regional['zh-HK'] = {
|
||||
closeText: '關閉',
|
||||
prevText: '<上月',
|
||||
nextText: '下月>',
|
||||
prevText: '<上月',
|
||||
nextText: '下月>',
|
||||
currentText: '今天',
|
||||
monthNames: ['一月','二月','三月','四月','五月','六月',
|
||||
'七月','八月','九月','十月','十一月','十二月'],
|
||||
monthNamesShort: ['一','二','三','四','五','六',
|
||||
'七','八','九','十','十一','十二'],
|
||||
monthNamesShort: ['一月','二月','三月','四月','五月','六月',
|
||||
'七月','八月','九月','十月','十一月','十二月'],
|
||||
dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
|
||||
dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
|
||||
dayNamesMin: ['日','一','二','三','四','五','六'],
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@
|
|||
jQuery(function($){
|
||||
$.datepicker.regional['zh-TW'] = {
|
||||
closeText: '關閉',
|
||||
prevText: '<上月',
|
||||
nextText: '下月>',
|
||||
prevText: '<上月',
|
||||
nextText: '下月>',
|
||||
currentText: '今天',
|
||||
monthNames: ['一月','二月','三月','四月','五月','六月',
|
||||
'七月','八月','九月','十月','十一月','十二月'],
|
||||
monthNamesShort: ['一','二','三','四','五','六',
|
||||
'七','八','九','十','十一','十二'],
|
||||
monthNamesShort: ['一月','二月','三月','四月','五月','六月',
|
||||
'七月','八月','九月','十月','十一月','十二月'],
|
||||
dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
|
||||
dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
|
||||
dayNamesMin: ['日','一','二','三','四','五','六'],
|
||||
|
|
|
|||
49
themes/default/js/ui/jquery.effects.blind.js
vendored
49
themes/default/js/ui/jquery.effects.blind.js
vendored
|
|
@ -1,49 +0,0 @@
|
|||
/*
|
||||
* jQuery UI Effects Blind 1.8.16
|
||||
*
|
||||
* 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:
|
||||
* jquery.effects.core.js
|
||||
*/
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.effects.blind = function(o) {
|
||||
|
||||
return this.queue(function() {
|
||||
|
||||
// Create element
|
||||
var el = $(this), props = ['position','top','bottom','left','right'];
|
||||
|
||||
// Set options
|
||||
var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
|
||||
var direction = o.options.direction || 'vertical'; // Default direction
|
||||
|
||||
// Adjust
|
||||
$.effects.save(el, props); el.show(); // Save & Show
|
||||
var wrapper = $.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper
|
||||
var ref = (direction == 'vertical') ? 'height' : 'width';
|
||||
var distance = (direction == 'vertical') ? wrapper.height() : wrapper.width();
|
||||
if(mode == 'show') wrapper.css(ref, 0); // Shift
|
||||
|
||||
// Animation
|
||||
var animation = {};
|
||||
animation[ref] = mode == 'show' ? distance : 0;
|
||||
|
||||
// Animate
|
||||
wrapper.animate(animation, o.duration, o.options.easing, function() {
|
||||
if(mode == 'hide') el.hide(); // Hide
|
||||
$.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
|
||||
if(o.callback) o.callback.apply(el[0], arguments); // Callback
|
||||
el.dequeue();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
})(jQuery);
|
||||
78
themes/default/js/ui/jquery.effects.bounce.js
vendored
78
themes/default/js/ui/jquery.effects.bounce.js
vendored
|
|
@ -1,78 +0,0 @@
|
|||
/*
|
||||
* jQuery UI Effects Bounce 1.8.16
|
||||
*
|
||||
* 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:
|
||||
* jquery.effects.core.js
|
||||
*/
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.effects.bounce = function(o) {
|
||||
|
||||
return this.queue(function() {
|
||||
|
||||
// Create element
|
||||
var el = $(this), props = ['position','top','bottom','left','right'];
|
||||
|
||||
// Set options
|
||||
var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode
|
||||
var direction = o.options.direction || 'up'; // Default direction
|
||||
var distance = o.options.distance || 20; // Default distance
|
||||
var times = o.options.times || 5; // Default # of times
|
||||
var speed = o.duration || 250; // Default speed per bounce
|
||||
if (/show|hide/.test(mode)) props.push('opacity'); // Avoid touching opacity to prevent clearType and PNG issues in IE
|
||||
|
||||
// Adjust
|
||||
$.effects.save(el, props); el.show(); // Save & Show
|
||||
$.effects.createWrapper(el); // Create Wrapper
|
||||
var ref = (direction == 'up' || direction == 'down') ? 'top' : 'left';
|
||||
var motion = (direction == 'up' || direction == 'left') ? 'pos' : 'neg';
|
||||
var distance = o.options.distance || (ref == 'top' ? el.outerHeight({margin:true}) / 3 : el.outerWidth({margin:true}) / 3);
|
||||
if (mode == 'show') el.css('opacity', 0).css(ref, motion == 'pos' ? -distance : distance); // Shift
|
||||
if (mode == 'hide') distance = distance / (times * 2);
|
||||
if (mode != 'hide') times--;
|
||||
|
||||
// Animate
|
||||
if (mode == 'show') { // Show Bounce
|
||||
var animation = {opacity: 1};
|
||||
animation[ref] = (motion == 'pos' ? '+=' : '-=') + distance;
|
||||
el.animate(animation, speed / 2, o.options.easing);
|
||||
distance = distance / 2;
|
||||
times--;
|
||||
};
|
||||
for (var i = 0; i < times; i++) { // Bounces
|
||||
var animation1 = {}, animation2 = {};
|
||||
animation1[ref] = (motion == 'pos' ? '-=' : '+=') + distance;
|
||||
animation2[ref] = (motion == 'pos' ? '+=' : '-=') + distance;
|
||||
el.animate(animation1, speed / 2, o.options.easing).animate(animation2, speed / 2, o.options.easing);
|
||||
distance = (mode == 'hide') ? distance * 2 : distance / 2;
|
||||
};
|
||||
if (mode == 'hide') { // Last Bounce
|
||||
var animation = {opacity: 0};
|
||||
animation[ref] = (motion == 'pos' ? '-=' : '+=') + distance;
|
||||
el.animate(animation, speed / 2, o.options.easing, function(){
|
||||
el.hide(); // Hide
|
||||
$.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
|
||||
if(o.callback) o.callback.apply(this, arguments); // Callback
|
||||
});
|
||||
} else {
|
||||
var animation1 = {}, animation2 = {};
|
||||
animation1[ref] = (motion == 'pos' ? '-=' : '+=') + distance;
|
||||
animation2[ref] = (motion == 'pos' ? '+=' : '-=') + distance;
|
||||
el.animate(animation1, speed / 2, o.options.easing).animate(animation2, speed / 2, o.options.easing, function(){
|
||||
$.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
|
||||
if(o.callback) o.callback.apply(this, arguments); // Callback
|
||||
});
|
||||
};
|
||||
el.queue('fx', function() { el.dequeue(); });
|
||||
el.dequeue();
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
})(jQuery);
|
||||
54
themes/default/js/ui/jquery.effects.clip.js
vendored
54
themes/default/js/ui/jquery.effects.clip.js
vendored
|
|
@ -1,54 +0,0 @@
|
|||
/*
|
||||
* jQuery UI Effects Clip 1.8.16
|
||||
*
|
||||
* 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:
|
||||
* jquery.effects.core.js
|
||||
*/
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.effects.clip = function(o) {
|
||||
|
||||
return this.queue(function() {
|
||||
|
||||
// Create element
|
||||
var el = $(this), props = ['position','top','bottom','left','right','height','width'];
|
||||
|
||||
// Set options
|
||||
var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
|
||||
var direction = o.options.direction || 'vertical'; // Default direction
|
||||
|
||||
// Adjust
|
||||
$.effects.save(el, props); el.show(); // Save & Show
|
||||
var wrapper = $.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper
|
||||
var animate = el[0].tagName == 'IMG' ? wrapper : el;
|
||||
var ref = {
|
||||
size: (direction == 'vertical') ? 'height' : 'width',
|
||||
position: (direction == 'vertical') ? 'top' : 'left'
|
||||
};
|
||||
var distance = (direction == 'vertical') ? animate.height() : animate.width();
|
||||
if(mode == 'show') { animate.css(ref.size, 0); animate.css(ref.position, distance / 2); } // Shift
|
||||
|
||||
// Animation
|
||||
var animation = {};
|
||||
animation[ref.size] = mode == 'show' ? distance : 0;
|
||||
animation[ref.position] = mode == 'show' ? 0 : distance / 2;
|
||||
|
||||
// Animate
|
||||
animate.animate(animation, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() {
|
||||
if(mode == 'hide') el.hide(); // Hide
|
||||
$.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
|
||||
if(o.callback) o.callback.apply(el[0], arguments); // Callback
|
||||
el.dequeue();
|
||||
}});
|
||||
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
})(jQuery);
|
||||
763
themes/default/js/ui/jquery.effects.core.js
vendored
763
themes/default/js/ui/jquery.effects.core.js
vendored
|
|
@ -1,763 +0,0 @@
|
|||
/*
|
||||
* jQuery UI Effects 1.8.16
|
||||
*
|
||||
* 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($, undefined) {
|
||||
|
||||
$.effects = {};
|
||||
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
/****************************** COLOR ANIMATIONS ******************************/
|
||||
/******************************************************************************/
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
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
|
||||
// By Blair Mitchelmore
|
||||
// http://jquery.offput.ca/highlightFade/
|
||||
|
||||
// Parse strings looking for color tuples [255,255,255]
|
||||
function getRGB(color) {
|
||||
var result;
|
||||
|
||||
// Check if we're already dealing with an array of colors
|
||||
if ( color && color.constructor == Array && color.length == 3 )
|
||||
return color;
|
||||
|
||||
// Look for rgb(num,num,num)
|
||||
if (result = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color))
|
||||
return [parseInt(result[1],10), parseInt(result[2],10), parseInt(result[3],10)];
|
||||
|
||||
// Look for rgb(num%,num%,num%)
|
||||
if (result = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color))
|
||||
return [parseFloat(result[1])*2.55, parseFloat(result[2])*2.55, parseFloat(result[3])*2.55];
|
||||
|
||||
// Look for #a0b1c2
|
||||
if (result = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color))
|
||||
return [parseInt(result[1],16), parseInt(result[2],16), parseInt(result[3],16)];
|
||||
|
||||
// Look for #fff
|
||||
if (result = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color))
|
||||
return [parseInt(result[1]+result[1],16), parseInt(result[2]+result[2],16), parseInt(result[3]+result[3],16)];
|
||||
|
||||
// Look for rgba(0, 0, 0, 0) == transparent in Safari 3
|
||||
if (result = /rgba\(0, 0, 0, 0\)/.exec(color))
|
||||
return colors['transparent'];
|
||||
|
||||
// Otherwise, we're most likely dealing with a named color
|
||||
return colors[$.trim(color).toLowerCase()];
|
||||
}
|
||||
|
||||
function getColor(elem, attr) {
|
||||
var color;
|
||||
|
||||
do {
|
||||
color = $.curCSS(elem, attr);
|
||||
|
||||
// Keep going until we find an element that has color, or we hit the body
|
||||
if ( color != '' && color != 'transparent' || $.nodeName(elem, "body") )
|
||||
break;
|
||||
|
||||
attr = "backgroundColor";
|
||||
} while ( elem = elem.parentNode );
|
||||
|
||||
return getRGB(color);
|
||||
};
|
||||
|
||||
// Some named colors to work with
|
||||
// From Interface by Stefan Petre
|
||||
// http://interface.eyecon.ro/
|
||||
|
||||
var colors = {
|
||||
aqua:[0,255,255],
|
||||
azure:[240,255,255],
|
||||
beige:[245,245,220],
|
||||
black:[0,0,0],
|
||||
blue:[0,0,255],
|
||||
brown:[165,42,42],
|
||||
cyan:[0,255,255],
|
||||
darkblue:[0,0,139],
|
||||
darkcyan:[0,139,139],
|
||||
darkgrey:[169,169,169],
|
||||
darkgreen:[0,100,0],
|
||||
darkkhaki:[189,183,107],
|
||||
darkmagenta:[139,0,139],
|
||||
darkolivegreen:[85,107,47],
|
||||
darkorange:[255,140,0],
|
||||
darkorchid:[153,50,204],
|
||||
darkred:[139,0,0],
|
||||
darksalmon:[233,150,122],
|
||||
darkviolet:[148,0,211],
|
||||
fuchsia:[255,0,255],
|
||||
gold:[255,215,0],
|
||||
green:[0,128,0],
|
||||
indigo:[75,0,130],
|
||||
khaki:[240,230,140],
|
||||
lightblue:[173,216,230],
|
||||
lightcyan:[224,255,255],
|
||||
lightgreen:[144,238,144],
|
||||
lightgrey:[211,211,211],
|
||||
lightpink:[255,182,193],
|
||||
lightyellow:[255,255,224],
|
||||
lime:[0,255,0],
|
||||
magenta:[255,0,255],
|
||||
maroon:[128,0,0],
|
||||
navy:[0,0,128],
|
||||
olive:[128,128,0],
|
||||
orange:[255,165,0],
|
||||
pink:[255,192,203],
|
||||
purple:[128,0,128],
|
||||
violet:[128,0,128],
|
||||
red:[255,0,0],
|
||||
silver:[192,192,192],
|
||||
white:[255,255,255],
|
||||
yellow:[255,255,0],
|
||||
transparent: [255,255,255]
|
||||
};
|
||||
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
/****************************** 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(function() {
|
||||
var that = $(this),
|
||||
originalStyleAttr = that.attr('style') || ' ',
|
||||
originalStyle = filterStyles(getElementStyles.call(this)),
|
||||
newStyle,
|
||||
className = that.attr('class');
|
||||
|
||||
$.each(classAnimationActions, function(i, action) {
|
||||
if (value[action]) {
|
||||
that[action + 'Class'](value[action]);
|
||||
}
|
||||
});
|
||||
newStyle = filterStyles(getElementStyles.call(this));
|
||||
that.attr('class', className);
|
||||
|
||||
that.animate(styleDifference(originalStyle, newStyle), {
|
||||
queue: false,
|
||||
duration: duration,
|
||||
easing: easing,
|
||||
complete: 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); }
|
||||
$.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.16",
|
||||
|
||||
// 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
|
||||
}),
|
||||
active = document.activeElement;
|
||||
|
||||
element.wrap(wrapper);
|
||||
|
||||
// Fixes #7595 - Elements lose focus when wrapped.
|
||||
if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
|
||||
$( active ).focus();
|
||||
}
|
||||
|
||||
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) {
|
||||
var parent,
|
||||
active = document.activeElement;
|
||||
|
||||
if (element.parent().is('.ui-effects-wrapper')) {
|
||||
parent = element.parent().replaceWith(element);
|
||||
// Fixes #7595 - Elements lose focus when wrapped.
|
||||
if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
|
||||
$( active ).focus();
|
||||
}
|
||||
return parent;
|
||||
}
|
||||
|
||||
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/
|
||||
*
|
||||
* Uses the built in easing capabilities added In jQuery 1.1
|
||||
* to offer multiple easing options
|
||||
*
|
||||
* TERMS OF USE - jQuery Easing
|
||||
*
|
||||
* Open source under the BSD License.
|
||||
*
|
||||
* Copyright 2008 George McGinley Smith
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* Neither the name of the author nor the names of contributors may be used to endorse
|
||||
* or promote products derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
// t: current time, b: begInnIng value, c: change In value, d: duration
|
||||
$.easing.jswing = $.easing.swing;
|
||||
|
||||
$.extend($.easing,
|
||||
{
|
||||
def: 'easeOutQuad',
|
||||
swing: function (x, t, b, c, d) {
|
||||
//alert($.easing.default);
|
||||
return $.easing[$.easing.def](x, t, b, c, d);
|
||||
},
|
||||
easeInQuad: function (x, t, b, c, d) {
|
||||
return c*(t/=d)*t + b;
|
||||
},
|
||||
easeOutQuad: function (x, t, b, c, d) {
|
||||
return -c *(t/=d)*(t-2) + b;
|
||||
},
|
||||
easeInOutQuad: function (x, t, b, c, d) {
|
||||
if ((t/=d/2) < 1) return c/2*t*t + b;
|
||||
return -c/2 * ((--t)*(t-2) - 1) + b;
|
||||
},
|
||||
easeInCubic: function (x, t, b, c, d) {
|
||||
return c*(t/=d)*t*t + b;
|
||||
},
|
||||
easeOutCubic: function (x, t, b, c, d) {
|
||||
return c*((t=t/d-1)*t*t + 1) + b;
|
||||
},
|
||||
easeInOutCubic: function (x, t, b, c, d) {
|
||||
if ((t/=d/2) < 1) return c/2*t*t*t + b;
|
||||
return c/2*((t-=2)*t*t + 2) + b;
|
||||
},
|
||||
easeInQuart: function (x, t, b, c, d) {
|
||||
return c*(t/=d)*t*t*t + b;
|
||||
},
|
||||
easeOutQuart: function (x, t, b, c, d) {
|
||||
return -c * ((t=t/d-1)*t*t*t - 1) + b;
|
||||
},
|
||||
easeInOutQuart: function (x, t, b, c, d) {
|
||||
if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
|
||||
return -c/2 * ((t-=2)*t*t*t - 2) + b;
|
||||
},
|
||||
easeInQuint: function (x, t, b, c, d) {
|
||||
return c*(t/=d)*t*t*t*t + b;
|
||||
},
|
||||
easeOutQuint: function (x, t, b, c, d) {
|
||||
return c*((t=t/d-1)*t*t*t*t + 1) + b;
|
||||
},
|
||||
easeInOutQuint: function (x, t, b, c, d) {
|
||||
if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
|
||||
return c/2*((t-=2)*t*t*t*t + 2) + b;
|
||||
},
|
||||
easeInSine: function (x, t, b, c, d) {
|
||||
return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
|
||||
},
|
||||
easeOutSine: function (x, t, b, c, d) {
|
||||
return c * Math.sin(t/d * (Math.PI/2)) + b;
|
||||
},
|
||||
easeInOutSine: function (x, t, b, c, d) {
|
||||
return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
|
||||
},
|
||||
easeInExpo: function (x, t, b, c, d) {
|
||||
return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
|
||||
},
|
||||
easeOutExpo: function (x, t, b, c, d) {
|
||||
return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
|
||||
},
|
||||
easeInOutExpo: function (x, t, b, c, d) {
|
||||
if (t==0) return b;
|
||||
if (t==d) return b+c;
|
||||
if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
|
||||
return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
|
||||
},
|
||||
easeInCirc: function (x, t, b, c, d) {
|
||||
return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
|
||||
},
|
||||
easeOutCirc: function (x, t, b, c, d) {
|
||||
return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
|
||||
},
|
||||
easeInOutCirc: function (x, t, b, c, d) {
|
||||
if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
|
||||
return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
|
||||
},
|
||||
easeInElastic: function (x, t, b, c, d) {
|
||||
var s=1.70158;var p=0;var a=c;
|
||||
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
|
||||
if (a < Math.abs(c)) { a=c; var s=p/4; }
|
||||
else var s = p/(2*Math.PI) * Math.asin (c/a);
|
||||
return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
|
||||
},
|
||||
easeOutElastic: function (x, t, b, c, d) {
|
||||
var s=1.70158;var p=0;var a=c;
|
||||
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
|
||||
if (a < Math.abs(c)) { a=c; var s=p/4; }
|
||||
else var s = p/(2*Math.PI) * Math.asin (c/a);
|
||||
return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
|
||||
},
|
||||
easeInOutElastic: function (x, t, b, c, d) {
|
||||
var s=1.70158;var p=0;var a=c;
|
||||
if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5);
|
||||
if (a < Math.abs(c)) { a=c; var s=p/4; }
|
||||
else var s = p/(2*Math.PI) * Math.asin (c/a);
|
||||
if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
|
||||
return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
|
||||
},
|
||||
easeInBack: function (x, t, b, c, d, s) {
|
||||
if (s == undefined) s = 1.70158;
|
||||
return c*(t/=d)*t*((s+1)*t - s) + b;
|
||||
},
|
||||
easeOutBack: function (x, t, b, c, d, s) {
|
||||
if (s == undefined) s = 1.70158;
|
||||
return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
|
||||
},
|
||||
easeInOutBack: function (x, t, b, c, d, s) {
|
||||
if (s == undefined) s = 1.70158;
|
||||
if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
|
||||
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
|
||||
},
|
||||
easeInBounce: function (x, t, b, c, d) {
|
||||
return c - $.easing.easeOutBounce (x, d-t, 0, c, d) + b;
|
||||
},
|
||||
easeOutBounce: function (x, t, b, c, d) {
|
||||
if ((t/=d) < (1/2.75)) {
|
||||
return c*(7.5625*t*t) + b;
|
||||
} else if (t < (2/2.75)) {
|
||||
return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
|
||||
} else if (t < (2.5/2.75)) {
|
||||
return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
|
||||
} else {
|
||||
return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
|
||||
}
|
||||
},
|
||||
easeInOutBounce: function (x, t, b, c, d) {
|
||||
if (t < d/2) return $.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
|
||||
return $.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
|
||||
}
|
||||
});
|
||||
|
||||
/*
|
||||
*
|
||||
* TERMS OF USE - EASING EQUATIONS
|
||||
*
|
||||
* Open source under the BSD License.
|
||||
*
|
||||
* Copyright 2001 Robert Penner
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* Neither the name of the author nor the names of contributors may be used to endorse
|
||||
* or promote products derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
})(jQuery);
|
||||
50
themes/default/js/ui/jquery.effects.drop.js
vendored
50
themes/default/js/ui/jquery.effects.drop.js
vendored
|
|
@ -1,50 +0,0 @@
|
|||
/*
|
||||
* jQuery UI Effects Drop 1.8.16
|
||||
*
|
||||
* 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:
|
||||
* jquery.effects.core.js
|
||||
*/
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.effects.drop = function(o) {
|
||||
|
||||
return this.queue(function() {
|
||||
|
||||
// Create element
|
||||
var el = $(this), props = ['position','top','bottom','left','right','opacity'];
|
||||
|
||||
// Set options
|
||||
var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
|
||||
var direction = o.options.direction || 'left'; // Default Direction
|
||||
|
||||
// Adjust
|
||||
$.effects.save(el, props); el.show(); // Save & Show
|
||||
$.effects.createWrapper(el); // Create Wrapper
|
||||
var ref = (direction == 'up' || direction == 'down') ? 'top' : 'left';
|
||||
var motion = (direction == 'up' || direction == 'left') ? 'pos' : 'neg';
|
||||
var distance = o.options.distance || (ref == 'top' ? el.outerHeight({margin:true}) / 2 : el.outerWidth({margin:true}) / 2);
|
||||
if (mode == 'show') el.css('opacity', 0).css(ref, motion == 'pos' ? -distance : distance); // Shift
|
||||
|
||||
// Animation
|
||||
var animation = {opacity: mode == 'show' ? 1 : 0};
|
||||
animation[ref] = (mode == 'show' ? (motion == 'pos' ? '+=' : '-=') : (motion == 'pos' ? '-=' : '+=')) + distance;
|
||||
|
||||
// Animate
|
||||
el.animate(animation, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() {
|
||||
if(mode == 'hide') el.hide(); // Hide
|
||||
$.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
|
||||
if(o.callback) o.callback.apply(this, arguments); // Callback
|
||||
el.dequeue();
|
||||
}});
|
||||
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
})(jQuery);
|
||||
79
themes/default/js/ui/jquery.effects.explode.js
vendored
79
themes/default/js/ui/jquery.effects.explode.js
vendored
|
|
@ -1,79 +0,0 @@
|
|||
/*
|
||||
* jQuery UI Effects Explode 1.8.16
|
||||
*
|
||||
* 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:
|
||||
* jquery.effects.core.js
|
||||
*/
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.effects.explode = function(o) {
|
||||
|
||||
return this.queue(function() {
|
||||
|
||||
var rows = o.options.pieces ? Math.round(Math.sqrt(o.options.pieces)) : 3;
|
||||
var cells = o.options.pieces ? Math.round(Math.sqrt(o.options.pieces)) : 3;
|
||||
|
||||
o.options.mode = o.options.mode == 'toggle' ? ($(this).is(':visible') ? 'hide' : 'show') : o.options.mode;
|
||||
var el = $(this).show().css('visibility', 'hidden');
|
||||
var offset = el.offset();
|
||||
|
||||
//Substract the margins - not fixing the problem yet.
|
||||
offset.top -= parseInt(el.css("marginTop"),10) || 0;
|
||||
offset.left -= parseInt(el.css("marginLeft"),10) || 0;
|
||||
|
||||
var width = el.outerWidth(true);
|
||||
var height = el.outerHeight(true);
|
||||
|
||||
for(var i=0;i<rows;i++) { // =
|
||||
for(var j=0;j<cells;j++) { // ||
|
||||
el
|
||||
.clone()
|
||||
.appendTo('body')
|
||||
.wrap('<div></div>')
|
||||
.css({
|
||||
position: 'absolute',
|
||||
visibility: 'visible',
|
||||
left: -j*(width/cells),
|
||||
top: -i*(height/rows)
|
||||
})
|
||||
.parent()
|
||||
.addClass('ui-effects-explode')
|
||||
.css({
|
||||
position: 'absolute',
|
||||
overflow: 'hidden',
|
||||
width: width/cells,
|
||||
height: height/rows,
|
||||
left: offset.left + j*(width/cells) + (o.options.mode == 'show' ? (j-Math.floor(cells/2))*(width/cells) : 0),
|
||||
top: offset.top + i*(height/rows) + (o.options.mode == 'show' ? (i-Math.floor(rows/2))*(height/rows) : 0),
|
||||
opacity: o.options.mode == 'show' ? 0 : 1
|
||||
}).animate({
|
||||
left: offset.left + j*(width/cells) + (o.options.mode == 'show' ? 0 : (j-Math.floor(cells/2))*(width/cells)),
|
||||
top: offset.top + i*(height/rows) + (o.options.mode == 'show' ? 0 : (i-Math.floor(rows/2))*(height/rows)),
|
||||
opacity: o.options.mode == 'show' ? 1 : 0
|
||||
}, o.duration || 500);
|
||||
}
|
||||
}
|
||||
|
||||
// Set a timeout, to call the callback approx. when the other animations have finished
|
||||
setTimeout(function() {
|
||||
|
||||
o.options.mode == 'show' ? el.css({ visibility: 'visible' }) : el.css({ visibility: 'visible' }).hide();
|
||||
if(o.callback) o.callback.apply(el[0]); // Callback
|
||||
el.dequeue();
|
||||
|
||||
$('div.ui-effects-explode').remove();
|
||||
|
||||
}, o.duration || 500);
|
||||
|
||||
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
})(jQuery);
|
||||
32
themes/default/js/ui/jquery.effects.fade.js
vendored
32
themes/default/js/ui/jquery.effects.fade.js
vendored
|
|
@ -1,32 +0,0 @@
|
|||
/*
|
||||
* jQuery UI Effects Fade 1.8.16
|
||||
*
|
||||
* 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);
|
||||
56
themes/default/js/ui/jquery.effects.fold.js
vendored
56
themes/default/js/ui/jquery.effects.fold.js
vendored
|
|
@ -1,56 +0,0 @@
|
|||
/*
|
||||
* jQuery UI Effects Fold 1.8.16
|
||||
*
|
||||
* 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:
|
||||
* jquery.effects.core.js
|
||||
*/
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.effects.fold = function(o) {
|
||||
|
||||
return this.queue(function() {
|
||||
|
||||
// Create element
|
||||
var el = $(this), props = ['position','top','bottom','left','right'];
|
||||
|
||||
// Set options
|
||||
var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
|
||||
var size = o.options.size || 15; // Default fold size
|
||||
var horizFirst = !(!o.options.horizFirst); // Ensure a boolean value
|
||||
var duration = o.duration ? o.duration / 2 : $.fx.speeds._default / 2;
|
||||
|
||||
// Adjust
|
||||
$.effects.save(el, props); el.show(); // Save & Show
|
||||
var wrapper = $.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper
|
||||
var widthFirst = ((mode == 'show') != horizFirst);
|
||||
var ref = widthFirst ? ['width', 'height'] : ['height', 'width'];
|
||||
var distance = widthFirst ? [wrapper.width(), wrapper.height()] : [wrapper.height(), wrapper.width()];
|
||||
var percent = /([0-9]+)%/.exec(size);
|
||||
if(percent) size = parseInt(percent[1],10) / 100 * distance[mode == 'hide' ? 0 : 1];
|
||||
if(mode == 'show') wrapper.css(horizFirst ? {height: 0, width: size} : {height: size, width: 0}); // Shift
|
||||
|
||||
// Animation
|
||||
var animation1 = {}, animation2 = {};
|
||||
animation1[ref[0]] = mode == 'show' ? distance[0] : size;
|
||||
animation2[ref[1]] = mode == 'show' ? distance[1] : 0;
|
||||
|
||||
// Animate
|
||||
wrapper.animate(animation1, duration, o.options.easing)
|
||||
.animate(animation2, duration, o.options.easing, function() {
|
||||
if(mode == 'hide') el.hide(); // Hide
|
||||
$.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
|
||||
if(o.callback) o.callback.apply(el[0], arguments); // Callback
|
||||
el.dequeue();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
})(jQuery);
|
||||
50
themes/default/js/ui/jquery.effects.highlight.js
vendored
50
themes/default/js/ui/jquery.effects.highlight.js
vendored
|
|
@ -1,50 +0,0 @@
|
|||
/*
|
||||
* jQuery UI Effects Highlight 1.8.16
|
||||
*
|
||||
* 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
51
themes/default/js/ui/jquery.effects.pulsate.js
vendored
|
|
@ -1,51 +0,0 @@
|
|||
/*
|
||||
* jQuery UI Effects Pulsate 1.8.16
|
||||
*
|
||||
* 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);
|
||||
178
themes/default/js/ui/jquery.effects.scale.js
vendored
178
themes/default/js/ui/jquery.effects.scale.js
vendored
|
|
@ -1,178 +0,0 @@
|
|||
/*
|
||||
* jQuery UI Effects Scale 1.8.16
|
||||
*
|
||||
* 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:
|
||||
* jquery.effects.core.js
|
||||
*/
|
||||
(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() };
|
||||
|
||||
$.extend(o.options, {
|
||||
fade: true,
|
||||
mode: mode,
|
||||
percent: mode == 'hide' ? percent : 100,
|
||||
from: mode == 'hide'
|
||||
? original
|
||||
: {
|
||||
height: original.height * factor,
|
||||
width: original.width * factor
|
||||
}
|
||||
});
|
||||
|
||||
elem.effect('scale', o.options, o.duration, o.callback);
|
||||
elem.dequeue();
|
||||
});
|
||||
};
|
||||
|
||||
$.effects.scale = function(o) {
|
||||
|
||||
return this.queue(function() {
|
||||
|
||||
// Create element
|
||||
var el = $(this);
|
||||
|
||||
// Set options
|
||||
var options = $.extend(true, {}, o.options);
|
||||
var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode
|
||||
var percent = parseInt(o.options.percent,10) || (parseInt(o.options.percent,10) == 0 ? 0 : (mode == 'hide' ? 0 : 100)); // Set default scaling percent
|
||||
var direction = o.options.direction || 'both'; // Set default axis
|
||||
var origin = o.options.origin; // The origin of the scaling
|
||||
if (mode != 'effect') { // Set default origin and restore for show/hide
|
||||
options.origin = origin || ['middle','center'];
|
||||
options.restore = true;
|
||||
}
|
||||
var original = {height: el.height(), width: el.width()}; // Save original
|
||||
el.from = o.options.from || (mode == 'show' ? {height: 0, width: 0} : original); // Default from state
|
||||
|
||||
// Adjust
|
||||
var factor = { // Set scaling factor
|
||||
y: direction != 'horizontal' ? (percent / 100) : 1,
|
||||
x: direction != 'vertical' ? (percent / 100) : 1
|
||||
};
|
||||
el.to = {height: original.height * factor.y, width: original.width * factor.x}; // Set to state
|
||||
|
||||
if (o.options.fade) { // Fade option to support puff
|
||||
if (mode == 'show') {el.from.opacity = 0; el.to.opacity = 1;};
|
||||
if (mode == 'hide') {el.from.opacity = 1; el.to.opacity = 0;};
|
||||
};
|
||||
|
||||
// Animation
|
||||
options.from = el.from; options.to = el.to; options.mode = mode;
|
||||
|
||||
// Animate
|
||||
el.effect('size', options, o.duration, o.callback);
|
||||
el.dequeue();
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
$.effects.size = function(o) {
|
||||
|
||||
return this.queue(function() {
|
||||
|
||||
// Create element
|
||||
var el = $(this), props = ['position','top','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'];
|
||||
var hProps = ['borderLeftWidth', 'borderRightWidth', 'paddingLeft', 'paddingRight'];
|
||||
|
||||
// Set options
|
||||
var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode
|
||||
var restore = o.options.restore || false; // Default restore
|
||||
var scale = o.options.scale || 'both'; // Default scale mode
|
||||
var origin = o.options.origin; // The origin of the sizing
|
||||
var original = {height: el.height(), width: el.width()}; // Save original
|
||||
el.from = o.options.from || original; // Default from state
|
||||
el.to = o.options.to || original; // Default to state
|
||||
// Adjust
|
||||
if (origin) { // Calculate baseline shifts
|
||||
var baseline = $.effects.getBaseline(origin, original);
|
||||
el.from.top = (original.height - el.from.height) * baseline.y;
|
||||
el.from.left = (original.width - el.from.width) * baseline.x;
|
||||
el.to.top = (original.height - el.to.height) * baseline.y;
|
||||
el.to.left = (original.width - el.to.width) * baseline.x;
|
||||
};
|
||||
var factor = { // Set scaling factor
|
||||
from: {y: el.from.height / original.height, x: el.from.width / original.width},
|
||||
to: {y: el.to.height / original.height, x: el.to.width / original.width}
|
||||
};
|
||||
if (scale == 'box' || scale == 'both') { // Scale the css box
|
||||
if (factor.from.y != factor.to.y) { // Vertical props scaling
|
||||
props = props.concat(vProps);
|
||||
el.from = $.effects.setTransition(el, vProps, factor.from.y, el.from);
|
||||
el.to = $.effects.setTransition(el, vProps, factor.to.y, el.to);
|
||||
};
|
||||
if (factor.from.x != factor.to.x) { // Horizontal props scaling
|
||||
props = props.concat(hProps);
|
||||
el.from = $.effects.setTransition(el, hProps, factor.from.x, el.from);
|
||||
el.to = $.effects.setTransition(el, hProps, factor.to.x, el.to);
|
||||
};
|
||||
};
|
||||
if (scale == 'content' || scale == 'both') { // Scale the content
|
||||
if (factor.from.y != factor.to.y) { // Vertical props scaling
|
||||
props = props.concat(cProps);
|
||||
el.from = $.effects.setTransition(el, cProps, factor.from.y, el.from);
|
||||
el.to = $.effects.setTransition(el, cProps, factor.to.y, el.to);
|
||||
};
|
||||
};
|
||||
$.effects.save(el, restore ? props : props1); el.show(); // Save & Show
|
||||
$.effects.createWrapper(el); // Create Wrapper
|
||||
el.css('overflow','hidden').css(el.from); // Shift
|
||||
|
||||
// Animate
|
||||
if (scale == 'content' || scale == 'both') { // Scale the children
|
||||
vProps = vProps.concat(['marginTop','marginBottom']).concat(cProps); // Add margins/font-size
|
||||
hProps = hProps.concat(['marginLeft','marginRight']); // Add margins
|
||||
props2 = props.concat(vProps).concat(hProps); // Concat
|
||||
el.find("*[width]").each(function(){
|
||||
child = $(this);
|
||||
if (restore) $.effects.save(child, props2);
|
||||
var c_original = {height: child.height(), width: child.width()}; // Save original
|
||||
child.from = {height: c_original.height * factor.from.y, width: c_original.width * factor.from.x};
|
||||
child.to = {height: c_original.height * factor.to.y, width: c_original.width * factor.to.x};
|
||||
if (factor.from.y != factor.to.y) { // Vertical props scaling
|
||||
child.from = $.effects.setTransition(child, vProps, factor.from.y, child.from);
|
||||
child.to = $.effects.setTransition(child, vProps, factor.to.y, child.to);
|
||||
};
|
||||
if (factor.from.x != factor.to.x) { // Horizontal props scaling
|
||||
child.from = $.effects.setTransition(child, hProps, factor.from.x, child.from);
|
||||
child.to = $.effects.setTransition(child, hProps, factor.to.x, child.to);
|
||||
};
|
||||
child.css(child.from); // Shift children
|
||||
child.animate(child.to, o.duration, o.options.easing, function(){
|
||||
if (restore) $.effects.restore(child, props2); // Restore children
|
||||
}); // Animate children
|
||||
});
|
||||
};
|
||||
|
||||
// Animate
|
||||
el.animate(el.to, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() {
|
||||
if (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
|
||||
el.dequeue();
|
||||
}});
|
||||
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
})(jQuery);
|
||||
57
themes/default/js/ui/jquery.effects.shake.js
vendored
57
themes/default/js/ui/jquery.effects.shake.js
vendored
|
|
@ -1,57 +0,0 @@
|
|||
/*
|
||||
* jQuery UI Effects Shake 1.8.16
|
||||
*
|
||||
* 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:
|
||||
* jquery.effects.core.js
|
||||
*/
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.effects.shake = function(o) {
|
||||
|
||||
return this.queue(function() {
|
||||
|
||||
// Create element
|
||||
var el = $(this), props = ['position','top','bottom','left','right'];
|
||||
|
||||
// Set options
|
||||
var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode
|
||||
var direction = o.options.direction || 'left'; // Default direction
|
||||
var distance = o.options.distance || 20; // Default distance
|
||||
var times = o.options.times || 3; // Default # of times
|
||||
var speed = o.duration || o.options.duration || 140; // Default speed per shake
|
||||
|
||||
// Adjust
|
||||
$.effects.save(el, props); el.show(); // Save & Show
|
||||
$.effects.createWrapper(el); // Create Wrapper
|
||||
var ref = (direction == 'up' || direction == 'down') ? 'top' : 'left';
|
||||
var motion = (direction == 'up' || direction == 'left') ? 'pos' : 'neg';
|
||||
|
||||
// Animation
|
||||
var animation = {}, animation1 = {}, animation2 = {};
|
||||
animation[ref] = (motion == 'pos' ? '-=' : '+=') + distance;
|
||||
animation1[ref] = (motion == 'pos' ? '+=' : '-=') + distance * 2;
|
||||
animation2[ref] = (motion == 'pos' ? '-=' : '+=') + distance * 2;
|
||||
|
||||
// Animate
|
||||
el.animate(animation, speed, o.options.easing);
|
||||
for (var i = 1; i < times; i++) { // Shakes
|
||||
el.animate(animation1, speed, o.options.easing).animate(animation2, speed, o.options.easing);
|
||||
};
|
||||
el.animate(animation1, speed, o.options.easing).
|
||||
animate(animation, speed / 2, o.options.easing, function(){ // Last shake
|
||||
$.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
|
||||
if(o.callback) o.callback.apply(this, arguments); // Callback
|
||||
});
|
||||
el.queue('fx', function() { el.dequeue(); });
|
||||
el.dequeue();
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
})(jQuery);
|
||||
50
themes/default/js/ui/jquery.effects.slide.js
vendored
50
themes/default/js/ui/jquery.effects.slide.js
vendored
|
|
@ -1,50 +0,0 @@
|
|||
/*
|
||||
* jQuery UI Effects Slide 1.8.16
|
||||
*
|
||||
* 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:
|
||||
* jquery.effects.core.js
|
||||
*/
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.effects.slide = function(o) {
|
||||
|
||||
return this.queue(function() {
|
||||
|
||||
// Create element
|
||||
var el = $(this), props = ['position','top','bottom','left','right'];
|
||||
|
||||
// Set options
|
||||
var mode = $.effects.setMode(el, o.options.mode || 'show'); // Set Mode
|
||||
var direction = o.options.direction || 'left'; // Default Direction
|
||||
|
||||
// Adjust
|
||||
$.effects.save(el, props); el.show(); // Save & Show
|
||||
$.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper
|
||||
var ref = (direction == 'up' || direction == 'down') ? 'top' : 'left';
|
||||
var motion = (direction == 'up' || direction == 'left') ? 'pos' : 'neg';
|
||||
var distance = o.options.distance || (ref == 'top' ? el.outerHeight({margin:true}) : el.outerWidth({margin:true}));
|
||||
if (mode == 'show') el.css(ref, motion == 'pos' ? (isNaN(distance) ? "-" + distance : -distance) : distance); // Shift
|
||||
|
||||
// Animation
|
||||
var animation = {};
|
||||
animation[ref] = (mode == 'show' ? (motion == 'pos' ? '+=' : '-=') : (motion == 'pos' ? '-=' : '+=')) + distance;
|
||||
|
||||
// Animate
|
||||
el.animate(animation, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() {
|
||||
if(mode == 'hide') el.hide(); // Hide
|
||||
$.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
|
||||
if(o.callback) o.callback.apply(this, arguments); // Callback
|
||||
el.dequeue();
|
||||
}});
|
||||
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
})(jQuery);
|
||||
45
themes/default/js/ui/jquery.effects.transfer.js
vendored
45
themes/default/js/ui/jquery.effects.transfer.js
vendored
|
|
@ -1,45 +0,0 @@
|
|||
/*
|
||||
* jQuery UI Effects Transfer 1.8.16
|
||||
*
|
||||
* 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:
|
||||
* jquery.effects.core.js
|
||||
*/
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.effects.transfer = function(o) {
|
||||
return this.queue(function() {
|
||||
var elem = $(this),
|
||||
target = $(o.options.to),
|
||||
endPosition = target.offset(),
|
||||
animation = {
|
||||
top: endPosition.top,
|
||||
left: endPosition.left,
|
||||
height: target.innerHeight(),
|
||||
width: target.innerWidth()
|
||||
},
|
||||
startPosition = elem.offset(),
|
||||
transfer = $('<div class="ui-effects-transfer"></div>')
|
||||
.appendTo(document.body)
|
||||
.addClass(o.options.className)
|
||||
.css({
|
||||
top: startPosition.top,
|
||||
left: startPosition.left,
|
||||
height: elem.innerHeight(),
|
||||
width: elem.innerWidth(),
|
||||
position: 'absolute'
|
||||
})
|
||||
.animate(animation, o.duration, o.options.easing, function() {
|
||||
transfer.remove();
|
||||
(o.callback && o.callback.apply(elem[0], arguments));
|
||||
elem.dequeue();
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
})(jQuery);
|
||||
957
themes/default/js/ui/jquery.ui.accordion.js
vendored
957
themes/default/js/ui/jquery.ui.accordion.js
vendored
File diff suppressed because it is too large
Load diff
675
themes/default/js/ui/jquery.ui.autocomplete.js
vendored
675
themes/default/js/ui/jquery.ui.autocomplete.js
vendored
|
|
@ -1,16 +1,18 @@
|
|||
/*
|
||||
* jQuery UI Autocomplete 1.8.16
|
||||
/*!
|
||||
* jQuery UI Autocomplete 1.9.0
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Autocomplete
|
||||
* http://api.jqueryui.com/autocomplete/
|
||||
*
|
||||
* Depends:
|
||||
* jquery.ui.core.js
|
||||
* jquery.ui.widget.js
|
||||
* jquery.ui.position.js
|
||||
* jquery.ui.menu.js
|
||||
*/
|
||||
(function( $, undefined ) {
|
||||
|
||||
|
|
@ -18,6 +20,8 @@
|
|||
var requestIndex = 0;
|
||||
|
||||
$.widget( "ui.autocomplete", {
|
||||
version: "1.9.0",
|
||||
defaultElement: "<input>",
|
||||
options: {
|
||||
appendTo: "body",
|
||||
autoFocus: false,
|
||||
|
|
@ -28,249 +32,339 @@ $.widget( "ui.autocomplete", {
|
|||
at: "left bottom",
|
||||
collision: "none"
|
||||
},
|
||||
source: null
|
||||
source: null,
|
||||
|
||||
// callbacks
|
||||
change: null,
|
||||
close: null,
|
||||
focus: null,
|
||||
open: null,
|
||||
response: null,
|
||||
search: null,
|
||||
select: null
|
||||
},
|
||||
|
||||
pending: 0,
|
||||
|
||||
_create: function() {
|
||||
var self = this,
|
||||
doc = this.element[ 0 ].ownerDocument,
|
||||
suppressKeyPress;
|
||||
// Some browsers only repeat keydown events, not keypress events,
|
||||
// so we use the suppressKeyPress flag to determine if we've already
|
||||
// handled the keydown event. #7269
|
||||
// Unfortunately the code for & in keypress is the same as the up arrow,
|
||||
// so we use the suppressKeyPressRepeat flag to avoid handling keypress
|
||||
// events when we know the keydown event was used to modify the
|
||||
// search term. #7799
|
||||
var suppressKeyPress, suppressKeyPressRepeat, suppressInput;
|
||||
|
||||
this.isMultiLine = this._isMultiLine();
|
||||
this.valueMethod = this.element[ this.element.is( "input,textarea" ) ? "val" : "text" ];
|
||||
this.isNewMenu = true;
|
||||
|
||||
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.propAttr( "readOnly" ) ) {
|
||||
.attr( "autocomplete", "off" );
|
||||
|
||||
this._on({
|
||||
keydown: function( event ) {
|
||||
if ( this.element.prop( "readOnly" ) ) {
|
||||
suppressKeyPress = true;
|
||||
suppressInput = true;
|
||||
suppressKeyPressRepeat = true;
|
||||
return;
|
||||
}
|
||||
|
||||
suppressKeyPress = false;
|
||||
suppressInput = false;
|
||||
suppressKeyPressRepeat = false;
|
||||
var keyCode = $.ui.keyCode;
|
||||
switch( event.keyCode ) {
|
||||
case keyCode.PAGE_UP:
|
||||
self._move( "previousPage", event );
|
||||
suppressKeyPress = true;
|
||||
this._move( "previousPage", event );
|
||||
break;
|
||||
case keyCode.PAGE_DOWN:
|
||||
self._move( "nextPage", event );
|
||||
suppressKeyPress = true;
|
||||
this._move( "nextPage", event );
|
||||
break;
|
||||
case keyCode.UP:
|
||||
self._move( "previous", event );
|
||||
// prevent moving cursor to beginning of text field in some browsers
|
||||
event.preventDefault();
|
||||
suppressKeyPress = true;
|
||||
this._keyEvent( "previous", event );
|
||||
break;
|
||||
case keyCode.DOWN:
|
||||
self._move( "next", event );
|
||||
// prevent moving cursor to end of text field in some browsers
|
||||
event.preventDefault();
|
||||
suppressKeyPress = true;
|
||||
this._keyEvent( "next", event );
|
||||
break;
|
||||
case keyCode.ENTER:
|
||||
case keyCode.NUMPAD_ENTER:
|
||||
// when menu is open and has focus
|
||||
if ( self.menu.active ) {
|
||||
if ( this.menu.active ) {
|
||||
// #6055 - Opera still allows the keypress to occur
|
||||
// which causes forms to submit
|
||||
suppressKeyPress = true;
|
||||
event.preventDefault();
|
||||
this.menu.select( event );
|
||||
}
|
||||
//passthrough - ENTER and TAB both select the current element
|
||||
break;
|
||||
case keyCode.TAB:
|
||||
if ( !self.menu.active ) {
|
||||
return;
|
||||
if ( this.menu.active ) {
|
||||
this.menu.select( event );
|
||||
}
|
||||
self.menu.select( event );
|
||||
break;
|
||||
case keyCode.ESCAPE:
|
||||
self.element.val( self.term );
|
||||
self.close( event );
|
||||
if ( this.menu.element.is( ":visible" ) ) {
|
||||
this._value( this.term );
|
||||
this.close( event );
|
||||
// Different browsers have different default behavior for escape
|
||||
// Single press can mean undo or clear
|
||||
// Double press in IE means clear the whole form
|
||||
event.preventDefault();
|
||||
}
|
||||
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 );
|
||||
suppressKeyPressRepeat = true;
|
||||
// search timeout should be triggered before the input value is changed
|
||||
this._searchTimeout( event );
|
||||
break;
|
||||
}
|
||||
})
|
||||
.bind( "keypress.autocomplete", function( event ) {
|
||||
},
|
||||
keypress: function( event ) {
|
||||
if ( suppressKeyPress ) {
|
||||
suppressKeyPress = false;
|
||||
event.preventDefault();
|
||||
return;
|
||||
}
|
||||
})
|
||||
.bind( "focus.autocomplete", function() {
|
||||
if ( self.options.disabled ) {
|
||||
if ( suppressKeyPressRepeat ) {
|
||||
return;
|
||||
}
|
||||
|
||||
self.selectedItem = null;
|
||||
self.previous = self.element.val();
|
||||
})
|
||||
.bind( "blur.autocomplete", function( event ) {
|
||||
if ( self.options.disabled ) {
|
||||
// replicate some key handlers to allow them to repeat in Firefox and Opera
|
||||
var keyCode = $.ui.keyCode;
|
||||
switch( event.keyCode ) {
|
||||
case keyCode.PAGE_UP:
|
||||
this._move( "previousPage", event );
|
||||
break;
|
||||
case keyCode.PAGE_DOWN:
|
||||
this._move( "nextPage", event );
|
||||
break;
|
||||
case keyCode.UP:
|
||||
this._keyEvent( "previous", event );
|
||||
break;
|
||||
case keyCode.DOWN:
|
||||
this._keyEvent( "next", event );
|
||||
break;
|
||||
}
|
||||
},
|
||||
input: function( event ) {
|
||||
if ( suppressInput ) {
|
||||
suppressInput = false;
|
||||
event.preventDefault();
|
||||
return;
|
||||
}
|
||||
this._searchTimeout( event );
|
||||
},
|
||||
focus: function() {
|
||||
this.selectedItem = null;
|
||||
this.previous = this._value();
|
||||
},
|
||||
blur: function( event ) {
|
||||
if ( this.cancelBlur ) {
|
||||
delete this.cancelBlur;
|
||||
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 );
|
||||
clearTimeout( this.searching );
|
||||
this.close( event );
|
||||
this._change( event );
|
||||
}
|
||||
});
|
||||
|
||||
this._initSource();
|
||||
this.response = function() {
|
||||
return self._response.apply( self, arguments );
|
||||
};
|
||||
this.menu = $( "<ul></ul>" )
|
||||
this.menu = $( "<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 ) {
|
||||
.appendTo( this.document.find( this.options.appendTo || "body" )[ 0 ] )
|
||||
.menu({
|
||||
// custom key handling for now
|
||||
input: $(),
|
||||
// disable ARIA support, the live region takes care of that
|
||||
role: null
|
||||
})
|
||||
.zIndex( this.element.zIndex() + 1 )
|
||||
.hide()
|
||||
.data( "menu" );
|
||||
this._on( this.menu.element, {
|
||||
mousedown: function( event ) {
|
||||
// prevent moving focus out of the text field
|
||||
event.preventDefault();
|
||||
|
||||
// IE doesn't prevent moving focus even with event.preventDefault()
|
||||
// so we set a flag to know when we should ignore the blur event
|
||||
this.cancelBlur = true;
|
||||
this._delay(function() {
|
||||
delete this.cancelBlur;
|
||||
});
|
||||
|
||||
// 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 ];
|
||||
var menuElement = this.menu.element[ 0 ];
|
||||
if ( !$( event.target ).closest( ".ui-menu-item" ).length ) {
|
||||
setTimeout(function() {
|
||||
$( document ).one( 'mousedown', function( event ) {
|
||||
if ( event.target !== self.element[ 0 ] &&
|
||||
this._delay(function() {
|
||||
var that = this;
|
||||
this.document.one( "mousedown", function( event ) {
|
||||
if ( event.target !== that.element[ 0 ] &&
|
||||
event.target !== menuElement &&
|
||||
!$.ui.contains( menuElement, event.target ) ) {
|
||||
self.close();
|
||||
!$.contains( menuElement, event.target ) ) {
|
||||
that.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;
|
||||
menufocus: function( event, ui ) {
|
||||
// #7024 - Prevent accidental activation of menu items in Firefox
|
||||
if ( this.isNewMenu ) {
|
||||
this.isNewMenu = false;
|
||||
if ( event.originalEvent && /^mouse/.test( event.originalEvent.type ) ) {
|
||||
this.menu.blur();
|
||||
|
||||
this.document.one( "mousemove", function() {
|
||||
$( event.target ).trigger( event.originalEvent );
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// back compat for _renderItem using item.autocomplete, via #7810
|
||||
// TODO remove the fallback, see #8156
|
||||
var item = ui.item.data( "ui-autocomplete-item" ) || ui.item.data( "item.autocomplete" );
|
||||
if ( false !== this._trigger( "focus", event, { item: item } ) ) {
|
||||
// use value to match what will end up in the input, if it was a key event
|
||||
if ( event.originalEvent && /^key/.test( event.originalEvent.type ) ) {
|
||||
this._value( item.value );
|
||||
}
|
||||
} else {
|
||||
// Normally the input is populated with the item's value as the
|
||||
// menu is navigated, causing screen readers to notice a change and
|
||||
// announce the item. Since the focus event was canceled, this doesn't
|
||||
// happen, so we update the live region so that screen readers can
|
||||
// still notice the change and announce it.
|
||||
this.liveRegion.text( item.value );
|
||||
}
|
||||
},
|
||||
menuselect: function( event, ui ) {
|
||||
// back compat for _renderItem using item.autocomplete, via #7810
|
||||
// TODO remove the fallback, see #8156
|
||||
var item = ui.item.data( "ui-autocomplete-item" ) || ui.item.data( "item.autocomplete" ),
|
||||
previous = this.previous;
|
||||
|
||||
// only trigger when focus was lost (click on menu)
|
||||
if ( self.element[0] !== doc.activeElement ) {
|
||||
self.element.focus();
|
||||
self.previous = previous;
|
||||
if ( this.element[0] !== this.document[0].activeElement ) {
|
||||
this.element.focus();
|
||||
this.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);
|
||||
this._delay(function() {
|
||||
this.previous = previous;
|
||||
this.selectedItem = item;
|
||||
});
|
||||
}
|
||||
|
||||
if ( false !== self._trigger( "select", event, { item: item } ) ) {
|
||||
self.element.val( item.value );
|
||||
if ( false !== this._trigger( "select", event, { item: item } ) ) {
|
||||
this._value( item.value );
|
||||
}
|
||||
// reset the term after the select event
|
||||
// this allows custom select handling to work properly
|
||||
self.term = self.element.val();
|
||||
this.term = this._value();
|
||||
|
||||
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 );
|
||||
}
|
||||
this.close( event );
|
||||
this.selectedItem = item;
|
||||
}
|
||||
});
|
||||
|
||||
this.liveRegion = $( "<span>", {
|
||||
role: "status",
|
||||
"aria-live": "polite"
|
||||
})
|
||||
.zIndex( this.element.zIndex() + 1 )
|
||||
// workaround for jQuery bug #5781 http://dev.jquery.com/ticket/5781
|
||||
.css({ top: 0, left: 0 })
|
||||
.hide()
|
||||
.data( "menu" );
|
||||
.addClass( "ui-helper-hidden-accessible" )
|
||||
.insertAfter( this.element );
|
||||
|
||||
if ( $.fn.bgiframe ) {
|
||||
this.menu.element.bgiframe();
|
||||
}
|
||||
|
||||
// turning off autocomplete prevents the browser from remembering the
|
||||
// value when navigating through history, so we re-enable autocomplete
|
||||
// if the page is unloaded before the widget is destroyed. #7790
|
||||
this._on( this.window, {
|
||||
beforeunload: function() {
|
||||
this.element.removeAttr( "autocomplete" );
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
destroy: function() {
|
||||
_destroy: function() {
|
||||
clearTimeout( this.searching );
|
||||
this.element
|
||||
.removeClass( "ui-autocomplete-input" )
|
||||
.removeAttr( "autocomplete" )
|
||||
.removeAttr( "role" )
|
||||
.removeAttr( "aria-autocomplete" )
|
||||
.removeAttr( "aria-haspopup" );
|
||||
.removeAttr( "autocomplete" );
|
||||
this.menu.element.remove();
|
||||
$.Widget.prototype.destroy.call( this );
|
||||
this.liveRegion.remove();
|
||||
},
|
||||
|
||||
_setOption: function( key, value ) {
|
||||
$.Widget.prototype._setOption.apply( this, arguments );
|
||||
this._super( key, value );
|
||||
if ( key === "source" ) {
|
||||
this._initSource();
|
||||
}
|
||||
if ( key === "appendTo" ) {
|
||||
this.menu.element.appendTo( $( value || "body", this.element[0].ownerDocument )[0] )
|
||||
this.menu.element.appendTo( this.document.find( value || "body" )[0] );
|
||||
}
|
||||
if ( key === "disabled" && value && this.xhr ) {
|
||||
this.xhr.abort();
|
||||
}
|
||||
},
|
||||
|
||||
_isMultiLine: function() {
|
||||
// Textareas are always multi-line
|
||||
if ( this.element.is( "textarea" ) ) {
|
||||
return true;
|
||||
}
|
||||
// Inputs are always single-line, even if inside a contentEditable element
|
||||
// IE also treats inputs as contentEditable
|
||||
if ( this.element.is( "input" ) ) {
|
||||
return false;
|
||||
}
|
||||
// All other element types are determined by whether or not they're contentEditable
|
||||
return this.element.prop( "isContentEditable" );
|
||||
},
|
||||
|
||||
_initSource: function() {
|
||||
var self = this,
|
||||
array,
|
||||
url;
|
||||
var array, url,
|
||||
that = this;
|
||||
if ( $.isArray(this.options.source) ) {
|
||||
array = this.options.source;
|
||||
this.source = function( request, response ) {
|
||||
response( $.ui.autocomplete.filter(array, request.term) );
|
||||
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();
|
||||
if ( that.xhr ) {
|
||||
that.xhr.abort();
|
||||
}
|
||||
self.xhr = $.ajax({
|
||||
that.xhr = $.ajax({
|
||||
url: url,
|
||||
data: request,
|
||||
dataType: "json",
|
||||
autocompleteRequest: ++requestIndex,
|
||||
success: function( data, status ) {
|
||||
if ( this.autocompleteRequest === requestIndex ) {
|
||||
response( data );
|
||||
}
|
||||
},
|
||||
error: function() {
|
||||
if ( this.autocompleteRequest === requestIndex ) {
|
||||
response( [] );
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
} else {
|
||||
|
|
@ -278,17 +372,27 @@ $.widget( "ui.autocomplete", {
|
|||
}
|
||||
},
|
||||
|
||||
_searchTimeout: function( event ) {
|
||||
clearTimeout( this.searching );
|
||||
this.searching = this._delay(function() {
|
||||
// only search if the value has changed
|
||||
if ( this.term !== this._value() ) {
|
||||
this.selectedItem = null;
|
||||
this.search( null, event );
|
||||
}
|
||||
}, this.options.delay );
|
||||
},
|
||||
|
||||
search: function( value, event ) {
|
||||
value = value != null ? value : this.element.val();
|
||||
value = value != null ? value : this._value();
|
||||
|
||||
// always save the actual value, not the one passed as an argument
|
||||
this.term = this.element.val();
|
||||
this.term = this._value();
|
||||
|
||||
if ( value.length < this.options.minLength ) {
|
||||
return this.close( event );
|
||||
}
|
||||
|
||||
clearTimeout( this.closing );
|
||||
if ( this._trigger( "search", event ) === false ) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -299,35 +403,57 @@ $.widget( "ui.autocomplete", {
|
|||
_search: function( value ) {
|
||||
this.pending++;
|
||||
this.element.addClass( "ui-autocomplete-loading" );
|
||||
this.cancelSearch = false;
|
||||
|
||||
this.source( { term: value }, this.response );
|
||||
this.source( { term: value }, this._response() );
|
||||
},
|
||||
|
||||
_response: function( content ) {
|
||||
if ( !this.options.disabled && content && content.length ) {
|
||||
_response: function() {
|
||||
var that = this,
|
||||
index = ++requestIndex;
|
||||
|
||||
return function( content ) {
|
||||
if ( index === requestIndex ) {
|
||||
that.__response( content );
|
||||
}
|
||||
|
||||
that.pending--;
|
||||
if ( !that.pending ) {
|
||||
that.element.removeClass( "ui-autocomplete-loading" );
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
__response: function( content ) {
|
||||
if ( content ) {
|
||||
content = this._normalize( content );
|
||||
}
|
||||
this._trigger( "response", null, { content: content } );
|
||||
if ( !this.options.disabled && content && content.length && !this.cancelSearch ) {
|
||||
this._suggest( content );
|
||||
this._trigger( "open" );
|
||||
} else {
|
||||
this.close();
|
||||
}
|
||||
this.pending--;
|
||||
if ( !this.pending ) {
|
||||
this.element.removeClass( "ui-autocomplete-loading" );
|
||||
// use ._close() instead of .close() so we don't cancel future searches
|
||||
this._close();
|
||||
}
|
||||
},
|
||||
|
||||
close: function( event ) {
|
||||
clearTimeout( this.closing );
|
||||
if ( this.menu.element.is(":visible") ) {
|
||||
this.cancelSearch = true;
|
||||
this._close( event );
|
||||
},
|
||||
|
||||
_close: function( event ) {
|
||||
if ( this.menu.element.is( ":visible" ) ) {
|
||||
this.menu.element.hide();
|
||||
this.menu.deactivate();
|
||||
this.menu.blur();
|
||||
this.isNewMenu = true;
|
||||
this._trigger( "close", event );
|
||||
}
|
||||
},
|
||||
|
||||
_change: function( event ) {
|
||||
if ( this.previous !== this.element.val() ) {
|
||||
if ( this.previous !== this._value() ) {
|
||||
this._trigger( "change", event, { item: this.selectedItem } );
|
||||
}
|
||||
},
|
||||
|
|
@ -337,7 +463,7 @@ $.widget( "ui.autocomplete", {
|
|||
if ( items.length && items[0].label && items[0].value ) {
|
||||
return items;
|
||||
}
|
||||
return $.map( items, function(item) {
|
||||
return $.map( items, function( item ) {
|
||||
if ( typeof item === "string" ) {
|
||||
return {
|
||||
label: item,
|
||||
|
|
@ -356,8 +482,6 @@ $.widget( "ui.autocomplete", {
|
|||
.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
|
||||
|
|
@ -368,41 +492,46 @@ $.widget( "ui.autocomplete", {
|
|||
}, this.options.position ));
|
||||
|
||||
if ( this.options.autoFocus ) {
|
||||
this.menu.next( new $.Event("mouseover") );
|
||||
this.menu.next();
|
||||
}
|
||||
},
|
||||
|
||||
_resizeMenu: function() {
|
||||
var ul = this.menu.element;
|
||||
ul.outerWidth( Math.max(
|
||||
ul.width( "" ).outerWidth(),
|
||||
// Firefox wraps long text (possibly a rounding bug)
|
||||
// so we add 1px to avoid the wrapping (#7513)
|
||||
ul.width( "" ).outerWidth() + 1,
|
||||
this.element.outerWidth()
|
||||
) );
|
||||
},
|
||||
|
||||
_renderMenu: function( ul, items ) {
|
||||
var self = this;
|
||||
var that = this;
|
||||
$.each( items, function( index, item ) {
|
||||
self._renderItem( ul, item );
|
||||
that._renderItemData( ul, item );
|
||||
});
|
||||
},
|
||||
|
||||
_renderItem: function( ul, item) {
|
||||
return $( "<li></li>" )
|
||||
.data( "item.autocomplete", item )
|
||||
.append( $( "<a></a>" ).text( item.label ) )
|
||||
_renderItemData: function( ul, item ) {
|
||||
return this._renderItem( ul, item ).data( "ui-autocomplete-item", item );
|
||||
},
|
||||
|
||||
_renderItem: function( ul, item ) {
|
||||
return $( "<li>" )
|
||||
.append( $( "<a>" ).text( item.label ) )
|
||||
.appendTo( ul );
|
||||
},
|
||||
|
||||
_move: function( direction, event ) {
|
||||
if ( !this.menu.element.is(":visible") ) {
|
||||
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();
|
||||
if ( this.menu.isFirstItem() && /^previous/.test( direction ) ||
|
||||
this.menu.isLastItem() && /^next/.test( direction ) ) {
|
||||
this._value( this.term );
|
||||
this.menu.blur();
|
||||
return;
|
||||
}
|
||||
this.menu[ direction ]( event );
|
||||
|
|
@ -410,12 +539,25 @@ $.widget( "ui.autocomplete", {
|
|||
|
||||
widget: function() {
|
||||
return this.menu.element;
|
||||
},
|
||||
|
||||
_value: function( value ) {
|
||||
return this.valueMethod.apply( this.element, arguments );
|
||||
},
|
||||
|
||||
_keyEvent: function( keyEvent, event ) {
|
||||
if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
|
||||
this._move( keyEvent, event );
|
||||
|
||||
// prevents moving cursor to beginning/end of the text field in some browsers
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$.extend( $.ui.autocomplete, {
|
||||
escapeRegex: function( value ) {
|
||||
return value.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
||||
return value.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
|
||||
},
|
||||
filter: function(array, term) {
|
||||
var matcher = new RegExp( $.ui.autocomplete.escapeRegex(term), "i" );
|
||||
|
|
@ -425,188 +567,35 @@ $.extend( $.ui.autocomplete, {
|
|||
}
|
||||
});
|
||||
|
||||
}( 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($) {
|
||||
// live region extension, adding a `messages` option
|
||||
// NOTE: This is an experimental API. We are still investigating
|
||||
// a full solution for string manipulation and internationalization.
|
||||
$.widget( "ui.autocomplete", $.ui.autocomplete, {
|
||||
options: {
|
||||
messages: {
|
||||
noResults: "No search results.",
|
||||
results: function( amount ) {
|
||||
return amount + ( amount > 1 ? " results are" : " result is" ) +
|
||||
" available, use up and down arrow keys to navigate.";
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
$.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 ) {
|
||||
__response: function( content ) {
|
||||
var message;
|
||||
this._superApply( arguments );
|
||||
if ( this.options.disabled || this.cancelSearch ) {
|
||||
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.scrollTop(),
|
||||
elementHeight = this.element.height();
|
||||
if (offset < 0) {
|
||||
this.element.scrollTop( scroll + offset);
|
||||
} else if (offset >= elementHeight) {
|
||||
this.element.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);
|
||||
if ( content && content.length ) {
|
||||
message = this.options.messages.results( content.length );
|
||||
} else {
|
||||
this.activate(event, this.element.children(edge));
|
||||
message = this.options.messages.noResults;
|
||||
}
|
||||
},
|
||||
|
||||
// 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[ $.fn.prop ? "prop" : "attr" ]("scrollHeight");
|
||||
},
|
||||
|
||||
select: function( event ) {
|
||||
this._trigger("selected", event, { item: this.active });
|
||||
this.liveRegion.text( message );
|
||||
}
|
||||
});
|
||||
|
||||
}(jQuery));
|
||||
|
||||
}( jQuery ));
|
||||
|
|
|
|||
113
themes/default/js/ui/jquery.ui.button.js
vendored
113
themes/default/js/ui/jquery.ui.button.js
vendored
|
|
@ -1,11 +1,12 @@
|
|||
/*
|
||||
* jQuery UI Button 1.8.16
|
||||
/*!
|
||||
* jQuery UI Button 1.9.0
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Button
|
||||
* http://api.jqueryui.com/button/
|
||||
*
|
||||
* Depends:
|
||||
* jquery.ui.core.js
|
||||
|
|
@ -41,6 +42,8 @@ var lastActive, startXPos, startYPos, clickDragged,
|
|||
};
|
||||
|
||||
$.widget( "ui.button", {
|
||||
version: "1.9.0",
|
||||
defaultElement: "<button>",
|
||||
options: {
|
||||
disabled: null,
|
||||
text: true,
|
||||
|
|
@ -52,34 +55,32 @@ $.widget( "ui.button", {
|
|||
},
|
||||
_create: function() {
|
||||
this.element.closest( "form" )
|
||||
.unbind( "reset.button" )
|
||||
.bind( "reset.button", formResetHandler );
|
||||
.unbind( "reset" + this.eventNamespace )
|
||||
.bind( "reset" + this.eventNamespace, formResetHandler );
|
||||
|
||||
if ( typeof this.options.disabled !== "boolean" ) {
|
||||
this.options.disabled = this.element.propAttr( "disabled" );
|
||||
this.options.disabled = !!this.element.prop( "disabled" );
|
||||
} else {
|
||||
this.element.prop( "disabled", this.options.disabled );
|
||||
}
|
||||
|
||||
this._determineButtonType();
|
||||
this.hasTitle = !!this.buttonElement.attr( "title" );
|
||||
|
||||
var self = this,
|
||||
var that = 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;
|
||||
options.label = (this.type === "input" ? this.buttonElement.val() : this.buttonElement.html());
|
||||
}
|
||||
|
||||
this.buttonElement
|
||||
.addClass( baseClasses )
|
||||
.attr( "role", "button" )
|
||||
.bind( "mouseenter.button", function() {
|
||||
.bind( "mouseenter" + this.eventNamespace, function() {
|
||||
if ( options.disabled ) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -88,13 +89,13 @@ $.widget( "ui.button", {
|
|||
$( this ).addClass( "ui-state-active" );
|
||||
}
|
||||
})
|
||||
.bind( "mouseleave.button", function() {
|
||||
.bind( "mouseleave" + this.eventNamespace, function() {
|
||||
if ( options.disabled ) {
|
||||
return;
|
||||
}
|
||||
$( this ).removeClass( hoverClass );
|
||||
})
|
||||
.bind( "click.button", function( event ) {
|
||||
.bind( "click" + this.eventNamespace, function( event ) {
|
||||
if ( options.disabled ) {
|
||||
event.preventDefault();
|
||||
event.stopImmediatePropagation();
|
||||
|
|
@ -102,26 +103,26 @@ $.widget( "ui.button", {
|
|||
});
|
||||
|
||||
this.element
|
||||
.bind( "focus.button", function() {
|
||||
.bind( "focus" + this.eventNamespace, function() {
|
||||
// no need to check disabled, focus won't be triggered anyway
|
||||
self.buttonElement.addClass( focusClass );
|
||||
that.buttonElement.addClass( focusClass );
|
||||
})
|
||||
.bind( "blur.button", function() {
|
||||
self.buttonElement.removeClass( focusClass );
|
||||
.bind( "blur" + this.eventNamespace, function() {
|
||||
that.buttonElement.removeClass( focusClass );
|
||||
});
|
||||
|
||||
if ( toggleButton ) {
|
||||
this.element.bind( "change.button", function() {
|
||||
this.element.bind( "change" + this.eventNamespace, function() {
|
||||
if ( clickDragged ) {
|
||||
return;
|
||||
}
|
||||
self.refresh();
|
||||
that.refresh();
|
||||
});
|
||||
// if mouse moves between mousedown and mouseup (drag) set clickDragged flag
|
||||
// prevents issue where button state changes but checkbox/radio checked state
|
||||
// does not in Firefox (see ticket #6970)
|
||||
this.buttonElement
|
||||
.bind( "mousedown.button", function( event ) {
|
||||
.bind( "mousedown" + this.eventNamespace, function( event ) {
|
||||
if ( options.disabled ) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -129,7 +130,7 @@ $.widget( "ui.button", {
|
|||
startXPos = event.pageX;
|
||||
startYPos = event.pageY;
|
||||
})
|
||||
.bind( "mouseup.button", function( event ) {
|
||||
.bind( "mouseup" + this.eventNamespace, function( event ) {
|
||||
if ( options.disabled ) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -140,22 +141,22 @@ $.widget( "ui.button", {
|
|||
}
|
||||
|
||||
if ( this.type === "checkbox" ) {
|
||||
this.buttonElement.bind( "click.button", function() {
|
||||
this.buttonElement.bind( "click" + this.eventNamespace, function() {
|
||||
if ( options.disabled || clickDragged ) {
|
||||
return false;
|
||||
}
|
||||
$( this ).toggleClass( "ui-state-active" );
|
||||
self.buttonElement.attr( "aria-pressed", self.element[0].checked );
|
||||
that.buttonElement.attr( "aria-pressed", that.element[0].checked );
|
||||
});
|
||||
} else if ( this.type === "radio" ) {
|
||||
this.buttonElement.bind( "click.button", function() {
|
||||
this.buttonElement.bind( "click" + this.eventNamespace, function() {
|
||||
if ( options.disabled || clickDragged ) {
|
||||
return false;
|
||||
}
|
||||
$( this ).addClass( "ui-state-active" );
|
||||
self.buttonElement.attr( "aria-pressed", "true" );
|
||||
that.buttonElement.attr( "aria-pressed", "true" );
|
||||
|
||||
var radio = self.element[ 0 ];
|
||||
var radio = that.element[ 0 ];
|
||||
radioGroup( radio )
|
||||
.not( radio )
|
||||
.map(function() {
|
||||
|
|
@ -166,31 +167,31 @@ $.widget( "ui.button", {
|
|||
});
|
||||
} else {
|
||||
this.buttonElement
|
||||
.bind( "mousedown.button", function() {
|
||||
.bind( "mousedown" + this.eventNamespace, function() {
|
||||
if ( options.disabled ) {
|
||||
return false;
|
||||
}
|
||||
$( this ).addClass( "ui-state-active" );
|
||||
lastActive = this;
|
||||
$( document ).one( "mouseup", function() {
|
||||
that.document.one( "mouseup", function() {
|
||||
lastActive = null;
|
||||
});
|
||||
})
|
||||
.bind( "mouseup.button", function() {
|
||||
.bind( "mouseup" + this.eventNamespace, function() {
|
||||
if ( options.disabled ) {
|
||||
return false;
|
||||
}
|
||||
$( this ).removeClass( "ui-state-active" );
|
||||
})
|
||||
.bind( "keydown.button", function(event) {
|
||||
.bind( "keydown" + this.eventNamespace, function(event) {
|
||||
if ( options.disabled ) {
|
||||
return false;
|
||||
}
|
||||
if ( event.keyCode == $.ui.keyCode.SPACE || event.keyCode == $.ui.keyCode.ENTER ) {
|
||||
if ( event.keyCode === $.ui.keyCode.SPACE || event.keyCode === $.ui.keyCode.ENTER ) {
|
||||
$( this ).addClass( "ui-state-active" );
|
||||
}
|
||||
})
|
||||
.bind( "keyup.button", function() {
|
||||
.bind( "keyup" + this.eventNamespace, function() {
|
||||
$( this ).removeClass( "ui-state-active" );
|
||||
});
|
||||
|
||||
|
|
@ -212,10 +213,11 @@ $.widget( "ui.button", {
|
|||
},
|
||||
|
||||
_determineButtonType: function() {
|
||||
var ancestor, labelSelector, checked;
|
||||
|
||||
if ( this.element.is(":checkbox") ) {
|
||||
if ( this.element.is("[type=checkbox]") ) {
|
||||
this.type = "checkbox";
|
||||
} else if ( this.element.is(":radio") ) {
|
||||
} else if ( this.element.is("[type=radio]") ) {
|
||||
this.type = "radio";
|
||||
} else if ( this.element.is("input") ) {
|
||||
this.type = "input";
|
||||
|
|
@ -226,7 +228,7 @@ $.widget( "ui.button", {
|
|||
if ( this.type === "checkbox" || this.type === "radio" ) {
|
||||
// we don't search against the document in case the element
|
||||
// is disconnected from the DOM
|
||||
var ancestor = this.element.parents().filter(":last"),
|
||||
ancestor = this.element.parents().last();
|
||||
labelSelector = "label[for='" + this.element.attr("id") + "']";
|
||||
this.buttonElement = ancestor.find( labelSelector );
|
||||
if ( !this.buttonElement.length ) {
|
||||
|
|
@ -238,11 +240,11 @@ $.widget( "ui.button", {
|
|||
}
|
||||
this.element.addClass( "ui-helper-hidden-accessible" );
|
||||
|
||||
var checked = this.element.is( ":checked" );
|
||||
checked = this.element.is( ":checked" );
|
||||
if ( checked ) {
|
||||
this.buttonElement.addClass( "ui-state-active" );
|
||||
}
|
||||
this.buttonElement.attr( "aria-pressed", checked );
|
||||
this.buttonElement.prop( "aria-pressed", checked );
|
||||
} else {
|
||||
this.buttonElement = this.element;
|
||||
}
|
||||
|
|
@ -252,7 +254,7 @@ $.widget( "ui.button", {
|
|||
return this.buttonElement;
|
||||
},
|
||||
|
||||
destroy: function() {
|
||||
_destroy: function() {
|
||||
this.element
|
||||
.removeClass( "ui-helper-hidden-accessible" );
|
||||
this.buttonElement
|
||||
|
|
@ -264,17 +266,15 @@ $.widget( "ui.button", {
|
|||
if ( !this.hasTitle ) {
|
||||
this.buttonElement.removeAttr( "title" );
|
||||
}
|
||||
|
||||
$.Widget.prototype.destroy.call( this );
|
||||
},
|
||||
|
||||
_setOption: function( key, value ) {
|
||||
$.Widget.prototype._setOption.apply( this, arguments );
|
||||
this._super( key, value );
|
||||
if ( key === "disabled" ) {
|
||||
if ( value ) {
|
||||
this.element.propAttr( "disabled", true );
|
||||
this.element.prop( "disabled", true );
|
||||
} else {
|
||||
this.element.propAttr( "disabled", false );
|
||||
this.element.prop( "disabled", false );
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
@ -319,7 +319,7 @@ $.widget( "ui.button", {
|
|||
return;
|
||||
}
|
||||
var buttonElement = this.buttonElement.removeClass( typeClasses ),
|
||||
buttonText = $( "<span></span>" )
|
||||
buttonText = $( "<span></span>", this.document[0] )
|
||||
.addClass( "ui-button-text" )
|
||||
.html( this.options.label )
|
||||
.appendTo( buttonElement.empty() )
|
||||
|
|
@ -345,7 +345,7 @@ $.widget( "ui.button", {
|
|||
buttonClasses.push( multipleIcons ? "ui-button-icons-only" : "ui-button-icon-only" );
|
||||
|
||||
if ( !this.hasTitle ) {
|
||||
buttonElement.attr( "title", buttonText );
|
||||
buttonElement.attr( "title", $.trim( buttonText ) );
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
@ -356,8 +356,9 @@ $.widget( "ui.button", {
|
|||
});
|
||||
|
||||
$.widget( "ui.buttonset", {
|
||||
version: "1.9.0",
|
||||
options: {
|
||||
items: ":button, :submit, :reset, :checkbox, :radio, a, :data(button)"
|
||||
items: "button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(button)"
|
||||
},
|
||||
|
||||
_create: function() {
|
||||
|
|
@ -373,11 +374,11 @@ $.widget( "ui.buttonset", {
|
|||
this.buttons.button( "option", key, value );
|
||||
}
|
||||
|
||||
$.Widget.prototype._setOption.apply( this, arguments );
|
||||
this._super( key, value );
|
||||
},
|
||||
|
||||
refresh: function() {
|
||||
var ltr = this.element.css( "direction" ) === "ltr";
|
||||
var rtl = this.element.css( "direction" ) === "rtl";
|
||||
|
||||
this.buttons = this.element.find( this.options.items )
|
||||
.filter( ":ui-button" )
|
||||
|
|
@ -391,15 +392,15 @@ $.widget( "ui.buttonset", {
|
|||
})
|
||||
.removeClass( "ui-corner-all ui-corner-left ui-corner-right" )
|
||||
.filter( ":first" )
|
||||
.addClass( ltr ? "ui-corner-left" : "ui-corner-right" )
|
||||
.addClass( rtl ? "ui-corner-right" : "ui-corner-left" )
|
||||
.end()
|
||||
.filter( ":last" )
|
||||
.addClass( ltr ? "ui-corner-right" : "ui-corner-left" )
|
||||
.addClass( rtl ? "ui-corner-left" : "ui-corner-right" )
|
||||
.end()
|
||||
.end();
|
||||
},
|
||||
|
||||
destroy: function() {
|
||||
_destroy: function() {
|
||||
this.element.removeClass( "ui-buttonset" );
|
||||
this.buttons
|
||||
.map(function() {
|
||||
|
|
@ -408,8 +409,6 @@ $.widget( "ui.buttonset", {
|
|||
.removeClass( "ui-corner-left ui-corner-right" )
|
||||
.end()
|
||||
.button( "destroy" );
|
||||
|
||||
$.Widget.prototype.destroy.call( this );
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
131
themes/default/js/ui/jquery.ui.core.js
vendored
131
themes/default/js/ui/jquery.ui.core.js
vendored
|
|
@ -1,14 +1,18 @@
|
|||
/*!
|
||||
* jQuery UI 1.8.16
|
||||
* jQuery UI Core 1.9.0
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI
|
||||
* http://api.jqueryui.com/category/ui-core/
|
||||
*/
|
||||
(function( $, undefined ) {
|
||||
|
||||
var uuid = 0,
|
||||
runiqueId = /^ui-id-\d+$/;
|
||||
|
||||
// prevent duplicate loading
|
||||
// this is only a problem because we proxy existing functions
|
||||
// and we don't want to double proxy them
|
||||
|
|
@ -18,26 +22,18 @@ if ( $.ui.version ) {
|
|||
}
|
||||
|
||||
$.extend( $.ui, {
|
||||
version: "1.8.16",
|
||||
version: "1.9.0",
|
||||
|
||||
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,
|
||||
|
|
@ -48,18 +44,14 @@ $.extend( $.ui, {
|
|||
PAGE_UP: 33,
|
||||
PERIOD: 190,
|
||||
RIGHT: 39,
|
||||
SHIFT: 16,
|
||||
SPACE: 32,
|
||||
TAB: 9,
|
||||
UP: 38,
|
||||
WINDOWS: 91 // COMMAND
|
||||
UP: 38
|
||||
}
|
||||
});
|
||||
|
||||
// plugins
|
||||
$.fn.extend({
|
||||
propAttr: $.fn.prop || $.fn.attr,
|
||||
|
||||
_focus: $.fn.focus,
|
||||
focus: function( delay, fn ) {
|
||||
return typeof delay === "number" ?
|
||||
|
|
@ -79,11 +71,11 @@ $.fn.extend({
|
|||
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));
|
||||
return (/(relative|absolute|fixed)/).test($.css(this,'position')) && (/(auto|scroll)/).test($.css(this,'overflow')+$.css(this,'overflow-y')+$.css(this,'overflow-x'));
|
||||
}).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));
|
||||
return (/(auto|scroll)/).test($.css(this,'overflow')+$.css(this,'overflow-y')+$.css(this,'overflow-x'));
|
||||
}).eq(0);
|
||||
}
|
||||
|
||||
|
|
@ -119,19 +111,26 @@ $.fn.extend({
|
|||
return 0;
|
||||
},
|
||||
|
||||
disableSelection: function() {
|
||||
return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) +
|
||||
".ui-disableSelection", function( event ) {
|
||||
event.preventDefault();
|
||||
uniqueId: function() {
|
||||
return this.each(function() {
|
||||
if ( !this.id ) {
|
||||
this.id = "ui-id-" + (++uuid);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
enableSelection: function() {
|
||||
return this.unbind( ".ui-disableSelection" );
|
||||
removeUniqueId: function() {
|
||||
return this.each(function() {
|
||||
if ( runiqueId.test( this.id ) ) {
|
||||
$( this ).removeAttr( "id" );
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$.each( [ "Width", "Height" ], function( i, name ) {
|
||||
// support: jQuery <1.8
|
||||
if ( !$( "<a>" ).outerWidth( 1 ).jquery ) {
|
||||
$.each( [ "Width", "Height" ], function( i, name ) {
|
||||
var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
|
||||
type = name.toLowerCase(),
|
||||
orig = {
|
||||
|
|
@ -143,12 +142,12 @@ $.each( [ "Width", "Height" ], function( i, name ) {
|
|||
|
||||
function reduce( elem, size, border, margin ) {
|
||||
$.each( side, function() {
|
||||
size -= parseFloat( $.curCSS( elem, "padding" + this, true) ) || 0;
|
||||
size -= parseFloat( $.css( elem, "padding" + this ) ) || 0;
|
||||
if ( border ) {
|
||||
size -= parseFloat( $.curCSS( elem, "border" + this + "Width", true) ) || 0;
|
||||
size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0;
|
||||
}
|
||||
if ( margin ) {
|
||||
size -= parseFloat( $.curCSS( elem, "margin" + this, true) ) || 0;
|
||||
size -= parseFloat( $.css( elem, "margin" + this ) ) || 0;
|
||||
}
|
||||
});
|
||||
return size;
|
||||
|
|
@ -173,39 +172,47 @@ $.each( [ "Width", "Height" ], function( i, name ) {
|
|||
$( this).css( type, reduce( this, size, true, margin ) + "px" );
|
||||
});
|
||||
};
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// selectors
|
||||
function focusable( element, isTabIndexNotNaN ) {
|
||||
var nodeName = element.nodeName.toLowerCase();
|
||||
var map, mapName, img,
|
||||
nodeName = element.nodeName.toLowerCase();
|
||||
if ( "area" === nodeName ) {
|
||||
var map = element.parentNode,
|
||||
mapName = map.name,
|
||||
img;
|
||||
map = element.parentNode;
|
||||
mapName = map.name;
|
||||
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 || isTabIndexNotNaN
|
||||
: isTabIndexNotNaN)
|
||||
return ( /input|select|textarea|button|object/.test( nodeName ) ?
|
||||
!element.disabled :
|
||||
"a" === nodeName ?
|
||||
element.href || isTabIndexNotNaN :
|
||||
isTabIndexNotNaN) &&
|
||||
// the element and all of its ancestors must be visible
|
||||
&& visible( element );
|
||||
visible( element );
|
||||
}
|
||||
|
||||
function visible( element ) {
|
||||
return !$( element ).parents().andSelf().filter(function() {
|
||||
return $.curCSS( this, "visibility" ) === "hidden" ||
|
||||
return $.css( this, "visibility" ) === "hidden" ||
|
||||
$.expr.filters.hidden( this );
|
||||
}).length;
|
||||
}
|
||||
|
||||
$.extend( $.expr[ ":" ], {
|
||||
data: function( elem, i, match ) {
|
||||
data: $.expr.createPseudo ?
|
||||
$.expr.createPseudo(function( dataName ) {
|
||||
return function( elem ) {
|
||||
return !!$.data( elem, dataName );
|
||||
};
|
||||
}) :
|
||||
// support: jQuery <1.8
|
||||
function( elem, i, match ) {
|
||||
return !!$.data( elem, match[ 3 ] );
|
||||
},
|
||||
|
||||
|
|
@ -225,6 +232,11 @@ $(function() {
|
|||
var body = document.body,
|
||||
div = body.appendChild( div = document.createElement( "div" ) );
|
||||
|
||||
// access offsetHeight before setting the style to prevent a layout bug
|
||||
// in IE 9 which causes the element to continue to take up space even
|
||||
// after it is removed from the DOM (#8026)
|
||||
div.offsetHeight;
|
||||
|
||||
$.extend( div.style, {
|
||||
minHeight: "100px",
|
||||
height: "auto",
|
||||
|
|
@ -245,23 +257,39 @@ $(function() {
|
|||
|
||||
|
||||
// deprecated
|
||||
|
||||
$.fn.extend({
|
||||
disableSelection: function() {
|
||||
return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) +
|
||||
".ui-disableSelection", function( event ) {
|
||||
event.preventDefault();
|
||||
});
|
||||
},
|
||||
|
||||
enableSelection: function() {
|
||||
return this.unbind( ".ui-disableSelection" );
|
||||
}
|
||||
});
|
||||
|
||||
$.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 ) {
|
||||
var i,
|
||||
proto = $.ui[ module ].prototype;
|
||||
for ( 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 ) {
|
||||
var i,
|
||||
set = instance.plugins[ name ];
|
||||
if ( !set || !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
for ( var i = 0; i < set.length; i++ ) {
|
||||
for ( i = 0; i < set.length; i++ ) {
|
||||
if ( instance.options[ set[ i ][ 0 ] ] ) {
|
||||
set[ i ][ 1 ].apply( instance.element, args );
|
||||
}
|
||||
|
|
@ -269,12 +297,7 @@ $.extend( $.ui, {
|
|||
}
|
||||
},
|
||||
|
||||
// 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 );
|
||||
},
|
||||
contains: $.contains,
|
||||
|
||||
// only used by resizable
|
||||
hasScroll: function( el, a ) {
|
||||
|
|
|
|||
181
themes/default/js/ui/jquery.ui.datepicker.js
vendored
181
themes/default/js/ui/jquery.ui.datepicker.js
vendored
|
|
@ -1,18 +1,19 @@
|
|||
/*
|
||||
* jQuery UI Datepicker 1.8.16
|
||||
/*!
|
||||
* jQuery UI Datepicker 1.9.0
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Datepicker
|
||||
* http://api.jqueryui.com/datepicker/
|
||||
*
|
||||
* Depends:
|
||||
* jquery.ui.core.js
|
||||
*/
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.extend($.ui, { datepicker: { version: "1.8.16" } });
|
||||
$.extend($.ui, { datepicker: { version: "1.9.0" } });
|
||||
|
||||
var PROP_NAME = 'datepicker';
|
||||
var dpuuid = new Date().getTime();
|
||||
|
|
@ -233,7 +234,10 @@ $.extend(Datepicker.prototype, {
|
|||
inst.trigger.click(function() {
|
||||
if ($.datepicker._datepickerShowing && $.datepicker._lastInput == input[0])
|
||||
$.datepicker._hideDatepicker();
|
||||
else
|
||||
else if ($.datepicker._datepickerShowing && $.datepicker._lastInput != input[0]) {
|
||||
$.datepicker._hideDatepicker();
|
||||
$.datepicker._showDatepicker(input[0]);
|
||||
} else
|
||||
$.datepicker._showDatepicker(input[0]);
|
||||
return false;
|
||||
});
|
||||
|
|
@ -305,7 +309,7 @@ $.extend(Datepicker.prototype, {
|
|||
this.uuid += 1;
|
||||
var id = 'dp' + this.uuid;
|
||||
this._dialogInput = $('<input type="text" id="' + id +
|
||||
'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>');
|
||||
'" style="position: absolute; top: -100px; width: 0px;"/>');
|
||||
this._dialogInput.keydown(this._doKeyDown);
|
||||
$('body').append(this._dialogInput);
|
||||
inst = this._dialogInst = this._newInst(this._dialogInput, false);
|
||||
|
|
@ -379,7 +383,7 @@ $.extend(Datepicker.prototype, {
|
|||
var inline = $target.children('.' + this._inlineClass);
|
||||
inline.children().removeClass('ui-state-disabled');
|
||||
inline.find("select.ui-datepicker-month, select.ui-datepicker-year").
|
||||
removeAttr("disabled");
|
||||
prop("disabled", false);
|
||||
}
|
||||
this._disabledInputs = $.map(this._disabledInputs,
|
||||
function(value) { return (value == target ? null : value); }); // delete entry
|
||||
|
|
@ -404,7 +408,7 @@ $.extend(Datepicker.prototype, {
|
|||
var inline = $target.children('.' + this._inlineClass);
|
||||
inline.children().addClass('ui-state-disabled');
|
||||
inline.find("select.ui-datepicker-month, select.ui-datepicker-year").
|
||||
attr("disabled", "disabled");
|
||||
prop("disabled", true);
|
||||
}
|
||||
this._disabledInputs = $.map(this._disabledInputs,
|
||||
function(value) { return (value == target ? null : value); }); // delete entry
|
||||
|
|
@ -617,8 +621,8 @@ $.extend(Datepicker.prototype, {
|
|||
$.datepicker._updateDatepicker(inst);
|
||||
}
|
||||
}
|
||||
catch (event) {
|
||||
$.datepicker.log(event);
|
||||
catch (err) {
|
||||
$.datepicker.log(err);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
@ -636,10 +640,10 @@ $.extend(Datepicker.prototype, {
|
|||
return;
|
||||
var inst = $.datepicker._getInst(input);
|
||||
if ($.datepicker._curInst && $.datepicker._curInst != inst) {
|
||||
if ( $.datepicker._datepickerShowing ) {
|
||||
$.datepicker._triggerOnClose($.datepicker._curInst);
|
||||
}
|
||||
$.datepicker._curInst.dpDiv.stop(true, true);
|
||||
if ( inst && $.datepicker._datepickerShowing ) {
|
||||
$.datepicker._hideDatepicker( $.datepicker._curInst.input[0] );
|
||||
}
|
||||
}
|
||||
var beforeShow = $.datepicker._get(inst, 'beforeShow');
|
||||
var beforeShowSettings = beforeShow ? beforeShow.apply(input, [input, inst]) : {};
|
||||
|
|
@ -662,10 +666,6 @@ $.extend(Datepicker.prototype, {
|
|||
isFixed |= $(this).css('position') == 'fixed';
|
||||
return !isFixed;
|
||||
});
|
||||
if (isFixed && $.browser.opera) { // correction for Opera when fixed and scrolled
|
||||
$.datepicker._pos[0] -= document.documentElement.scrollLeft;
|
||||
$.datepicker._pos[1] -= document.documentElement.scrollTop;
|
||||
}
|
||||
var offset = {left: $.datepicker._pos[0], top: $.datepicker._pos[1]};
|
||||
$.datepicker._pos = null;
|
||||
//to avoid flashes on Firefox
|
||||
|
|
@ -692,7 +692,9 @@ $.extend(Datepicker.prototype, {
|
|||
};
|
||||
inst.dpDiv.zIndex($(input).zIndex()+1);
|
||||
$.datepicker._datepickerShowing = true;
|
||||
if ($.effects && $.effects[showAnim])
|
||||
|
||||
// DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed
|
||||
if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) )
|
||||
inst.dpDiv.show(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess);
|
||||
else
|
||||
inst.dpDiv[showAnim || 'show']((showAnim ? duration : null), postProcess);
|
||||
|
|
@ -706,11 +708,11 @@ $.extend(Datepicker.prototype, {
|
|||
|
||||
/* Generate the date picker content. */
|
||||
_updateDatepicker: function(inst) {
|
||||
var self = this;
|
||||
self.maxRows = 4; //Reset the max number of rows being displayed (see #7043)
|
||||
this.maxRows = 4; //Reset the max number of rows being displayed (see #7043)
|
||||
var borders = $.datepicker._getBorders(inst.dpDiv);
|
||||
instActive = inst; // for delegate hover events
|
||||
inst.dpDiv.empty().append(this._generateHTML(inst));
|
||||
this._attachHandlers(inst);
|
||||
var cover = inst.dpDiv.find('iframe.ui-datepicker-cover'); // IE6- only
|
||||
if( !!cover.length ){ //avoid call to outerXXXX() when not in IE6
|
||||
cover.css({left: -borders[0], top: -borders[1], width: inst.dpDiv.outerWidth(), height: inst.dpDiv.outerHeight()})
|
||||
|
|
@ -761,8 +763,8 @@ $.extend(Datepicker.prototype, {
|
|||
var dpHeight = inst.dpDiv.outerHeight();
|
||||
var inputWidth = inst.input ? inst.input.outerWidth() : 0;
|
||||
var inputHeight = inst.input ? inst.input.outerHeight() : 0;
|
||||
var viewWidth = document.documentElement.clientWidth + $(document).scrollLeft();
|
||||
var viewHeight = document.documentElement.clientHeight + $(document).scrollTop();
|
||||
var viewWidth = document.documentElement.clientWidth + (isFixed ? 0 : $(document).scrollLeft());
|
||||
var viewHeight = document.documentElement.clientHeight + (isFixed ? 0 : $(document).scrollTop());
|
||||
|
||||
offset.left -= (this._get(inst, 'isRTL') ? (dpWidth - inputWidth) : 0);
|
||||
offset.left -= (isFixed && offset.left == inst.input.offset().left) ? $(document).scrollLeft() : 0;
|
||||
|
|
@ -788,14 +790,6 @@ $.extend(Datepicker.prototype, {
|
|||
return [position.left, position.top];
|
||||
},
|
||||
|
||||
/* Trigger custom callback of onClose. */
|
||||
_triggerOnClose: function(inst) {
|
||||
var onClose = this._get(inst, 'onClose');
|
||||
if (onClose)
|
||||
onClose.apply((inst.input ? inst.input[0] : null),
|
||||
[(inst.input ? inst.input.val() : ''), inst]);
|
||||
},
|
||||
|
||||
/* Hide the date picker from view.
|
||||
@param input element - the input field attached to the date picker */
|
||||
_hideDatepicker: function(input) {
|
||||
|
|
@ -807,17 +801,21 @@ $.extend(Datepicker.prototype, {
|
|||
var duration = this._get(inst, 'duration');
|
||||
var postProcess = function() {
|
||||
$.datepicker._tidyDialog(inst);
|
||||
this._curInst = null;
|
||||
};
|
||||
if ($.effects && $.effects[showAnim])
|
||||
|
||||
// DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed
|
||||
if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) )
|
||||
inst.dpDiv.hide(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess);
|
||||
else
|
||||
inst.dpDiv[(showAnim == 'slideDown' ? 'slideUp' :
|
||||
(showAnim == 'fadeIn' ? 'fadeOut' : 'hide'))]((showAnim ? duration : null), postProcess);
|
||||
if (!showAnim)
|
||||
postProcess();
|
||||
$.datepicker._triggerOnClose(inst);
|
||||
this._datepickerShowing = false;
|
||||
var onClose = this._get(inst, 'onClose');
|
||||
if (onClose)
|
||||
onClose.apply((inst.input ? inst.input[0] : null),
|
||||
[(inst.input ? inst.input.val() : ''), inst]);
|
||||
this._lastInput = null;
|
||||
if (this._inDialog) {
|
||||
this._dialogInput.css({ position: 'absolute', left: '0', top: '-100px' });
|
||||
|
|
@ -839,12 +837,16 @@ $.extend(Datepicker.prototype, {
|
|||
_checkExternalClick: function(event) {
|
||||
if (!$.datepicker._curInst)
|
||||
return;
|
||||
var $target = $(event.target);
|
||||
if ($target[0].id != $.datepicker._mainDivId &&
|
||||
|
||||
var $target = $(event.target),
|
||||
inst = $.datepicker._getInst($target[0]);
|
||||
|
||||
if ( ( ( $target[0].id != $.datepicker._mainDivId &&
|
||||
$target.parents('#' + $.datepicker._mainDivId).length == 0 &&
|
||||
!$target.hasClass($.datepicker.markerClassName) &&
|
||||
!$target.hasClass($.datepicker._triggerClass) &&
|
||||
$.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI))
|
||||
!$target.closest("." + $.datepicker._triggerClass).length &&
|
||||
$.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI) ) ) ||
|
||||
( $target.hasClass($.datepicker.markerClassName) && $.datepicker._curInst != inst ) )
|
||||
$.datepicker._hideDatepicker();
|
||||
},
|
||||
|
||||
|
|
@ -1094,7 +1096,10 @@ $.extend(Datepicker.prototype, {
|
|||
}
|
||||
}
|
||||
if (iValue < value.length){
|
||||
throw "Extra/unparsed characters found in date: " + value.substring(iValue);
|
||||
var extra = value.substr(iValue);
|
||||
if (!/^\s+/.test(extra)) {
|
||||
throw "Extra/unparsed characters found in date: " + extra;
|
||||
}
|
||||
}
|
||||
if (year == -1)
|
||||
year = new Date().getFullYear();
|
||||
|
|
@ -1401,6 +1406,43 @@ $.extend(Datepicker.prototype, {
|
|||
return startDate;
|
||||
},
|
||||
|
||||
/* Attach the onxxx handlers. These are declared statically so
|
||||
* they work with static code transformers like Caja.
|
||||
*/
|
||||
_attachHandlers: function(inst) {
|
||||
var stepMonths = this._get(inst, 'stepMonths');
|
||||
var id = '#' + inst.id.replace( /\\\\/g, "\\" );
|
||||
inst.dpDiv.find('[data-handler]').map(function () {
|
||||
var handler = {
|
||||
prev: function () {
|
||||
window['DP_jQuery_' + dpuuid].datepicker._adjustDate(id, -stepMonths, 'M');
|
||||
},
|
||||
next: function () {
|
||||
window['DP_jQuery_' + dpuuid].datepicker._adjustDate(id, +stepMonths, 'M');
|
||||
},
|
||||
hide: function () {
|
||||
window['DP_jQuery_' + dpuuid].datepicker._hideDatepicker();
|
||||
},
|
||||
today: function () {
|
||||
window['DP_jQuery_' + dpuuid].datepicker._gotoToday(id);
|
||||
},
|
||||
selectDay: function () {
|
||||
window['DP_jQuery_' + dpuuid].datepicker._selectDay(id, +this.getAttribute('data-month'), +this.getAttribute('data-year'), this);
|
||||
return false;
|
||||
},
|
||||
selectMonth: function () {
|
||||
window['DP_jQuery_' + dpuuid].datepicker._selectMonthYear(id, this, 'M');
|
||||
return false;
|
||||
},
|
||||
selectYear: function () {
|
||||
window['DP_jQuery_' + dpuuid].datepicker._selectMonthYear(id, this, 'Y');
|
||||
return false;
|
||||
}
|
||||
};
|
||||
$(this).bind(this.getAttribute('data-event'), handler[this.getAttribute('data-handler')]);
|
||||
});
|
||||
},
|
||||
|
||||
/* Generate the HTML for the current state of the date picker. */
|
||||
_generateHTML: function(inst) {
|
||||
var today = new Date();
|
||||
|
|
@ -1443,8 +1485,7 @@ $.extend(Datepicker.prototype, {
|
|||
this._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths, 1)),
|
||||
this._getFormatConfig(inst)));
|
||||
var prev = (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ?
|
||||
'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_' + dpuuid +
|
||||
'.datepicker._adjustDate(\'#' + inst.id + '\', -' + stepMonths + ', \'M\');"' +
|
||||
'<a class="ui-datepicker-prev ui-corner-all" data-handler="prev" data-event="click"' +
|
||||
' title="' + prevText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'e' : 'w') + '">' + prevText + '</span></a>' :
|
||||
(hideIfNoPrevNext ? '' : '<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+ prevText +'"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'e' : 'w') + '">' + prevText + '</span></a>'));
|
||||
var nextText = this._get(inst, 'nextText');
|
||||
|
|
@ -1452,19 +1493,17 @@ $.extend(Datepicker.prototype, {
|
|||
this._daylightSavingAdjust(new Date(drawYear, drawMonth + stepMonths, 1)),
|
||||
this._getFormatConfig(inst)));
|
||||
var next = (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ?
|
||||
'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_' + dpuuid +
|
||||
'.datepicker._adjustDate(\'#' + inst.id + '\', +' + stepMonths + ', \'M\');"' +
|
||||
'<a class="ui-datepicker-next ui-corner-all" data-handler="next" data-event="click"' +
|
||||
' title="' + nextText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'w' : 'e') + '">' + nextText + '</span></a>' :
|
||||
(hideIfNoPrevNext ? '' : '<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+ nextText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'w' : 'e') + '">' + nextText + '</span></a>'));
|
||||
var currentText = this._get(inst, 'currentText');
|
||||
var gotoDate = (this._get(inst, 'gotoCurrent') && inst.currentDay ? currentDate : today);
|
||||
currentText = (!navigationAsDateFormat ? currentText :
|
||||
this.formatDate(currentText, gotoDate, this._getFormatConfig(inst)));
|
||||
var controls = (!inst.inline ? '<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_' + dpuuid +
|
||||
'.datepicker._hideDatepicker();">' + this._get(inst, 'closeText') + '</button>' : '');
|
||||
var controls = (!inst.inline ? '<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" data-handler="hide" data-event="click">' +
|
||||
this._get(inst, 'closeText') + '</button>' : '');
|
||||
var buttonPanel = (showButtonPanel) ? '<div class="ui-datepicker-buttonpane ui-widget-content">' + (isRTL ? controls : '') +
|
||||
(this._isInRange(inst, gotoDate) ? '<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_' + dpuuid +
|
||||
'.datepicker._gotoToday(\'#' + inst.id + '\');"' +
|
||||
(this._isInRange(inst, gotoDate) ? '<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" data-handler="today" data-event="click"' +
|
||||
'>' + currentText + '</button>' : '') + (isRTL ? '' : controls) + '</div>' : '';
|
||||
var firstDay = parseInt(this._get(inst, 'firstDay'),10);
|
||||
firstDay = (isNaN(firstDay) ? 0 : firstDay);
|
||||
|
|
@ -1543,8 +1582,7 @@ $.extend(Datepicker.prototype, {
|
|||
(printDate.getTime() == currentDate.getTime() ? ' ' + this._currentClass : '') + // highlight selected day
|
||||
(printDate.getTime() == today.getTime() ? ' ui-datepicker-today' : '')) + '"' + // highlight today (if different)
|
||||
((!otherMonth || showOtherMonths) && daySettings[2] ? ' title="' + daySettings[2] + '"' : '') + // cell title
|
||||
(unselectable ? '' : ' onclick="DP_jQuery_' + dpuuid + '.datepicker._selectDay(\'#' +
|
||||
inst.id + '\',' + printDate.getMonth() + ',' + printDate.getFullYear() + ', this);return false;"') + '>' + // actions
|
||||
(unselectable ? '' : ' data-handler="selectDay" data-event="click" data-month="' + printDate.getMonth() + '" data-year="' + printDate.getFullYear() + '"') + '>' + // actions
|
||||
(otherMonth && !showOtherMonths ? ' ' : // display for other months
|
||||
(unselectable ? '<span class="ui-state-default">' + printDate.getDate() + '</span>' : '<a class="ui-state-default' +
|
||||
(printDate.getTime() == today.getTime() ? ' ui-state-highlight' : '') +
|
||||
|
|
@ -1587,9 +1625,7 @@ $.extend(Datepicker.prototype, {
|
|||
else {
|
||||
var inMinYear = (minDate && minDate.getFullYear() == drawYear);
|
||||
var inMaxYear = (maxDate && maxDate.getFullYear() == drawYear);
|
||||
monthHtml += '<select class="ui-datepicker-month" ' +
|
||||
'onchange="DP_jQuery_' + dpuuid + '.datepicker._selectMonthYear(\'#' + inst.id + '\', this, \'M\');" ' +
|
||||
'>';
|
||||
monthHtml += '<select class="ui-datepicker-month" data-handler="selectMonth" data-event="change">';
|
||||
for (var month = 0; month < 12; month++) {
|
||||
if ((!inMinYear || month >= minDate.getMonth()) &&
|
||||
(!inMaxYear || month <= maxDate.getMonth()))
|
||||
|
|
@ -1620,9 +1656,7 @@ $.extend(Datepicker.prototype, {
|
|||
var endYear = Math.max(year, determineYear(years[1] || ''));
|
||||
year = (minDate ? Math.max(year, minDate.getFullYear()) : year);
|
||||
endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear);
|
||||
inst.yearshtml += '<select class="ui-datepicker-year" ' +
|
||||
'onchange="DP_jQuery_' + dpuuid + '.datepicker._selectMonthYear(\'#' + inst.id + '\', this, \'Y\');" ' +
|
||||
'>';
|
||||
inst.yearshtml += '<select class="ui-datepicker-year" data-handler="selectYear" data-event="change">';
|
||||
for (; year <= endYear; year++) {
|
||||
inst.yearshtml += '<option value="' + year + '"' +
|
||||
(year == drawYear ? ' selected="selected"' : '') +
|
||||
|
|
@ -1743,23 +1777,18 @@ $.extend(Datepicker.prototype, {
|
|||
*/
|
||||
function bindHover(dpDiv) {
|
||||
var selector = 'button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a';
|
||||
return dpDiv.bind('mouseout', function(event) {
|
||||
var elem = $( event.target ).closest( selector );
|
||||
if ( !elem.length ) {
|
||||
return;
|
||||
}
|
||||
elem.removeClass( "ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover" );
|
||||
return dpDiv.delegate(selector, 'mouseout', function() {
|
||||
$(this).removeClass('ui-state-hover');
|
||||
if (this.className.indexOf('ui-datepicker-prev') != -1) $(this).removeClass('ui-datepicker-prev-hover');
|
||||
if (this.className.indexOf('ui-datepicker-next') != -1) $(this).removeClass('ui-datepicker-next-hover');
|
||||
})
|
||||
.bind('mouseover', function(event) {
|
||||
var elem = $( event.target ).closest( selector );
|
||||
if ($.datepicker._isDisabledDatepicker( instActive.inline ? dpDiv.parent()[0] : instActive.input[0]) ||
|
||||
!elem.length ) {
|
||||
return;
|
||||
.delegate(selector, 'mouseover', function(){
|
||||
if (!$.datepicker._isDisabledDatepicker( instActive.inline ? dpDiv.parent()[0] : instActive.input[0])) {
|
||||
$(this).parents('.ui-datepicker-calendar').find('a').removeClass('ui-state-hover');
|
||||
$(this).addClass('ui-state-hover');
|
||||
if (this.className.indexOf('ui-datepicker-prev') != -1) $(this).addClass('ui-datepicker-prev-hover');
|
||||
if (this.className.indexOf('ui-datepicker-next') != -1) $(this).addClass('ui-datepicker-next-hover');
|
||||
}
|
||||
elem.parents('.ui-datepicker-calendar').find('a').removeClass('ui-state-hover');
|
||||
elem.addClass('ui-state-hover');
|
||||
if (elem.hasClass('ui-datepicker-prev')) elem.addClass('ui-datepicker-prev-hover');
|
||||
if (elem.hasClass('ui-datepicker-next')) elem.addClass('ui-datepicker-next-hover');
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -1772,12 +1801,6 @@ function extendRemove(target, props) {
|
|||
return target;
|
||||
};
|
||||
|
||||
/* Determine whether an object is an array. */
|
||||
function isArray(a) {
|
||||
return (a && (($.browser.safari && typeof a == 'object' && a.length) ||
|
||||
(a.constructor && a.constructor.toString().match(/\Array\(\)/))));
|
||||
};
|
||||
|
||||
/* Invoke the datepicker functionality.
|
||||
@param options string - a command, optionally followed by additional parameters or
|
||||
Object - settings for attaching new datepicker functionality
|
||||
|
|
@ -1792,7 +1815,7 @@ $.fn.datepicker = function(options){
|
|||
/* Initialise the date picker. */
|
||||
if (!$.datepicker.initialized) {
|
||||
$(document).mousedown($.datepicker._checkExternalClick).
|
||||
find('body').append($.datepicker.dpDiv);
|
||||
find(document.body).append($.datepicker.dpDiv);
|
||||
$.datepicker.initialized = true;
|
||||
}
|
||||
|
||||
|
|
@ -1814,7 +1837,7 @@ $.fn.datepicker = function(options){
|
|||
$.datepicker = new Datepicker(); // singleton instance
|
||||
$.datepicker.initialized = false;
|
||||
$.datepicker.uuid = new Date().getTime();
|
||||
$.datepicker.version = "1.8.16";
|
||||
$.datepicker.version = "1.9.0";
|
||||
|
||||
// Workaround for #4055
|
||||
// Add another global to avoid noConflict issues with inline event handlers
|
||||
|
|
|
|||
775
themes/default/js/ui/jquery.ui.dialog.js
vendored
775
themes/default/js/ui/jquery.ui.dialog.js
vendored
File diff suppressed because it is too large
Load diff
73
themes/default/js/ui/jquery.ui.draggable.js
vendored
73
themes/default/js/ui/jquery.ui.draggable.js
vendored
|
|
@ -1,11 +1,12 @@
|
|||
/*
|
||||
* jQuery UI Draggable 1.8.16
|
||||
/*!
|
||||
* jQuery UI Draggable 1.9.0
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Draggables
|
||||
* http://api.jqueryui.com/draggable/
|
||||
*
|
||||
* Depends:
|
||||
* jquery.ui.core.js
|
||||
|
|
@ -15,6 +16,7 @@
|
|||
(function( $, undefined ) {
|
||||
|
||||
$.widget("ui.draggable", $.ui.mouse, {
|
||||
version: "1.9.0",
|
||||
widgetEventPrefix: "drag",
|
||||
options: {
|
||||
addClasses: true,
|
||||
|
|
@ -54,17 +56,9 @@ $.widget("ui.draggable", $.ui.mouse, {
|
|||
|
||||
},
|
||||
|
||||
destroy: function() {
|
||||
if(!this.element.data('draggable')) return;
|
||||
this.element
|
||||
.removeData("draggable")
|
||||
.unbind(".draggable")
|
||||
.removeClass("ui-draggable"
|
||||
+ " ui-draggable-dragging"
|
||||
+ " ui-draggable-disabled");
|
||||
_destroy: function() {
|
||||
this.element.removeClass( "ui-draggable ui-draggable-dragging ui-draggable-disabled" );
|
||||
this._mouseDestroy();
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
_mouseCapture: function(event) {
|
||||
|
|
@ -80,7 +74,6 @@ $.widget("ui.draggable", $.ui.mouse, {
|
|||
if (!this.handle)
|
||||
return false;
|
||||
|
||||
if ( o.iframeFix ) {
|
||||
$(o.iframeFix === true ? "iframe" : o.iframeFix).each(function() {
|
||||
$('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>')
|
||||
.css({
|
||||
|
|
@ -90,7 +83,6 @@ $.widget("ui.draggable", $.ui.mouse, {
|
|||
.css($(this).offset())
|
||||
.appendTo("body");
|
||||
});
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
|
|
@ -103,6 +95,8 @@ $.widget("ui.draggable", $.ui.mouse, {
|
|||
//Create and append the visible helper
|
||||
this.helper = this._createHelper(event);
|
||||
|
||||
this.helper.addClass("ui-draggable-dragging");
|
||||
|
||||
//Cache the helper size
|
||||
this._cacheHelperProportions();
|
||||
|
||||
|
|
@ -163,7 +157,7 @@ $.widget("ui.draggable", $.ui.mouse, {
|
|||
if ($.ui.ddmanager && !o.dropBehaviour)
|
||||
$.ui.ddmanager.prepareOffsets(this, event);
|
||||
|
||||
this.helper.addClass("ui-draggable-dragging");
|
||||
|
||||
this._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position
|
||||
|
||||
//If the ddmanager is used for droppables, inform the manager that dragging has started (see #5003)
|
||||
|
|
@ -208,15 +202,21 @@ $.widget("ui.draggable", $.ui.mouse, {
|
|||
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")
|
||||
//if the original element is no longer in the DOM don't bother to continue (see #8269)
|
||||
var element = this.element[0], elementInDom = false;
|
||||
while ( element && (element = element.parentNode) ) {
|
||||
if (element == document ) {
|
||||
elementInDom = true;
|
||||
}
|
||||
}
|
||||
if ( !elementInDom && 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;
|
||||
var that = this;
|
||||
$(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() {
|
||||
if(self._trigger("stop", event) !== false) {
|
||||
self._clear();
|
||||
if(that._trigger("stop", event) !== false) {
|
||||
that._clear();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
|
@ -229,11 +229,10 @@ $.widget("ui.draggable", $.ui.mouse, {
|
|||
},
|
||||
|
||||
_mouseUp: function(event) {
|
||||
if (this.options.iframeFix === true) {
|
||||
//Remove frame helpers
|
||||
$("div.ui-draggable-iframeFix").each(function() {
|
||||
this.parentNode.removeChild(this);
|
||||
}); //Remove frame helpers
|
||||
}
|
||||
});
|
||||
|
||||
//If the ddmanager is used for droppables, inform the manager that dragging has stopped (see #5003)
|
||||
if( $.ui.ddmanager ) $.ui.ddmanager.dragStop(this, event);
|
||||
|
|
@ -313,7 +312,7 @@ $.widget("ui.draggable", $.ui.mouse, {
|
|||
// 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
|
||||
// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
|
||||
// the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
|
||||
if(this.cssPosition == 'absolute' && this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) {
|
||||
if(this.cssPosition == 'absolute' && this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) {
|
||||
po.left += this.scrollParent.scrollLeft();
|
||||
po.top += this.scrollParent.scrollTop();
|
||||
}
|
||||
|
|
@ -394,20 +393,20 @@ $.widget("ui.draggable", $.ui.mouse, {
|
|||
|
||||
if(!pos) pos = this.position;
|
||||
var mod = d == "absolute" ? 1 : -1;
|
||||
var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
|
||||
var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
|
||||
|
||||
return {
|
||||
top: (
|
||||
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 && $.browser.version < 526 && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
|
||||
- ( ( 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 && $.browser.version < 526 && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
|
||||
- ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
|
||||
)
|
||||
};
|
||||
|
||||
|
|
@ -415,7 +414,7 @@ $.widget("ui.draggable", $.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);
|
||||
var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
|
||||
var pageX = event.pageX;
|
||||
var pageY = event.pageY;
|
||||
|
||||
|
|
@ -461,14 +460,14 @@ $.widget("ui.draggable", $.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 && $.browser.version < 526 && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
|
||||
+ ( ( 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 && $.browser.version < 526 && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
|
||||
+ ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
|
||||
)
|
||||
};
|
||||
|
||||
|
|
@ -504,10 +503,6 @@ $.widget("ui.draggable", $.ui.mouse, {
|
|||
|
||||
});
|
||||
|
||||
$.extend($.ui.draggable, {
|
||||
version: "1.8.16"
|
||||
});
|
||||
|
||||
$.ui.plugin.add("draggable", "connectToSortable", {
|
||||
start: function(event, ui) {
|
||||
|
||||
|
|
@ -563,7 +558,7 @@ $.ui.plugin.add("draggable", "connectToSortable", {
|
|||
},
|
||||
drag: function(event, ui) {
|
||||
|
||||
var inst = $(this).data("draggable"), self = this;
|
||||
var inst = $(this).data("draggable"), that = this;
|
||||
|
||||
var checkPos = function(o) {
|
||||
var dyClick = this.offset.click.top, dxClick = this.offset.click.left;
|
||||
|
|
@ -590,7 +585,7 @@ $.ui.plugin.add("draggable", "connectToSortable", {
|
|||
//Now we fake the start of dragging for the sortable instance,
|
||||
//by cloning the list group item, appending it to the sortable and using it as inst.currentItem
|
||||
//We can then fire the start event of the sortable with our passed browser event, and our own helper (so it doesn't create a new one)
|
||||
this.instance.currentItem = $(self).clone().removeAttr('id').appendTo(this.instance.element).data("sortable-item", true);
|
||||
this.instance.currentItem = $(that).clone().removeAttr('id').appendTo(this.instance.element).data("sortable-item", true);
|
||||
this.instance.options._helper = this.instance.options.helper; //Store helper option to later restore it
|
||||
this.instance.options.helper = function() { return ui.helper[0]; };
|
||||
|
||||
|
|
|
|||
38
themes/default/js/ui/jquery.ui.droppable.js
vendored
38
themes/default/js/ui/jquery.ui.droppable.js
vendored
|
|
@ -1,11 +1,12 @@
|
|||
/*
|
||||
* jQuery UI Droppable 1.8.16
|
||||
/*!
|
||||
* jQuery UI Droppable 1.9.0
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Droppables
|
||||
* http://api.jqueryui.com/droppable/
|
||||
*
|
||||
* Depends:
|
||||
* jquery.ui.core.js
|
||||
|
|
@ -16,6 +17,7 @@
|
|||
(function( $, undefined ) {
|
||||
|
||||
$.widget("ui.droppable", {
|
||||
version: "1.9.0",
|
||||
widgetEventPrefix: "drop",
|
||||
options: {
|
||||
accept: '*',
|
||||
|
|
@ -46,18 +48,13 @@ $.widget("ui.droppable", {
|
|||
|
||||
},
|
||||
|
||||
destroy: function() {
|
||||
_destroy: function() {
|
||||
var drop = $.ui.ddmanager.droppables[this.options.scope];
|
||||
for ( var i = 0; i < drop.length; i++ )
|
||||
if ( drop[i] == this )
|
||||
drop.splice(i, 1);
|
||||
|
||||
this.element
|
||||
.removeClass("ui-droppable ui-droppable-disabled")
|
||||
.removeData("droppable")
|
||||
.unbind(".droppable");
|
||||
|
||||
return this;
|
||||
this.element.removeClass("ui-droppable ui-droppable-disabled");
|
||||
},
|
||||
|
||||
_setOption: function(key, value) {
|
||||
|
|
@ -146,10 +143,6 @@ $.widget("ui.droppable", {
|
|||
|
||||
});
|
||||
|
||||
$.extend($.ui.droppable, {
|
||||
version: "1.8.16"
|
||||
});
|
||||
|
||||
$.ui.intersect = function(draggable, droppable, toleranceMode) {
|
||||
|
||||
if (!droppable.offset) return false;
|
||||
|
|
@ -227,7 +220,7 @@ $.ui.ddmanager = {
|
|||
|
||||
if(!this.options) return;
|
||||
if (!this.options.disabled && this.visible && $.ui.intersect(draggable, this, this.options.tolerance))
|
||||
dropped = dropped || this._drop.call(this, event);
|
||||
dropped = this._drop.call(this, event) || dropped;
|
||||
|
||||
if (!this.options.disabled && this.visible && this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
|
||||
this.isout = 1; this.isover = 0;
|
||||
|
|
@ -240,7 +233,7 @@ $.ui.ddmanager = {
|
|||
},
|
||||
dragStart: function( draggable, event ) {
|
||||
//Listen for scrolling so that if the dragging causes scrolling the position of the droppables can be recalculated (see #5003)
|
||||
draggable.element.parents( ":not(body,html)" ).bind( "scroll.droppable", function() {
|
||||
draggable.element.parentsUntil( "body" ).bind( "scroll.droppable", function() {
|
||||
if( !draggable.options.refreshPositions ) $.ui.ddmanager.prepareOffsets( draggable, event );
|
||||
});
|
||||
},
|
||||
|
|
@ -260,7 +253,12 @@ $.ui.ddmanager = {
|
|||
|
||||
var parentInstance;
|
||||
if (this.options.greedy) {
|
||||
var parent = this.element.parents(':data(droppable):eq(0)');
|
||||
// find droppable parents with same scope
|
||||
var scope = this.options.scope;
|
||||
var parent = this.element.parents(':data(droppable)').filter(function () {
|
||||
return $.data(this, 'droppable').options.scope === scope;
|
||||
});
|
||||
|
||||
if (parent.length) {
|
||||
parentInstance = $.data(parent[0], 'droppable');
|
||||
parentInstance.greedyChild = (c == 'isover' ? 1 : 0);
|
||||
|
|
@ -287,7 +285,7 @@ $.ui.ddmanager = {
|
|||
|
||||
},
|
||||
dragStop: function( draggable, event ) {
|
||||
draggable.element.parents( ":not(body,html)" ).unbind( "scroll.droppable" );
|
||||
draggable.element.parentsUntil( "body" ).unbind( "scroll.droppable" );
|
||||
//Call prepareOffsets one final time since IE does not fire return scroll events when overflow was caused by drag (see #5003)
|
||||
if( !draggable.options.refreshPositions ) $.ui.ddmanager.prepareOffsets( draggable, event );
|
||||
}
|
||||
|
|
|
|||
41
themes/default/js/ui/jquery.ui.mouse.js
vendored
41
themes/default/js/ui/jquery.ui.mouse.js
vendored
|
|
@ -1,11 +1,12 @@
|
|||
/*!
|
||||
* jQuery UI Mouse 1.8.16
|
||||
* jQuery UI Mouse 1.9.0
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Mouse
|
||||
* http://api.jqueryui.com/mouse/
|
||||
*
|
||||
* Depends:
|
||||
* jquery.ui.widget.js
|
||||
|
|
@ -18,21 +19,22 @@ $( document ).mouseup( function( e ) {
|
|||
});
|
||||
|
||||
$.widget("ui.mouse", {
|
||||
version: "1.9.0",
|
||||
options: {
|
||||
cancel: ':input,option',
|
||||
cancel: 'input,textarea,button,select,option',
|
||||
distance: 1,
|
||||
delay: 0
|
||||
},
|
||||
_mouseInit: function() {
|
||||
var self = this;
|
||||
var that = this;
|
||||
|
||||
this.element
|
||||
.bind('mousedown.'+this.widgetName, function(event) {
|
||||
return self._mouseDown(event);
|
||||
return that._mouseDown(event);
|
||||
})
|
||||
.bind('click.'+this.widgetName, function(event) {
|
||||
if (true === $.data(event.target, self.widgetName + '.preventClickEvent')) {
|
||||
$.removeData(event.target, self.widgetName + '.preventClickEvent');
|
||||
if (true === $.data(event.target, that.widgetName + '.preventClickEvent')) {
|
||||
$.removeData(event.target, that.widgetName + '.preventClickEvent');
|
||||
event.stopImmediatePropagation();
|
||||
return false;
|
||||
}
|
||||
|
|
@ -45,22 +47,27 @@ $.widget("ui.mouse", {
|
|||
// other instances of mouse
|
||||
_mouseDestroy: function() {
|
||||
this.element.unbind('.'+this.widgetName);
|
||||
if ( this._mouseMoveDelegate ) {
|
||||
$(document)
|
||||
.unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
|
||||
.unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);
|
||||
}
|
||||
},
|
||||
|
||||
_mouseDown: function(event) {
|
||||
// don't let more than one widget handle mouseStart
|
||||
if( mouseHandled ) { return };
|
||||
if( 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),
|
||||
var that = this,
|
||||
btnIsLeft = (event.which === 1),
|
||||
// event.target.nodeName works around a bug in IE 8 with
|
||||
// disabled inputs (#7620)
|
||||
elIsCancel = (typeof this.options.cancel == "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false);
|
||||
elIsCancel = (typeof this.options.cancel === "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false);
|
||||
if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
|
||||
return true;
|
||||
}
|
||||
|
|
@ -68,7 +75,7 @@ $.widget("ui.mouse", {
|
|||
this.mouseDelayMet = !this.options.delay;
|
||||
if (!this.mouseDelayMet) {
|
||||
this._mouseDelayTimer = setTimeout(function() {
|
||||
self.mouseDelayMet = true;
|
||||
that.mouseDelayMet = true;
|
||||
}, this.options.delay);
|
||||
}
|
||||
|
||||
|
|
@ -87,10 +94,10 @@ $.widget("ui.mouse", {
|
|||
|
||||
// these delegates are required to keep context
|
||||
this._mouseMoveDelegate = function(event) {
|
||||
return self._mouseMove(event);
|
||||
return that._mouseMove(event);
|
||||
};
|
||||
this._mouseUpDelegate = function(event) {
|
||||
return self._mouseUp(event);
|
||||
return that._mouseUp(event);
|
||||
};
|
||||
$(document)
|
||||
.bind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
|
||||
|
|
@ -130,7 +137,7 @@ $.widget("ui.mouse", {
|
|||
if (this._mouseStarted) {
|
||||
this._mouseStarted = false;
|
||||
|
||||
if (event.target == this._mouseDownEvent.target) {
|
||||
if (event.target === this._mouseDownEvent.target) {
|
||||
$.data(event.target, this.widgetName + '.preventClickEvent', true);
|
||||
}
|
||||
|
||||
|
|
|
|||
519
themes/default/js/ui/jquery.ui.position.js
vendored
519
themes/default/js/ui/jquery.ui.position.js
vendored
|
|
@ -1,21 +1,87 @@
|
|||
/*
|
||||
* jQuery UI Position 1.8.16
|
||||
/*!
|
||||
* jQuery UI Position 1.9.0
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Position
|
||||
* http://api.jqueryui.com/position/
|
||||
*/
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.ui = $.ui || {};
|
||||
|
||||
var horizontalPositions = /left|center|right/,
|
||||
verticalPositions = /top|center|bottom/,
|
||||
center = "center",
|
||||
_position = $.fn.position,
|
||||
_offset = $.fn.offset;
|
||||
var cachedScrollbarWidth,
|
||||
max = Math.max,
|
||||
abs = Math.abs,
|
||||
round = Math.round,
|
||||
rhorizontal = /left|center|right/,
|
||||
rvertical = /top|center|bottom/,
|
||||
roffset = /[\+\-]\d+%?/,
|
||||
rposition = /^\w+/,
|
||||
rpercent = /%$/,
|
||||
_position = $.fn.position;
|
||||
|
||||
function getOffsets( offsets, width, height ) {
|
||||
return [
|
||||
parseInt( offsets[ 0 ], 10 ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ),
|
||||
parseInt( offsets[ 1 ], 10 ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 )
|
||||
];
|
||||
}
|
||||
function parseCss( element, property ) {
|
||||
return parseInt( $.css( element, property ), 10 ) || 0;
|
||||
}
|
||||
|
||||
$.position = {
|
||||
scrollbarWidth: function() {
|
||||
if ( cachedScrollbarWidth !== undefined ) {
|
||||
return cachedScrollbarWidth;
|
||||
}
|
||||
var w1, w2,
|
||||
div = $( "<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>" ),
|
||||
innerDiv = div.children()[0];
|
||||
|
||||
$( "body" ).append( div );
|
||||
w1 = innerDiv.offsetWidth;
|
||||
div.css( "overflow", "scroll" );
|
||||
|
||||
w2 = innerDiv.offsetWidth;
|
||||
|
||||
if ( w1 === w2 ) {
|
||||
w2 = div[0].clientWidth;
|
||||
}
|
||||
|
||||
div.remove();
|
||||
|
||||
return (cachedScrollbarWidth = w1 - w2);
|
||||
},
|
||||
getScrollInfo: function( within ) {
|
||||
var overflowX = within.isWindow ? "" : within.element.css( "overflow-x" ),
|
||||
overflowY = within.isWindow ? "" : within.element.css( "overflow-y" ),
|
||||
hasOverflowX = overflowX === "scroll" ||
|
||||
( overflowX === "auto" && within.width < within.element[0].scrollWidth ),
|
||||
hasOverflowY = overflowY === "scroll" ||
|
||||
( overflowY === "auto" && within.height < within.element[0].scrollHeight );
|
||||
return {
|
||||
width: hasOverflowX ? $.position.scrollbarWidth() : 0,
|
||||
height: hasOverflowY ? $.position.scrollbarWidth() : 0
|
||||
};
|
||||
},
|
||||
getWithinInfo: function( element ) {
|
||||
var withinElement = $( element || window ),
|
||||
isWindow = $.isWindow( withinElement[0] );
|
||||
return {
|
||||
element: withinElement,
|
||||
isWindow: isWindow,
|
||||
offset: withinElement.offset() || { left: 0, top: 0 },
|
||||
scrollLeft: withinElement.scrollLeft(),
|
||||
scrollTop: withinElement.scrollTop(),
|
||||
width: isWindow ? withinElement.width() : withinElement.outerWidth(),
|
||||
height: isWindow ? withinElement.height() : withinElement.outerHeight()
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
$.fn.position = function( options ) {
|
||||
if ( !options || !options.of ) {
|
||||
|
|
@ -25,48 +91,65 @@ $.fn.position = function( options ) {
|
|||
// make a copy, we don't want to modify arguments
|
||||
options = $.extend( {}, options );
|
||||
|
||||
var target = $( options.of ),
|
||||
var atOffset, targetWidth, targetHeight, targetOffset, basePosition,
|
||||
target = $( options.of ),
|
||||
within = $.position.getWithinInfo( options.within ),
|
||||
scrollInfo = $.position.getScrollInfo( within ),
|
||||
targetElem = target[0],
|
||||
collision = ( options.collision || "flip" ).split( " " ),
|
||||
offset = options.offset ? options.offset.split( " " ) : [ 0, 0 ],
|
||||
targetWidth,
|
||||
targetHeight,
|
||||
basePosition;
|
||||
offsets = {};
|
||||
|
||||
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 ) {
|
||||
targetOffset = { top: 0, left: 0 };
|
||||
} else if ( $.isWindow( targetElem ) ) {
|
||||
targetWidth = target.width();
|
||||
targetHeight = target.height();
|
||||
basePosition = { top: target.scrollTop(), left: target.scrollLeft() };
|
||||
targetOffset = { 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 };
|
||||
targetOffset = { top: targetElem.pageY, left: targetElem.pageX };
|
||||
} else {
|
||||
targetWidth = target.outerWidth();
|
||||
targetHeight = target.outerHeight();
|
||||
basePosition = target.offset();
|
||||
targetOffset = target.offset();
|
||||
}
|
||||
// clone to reuse original targetOffset later
|
||||
basePosition = $.extend( {}, targetOffset );
|
||||
|
||||
// force my and at to have valid horizontal and veritcal positions
|
||||
// force my and at to have valid horizontal and vertical positions
|
||||
// if a value is missing or invalid, it will be converted to center
|
||||
$.each( [ "my", "at" ], function() {
|
||||
var pos = ( options[this] || "" ).split( " " );
|
||||
var pos = ( options[ this ] || "" ).split( " " ),
|
||||
horizontalOffset,
|
||||
verticalOffset;
|
||||
|
||||
if ( pos.length === 1) {
|
||||
pos = horizontalPositions.test( pos[0] ) ?
|
||||
pos.concat( [center] ) :
|
||||
verticalPositions.test( pos[0] ) ?
|
||||
[ center ].concat( pos ) :
|
||||
[ center, center ];
|
||||
pos = rhorizontal.test( pos[ 0 ] ) ?
|
||||
pos.concat( [ "center" ] ) :
|
||||
rvertical.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;
|
||||
pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center";
|
||||
pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center";
|
||||
|
||||
// calculate offsets
|
||||
horizontalOffset = roffset.exec( pos[ 0 ] );
|
||||
verticalOffset = roffset.exec( pos[ 1 ] );
|
||||
offsets[ this ] = [
|
||||
horizontalOffset ? horizontalOffset[ 0 ] : 0,
|
||||
verticalOffset ? verticalOffset[ 0 ] : 0
|
||||
];
|
||||
|
||||
// reduce to just the positions without the offsets
|
||||
options[ this ] = [
|
||||
rposition.exec( pos[ 0 ] )[ 0 ],
|
||||
rposition.exec( pos[ 1 ] )[ 0 ]
|
||||
];
|
||||
});
|
||||
|
||||
// normalize collision option
|
||||
|
|
@ -74,65 +157,63 @@ $.fn.position = function( options ) {
|
|||
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" ) {
|
||||
if ( options.at[ 0 ] === "right" ) {
|
||||
basePosition.left += targetWidth;
|
||||
} else if ( options.at[0] === center ) {
|
||||
} else if ( options.at[ 0 ] === "center" ) {
|
||||
basePosition.left += targetWidth / 2;
|
||||
}
|
||||
|
||||
if ( options.at[1] === "bottom" ) {
|
||||
if ( options.at[ 1 ] === "bottom" ) {
|
||||
basePosition.top += targetHeight;
|
||||
} else if ( options.at[1] === center ) {
|
||||
} else if ( options.at[ 1 ] === "center" ) {
|
||||
basePosition.top += targetHeight / 2;
|
||||
}
|
||||
|
||||
basePosition.left += offset[ 0 ];
|
||||
basePosition.top += offset[ 1 ];
|
||||
atOffset = getOffsets( offsets.at, targetWidth, targetHeight );
|
||||
basePosition.left += atOffset[ 0 ];
|
||||
basePosition.top += atOffset[ 1 ];
|
||||
|
||||
return this.each(function() {
|
||||
var elem = $( this ),
|
||||
var collisionPosition, using,
|
||||
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 ),
|
||||
marginLeft = parseCss( this, "marginLeft" ),
|
||||
marginTop = parseCss( this, "marginTop" ),
|
||||
collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) + scrollInfo.width,
|
||||
collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) + scrollInfo.height,
|
||||
position = $.extend( {}, basePosition ),
|
||||
collisionPosition;
|
||||
myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() );
|
||||
|
||||
if ( options.my[0] === "right" ) {
|
||||
if ( options.my[ 0 ] === "right" ) {
|
||||
position.left -= elemWidth;
|
||||
} else if ( options.my[0] === center ) {
|
||||
} else if ( options.my[ 0 ] === "center" ) {
|
||||
position.left -= elemWidth / 2;
|
||||
}
|
||||
|
||||
if ( options.my[1] === "bottom" ) {
|
||||
if ( options.my[ 1 ] === "bottom" ) {
|
||||
position.top -= elemHeight;
|
||||
} else if ( options.my[1] === center ) {
|
||||
} 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 );
|
||||
position.left += myOffset[ 0 ];
|
||||
position.top += myOffset[ 1 ];
|
||||
|
||||
// if the browser doesn't support fractions, then round for consistent results
|
||||
if ( !$.support.offsetFractions ) {
|
||||
position.left = round( position.left );
|
||||
position.top = round( position.top );
|
||||
}
|
||||
|
||||
collisionPosition = {
|
||||
left: position.left - marginLeft,
|
||||
top: position.top - marginTop
|
||||
marginLeft: marginLeft,
|
||||
marginTop: marginTop
|
||||
};
|
||||
|
||||
$.each( [ "left", "top" ], function( i, dir ) {
|
||||
if ( $.ui.position[ collision[i] ] ) {
|
||||
$.ui.position[ collision[i] ][ dir ]( position, {
|
||||
if ( $.ui.position[ collision[ i ] ] ) {
|
||||
$.ui.position[ collision[ i ] ][ dir ]( position, {
|
||||
targetWidth: targetWidth,
|
||||
targetHeight: targetHeight,
|
||||
elemWidth: elemWidth,
|
||||
|
|
@ -140,9 +221,11 @@ $.fn.position = function( options ) {
|
|||
collisionPosition: collisionPosition,
|
||||
collisionWidth: collisionWidth,
|
||||
collisionHeight: collisionHeight,
|
||||
offset: offset,
|
||||
offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ],
|
||||
my: options.my,
|
||||
at: options.at
|
||||
at: options.at,
|
||||
within: within,
|
||||
elem : elem
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
@ -150,31 +233,137 @@ $.fn.position = function( options ) {
|
|||
if ( $.fn.bgiframe ) {
|
||||
elem.bgiframe();
|
||||
}
|
||||
elem.offset( $.extend( position, { using: options.using } ) );
|
||||
|
||||
if ( options.using ) {
|
||||
// adds feedback as second argument to using callback, if present
|
||||
using = function( props ) {
|
||||
var left = targetOffset.left - position.left,
|
||||
right = left + targetWidth - elemWidth,
|
||||
top = targetOffset.top - position.top,
|
||||
bottom = top + targetHeight - elemHeight,
|
||||
feedback = {
|
||||
target: {
|
||||
element: target,
|
||||
left: targetOffset.left,
|
||||
top: targetOffset.top,
|
||||
width: targetWidth,
|
||||
height: targetHeight
|
||||
},
|
||||
element: {
|
||||
element: elem,
|
||||
left: position.left,
|
||||
top: position.top,
|
||||
width: elemWidth,
|
||||
height: elemHeight
|
||||
},
|
||||
horizontal: right < 0 ? "left" : left > 0 ? "right" : "center",
|
||||
vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle"
|
||||
};
|
||||
if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) {
|
||||
feedback.horizontal = "center";
|
||||
}
|
||||
if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) {
|
||||
feedback.vertical = "middle";
|
||||
}
|
||||
if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) {
|
||||
feedback.important = "horizontal";
|
||||
} else {
|
||||
feedback.important = "vertical";
|
||||
}
|
||||
options.using.call( this, props, feedback );
|
||||
};
|
||||
}
|
||||
|
||||
elem.offset( $.extend( position, { using: 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 );
|
||||
var within = data.within,
|
||||
withinOffset = within.isWindow ? within.scrollLeft : within.offset.left,
|
||||
outerWidth = within.width,
|
||||
collisionPosLeft = position.left - data.collisionPosition.marginLeft,
|
||||
overLeft = withinOffset - collisionPosLeft,
|
||||
overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset,
|
||||
newOverRight;
|
||||
|
||||
// element is wider than within
|
||||
if ( data.collisionWidth > outerWidth ) {
|
||||
// element is initially over the left side of within
|
||||
if ( overLeft > 0 && overRight <= 0 ) {
|
||||
newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - withinOffset;
|
||||
position.left += overLeft - newOverRight;
|
||||
// element is initially over right side of within
|
||||
} else if ( overRight > 0 && overLeft <= 0 ) {
|
||||
position.left = withinOffset;
|
||||
// element is initially over both left and right sides of within
|
||||
} else {
|
||||
if ( overLeft > overRight ) {
|
||||
position.left = withinOffset + outerWidth - data.collisionWidth;
|
||||
} else {
|
||||
position.left = withinOffset;
|
||||
}
|
||||
}
|
||||
// too far left -> align with left edge
|
||||
} else if ( overLeft > 0 ) {
|
||||
position.left += overLeft;
|
||||
// too far right -> align with right edge
|
||||
} else if ( overRight > 0 ) {
|
||||
position.left -= overRight;
|
||||
// adjust based on position and margin
|
||||
} else {
|
||||
position.left = max( position.left - collisionPosLeft, 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 );
|
||||
var within = data.within,
|
||||
withinOffset = within.isWindow ? within.scrollTop : within.offset.top,
|
||||
outerHeight = data.within.height,
|
||||
collisionPosTop = position.top - data.collisionPosition.marginTop,
|
||||
overTop = withinOffset - collisionPosTop,
|
||||
overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset,
|
||||
newOverBottom;
|
||||
|
||||
// element is taller than within
|
||||
if ( data.collisionHeight > outerHeight ) {
|
||||
// element is initially over the top of within
|
||||
if ( overTop > 0 && overBottom <= 0 ) {
|
||||
newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - withinOffset;
|
||||
position.top += overTop - newOverBottom;
|
||||
// element is initially over bottom of within
|
||||
} else if ( overBottom > 0 && overTop <= 0 ) {
|
||||
position.top = withinOffset;
|
||||
// element is initially over both top and bottom of within
|
||||
} else {
|
||||
if ( overTop > overBottom ) {
|
||||
position.top = withinOffset + outerHeight - data.collisionHeight;
|
||||
} else {
|
||||
position.top = withinOffset;
|
||||
}
|
||||
}
|
||||
// too far up -> align with top
|
||||
} else if ( overTop > 0 ) {
|
||||
position.top += overTop;
|
||||
// too far down -> align with bottom edge
|
||||
} else if ( overBottom > 0 ) {
|
||||
position.top -= overBottom;
|
||||
// adjust based on position and margin
|
||||
} else {
|
||||
position.top = max( position.top - collisionPosTop, 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(),
|
||||
var within = data.within,
|
||||
withinOffset = within.offset.left + within.scrollLeft,
|
||||
outerWidth = within.width,
|
||||
offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,
|
||||
collisionPosLeft = position.left - data.collisionPosition.marginLeft,
|
||||
overLeft = collisionPosLeft - offsetLeft,
|
||||
overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft,
|
||||
myOffset = data.my[ 0 ] === "left" ?
|
||||
-data.elemWidth :
|
||||
data.my[ 0 ] === "right" ?
|
||||
|
|
@ -182,71 +371,147 @@ $.ui.position = {
|
|||
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;
|
||||
data.at[ 0 ] === "right" ?
|
||||
-data.targetWidth :
|
||||
0,
|
||||
offset = -2 * data.offset[ 0 ],
|
||||
newOverRight,
|
||||
newOverLeft;
|
||||
|
||||
if ( overLeft < 0 ) {
|
||||
newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - outerWidth - withinOffset;
|
||||
if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) {
|
||||
position.left += myOffset + atOffset + offset;
|
||||
}
|
||||
}
|
||||
else if ( overRight > 0 ) {
|
||||
newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft;
|
||||
if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) {
|
||||
position.left += myOffset + atOffset + offset;
|
||||
}
|
||||
}
|
||||
},
|
||||
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" ?
|
||||
var within = data.within,
|
||||
withinOffset = within.offset.top + within.scrollTop,
|
||||
outerHeight = within.height,
|
||||
offsetTop = within.isWindow ? within.scrollTop : within.offset.top,
|
||||
collisionPosTop = position.top - data.collisionPosition.marginTop,
|
||||
overTop = collisionPosTop - offsetTop,
|
||||
overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop,
|
||||
top = data.my[ 1 ] === "top",
|
||||
myOffset = 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;
|
||||
data.at[ 1 ] === "bottom" ?
|
||||
-data.targetHeight :
|
||||
0,
|
||||
offset = -2 * data.offset[ 1 ],
|
||||
newOverTop,
|
||||
newOverBottom;
|
||||
if ( overTop < 0 ) {
|
||||
newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset;
|
||||
if ( ( position.top + myOffset + atOffset + offset) > overTop && ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) ) {
|
||||
position.top += myOffset + atOffset + offset;
|
||||
}
|
||||
}
|
||||
else if ( overBottom > 0 ) {
|
||||
newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop;
|
||||
if ( ( position.top + myOffset + atOffset + offset) > overBottom && ( newOverTop > 0 || abs( newOverTop ) < overBottom ) ) {
|
||||
position.top += myOffset + atOffset + offset;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
flipfit: {
|
||||
left: function() {
|
||||
$.ui.position.flip.left.apply( this, arguments );
|
||||
$.ui.position.fit.left.apply( this, arguments );
|
||||
},
|
||||
top: function() {
|
||||
$.ui.position.flip.top.apply( this, arguments );
|
||||
$.ui.position.fit.top.apply( this, arguments );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// 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
|
||||
};
|
||||
// fraction support test
|
||||
(function () {
|
||||
var testElement, testElementParent, testElementStyle, offsetLeft, i,
|
||||
body = document.getElementsByTagName( "body" )[ 0 ],
|
||||
div = document.createElement( "div" );
|
||||
|
||||
if ( 'using' in options ) {
|
||||
options.using.call( elem, props );
|
||||
} else {
|
||||
curElem.css( props );
|
||||
}
|
||||
//Create a "fake body" for testing based on method used in jQuery.support
|
||||
testElement = document.createElement( body ? "div" : "body" );
|
||||
testElementStyle = {
|
||||
visibility: "hidden",
|
||||
width: 0,
|
||||
height: 0,
|
||||
border: 0,
|
||||
margin: 0,
|
||||
background: "none"
|
||||
};
|
||||
|
||||
$.fn.offset = function( options ) {
|
||||
var elem = this[ 0 ];
|
||||
if ( !elem || !elem.ownerDocument ) { return null; }
|
||||
if ( options ) {
|
||||
return this.each(function() {
|
||||
$.offset.setOffset( this, options );
|
||||
if ( body ) {
|
||||
$.extend( testElementStyle, {
|
||||
position: "absolute",
|
||||
left: "-1000px",
|
||||
top: "-1000px"
|
||||
});
|
||||
}
|
||||
return _offset.call( this );
|
||||
for ( i in testElementStyle ) {
|
||||
testElement.style[ i ] = testElementStyle[ i ];
|
||||
}
|
||||
testElement.appendChild( div );
|
||||
testElementParent = body || document.documentElement;
|
||||
testElementParent.insertBefore( testElement, testElementParent.firstChild );
|
||||
|
||||
div.style.cssText = "position: absolute; left: 10.7432222px;";
|
||||
|
||||
offsetLeft = $( div ).offset().left;
|
||||
$.support.offsetFractions = offsetLeft > 10 && offsetLeft < 11;
|
||||
|
||||
testElement.innerHTML = "";
|
||||
testElementParent.removeChild( testElement );
|
||||
})();
|
||||
|
||||
// DEPRECATED
|
||||
if ( $.uiBackCompat !== false ) {
|
||||
// offset option
|
||||
(function( $ ) {
|
||||
var _position = $.fn.position;
|
||||
$.fn.position = function( options ) {
|
||||
if ( !options || !options.offset ) {
|
||||
return _position.call( this, options );
|
||||
}
|
||||
var offset = options.offset.split( " " ),
|
||||
at = options.at.split( " " );
|
||||
if ( offset.length === 1 ) {
|
||||
offset[ 1 ] = offset[ 0 ];
|
||||
}
|
||||
if ( /^\d/.test( offset[ 0 ] ) ) {
|
||||
offset[ 0 ] = "+" + offset[ 0 ];
|
||||
}
|
||||
if ( /^\d/.test( offset[ 1 ] ) ) {
|
||||
offset[ 1 ] = "+" + offset[ 1 ];
|
||||
}
|
||||
if ( at.length === 1 ) {
|
||||
if ( /left|center|right/.test( at[ 0 ] ) ) {
|
||||
at[ 1 ] = "center";
|
||||
} else {
|
||||
at[ 1 ] = at[ 0 ];
|
||||
at[ 0 ] = "center";
|
||||
}
|
||||
}
|
||||
return _position.call( this, $.extend( options, {
|
||||
at: at[ 0 ] + offset[ 0 ] + " " + at[ 1 ] + offset[ 1 ],
|
||||
offset: undefined
|
||||
} ) );
|
||||
};
|
||||
}( jQuery ) );
|
||||
}
|
||||
|
||||
}( jQuery ));
|
||||
}( jQuery ) );
|
||||
|
|
|
|||
26
themes/default/js/ui/jquery.ui.progressbar.js
vendored
26
themes/default/js/ui/jquery.ui.progressbar.js
vendored
|
|
@ -1,11 +1,12 @@
|
|||
/*
|
||||
* jQuery UI Progressbar 1.8.16
|
||||
/*!
|
||||
* jQuery UI Progressbar 1.9.0
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Progressbar
|
||||
* http://api.jqueryui.com/progressbar/
|
||||
*
|
||||
* Depends:
|
||||
* jquery.ui.core.js
|
||||
|
|
@ -14,6 +15,7 @@
|
|||
(function( $, undefined ) {
|
||||
|
||||
$.widget( "ui.progressbar", {
|
||||
version: "1.9.0",
|
||||
options: {
|
||||
value: 0,
|
||||
max: 100
|
||||
|
|
@ -38,7 +40,7 @@ $.widget( "ui.progressbar", {
|
|||
this._refreshValue();
|
||||
},
|
||||
|
||||
destroy: function() {
|
||||
_destroy: function() {
|
||||
this.element
|
||||
.removeClass( "ui-progressbar ui-widget ui-widget-content ui-corner-all" )
|
||||
.removeAttr( "role" )
|
||||
|
|
@ -47,8 +49,6 @@ $.widget( "ui.progressbar", {
|
|||
.removeAttr( "aria-valuenow" );
|
||||
|
||||
this.valueDiv.remove();
|
||||
|
||||
$.Widget.prototype.destroy.apply( this, arguments );
|
||||
},
|
||||
|
||||
value: function( newValue ) {
|
||||
|
|
@ -69,7 +69,7 @@ $.widget( "ui.progressbar", {
|
|||
}
|
||||
}
|
||||
|
||||
$.Widget.prototype._setOption.apply( this, arguments );
|
||||
this._super( key, value );
|
||||
},
|
||||
|
||||
_value: function() {
|
||||
|
|
@ -86,8 +86,8 @@ $.widget( "ui.progressbar", {
|
|||
},
|
||||
|
||||
_refreshValue: function() {
|
||||
var value = this.value();
|
||||
var percentage = this._percentage();
|
||||
var value = this.value(),
|
||||
percentage = this._percentage();
|
||||
|
||||
if ( this.oldValue !== value ) {
|
||||
this.oldValue = value;
|
||||
|
|
@ -102,8 +102,4 @@ $.widget( "ui.progressbar", {
|
|||
}
|
||||
});
|
||||
|
||||
$.extend( $.ui.progressbar, {
|
||||
version: "1.8.16"
|
||||
});
|
||||
|
||||
})( jQuery );
|
||||
|
|
|
|||
258
themes/default/js/ui/jquery.ui.resizable.js
vendored
258
themes/default/js/ui/jquery.ui.resizable.js
vendored
|
|
@ -1,11 +1,12 @@
|
|||
/*
|
||||
* jQuery UI Resizable 1.8.16
|
||||
/*!
|
||||
* jQuery UI Resizable 1.9.0
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Resizables
|
||||
* http://api.jqueryui.com/resizable/
|
||||
*
|
||||
* Depends:
|
||||
* jquery.ui.core.js
|
||||
|
|
@ -15,6 +16,7 @@
|
|||
(function( $, undefined ) {
|
||||
|
||||
$.widget("ui.resizable", $.ui.mouse, {
|
||||
version: "1.9.0",
|
||||
widgetEventPrefix: "resize",
|
||||
options: {
|
||||
alsoResize: false,
|
||||
|
|
@ -36,7 +38,7 @@ $.widget("ui.resizable", $.ui.mouse, {
|
|||
},
|
||||
_create: function() {
|
||||
|
||||
var self = this, o = this.options;
|
||||
var that = this, o = this.options;
|
||||
this.element.addClass("ui-resizable");
|
||||
|
||||
$.extend(this, {
|
||||
|
|
@ -50,10 +52,6 @@ $.widget("ui.resizable", $.ui.mouse, {
|
|||
//Wrap the element if it cannot hold child nodes
|
||||
if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)) {
|
||||
|
||||
//Opera fix for relative positioning
|
||||
if (/relative/.test(this.element.css('position')) && $.browser.opera)
|
||||
this.element.css({ position: 'relative', top: 'auto', left: 'auto' });
|
||||
|
||||
//Create a wrapper element and set the wrapper to the new current internal element
|
||||
this.element.wrap(
|
||||
$('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({
|
||||
|
|
@ -102,9 +100,8 @@ $.widget("ui.resizable", $.ui.mouse, {
|
|||
var handle = $.trim(n[i]), hname = 'ui-resizable-'+handle;
|
||||
var axis = $('<div class="ui-resizable-handle ' + hname + '"></div>');
|
||||
|
||||
// increase zIndex of sw, se, ne, nw axis
|
||||
//TODO : this modifies original option
|
||||
if(/sw|se|ne|nw/.test(handle)) axis.css({ zIndex: ++o.zIndex });
|
||||
// Apply zIndex to all handles - see #7960
|
||||
axis.css({ zIndex: o.zIndex });
|
||||
|
||||
//TODO : What's going on here?
|
||||
if ('se' == handle) {
|
||||
|
|
@ -162,11 +159,11 @@ $.widget("ui.resizable", $.ui.mouse, {
|
|||
|
||||
//Matching axis name
|
||||
this._handles.mouseover(function() {
|
||||
if (!self.resizing) {
|
||||
if (!that.resizing) {
|
||||
if (this.className)
|
||||
var axis = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);
|
||||
//Axis, default = se
|
||||
self.axis = axis && axis[1] ? axis[1] : 'se';
|
||||
that.axis = axis && axis[1] ? axis[1] : 'se';
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -175,16 +172,16 @@ $.widget("ui.resizable", $.ui.mouse, {
|
|||
this._handles.hide();
|
||||
$(this.element)
|
||||
.addClass("ui-resizable-autohide")
|
||||
.hover(function() {
|
||||
.mouseenter(function() {
|
||||
if (o.disabled) return;
|
||||
$(this).removeClass("ui-resizable-autohide");
|
||||
self._handles.show();
|
||||
},
|
||||
function(){
|
||||
that._handles.show();
|
||||
})
|
||||
.mouseleave(function(){
|
||||
if (o.disabled) return;
|
||||
if (!self.resizing) {
|
||||
if (!that.resizing) {
|
||||
$(this).addClass("ui-resizable-autohide");
|
||||
self._handles.hide();
|
||||
that._handles.hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -194,13 +191,13 @@ $.widget("ui.resizable", $.ui.mouse, {
|
|||
|
||||
},
|
||||
|
||||
destroy: function() {
|
||||
_destroy: function() {
|
||||
|
||||
this._mouseDestroy();
|
||||
|
||||
var _destroy = function(exp) {
|
||||
$(exp).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing")
|
||||
.removeData("resizable").unbind(".resizable").find('.ui-resizable-handle').remove();
|
||||
.removeData("resizable").removeData("ui-resizable").unbind(".resizable").find('.ui-resizable-handle').remove();
|
||||
};
|
||||
|
||||
//TODO: Unwrap at same DOM position
|
||||
|
|
@ -247,10 +244,6 @@ $.widget("ui.resizable", $.ui.mouse, {
|
|||
el.css({ position: 'absolute', top: iniPos.top, left: iniPos.left });
|
||||
}
|
||||
|
||||
//Opera fixing relative position
|
||||
if ($.browser.opera && (/relative/).test(el.css('position')))
|
||||
el.css({ position: 'relative', top: 'auto', left: 'auto' });
|
||||
|
||||
this._renderProxy();
|
||||
|
||||
var curleft = num(this.helper.css('left')), curtop = num(this.helper.css('top'));
|
||||
|
|
@ -284,14 +277,14 @@ $.widget("ui.resizable", $.ui.mouse, {
|
|||
|
||||
//Increase performance, avoid regex
|
||||
var el = this.helper, o = this.options, props = {},
|
||||
self = this, smp = this.originalMousePosition, a = this.axis;
|
||||
that = this, smp = this.originalMousePosition, a = this.axis;
|
||||
|
||||
var dx = (event.pageX-smp.left)||0, dy = (event.pageY-smp.top)||0;
|
||||
var trigger = this._change[a];
|
||||
if (!trigger) return false;
|
||||
|
||||
// Calculate the attrs that will be change
|
||||
var data = trigger.apply(this, [event, dx, dy]), ie6 = $.browser.msie && $.browser.version < 7, csdif = this.sizeDiff;
|
||||
var data = trigger.apply(this, [event, dx, dy]);
|
||||
|
||||
// Put this in the mouseDrag handler since the user can start pressing shift while resizing
|
||||
this._updateVirtualBoundaries(event.shiftKey);
|
||||
|
|
@ -322,22 +315,22 @@ $.widget("ui.resizable", $.ui.mouse, {
|
|||
_mouseStop: function(event) {
|
||||
|
||||
this.resizing = false;
|
||||
var o = this.options, self = this;
|
||||
var o = this.options, that = this;
|
||||
|
||||
if(this._helper) {
|
||||
var pr = this._proportionallyResizeElements, ista = pr.length && (/textarea/i).test(pr[0].nodeName),
|
||||
soffseth = ista && $.ui.hasScroll(pr[0], 'left') /* TODO - jump height */ ? 0 : self.sizeDiff.height,
|
||||
soffsetw = ista ? 0 : self.sizeDiff.width;
|
||||
soffseth = ista && $.ui.hasScroll(pr[0], 'left') /* TODO - jump height */ ? 0 : that.sizeDiff.height,
|
||||
soffsetw = ista ? 0 : that.sizeDiff.width;
|
||||
|
||||
var s = { width: (self.helper.width() - soffsetw), height: (self.helper.height() - soffseth) },
|
||||
left = (parseInt(self.element.css('left'), 10) + (self.position.left - self.originalPosition.left)) || null,
|
||||
top = (parseInt(self.element.css('top'), 10) + (self.position.top - self.originalPosition.top)) || null;
|
||||
var s = { width: (that.helper.width() - soffsetw), height: (that.helper.height() - soffseth) },
|
||||
left = (parseInt(that.element.css('left'), 10) + (that.position.left - that.originalPosition.left)) || null,
|
||||
top = (parseInt(that.element.css('top'), 10) + (that.position.top - that.originalPosition.top)) || null;
|
||||
|
||||
if (!o.animate)
|
||||
this.element.css($.extend(s, { top: top, left: left }));
|
||||
|
||||
self.helper.height(self.size.height);
|
||||
self.helper.width(self.size.width);
|
||||
that.helper.height(that.size.height);
|
||||
that.helper.width(that.size.width);
|
||||
|
||||
if (this._helper && !o.animate) this._proportionallyResize();
|
||||
}
|
||||
|
|
@ -454,9 +447,6 @@ $.widget("ui.resizable", $.ui.mouse, {
|
|||
});
|
||||
}
|
||||
|
||||
if ($.browser.msie && !(!($(element).is(':hidden') || $(element).parents(':hidden').length)))
|
||||
continue;
|
||||
|
||||
prel.css({
|
||||
height: (element.height() - this.borderDif[0] - this.borderDif[2]) || 0,
|
||||
width: (element.width() - this.borderDif[1] - this.borderDif[3]) || 0
|
||||
|
|
@ -548,10 +538,6 @@ $.widget("ui.resizable", $.ui.mouse, {
|
|||
|
||||
});
|
||||
|
||||
$.extend($.ui.resizable, {
|
||||
version: "1.8.16"
|
||||
});
|
||||
|
||||
/*
|
||||
* Resizable Extensions
|
||||
*/
|
||||
|
|
@ -559,15 +545,14 @@ $.extend($.ui.resizable, {
|
|||
$.ui.plugin.add("resizable", "alsoResize", {
|
||||
|
||||
start: function (event, ui) {
|
||||
var self = $(this).data("resizable"), o = self.options;
|
||||
var that = $(this).data("resizable"), o = that.options;
|
||||
|
||||
var _store = function (exp) {
|
||||
$(exp).each(function() {
|
||||
var el = $(this);
|
||||
el.data("resizable-alsoresize", {
|
||||
width: parseInt(el.width(), 10), height: parseInt(el.height(), 10),
|
||||
left: parseInt(el.css('left'), 10), top: parseInt(el.css('top'), 10),
|
||||
position: el.css('position') // to reset Opera on stop()
|
||||
left: parseInt(el.css('left'), 10), top: parseInt(el.css('top'), 10)
|
||||
});
|
||||
});
|
||||
};
|
||||
|
|
@ -581,11 +566,11 @@ $.ui.plugin.add("resizable", "alsoResize", {
|
|||
},
|
||||
|
||||
resize: function (event, ui) {
|
||||
var self = $(this).data("resizable"), o = self.options, os = self.originalSize, op = self.originalPosition;
|
||||
var that = $(this).data("resizable"), o = that.options, os = that.originalSize, op = that.originalPosition;
|
||||
|
||||
var delta = {
|
||||
height: (self.size.height - os.height) || 0, width: (self.size.width - os.width) || 0,
|
||||
top: (self.position.top - op.top) || 0, left: (self.position.left - op.left) || 0
|
||||
height: (that.size.height - os.height) || 0, width: (that.size.width - os.width) || 0,
|
||||
top: (that.position.top - op.top) || 0, left: (that.position.left - op.left) || 0
|
||||
},
|
||||
|
||||
_alsoResize = function (exp, c) {
|
||||
|
|
@ -599,12 +584,6 @@ $.ui.plugin.add("resizable", "alsoResize", {
|
|||
style[prop] = sum || null;
|
||||
});
|
||||
|
||||
// Opera fixing relative position
|
||||
if ($.browser.opera && /relative/.test(el.css('position'))) {
|
||||
self._revertToRelativePosition = true;
|
||||
el.css({ position: 'absolute', top: 'auto', left: 'auto' });
|
||||
}
|
||||
|
||||
el.css(style);
|
||||
});
|
||||
};
|
||||
|
|
@ -617,25 +596,6 @@ $.ui.plugin.add("resizable", "alsoResize", {
|
|||
},
|
||||
|
||||
stop: function (event, ui) {
|
||||
var self = $(this).data("resizable"), o = self.options;
|
||||
|
||||
var _reset = function (exp) {
|
||||
$(exp).each(function() {
|
||||
var el = $(this);
|
||||
// reset position for Opera - no need to verify it was changed
|
||||
el.css({ position: el.data("resizable-alsoresize").position });
|
||||
});
|
||||
};
|
||||
|
||||
if (self._revertToRelativePosition) {
|
||||
self._revertToRelativePosition = false;
|
||||
if (typeof(o.alsoResize) == 'object' && !o.alsoResize.nodeType) {
|
||||
$.each(o.alsoResize, function (exp) { _reset(exp); });
|
||||
}else{
|
||||
_reset(o.alsoResize);
|
||||
}
|
||||
}
|
||||
|
||||
$(this).removeData("resizable-alsoresize");
|
||||
}
|
||||
});
|
||||
|
|
@ -643,34 +603,34 @@ $.ui.plugin.add("resizable", "alsoResize", {
|
|||
$.ui.plugin.add("resizable", "animate", {
|
||||
|
||||
stop: function(event, ui) {
|
||||
var self = $(this).data("resizable"), o = self.options;
|
||||
var that = $(this).data("resizable"), o = that.options;
|
||||
|
||||
var pr = self._proportionallyResizeElements, ista = pr.length && (/textarea/i).test(pr[0].nodeName),
|
||||
soffseth = ista && $.ui.hasScroll(pr[0], 'left') /* TODO - jump height */ ? 0 : self.sizeDiff.height,
|
||||
soffsetw = ista ? 0 : self.sizeDiff.width;
|
||||
var pr = that._proportionallyResizeElements, ista = pr.length && (/textarea/i).test(pr[0].nodeName),
|
||||
soffseth = ista && $.ui.hasScroll(pr[0], 'left') /* TODO - jump height */ ? 0 : that.sizeDiff.height,
|
||||
soffsetw = ista ? 0 : that.sizeDiff.width;
|
||||
|
||||
var style = { width: (self.size.width - soffsetw), height: (self.size.height - soffseth) },
|
||||
left = (parseInt(self.element.css('left'), 10) + (self.position.left - self.originalPosition.left)) || null,
|
||||
top = (parseInt(self.element.css('top'), 10) + (self.position.top - self.originalPosition.top)) || null;
|
||||
var style = { width: (that.size.width - soffsetw), height: (that.size.height - soffseth) },
|
||||
left = (parseInt(that.element.css('left'), 10) + (that.position.left - that.originalPosition.left)) || null,
|
||||
top = (parseInt(that.element.css('top'), 10) + (that.position.top - that.originalPosition.top)) || null;
|
||||
|
||||
self.element.animate(
|
||||
that.element.animate(
|
||||
$.extend(style, top && left ? { top: top, left: left } : {}), {
|
||||
duration: o.animateDuration,
|
||||
easing: o.animateEasing,
|
||||
step: function() {
|
||||
|
||||
var data = {
|
||||
width: parseInt(self.element.css('width'), 10),
|
||||
height: parseInt(self.element.css('height'), 10),
|
||||
top: parseInt(self.element.css('top'), 10),
|
||||
left: parseInt(self.element.css('left'), 10)
|
||||
width: parseInt(that.element.css('width'), 10),
|
||||
height: parseInt(that.element.css('height'), 10),
|
||||
top: parseInt(that.element.css('top'), 10),
|
||||
left: parseInt(that.element.css('left'), 10)
|
||||
};
|
||||
|
||||
if (pr && pr.length) $(pr[0]).css({ width: data.width, height: data.height });
|
||||
|
||||
// propagating resize, and updating values for each animation step
|
||||
self._updateCache(data);
|
||||
self._propagate("resize", event);
|
||||
that._updateCache(data);
|
||||
that._propagate("resize", event);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -682,17 +642,17 @@ $.ui.plugin.add("resizable", "animate", {
|
|||
$.ui.plugin.add("resizable", "containment", {
|
||||
|
||||
start: function(event, ui) {
|
||||
var self = $(this).data("resizable"), o = self.options, el = self.element;
|
||||
var that = $(this).data("resizable"), o = that.options, el = that.element;
|
||||
var oc = o.containment, ce = (oc instanceof $) ? oc.get(0) : (/parent/.test(oc)) ? el.parent().get(0) : oc;
|
||||
if (!ce) return;
|
||||
|
||||
self.containerElement = $(ce);
|
||||
that.containerElement = $(ce);
|
||||
|
||||
if (/document/.test(oc) || oc == document) {
|
||||
self.containerOffset = { left: 0, top: 0 };
|
||||
self.containerPosition = { left: 0, top: 0 };
|
||||
that.containerOffset = { left: 0, top: 0 };
|
||||
that.containerPosition = { left: 0, top: 0 };
|
||||
|
||||
self.parentData = {
|
||||
that.parentData = {
|
||||
element: $(document), left: 0, top: 0,
|
||||
width: $(document).width(), height: $(document).height() || document.body.parentNode.scrollHeight
|
||||
};
|
||||
|
|
@ -703,70 +663,70 @@ $.ui.plugin.add("resizable", "containment", {
|
|||
var element = $(ce), p = [];
|
||||
$([ "Top", "Right", "Left", "Bottom" ]).each(function(i, name) { p[i] = num(element.css("padding" + name)); });
|
||||
|
||||
self.containerOffset = element.offset();
|
||||
self.containerPosition = element.position();
|
||||
self.containerSize = { height: (element.innerHeight() - p[3]), width: (element.innerWidth() - p[1]) };
|
||||
that.containerOffset = element.offset();
|
||||
that.containerPosition = element.position();
|
||||
that.containerSize = { height: (element.innerHeight() - p[3]), width: (element.innerWidth() - p[1]) };
|
||||
|
||||
var co = self.containerOffset, ch = self.containerSize.height, cw = self.containerSize.width,
|
||||
var co = that.containerOffset, ch = that.containerSize.height, cw = that.containerSize.width,
|
||||
width = ($.ui.hasScroll(ce, "left") ? ce.scrollWidth : cw ), height = ($.ui.hasScroll(ce) ? ce.scrollHeight : ch);
|
||||
|
||||
self.parentData = {
|
||||
that.parentData = {
|
||||
element: ce, left: co.left, top: co.top, width: width, height: height
|
||||
};
|
||||
}
|
||||
},
|
||||
|
||||
resize: function(event, ui) {
|
||||
var self = $(this).data("resizable"), o = self.options,
|
||||
ps = self.containerSize, co = self.containerOffset, cs = self.size, cp = self.position,
|
||||
pRatio = self._aspectRatio || event.shiftKey, cop = { top:0, left:0 }, ce = self.containerElement;
|
||||
var that = $(this).data("resizable"), o = that.options,
|
||||
ps = that.containerSize, co = that.containerOffset, cs = that.size, cp = that.position,
|
||||
pRatio = that._aspectRatio || event.shiftKey, cop = { top:0, left:0 }, ce = that.containerElement;
|
||||
|
||||
if (ce[0] != document && (/static/).test(ce.css('position'))) cop = co;
|
||||
|
||||
if (cp.left < (self._helper ? co.left : 0)) {
|
||||
self.size.width = self.size.width + (self._helper ? (self.position.left - co.left) : (self.position.left - cop.left));
|
||||
if (pRatio) self.size.height = self.size.width / o.aspectRatio;
|
||||
self.position.left = o.helper ? co.left : 0;
|
||||
if (cp.left < (that._helper ? co.left : 0)) {
|
||||
that.size.width = that.size.width + (that._helper ? (that.position.left - co.left) : (that.position.left - cop.left));
|
||||
if (pRatio) that.size.height = that.size.width / that.aspectRatio;
|
||||
that.position.left = o.helper ? co.left : 0;
|
||||
}
|
||||
|
||||
if (cp.top < (self._helper ? co.top : 0)) {
|
||||
self.size.height = self.size.height + (self._helper ? (self.position.top - co.top) : self.position.top);
|
||||
if (pRatio) self.size.width = self.size.height * o.aspectRatio;
|
||||
self.position.top = self._helper ? co.top : 0;
|
||||
if (cp.top < (that._helper ? co.top : 0)) {
|
||||
that.size.height = that.size.height + (that._helper ? (that.position.top - co.top) : that.position.top);
|
||||
if (pRatio) that.size.width = that.size.height * that.aspectRatio;
|
||||
that.position.top = that._helper ? co.top : 0;
|
||||
}
|
||||
|
||||
self.offset.left = self.parentData.left+self.position.left;
|
||||
self.offset.top = self.parentData.top+self.position.top;
|
||||
that.offset.left = that.parentData.left+that.position.left;
|
||||
that.offset.top = that.parentData.top+that.position.top;
|
||||
|
||||
var woset = Math.abs( (self._helper ? self.offset.left - cop.left : (self.offset.left - cop.left)) + self.sizeDiff.width ),
|
||||
hoset = Math.abs( (self._helper ? self.offset.top - cop.top : (self.offset.top - co.top)) + self.sizeDiff.height );
|
||||
var woset = Math.abs( (that._helper ? that.offset.left - cop.left : (that.offset.left - cop.left)) + that.sizeDiff.width ),
|
||||
hoset = Math.abs( (that._helper ? that.offset.top - cop.top : (that.offset.top - co.top)) + that.sizeDiff.height );
|
||||
|
||||
var isParent = self.containerElement.get(0) == self.element.parent().get(0),
|
||||
isOffsetRelative = /relative|absolute/.test(self.containerElement.css('position'));
|
||||
var isParent = that.containerElement.get(0) == that.element.parent().get(0),
|
||||
isOffsetRelative = /relative|absolute/.test(that.containerElement.css('position'));
|
||||
|
||||
if(isParent && isOffsetRelative) woset -= self.parentData.left;
|
||||
if(isParent && isOffsetRelative) woset -= that.parentData.left;
|
||||
|
||||
if (woset + self.size.width >= self.parentData.width) {
|
||||
self.size.width = self.parentData.width - woset;
|
||||
if (pRatio) self.size.height = self.size.width / self.aspectRatio;
|
||||
if (woset + that.size.width >= that.parentData.width) {
|
||||
that.size.width = that.parentData.width - woset;
|
||||
if (pRatio) that.size.height = that.size.width / that.aspectRatio;
|
||||
}
|
||||
|
||||
if (hoset + self.size.height >= self.parentData.height) {
|
||||
self.size.height = self.parentData.height - hoset;
|
||||
if (pRatio) self.size.width = self.size.height * self.aspectRatio;
|
||||
if (hoset + that.size.height >= that.parentData.height) {
|
||||
that.size.height = that.parentData.height - hoset;
|
||||
if (pRatio) that.size.width = that.size.height * that.aspectRatio;
|
||||
}
|
||||
},
|
||||
|
||||
stop: function(event, ui){
|
||||
var self = $(this).data("resizable"), o = self.options, cp = self.position,
|
||||
co = self.containerOffset, cop = self.containerPosition, ce = self.containerElement;
|
||||
var that = $(this).data("resizable"), o = that.options, cp = that.position,
|
||||
co = that.containerOffset, cop = that.containerPosition, ce = that.containerElement;
|
||||
|
||||
var helper = $(self.helper), ho = helper.offset(), w = helper.outerWidth() - self.sizeDiff.width, h = helper.outerHeight() - self.sizeDiff.height;
|
||||
var helper = $(that.helper), ho = helper.offset(), w = helper.outerWidth() - that.sizeDiff.width, h = helper.outerHeight() - that.sizeDiff.height;
|
||||
|
||||
if (self._helper && !o.animate && (/relative/).test(ce.css('position')))
|
||||
if (that._helper && !o.animate && (/relative/).test(ce.css('position')))
|
||||
$(this).css({ left: ho.left - cop.left - co.left, width: w, height: h });
|
||||
|
||||
if (self._helper && !o.animate && (/static/).test(ce.css('position')))
|
||||
if (that._helper && !o.animate && (/static/).test(ce.css('position')))
|
||||
$(this).css({ left: ho.left - cop.left - co.left, width: w, height: h });
|
||||
|
||||
}
|
||||
|
|
@ -776,26 +736,26 @@ $.ui.plugin.add("resizable", "ghost", {
|
|||
|
||||
start: function(event, ui) {
|
||||
|
||||
var self = $(this).data("resizable"), o = self.options, cs = self.size;
|
||||
var that = $(this).data("resizable"), o = that.options, cs = that.size;
|
||||
|
||||
self.ghost = self.originalElement.clone();
|
||||
self.ghost
|
||||
that.ghost = that.originalElement.clone();
|
||||
that.ghost
|
||||
.css({ opacity: .25, display: 'block', position: 'relative', height: cs.height, width: cs.width, margin: 0, left: 0, top: 0 })
|
||||
.addClass('ui-resizable-ghost')
|
||||
.addClass(typeof o.ghost == 'string' ? o.ghost : '');
|
||||
|
||||
self.ghost.appendTo(self.helper);
|
||||
that.ghost.appendTo(that.helper);
|
||||
|
||||
},
|
||||
|
||||
resize: function(event, ui){
|
||||
var self = $(this).data("resizable"), o = self.options;
|
||||
if (self.ghost) self.ghost.css({ position: 'relative', height: self.size.height, width: self.size.width });
|
||||
var that = $(this).data("resizable"), o = that.options;
|
||||
if (that.ghost) that.ghost.css({ position: 'relative', height: that.size.height, width: that.size.width });
|
||||
},
|
||||
|
||||
stop: function(event, ui){
|
||||
var self = $(this).data("resizable"), o = self.options;
|
||||
if (self.ghost && self.helper) self.helper.get(0).removeChild(self.ghost.get(0));
|
||||
var that = $(this).data("resizable"), o = that.options;
|
||||
if (that.ghost && that.helper) that.helper.get(0).removeChild(that.ghost.get(0));
|
||||
}
|
||||
|
||||
});
|
||||
|
|
@ -803,29 +763,29 @@ $.ui.plugin.add("resizable", "ghost", {
|
|||
$.ui.plugin.add("resizable", "grid", {
|
||||
|
||||
resize: function(event, ui) {
|
||||
var self = $(this).data("resizable"), o = self.options, cs = self.size, os = self.originalSize, op = self.originalPosition, a = self.axis, ratio = o._aspectRatio || event.shiftKey;
|
||||
var that = $(this).data("resizable"), o = that.options, cs = that.size, os = that.originalSize, op = that.originalPosition, a = that.axis, ratio = o._aspectRatio || event.shiftKey;
|
||||
o.grid = typeof o.grid == "number" ? [o.grid, o.grid] : o.grid;
|
||||
var ox = Math.round((cs.width - os.width) / (o.grid[0]||1)) * (o.grid[0]||1), oy = Math.round((cs.height - os.height) / (o.grid[1]||1)) * (o.grid[1]||1);
|
||||
|
||||
if (/^(se|s|e)$/.test(a)) {
|
||||
self.size.width = os.width + ox;
|
||||
self.size.height = os.height + oy;
|
||||
that.size.width = os.width + ox;
|
||||
that.size.height = os.height + oy;
|
||||
}
|
||||
else if (/^(ne)$/.test(a)) {
|
||||
self.size.width = os.width + ox;
|
||||
self.size.height = os.height + oy;
|
||||
self.position.top = op.top - oy;
|
||||
that.size.width = os.width + ox;
|
||||
that.size.height = os.height + oy;
|
||||
that.position.top = op.top - oy;
|
||||
}
|
||||
else if (/^(sw)$/.test(a)) {
|
||||
self.size.width = os.width + ox;
|
||||
self.size.height = os.height + oy;
|
||||
self.position.left = op.left - ox;
|
||||
that.size.width = os.width + ox;
|
||||
that.size.height = os.height + oy;
|
||||
that.position.left = op.left - ox;
|
||||
}
|
||||
else {
|
||||
self.size.width = os.width + ox;
|
||||
self.size.height = os.height + oy;
|
||||
self.position.top = op.top - oy;
|
||||
self.position.left = op.left - ox;
|
||||
that.size.width = os.width + ox;
|
||||
that.size.height = os.height + oy;
|
||||
that.position.top = op.top - oy;
|
||||
that.position.left = op.left - ox;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
61
themes/default/js/ui/jquery.ui.selectable.js
vendored
61
themes/default/js/ui/jquery.ui.selectable.js
vendored
|
|
@ -1,11 +1,12 @@
|
|||
/*
|
||||
* jQuery UI Selectable 1.8.16
|
||||
/*!
|
||||
* jQuery UI Selectable 1.9.0
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Selectables
|
||||
* http://api.jqueryui.com/selectable/
|
||||
*
|
||||
* Depends:
|
||||
* jquery.ui.core.js
|
||||
|
|
@ -15,6 +16,7 @@
|
|||
(function( $, undefined ) {
|
||||
|
||||
$.widget("ui.selectable", $.ui.mouse, {
|
||||
version: "1.9.0",
|
||||
options: {
|
||||
appendTo: 'body',
|
||||
autoRefresh: true,
|
||||
|
|
@ -23,7 +25,7 @@ $.widget("ui.selectable", $.ui.mouse, {
|
|||
tolerance: 'touch'
|
||||
},
|
||||
_create: function() {
|
||||
var self = this;
|
||||
var that = this;
|
||||
|
||||
this.element.addClass("ui-selectable");
|
||||
|
||||
|
|
@ -32,7 +34,8 @@ $.widget("ui.selectable", $.ui.mouse, {
|
|||
// cache selectee children based on filter
|
||||
var selectees;
|
||||
this.refresh = function() {
|
||||
selectees = $(self.options.filter, self.element[0]);
|
||||
selectees = $(that.options.filter, that.element[0]);
|
||||
selectees.addClass("ui-selectee");
|
||||
selectees.each(function() {
|
||||
var $this = $(this);
|
||||
var pos = $this.offset();
|
||||
|
|
@ -59,21 +62,17 @@ $.widget("ui.selectable", $.ui.mouse, {
|
|||
this.helper = $("<div class='ui-selectable-helper'></div>");
|
||||
},
|
||||
|
||||
destroy: function() {
|
||||
_destroy: function() {
|
||||
this.selectees
|
||||
.removeClass("ui-selectee")
|
||||
.removeData("selectable-item");
|
||||
this.element
|
||||
.removeClass("ui-selectable ui-selectable-disabled")
|
||||
.removeData("selectable")
|
||||
.unbind(".selectable");
|
||||
.removeClass("ui-selectable ui-selectable-disabled");
|
||||
this._mouseDestroy();
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
_mouseStart: function(event) {
|
||||
var self = this;
|
||||
var that = this;
|
||||
|
||||
this.opos = [event.pageX, event.pageY];
|
||||
|
||||
|
|
@ -102,13 +101,13 @@ $.widget("ui.selectable", $.ui.mouse, {
|
|||
this.selectees.filter('.ui-selected').each(function() {
|
||||
var selectee = $.data(this, "selectable-item");
|
||||
selectee.startselected = true;
|
||||
if (!event.metaKey) {
|
||||
if (!event.metaKey && !event.ctrlKey) {
|
||||
selectee.$element.removeClass('ui-selected');
|
||||
selectee.selected = false;
|
||||
selectee.$element.addClass('ui-unselecting');
|
||||
selectee.unselecting = true;
|
||||
// selectable UNSELECTING callback
|
||||
self._trigger("unselecting", event, {
|
||||
that._trigger("unselecting", event, {
|
||||
unselecting: selectee.element
|
||||
});
|
||||
}
|
||||
|
|
@ -117,7 +116,7 @@ $.widget("ui.selectable", $.ui.mouse, {
|
|||
$(event.target).parents().andSelf().each(function() {
|
||||
var selectee = $.data(this, "selectable-item");
|
||||
if (selectee) {
|
||||
var doSelect = !event.metaKey || !selectee.$element.hasClass('ui-selected');
|
||||
var doSelect = (!event.metaKey && !event.ctrlKey) || !selectee.$element.hasClass('ui-selected');
|
||||
selectee.$element
|
||||
.removeClass(doSelect ? "ui-unselecting" : "ui-selected")
|
||||
.addClass(doSelect ? "ui-selecting" : "ui-unselecting");
|
||||
|
|
@ -126,11 +125,11 @@ $.widget("ui.selectable", $.ui.mouse, {
|
|||
selectee.selected = doSelect;
|
||||
// selectable (UN)SELECTING callback
|
||||
if (doSelect) {
|
||||
self._trigger("selecting", event, {
|
||||
that._trigger("selecting", event, {
|
||||
selecting: selectee.element
|
||||
});
|
||||
} else {
|
||||
self._trigger("unselecting", event, {
|
||||
that._trigger("unselecting", event, {
|
||||
unselecting: selectee.element
|
||||
});
|
||||
}
|
||||
|
|
@ -141,7 +140,7 @@ $.widget("ui.selectable", $.ui.mouse, {
|
|||
},
|
||||
|
||||
_mouseDrag: function(event) {
|
||||
var self = this;
|
||||
var that = this;
|
||||
this.dragged = true;
|
||||
|
||||
if (this.options.disabled)
|
||||
|
|
@ -157,7 +156,7 @@ $.widget("ui.selectable", $.ui.mouse, {
|
|||
this.selectees.each(function() {
|
||||
var selectee = $.data(this, "selectable-item");
|
||||
//prevent helper from being selected if appendTo: selectable
|
||||
if (!selectee || selectee.element == self.element[0])
|
||||
if (!selectee || selectee.element == that.element[0])
|
||||
return;
|
||||
var hit = false;
|
||||
if (options.tolerance == 'touch') {
|
||||
|
|
@ -180,14 +179,14 @@ $.widget("ui.selectable", $.ui.mouse, {
|
|||
selectee.$element.addClass('ui-selecting');
|
||||
selectee.selecting = true;
|
||||
// selectable SELECTING callback
|
||||
self._trigger("selecting", event, {
|
||||
that._trigger("selecting", event, {
|
||||
selecting: selectee.element
|
||||
});
|
||||
}
|
||||
} else {
|
||||
// UNSELECT
|
||||
if (selectee.selecting) {
|
||||
if (event.metaKey && selectee.startselected) {
|
||||
if ((event.metaKey || event.ctrlKey) && selectee.startselected) {
|
||||
selectee.$element.removeClass('ui-selecting');
|
||||
selectee.selecting = false;
|
||||
selectee.$element.addClass('ui-selected');
|
||||
|
|
@ -200,20 +199,20 @@ $.widget("ui.selectable", $.ui.mouse, {
|
|||
selectee.unselecting = true;
|
||||
}
|
||||
// selectable UNSELECTING callback
|
||||
self._trigger("unselecting", event, {
|
||||
that._trigger("unselecting", event, {
|
||||
unselecting: selectee.element
|
||||
});
|
||||
}
|
||||
}
|
||||
if (selectee.selected) {
|
||||
if (!event.metaKey && !selectee.startselected) {
|
||||
if (!event.metaKey && !event.ctrlKey && !selectee.startselected) {
|
||||
selectee.$element.removeClass('ui-selected');
|
||||
selectee.selected = false;
|
||||
|
||||
selectee.$element.addClass('ui-unselecting');
|
||||
selectee.unselecting = true;
|
||||
// selectable UNSELECTING callback
|
||||
self._trigger("unselecting", event, {
|
||||
that._trigger("unselecting", event, {
|
||||
unselecting: selectee.element
|
||||
});
|
||||
}
|
||||
|
|
@ -225,7 +224,7 @@ $.widget("ui.selectable", $.ui.mouse, {
|
|||
},
|
||||
|
||||
_mouseStop: function(event) {
|
||||
var self = this;
|
||||
var that = this;
|
||||
|
||||
this.dragged = false;
|
||||
|
||||
|
|
@ -236,7 +235,7 @@ $.widget("ui.selectable", $.ui.mouse, {
|
|||
selectee.$element.removeClass('ui-unselecting');
|
||||
selectee.unselecting = false;
|
||||
selectee.startselected = false;
|
||||
self._trigger("unselected", event, {
|
||||
that._trigger("unselected", event, {
|
||||
unselected: selectee.element
|
||||
});
|
||||
});
|
||||
|
|
@ -246,7 +245,7 @@ $.widget("ui.selectable", $.ui.mouse, {
|
|||
selectee.selecting = false;
|
||||
selectee.selected = true;
|
||||
selectee.startselected = true;
|
||||
self._trigger("selected", event, {
|
||||
that._trigger("selected", event, {
|
||||
selected: selectee.element
|
||||
});
|
||||
});
|
||||
|
|
@ -259,8 +258,4 @@ $.widget("ui.selectable", $.ui.mouse, {
|
|||
|
||||
});
|
||||
|
||||
$.extend($.ui.selectable, {
|
||||
version: "1.8.16"
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
|
|
|
|||
163
themes/default/js/ui/jquery.ui.slider.js
vendored
163
themes/default/js/ui/jquery.ui.slider.js
vendored
|
|
@ -1,11 +1,12 @@
|
|||
/*
|
||||
* jQuery UI Slider 1.8.16
|
||||
/*!
|
||||
* jQuery UI Slider 1.9.0
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Slider
|
||||
* http://api.jqueryui.com/slider/
|
||||
*
|
||||
* Depends:
|
||||
* jquery.ui.core.js
|
||||
|
|
@ -19,7 +20,7 @@
|
|||
var numPages = 5;
|
||||
|
||||
$.widget( "ui.slider", $.ui.mouse, {
|
||||
|
||||
version: "1.9.0",
|
||||
widgetEventPrefix: "slide",
|
||||
|
||||
options: {
|
||||
|
|
@ -35,7 +36,7 @@ $.widget( "ui.slider", $.ui.mouse, {
|
|||
},
|
||||
|
||||
_create: function() {
|
||||
var self = this,
|
||||
var i,
|
||||
o = this.options,
|
||||
existingHandles = this.element.find( ".ui-slider-handle" ).addClass( "ui-state-default ui-corner-all" ),
|
||||
handle = "<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",
|
||||
|
|
@ -78,11 +79,11 @@ $.widget( "ui.slider", $.ui.mouse, {
|
|||
( ( o.range === "min" || o.range === "max" ) ? " ui-slider-range-" + o.range : "" ) );
|
||||
}
|
||||
|
||||
for ( var i = existingHandles.length; i < handleCount; i += 1 ) {
|
||||
for ( i = existingHandles.length; i < handleCount; i++ ) {
|
||||
handles.push( handle );
|
||||
}
|
||||
|
||||
this.handles = existingHandles.add( $( handles.join( "" ) ).appendTo( self.element ) );
|
||||
this.handles = existingHandles.add( $( handles.join( "" ) ).appendTo( this.element ) );
|
||||
|
||||
this.handle = this.handles.eq( 0 );
|
||||
|
||||
|
|
@ -90,11 +91,12 @@ $.widget( "ui.slider", $.ui.mouse, {
|
|||
.click(function( event ) {
|
||||
event.preventDefault();
|
||||
})
|
||||
.hover(function() {
|
||||
.mouseenter(function() {
|
||||
if ( !o.disabled ) {
|
||||
$( this ).addClass( "ui-state-hover" );
|
||||
}
|
||||
}, function() {
|
||||
})
|
||||
.mouseleave(function() {
|
||||
$( this ).removeClass( "ui-state-hover" );
|
||||
})
|
||||
.focus(function() {
|
||||
|
|
@ -110,21 +112,13 @@ $.widget( "ui.slider", $.ui.mouse, {
|
|||
});
|
||||
|
||||
this.handles.each(function( i ) {
|
||||
$( this ).data( "index.ui-slider-handle", i );
|
||||
$( this ).data( "ui-slider-handle-index", i );
|
||||
});
|
||||
|
||||
this.handles
|
||||
.keydown(function( event ) {
|
||||
var ret = true,
|
||||
index = $( this ).data( "index.ui-slider-handle" ),
|
||||
allowed,
|
||||
curVal,
|
||||
newVal,
|
||||
step;
|
||||
|
||||
if ( self.options.disabled ) {
|
||||
return;
|
||||
}
|
||||
this._on( this.handles, {
|
||||
keydown: function( event ) {
|
||||
var allowed, curVal, newVal, step,
|
||||
index = $( event.target ).data( "ui-slider-handle-index" );
|
||||
|
||||
switch ( event.keyCode ) {
|
||||
case $.ui.keyCode.HOME:
|
||||
|
|
@ -135,11 +129,11 @@ $.widget( "ui.slider", $.ui.mouse, {
|
|||
case $.ui.keyCode.RIGHT:
|
||||
case $.ui.keyCode.DOWN:
|
||||
case $.ui.keyCode.LEFT:
|
||||
ret = false;
|
||||
if ( !self._keySliding ) {
|
||||
self._keySliding = true;
|
||||
$( this ).addClass( "ui-state-active" );
|
||||
allowed = self._start( event, index );
|
||||
event.preventDefault();
|
||||
if ( !this._keySliding ) {
|
||||
this._keySliding = true;
|
||||
$( event.target ).addClass( "ui-state-active" );
|
||||
allowed = this._start( event, index );
|
||||
if ( allowed === false ) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -147,57 +141,54 @@ $.widget( "ui.slider", $.ui.mouse, {
|
|||
break;
|
||||
}
|
||||
|
||||
step = self.options.step;
|
||||
if ( self.options.values && self.options.values.length ) {
|
||||
curVal = newVal = self.values( index );
|
||||
step = this.options.step;
|
||||
if ( this.options.values && this.options.values.length ) {
|
||||
curVal = newVal = this.values( index );
|
||||
} else {
|
||||
curVal = newVal = self.value();
|
||||
curVal = newVal = this.value();
|
||||
}
|
||||
|
||||
switch ( event.keyCode ) {
|
||||
case $.ui.keyCode.HOME:
|
||||
newVal = self._valueMin();
|
||||
newVal = this._valueMin();
|
||||
break;
|
||||
case $.ui.keyCode.END:
|
||||
newVal = self._valueMax();
|
||||
newVal = this._valueMax();
|
||||
break;
|
||||
case $.ui.keyCode.PAGE_UP:
|
||||
newVal = self._trimAlignValue( curVal + ( (self._valueMax() - self._valueMin()) / numPages ) );
|
||||
newVal = this._trimAlignValue( curVal + ( (this._valueMax() - this._valueMin()) / numPages ) );
|
||||
break;
|
||||
case $.ui.keyCode.PAGE_DOWN:
|
||||
newVal = self._trimAlignValue( curVal - ( (self._valueMax() - self._valueMin()) / numPages ) );
|
||||
newVal = this._trimAlignValue( curVal - ( (this._valueMax() - this._valueMin()) / numPages ) );
|
||||
break;
|
||||
case $.ui.keyCode.UP:
|
||||
case $.ui.keyCode.RIGHT:
|
||||
if ( curVal === self._valueMax() ) {
|
||||
if ( curVal === this._valueMax() ) {
|
||||
return;
|
||||
}
|
||||
newVal = self._trimAlignValue( curVal + step );
|
||||
newVal = this._trimAlignValue( curVal + step );
|
||||
break;
|
||||
case $.ui.keyCode.DOWN:
|
||||
case $.ui.keyCode.LEFT:
|
||||
if ( curVal === self._valueMin() ) {
|
||||
if ( curVal === this._valueMin() ) {
|
||||
return;
|
||||
}
|
||||
newVal = self._trimAlignValue( curVal - step );
|
||||
newVal = this._trimAlignValue( curVal - step );
|
||||
break;
|
||||
}
|
||||
|
||||
self._slide( event, index, newVal );
|
||||
this._slide( event, index, newVal );
|
||||
},
|
||||
keyup: function( event ) {
|
||||
var index = $( event.target ).data( "ui-slider-handle-index" );
|
||||
|
||||
return ret;
|
||||
|
||||
})
|
||||
.keyup(function( event ) {
|
||||
var index = $( this ).data( "index.ui-slider-handle" );
|
||||
|
||||
if ( self._keySliding ) {
|
||||
self._keySliding = false;
|
||||
self._stop( event, index );
|
||||
self._change( event, index );
|
||||
$( this ).removeClass( "ui-state-active" );
|
||||
if ( this._keySliding ) {
|
||||
this._keySliding = false;
|
||||
this._stop( event, index );
|
||||
this._change( event, index );
|
||||
$( event.target ).removeClass( "ui-state-active" );
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
this._refreshValue();
|
||||
|
|
@ -205,7 +196,7 @@ $.widget( "ui.slider", $.ui.mouse, {
|
|||
this._animateOff = false;
|
||||
},
|
||||
|
||||
destroy: function() {
|
||||
_destroy: function() {
|
||||
this.handles.remove();
|
||||
this.range.remove();
|
||||
|
||||
|
|
@ -216,26 +207,15 @@ $.widget( "ui.slider", $.ui.mouse, {
|
|||
" ui-slider-disabled" +
|
||||
" ui-widget" +
|
||||
" ui-widget-content" +
|
||||
" ui-corner-all" )
|
||||
.removeData( "slider" )
|
||||
.unbind( ".slider" );
|
||||
" ui-corner-all" );
|
||||
|
||||
this._mouseDestroy();
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
_mouseCapture: function( event ) {
|
||||
var o = this.options,
|
||||
position,
|
||||
normValue,
|
||||
distance,
|
||||
closestHandle,
|
||||
self,
|
||||
index,
|
||||
allowed,
|
||||
offset,
|
||||
mouseOverHandle;
|
||||
var position, normValue, distance, closestHandle, index, allowed, offset, mouseOverHandle,
|
||||
that = this,
|
||||
o = this.options;
|
||||
|
||||
if ( o.disabled ) {
|
||||
return false;
|
||||
|
|
@ -250,9 +230,8 @@ $.widget( "ui.slider", $.ui.mouse, {
|
|||
position = { x: event.pageX, y: event.pageY };
|
||||
normValue = this._normValueFromMouse( position );
|
||||
distance = this._valueMax() - this._valueMin() + 1;
|
||||
self = this;
|
||||
this.handles.each(function( i ) {
|
||||
var thisDistance = Math.abs( normValue - self.values(i) );
|
||||
var thisDistance = Math.abs( normValue - that.values(i) );
|
||||
if ( distance > thisDistance ) {
|
||||
distance = thisDistance;
|
||||
closestHandle = $( this );
|
||||
|
|
@ -274,7 +253,7 @@ $.widget( "ui.slider", $.ui.mouse, {
|
|||
}
|
||||
this._mouseSliding = true;
|
||||
|
||||
self._handleIndex = index;
|
||||
this._handleIndex = index;
|
||||
|
||||
closestHandle
|
||||
.addClass( "ui-state-active" )
|
||||
|
|
@ -502,10 +481,10 @@ $.widget( "ui.slider", $.ui.mouse, {
|
|||
if ( value ) {
|
||||
this.handles.filter( ".ui-state-focus" ).blur();
|
||||
this.handles.removeClass( "ui-state-hover" );
|
||||
this.handles.propAttr( "disabled", true );
|
||||
this.handles.prop( "disabled", true );
|
||||
this.element.addClass( "ui-disabled" );
|
||||
} else {
|
||||
this.handles.propAttr( "disabled", false );
|
||||
this.handles.prop( "disabled", false );
|
||||
this.element.removeClass( "ui-disabled" );
|
||||
}
|
||||
break;
|
||||
|
|
@ -597,36 +576,32 @@ $.widget( "ui.slider", $.ui.mouse, {
|
|||
},
|
||||
|
||||
_refreshValue: function() {
|
||||
var oRange = this.options.range,
|
||||
var lastValPercent, valPercent, value, valueMin, valueMax,
|
||||
oRange = this.options.range,
|
||||
o = this.options,
|
||||
self = this,
|
||||
that = this,
|
||||
animate = ( !this._animateOff ) ? o.animate : false,
|
||||
valPercent,
|
||||
_set = {},
|
||||
lastValPercent,
|
||||
value,
|
||||
valueMin,
|
||||
valueMax;
|
||||
_set = {};
|
||||
|
||||
if ( this.options.values && this.options.values.length ) {
|
||||
this.handles.each(function( i, j ) {
|
||||
valPercent = ( self.values(i) - self._valueMin() ) / ( self._valueMax() - self._valueMin() ) * 100;
|
||||
_set[ self.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
|
||||
valPercent = ( that.values(i) - that._valueMin() ) / ( that._valueMax() - that._valueMin() ) * 100;
|
||||
_set[ that.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
|
||||
$( this ).stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
|
||||
if ( self.options.range === true ) {
|
||||
if ( self.orientation === "horizontal" ) {
|
||||
if ( that.options.range === true ) {
|
||||
if ( that.orientation === "horizontal" ) {
|
||||
if ( i === 0 ) {
|
||||
self.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { left: valPercent + "%" }, o.animate );
|
||||
that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { left: valPercent + "%" }, o.animate );
|
||||
}
|
||||
if ( i === 1 ) {
|
||||
self.range[ animate ? "animate" : "css" ]( { width: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } );
|
||||
that.range[ animate ? "animate" : "css" ]( { width: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } );
|
||||
}
|
||||
} else {
|
||||
if ( i === 0 ) {
|
||||
self.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { bottom: ( valPercent ) + "%" }, o.animate );
|
||||
that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { bottom: ( valPercent ) + "%" }, o.animate );
|
||||
}
|
||||
if ( i === 1 ) {
|
||||
self.range[ animate ? "animate" : "css" ]( { height: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } );
|
||||
that.range[ animate ? "animate" : "css" ]( { height: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -639,7 +614,7 @@ $.widget( "ui.slider", $.ui.mouse, {
|
|||
valPercent = ( valueMax !== valueMin ) ?
|
||||
( value - valueMin ) / ( valueMax - valueMin ) * 100 :
|
||||
0;
|
||||
_set[ self.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
|
||||
_set[ this.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
|
||||
this.handle.stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
|
||||
|
||||
if ( oRange === "min" && this.orientation === "horizontal" ) {
|
||||
|
|
@ -659,8 +634,4 @@ $.widget( "ui.slider", $.ui.mouse, {
|
|||
|
||||
});
|
||||
|
||||
$.extend( $.ui.slider, {
|
||||
version: "1.8.16"
|
||||
});
|
||||
|
||||
}(jQuery));
|
||||
|
|
|
|||
190
themes/default/js/ui/jquery.ui.sortable.js
vendored
190
themes/default/js/ui/jquery.ui.sortable.js
vendored
|
|
@ -1,11 +1,12 @@
|
|||
/*
|
||||
* jQuery UI Sortable 1.8.16
|
||||
/*!
|
||||
* jQuery UI Sortable 1.9.0
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Sortables
|
||||
* http://api.jqueryui.com/sortable/
|
||||
*
|
||||
* Depends:
|
||||
* jquery.ui.core.js
|
||||
|
|
@ -15,7 +16,9 @@
|
|||
(function( $, undefined ) {
|
||||
|
||||
$.widget("ui.sortable", $.ui.mouse, {
|
||||
version: "1.9.0",
|
||||
widgetEventPrefix: "sort",
|
||||
ready: false,
|
||||
options: {
|
||||
appendTo: "parent",
|
||||
axis: false,
|
||||
|
|
@ -58,17 +61,18 @@ $.widget("ui.sortable", $.ui.mouse, {
|
|||
//Initialize mouse events for interaction
|
||||
this._mouseInit();
|
||||
|
||||
//We're ready to go
|
||||
this.ready = true
|
||||
|
||||
},
|
||||
|
||||
destroy: function() {
|
||||
_destroy: function() {
|
||||
this.element
|
||||
.removeClass("ui-sortable ui-sortable-disabled")
|
||||
.removeData("sortable")
|
||||
.unbind(".sortable");
|
||||
.removeClass("ui-sortable ui-sortable-disabled");
|
||||
this._mouseDestroy();
|
||||
|
||||
for ( var i = this.items.length - 1; i >= 0; i-- )
|
||||
this.items[i].item.removeData("sortable-item");
|
||||
this.items[i].item.removeData(this.widgetName + "-item");
|
||||
|
||||
return this;
|
||||
},
|
||||
|
|
@ -77,8 +81,7 @@ $.widget("ui.sortable", $.ui.mouse, {
|
|||
if ( key === "disabled" ) {
|
||||
this.options[ key ] = value;
|
||||
|
||||
this.widget()
|
||||
[ value ? "addClass" : "removeClass"]( "ui-sortable-disabled" );
|
||||
this.widget().toggleClass( "ui-sortable-disabled", !!value );
|
||||
} else {
|
||||
// Don't call widget base _setOption for disable as it adds ui-state-disabled class
|
||||
$.Widget.prototype._setOption.apply(this, arguments);
|
||||
|
|
@ -86,6 +89,7 @@ $.widget("ui.sortable", $.ui.mouse, {
|
|||
},
|
||||
|
||||
_mouseCapture: function(event, overrideHandle) {
|
||||
var that = this;
|
||||
|
||||
if (this.reverting) {
|
||||
return false;
|
||||
|
|
@ -97,13 +101,13 @@ $.widget("ui.sortable", $.ui.mouse, {
|
|||
this._refreshItems(event);
|
||||
|
||||
//Find out if the clicked node (or one of its parents) is a actual item in this.items
|
||||
var currentItem = null, self = this, nodes = $(event.target).parents().each(function() {
|
||||
if($.data(this, 'sortable-item') == self) {
|
||||
var currentItem = null, nodes = $(event.target).parents().each(function() {
|
||||
if($.data(this, that.widgetName + '-item') == that) {
|
||||
currentItem = $(this);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
if($.data(event.target, 'sortable-item') == self) currentItem = $(event.target);
|
||||
if($.data(event.target, that.widgetName + '-item') == that) currentItem = $(event.target);
|
||||
|
||||
if(!currentItem) return false;
|
||||
if(this.options.handle && !overrideHandle) {
|
||||
|
|
@ -121,7 +125,7 @@ $.widget("ui.sortable", $.ui.mouse, {
|
|||
|
||||
_mouseStart: function(event, overrideHandle, noActivation) {
|
||||
|
||||
var o = this.options, self = this;
|
||||
var o = this.options;
|
||||
this.currentContainer = this;
|
||||
|
||||
//We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture
|
||||
|
|
@ -151,11 +155,6 @@ $.widget("ui.sortable", $.ui.mouse, {
|
|||
left: this.offset.left - this.margins.left
|
||||
};
|
||||
|
||||
// Only after we got the offset, we can change the helper's position to absolute
|
||||
// TODO: Still need to figure out a way to make relative sorting possible
|
||||
this.helper.css("position", "absolute");
|
||||
this.cssPosition = this.helper.css("position");
|
||||
|
||||
$.extend(this.offset, {
|
||||
click: { //Where the click happened, relative to the element
|
||||
left: event.pageX - this.offset.left,
|
||||
|
|
@ -165,6 +164,11 @@ $.widget("ui.sortable", $.ui.mouse, {
|
|||
relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper
|
||||
});
|
||||
|
||||
// Only after we got the offset, we can change the helper's position to absolute
|
||||
// TODO: Still need to figure out a way to make relative sorting possible
|
||||
this.helper.css("position", "absolute");
|
||||
this.cssPosition = this.helper.css("position");
|
||||
|
||||
//Generate the original position
|
||||
this.originalPosition = this._generatePosition(event);
|
||||
this.originalPageX = event.pageX;
|
||||
|
|
@ -217,7 +221,7 @@ $.widget("ui.sortable", $.ui.mouse, {
|
|||
|
||||
//Post 'activate' events to possible containers
|
||||
if(!noActivation) {
|
||||
for (var i = this.containers.length - 1; i >= 0; i--) { this.containers[i]._trigger("activate", event, self._uiHash(this)); }
|
||||
for (var i = this.containers.length - 1; i >= 0; i--) { this.containers[i]._trigger("activate", event, this._uiHash(this)); }
|
||||
}
|
||||
|
||||
//Prepare possible droppables
|
||||
|
|
@ -292,10 +296,19 @@ $.widget("ui.sortable", $.ui.mouse, {
|
|||
var item = this.items[i], itemElement = item.item[0], intersection = this._intersectsWithPointer(item);
|
||||
if (!intersection) continue;
|
||||
|
||||
if(itemElement != this.currentItem[0] //cannot intersect with itself
|
||||
// Only put the placeholder inside the current Container, skip all
|
||||
// items form other containers. This works because when moving
|
||||
// an item from one container to another the
|
||||
// currentContainer is switched before the placeholder is moved.
|
||||
//
|
||||
// Without this moving items in "sub-sortables" can cause the placeholder to jitter
|
||||
// beetween the outer and inner container.
|
||||
if (item.instance !== this.currentContainer) continue;
|
||||
|
||||
if (itemElement != this.currentItem[0] //cannot intersect with itself
|
||||
&& this.placeholder[intersection == 1 ? "next" : "prev"]()[0] != itemElement //no useless actions that have been done before
|
||||
&& !$.ui.contains(this.placeholder[0], itemElement) //no action if the item moved is the parent of the item checked
|
||||
&& (this.options.type == 'semi-dynamic' ? !$.ui.contains(this.element[0], itemElement) : true)
|
||||
&& !$.contains(this.placeholder[0], itemElement) //no action if the item moved is the parent of the item checked
|
||||
&& (this.options.type == 'semi-dynamic' ? !$.contains(this.element[0], itemElement) : true)
|
||||
//&& itemElement.parentNode == this.placeholder[0].parentNode // only rearrange items within the same container
|
||||
) {
|
||||
|
||||
|
|
@ -335,16 +348,16 @@ $.widget("ui.sortable", $.ui.mouse, {
|
|||
$.ui.ddmanager.drop(this, event);
|
||||
|
||||
if(this.options.revert) {
|
||||
var self = this;
|
||||
var cur = self.placeholder.offset();
|
||||
var that = this;
|
||||
var cur = this.placeholder.offset();
|
||||
|
||||
self.reverting = true;
|
||||
this.reverting = true;
|
||||
|
||||
$(this.helper).animate({
|
||||
left: cur.left - this.offset.parent.left - self.margins.left + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollLeft),
|
||||
top: cur.top - this.offset.parent.top - self.margins.top + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollTop)
|
||||
left: cur.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollLeft),
|
||||
top: cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollTop)
|
||||
}, parseInt(this.options.revert, 10) || 500, function() {
|
||||
self._clear(event);
|
||||
that._clear(event);
|
||||
});
|
||||
} else {
|
||||
this._clear(event, noPropagation);
|
||||
|
|
@ -356,8 +369,6 @@ $.widget("ui.sortable", $.ui.mouse, {
|
|||
|
||||
cancel: function() {
|
||||
|
||||
var self = this;
|
||||
|
||||
if(this.dragging) {
|
||||
|
||||
this._mouseUp({ target: null });
|
||||
|
|
@ -369,9 +380,9 @@ $.widget("ui.sortable", $.ui.mouse, {
|
|||
|
||||
//Post deactivating events to containers
|
||||
for (var i = this.containers.length - 1; i >= 0; i--){
|
||||
this.containers[i]._trigger("deactivate", null, self._uiHash(this));
|
||||
this.containers[i]._trigger("deactivate", null, this._uiHash(this));
|
||||
if(this.containers[i].containerCache.over) {
|
||||
this.containers[i]._trigger("out", null, self._uiHash(this));
|
||||
this.containers[i]._trigger("out", null, this._uiHash(this));
|
||||
this.containers[i].containerCache.over = 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -464,8 +475,8 @@ $.widget("ui.sortable", $.ui.mouse, {
|
|||
|
||||
_intersectsWithPointer: function(item) {
|
||||
|
||||
var isOverElementHeight = $.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height),
|
||||
isOverElementWidth = $.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width),
|
||||
var isOverElementHeight = (this.options.axis === 'x') || $.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height),
|
||||
isOverElementWidth = (this.options.axis === 'y') || $.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width),
|
||||
isOverElement = isOverElementHeight && isOverElementWidth,
|
||||
verticalDirection = this._getDragVerticalDirection(),
|
||||
horizontalDirection = this._getDragHorizontalDirection();
|
||||
|
|
@ -519,7 +530,6 @@ $.widget("ui.sortable", $.ui.mouse, {
|
|||
|
||||
_getItemsAsjQuery: function(connected) {
|
||||
|
||||
var self = this;
|
||||
var items = [];
|
||||
var queries = [];
|
||||
var connectWith = this._connectWith();
|
||||
|
|
@ -528,7 +538,7 @@ $.widget("ui.sortable", $.ui.mouse, {
|
|||
for (var i = connectWith.length - 1; i >= 0; i--){
|
||||
var cur = $(connectWith[i]);
|
||||
for (var j = cur.length - 1; j >= 0; j--){
|
||||
var inst = $.data(cur[j], 'sortable');
|
||||
var inst = $.data(cur[j], this.widgetName);
|
||||
if(inst && inst != this && !inst.options.disabled) {
|
||||
queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element).not(".ui-sortable-helper").not('.ui-sortable-placeholder'), inst]);
|
||||
}
|
||||
|
|
@ -550,7 +560,7 @@ $.widget("ui.sortable", $.ui.mouse, {
|
|||
|
||||
_removeCurrentsFromItems: function() {
|
||||
|
||||
var list = this.currentItem.find(":data(sortable-item)");
|
||||
var list = this.currentItem.find(":data(" + this.widgetName + "-item)");
|
||||
|
||||
for (var i=0; i < this.items.length; i++) {
|
||||
|
||||
|
|
@ -568,15 +578,14 @@ $.widget("ui.sortable", $.ui.mouse, {
|
|||
this.items = [];
|
||||
this.containers = [this];
|
||||
var items = this.items;
|
||||
var self = this;
|
||||
var queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]];
|
||||
var connectWith = this._connectWith();
|
||||
|
||||
if(connectWith) {
|
||||
if(connectWith && this.ready) { //Shouldn't be run the first time through due to massive slow-down
|
||||
for (var i = connectWith.length - 1; i >= 0; i--){
|
||||
var cur = $(connectWith[i]);
|
||||
for (var j = cur.length - 1; j >= 0; j--){
|
||||
var inst = $.data(cur[j], 'sortable');
|
||||
var inst = $.data(cur[j], this.widgetName);
|
||||
if(inst && inst != this && !inst.options.disabled) {
|
||||
queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]);
|
||||
this.containers.push(inst);
|
||||
|
|
@ -592,7 +601,7 @@ $.widget("ui.sortable", $.ui.mouse, {
|
|||
for (var j=0, queriesLength = _queries.length; j < queriesLength; j++) {
|
||||
var item = $(_queries[j]);
|
||||
|
||||
item.data('sortable-item', targetData); // Data for target checking (mouse manager)
|
||||
item.data(this.widgetName + '-item', targetData); // Data for target checking (mouse manager)
|
||||
|
||||
items.push({
|
||||
item: item,
|
||||
|
|
@ -647,16 +656,16 @@ $.widget("ui.sortable", $.ui.mouse, {
|
|||
},
|
||||
|
||||
_createPlaceholder: function(that) {
|
||||
|
||||
var self = that || this, o = self.options;
|
||||
that = that || this;
|
||||
var o = that.options;
|
||||
|
||||
if(!o.placeholder || o.placeholder.constructor == String) {
|
||||
var className = o.placeholder;
|
||||
o.placeholder = {
|
||||
element: function() {
|
||||
|
||||
var el = $(document.createElement(self.currentItem[0].nodeName))
|
||||
.addClass(className || self.currentItem[0].className+" ui-sortable-placeholder")
|
||||
var el = $(document.createElement(that.currentItem[0].nodeName))
|
||||
.addClass(className || that.currentItem[0].className+" ui-sortable-placeholder")
|
||||
.removeClass("ui-sortable-helper")[0];
|
||||
|
||||
if(!className)
|
||||
|
|
@ -671,20 +680,20 @@ $.widget("ui.sortable", $.ui.mouse, {
|
|||
if(className && !o.forcePlaceholderSize) return;
|
||||
|
||||
//If the element doesn't have a actual height by itself (without styles coming from a stylesheet), it receives the inline height from the dragged item
|
||||
if(!p.height()) { p.height(self.currentItem.innerHeight() - parseInt(self.currentItem.css('paddingTop')||0, 10) - parseInt(self.currentItem.css('paddingBottom')||0, 10)); };
|
||||
if(!p.width()) { p.width(self.currentItem.innerWidth() - parseInt(self.currentItem.css('paddingLeft')||0, 10) - parseInt(self.currentItem.css('paddingRight')||0, 10)); };
|
||||
if(!p.height()) { p.height(that.currentItem.innerHeight() - parseInt(that.currentItem.css('paddingTop')||0, 10) - parseInt(that.currentItem.css('paddingBottom')||0, 10)); };
|
||||
if(!p.width()) { p.width(that.currentItem.innerWidth() - parseInt(that.currentItem.css('paddingLeft')||0, 10) - parseInt(that.currentItem.css('paddingRight')||0, 10)); };
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
//Create the placeholder
|
||||
self.placeholder = $(o.placeholder.element.call(self.element, self.currentItem));
|
||||
that.placeholder = $(o.placeholder.element.call(that.element, that.currentItem));
|
||||
|
||||
//Append it after the actual current item
|
||||
self.currentItem.after(self.placeholder);
|
||||
that.currentItem.after(that.placeholder);
|
||||
|
||||
//Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317)
|
||||
o.placeholder.update(self, self.placeholder);
|
||||
o.placeholder.update(that, that.placeholder);
|
||||
|
||||
},
|
||||
|
||||
|
|
@ -697,13 +706,13 @@ $.widget("ui.sortable", $.ui.mouse, {
|
|||
for (var i = this.containers.length - 1; i >= 0; i--){
|
||||
|
||||
// never consider a container that's located within the item itself
|
||||
if($.ui.contains(this.currentItem[0], this.containers[i].element[0]))
|
||||
if($.contains(this.currentItem[0], this.containers[i].element[0]))
|
||||
continue;
|
||||
|
||||
if(this._intersectsWith(this.containers[i].containerCache)) {
|
||||
|
||||
// if we've already found a container and it's more "inner" than this, then continue
|
||||
if(innermostContainer && $.ui.contains(this.containers[i].element[0], innermostContainer.element[0]))
|
||||
if(innermostContainer && $.contains(this.containers[i].element[0], innermostContainer.element[0]))
|
||||
continue;
|
||||
|
||||
innermostContainer = this.containers[i];
|
||||
|
|
@ -731,10 +740,11 @@ $.widget("ui.sortable", $.ui.mouse, {
|
|||
//When entering a new container, we will find the item with the least distance and append our item near it
|
||||
var dist = 10000; var itemWithLeastDistance = null; var base = this.positionAbs[this.containers[innermostIndex].floating ? 'left' : 'top'];
|
||||
for (var j = this.items.length - 1; j >= 0; j--) {
|
||||
if(!$.ui.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) continue;
|
||||
var cur = this.items[j][this.containers[innermostIndex].floating ? 'left' : 'top'];
|
||||
if(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) continue;
|
||||
var cur = this.containers[innermostIndex].floating ? this.items[j].item.offset().left : this.items[j].item.offset().top;
|
||||
if(Math.abs(cur - base) < dist) {
|
||||
dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j];
|
||||
this.direction = (cur - base > 0) ? 'down' : 'up';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -806,7 +816,7 @@ $.widget("ui.sortable", $.ui.mouse, {
|
|||
// 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
|
||||
// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
|
||||
// the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
|
||||
if(this.cssPosition == 'absolute' && this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) {
|
||||
if(this.cssPosition == 'absolute' && this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) {
|
||||
po.left += this.scrollParent.scrollLeft();
|
||||
po.top += this.scrollParent.scrollTop();
|
||||
}
|
||||
|
|
@ -880,20 +890,20 @@ $.widget("ui.sortable", $.ui.mouse, {
|
|||
|
||||
if(!pos) pos = this.position;
|
||||
var mod = d == "absolute" ? 1 : -1;
|
||||
var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
|
||||
var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
|
||||
|
||||
return {
|
||||
top: (
|
||||
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)
|
||||
- ( ( 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)
|
||||
- ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
|
||||
)
|
||||
};
|
||||
|
||||
|
|
@ -901,7 +911,7 @@ $.widget("ui.sortable", $.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);
|
||||
var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.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
|
||||
|
|
@ -944,14 +954,14 @@ $.widget("ui.sortable", $.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() ) ))
|
||||
+ ( ( 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() ))
|
||||
+ ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
|
||||
)
|
||||
};
|
||||
|
||||
|
|
@ -967,11 +977,11 @@ $.widget("ui.sortable", $.ui.mouse, {
|
|||
// 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same
|
||||
// 4. this lets only the last addition to the timeout stack through
|
||||
this.counter = this.counter ? ++this.counter : 1;
|
||||
var self = this, counter = this.counter;
|
||||
var counter = this.counter;
|
||||
|
||||
window.setTimeout(function() {
|
||||
if(counter == self.counter) self.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove
|
||||
},0);
|
||||
this._delay(function() {
|
||||
if(counter == this.counter) this.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
|
|
@ -980,7 +990,7 @@ $.widget("ui.sortable", $.ui.mouse, {
|
|||
this.reverting = false;
|
||||
// We delay all events that have to be triggered to after the point where the placeholder has been removed and
|
||||
// everything else normalized again
|
||||
var delayedTriggers = [], self = this;
|
||||
var delayedTriggers = [];
|
||||
|
||||
// We first have to update the dom position of the actual currentItem
|
||||
// Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088)
|
||||
|
|
@ -998,15 +1008,17 @@ $.widget("ui.sortable", $.ui.mouse, {
|
|||
|
||||
if(this.fromOutside && !noPropagation) delayedTriggers.push(function(event) { this._trigger("receive", event, this._uiHash(this.fromOutside)); });
|
||||
if((this.fromOutside || this.domPosition.prev != this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent != this.currentItem.parent()[0]) && !noPropagation) delayedTriggers.push(function(event) { this._trigger("update", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed
|
||||
if(!$.ui.contains(this.element[0], this.currentItem[0])) { //Node was moved out of the current element
|
||||
if(!noPropagation) delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); });
|
||||
for (var i = this.containers.length - 1; i >= 0; i--){
|
||||
if($.ui.contains(this.containers[i].element[0], this.currentItem[0]) && !noPropagation) {
|
||||
delayedTriggers.push((function(c) { return function(event) { c._trigger("receive", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
|
||||
delayedTriggers.push((function(c) { return function(event) { c._trigger("update", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
|
||||
|
||||
// Check if the items Container has Changed and trigger appropriate
|
||||
// events.
|
||||
if (this !== this.currentContainer) {
|
||||
if(!noPropagation) {
|
||||
delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); });
|
||||
delayedTriggers.push((function(c) { return function(event) { c._trigger("receive", event, this._uiHash(this)); }; }).call(this, this.currentContainer));
|
||||
delayedTriggers.push((function(c) { return function(event) { c._trigger("update", event, this._uiHash(this)); }; }).call(this, this.currentContainer));
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
//Post events to containers
|
||||
for (var i = this.containers.length - 1; i >= 0; i--){
|
||||
|
|
@ -1029,6 +1041,8 @@ $.widget("ui.sortable", $.ui.mouse, {
|
|||
for (var i=0; i < delayedTriggers.length; i++) { delayedTriggers[i].call(this, event); }; //Trigger all delayed events
|
||||
this._trigger("stop", event, this._uiHash());
|
||||
}
|
||||
|
||||
this.fromOutside = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -1055,23 +1069,19 @@ $.widget("ui.sortable", $.ui.mouse, {
|
|||
}
|
||||
},
|
||||
|
||||
_uiHash: function(inst) {
|
||||
var self = inst || this;
|
||||
_uiHash: function(_inst) {
|
||||
var inst = _inst || this;
|
||||
return {
|
||||
helper: self.helper,
|
||||
placeholder: self.placeholder || $([]),
|
||||
position: self.position,
|
||||
originalPosition: self.originalPosition,
|
||||
offset: self.positionAbs,
|
||||
item: self.currentItem,
|
||||
sender: inst ? inst.element : null
|
||||
helper: inst.helper,
|
||||
placeholder: inst.placeholder || $([]),
|
||||
position: inst.position,
|
||||
originalPosition: inst.originalPosition,
|
||||
offset: inst.positionAbs,
|
||||
item: inst.currentItem,
|
||||
sender: _inst ? _inst.element : null
|
||||
};
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$.extend($.ui.sortable, {
|
||||
version: "1.8.16"
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
|
|
|
|||
1866
themes/default/js/ui/jquery.ui.tabs.js
vendored
1866
themes/default/js/ui/jquery.ui.tabs.js
vendored
File diff suppressed because it is too large
Load diff
468
themes/default/js/ui/jquery.ui.widget.js
vendored
468
themes/default/js/ui/jquery.ui.widget.js
vendored
|
|
@ -1,18 +1,19 @@
|
|||
/*!
|
||||
* jQuery UI Widget 1.8.16
|
||||
* jQuery UI Widget 1.9.0
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Widget
|
||||
* http://api.jqueryui.com/jQuery.widget/
|
||||
*/
|
||||
(function( $, undefined ) {
|
||||
|
||||
// jQuery 1.4+
|
||||
if ( $.cleanData ) {
|
||||
var _cleanData = $.cleanData;
|
||||
$.cleanData = function( elems ) {
|
||||
var uuid = 0,
|
||||
slice = Array.prototype.slice,
|
||||
_cleanData = $.cleanData;
|
||||
$.cleanData = function( elems ) {
|
||||
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
|
||||
try {
|
||||
$( elem ).triggerHandler( "remove" );
|
||||
|
|
@ -20,29 +21,12 @@ if ( $.cleanData ) {
|
|||
} catch( e ) {}
|
||||
}
|
||||
_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() {
|
||||
try {
|
||||
$( this ).triggerHandler( "remove" );
|
||||
// http://bugs.jquery.com/ticket/8235
|
||||
} catch( e ) {}
|
||||
});
|
||||
}
|
||||
}
|
||||
return _remove.call( $(this), selector, keepData );
|
||||
});
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
$.widget = function( name, base, prototype ) {
|
||||
var namespace = name.split( "." )[ 0 ],
|
||||
fullName;
|
||||
var fullName, existingConstructor, constructor, basePrototype,
|
||||
namespace = name.split( "." )[ 0 ];
|
||||
|
||||
name = name.split( "." )[ 1 ];
|
||||
fullName = namespace + "-" + name;
|
||||
|
||||
|
|
@ -52,81 +36,158 @@ $.widget = function( name, base, prototype ) {
|
|||
}
|
||||
|
||||
// create selector for plugin
|
||||
$.expr[ ":" ][ fullName ] = function( elem ) {
|
||||
return !!$.data( elem, name );
|
||||
$.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) {
|
||||
return !!$.data( elem, fullName );
|
||||
};
|
||||
|
||||
$[ namespace ] = $[ namespace ] || {};
|
||||
$[ namespace ][ name ] = function( options, element ) {
|
||||
existingConstructor = $[ namespace ][ name ];
|
||||
constructor = $[ namespace ][ name ] = function( options, element ) {
|
||||
// allow instantiation without "new" keyword
|
||||
if ( !this._createWidget ) {
|
||||
return new constructor( options, element );
|
||||
}
|
||||
|
||||
// allow instantiation without initializing for simple inheritance
|
||||
// must use "new" keyword (the code above always passes args)
|
||||
if ( arguments.length ) {
|
||||
this._createWidget( options, element );
|
||||
}
|
||||
};
|
||||
// extend with the existing constructor to carry over any static properties
|
||||
$.extend( constructor, existingConstructor, {
|
||||
version: prototype.version,
|
||||
// copy the object used to create the prototype in case we need to
|
||||
// redefine the widget later
|
||||
_proto: $.extend( {}, prototype ),
|
||||
// track widgets that inherit from this widget in case this widget is
|
||||
// redefined after a widget inherits from it
|
||||
_childConstructors: []
|
||||
});
|
||||
|
||||
var basePrototype = new base();
|
||||
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, {
|
||||
basePrototype.options = $.widget.extend( {}, basePrototype.options );
|
||||
$.each( prototype, function( prop, value ) {
|
||||
if ( $.isFunction( value ) ) {
|
||||
prototype[ prop ] = (function() {
|
||||
var _super = function() {
|
||||
return base.prototype[ prop ].apply( this, arguments );
|
||||
},
|
||||
_superApply = function( args ) {
|
||||
return base.prototype[ prop ].apply( this, args );
|
||||
};
|
||||
return function() {
|
||||
var __super = this._super,
|
||||
__superApply = this._superApply,
|
||||
returnValue;
|
||||
|
||||
this._super = _super;
|
||||
this._superApply = _superApply;
|
||||
|
||||
returnValue = value.apply( this, arguments );
|
||||
|
||||
this._super = __super;
|
||||
this._superApply = __superApply;
|
||||
|
||||
return returnValue;
|
||||
};
|
||||
})();
|
||||
}
|
||||
});
|
||||
constructor.prototype = $.widget.extend( basePrototype, {
|
||||
// TODO: remove support for widgetEventPrefix
|
||||
// always use the name + a colon as the prefix, e.g., draggable:start
|
||||
// don't prefix for widgets that aren't DOM-based
|
||||
widgetEventPrefix: name
|
||||
}, prototype, {
|
||||
constructor: constructor,
|
||||
namespace: namespace,
|
||||
widgetName: name,
|
||||
widgetEventPrefix: $[ namespace ][ name ].prototype.widgetEventPrefix || name,
|
||||
widgetBaseClass: fullName
|
||||
}, prototype );
|
||||
// TODO remove widgetBaseClass, see #8155
|
||||
widgetBaseClass: fullName,
|
||||
widgetFullName: fullName
|
||||
});
|
||||
|
||||
$.widget.bridge( name, $[ namespace ][ name ] );
|
||||
// If this widget is being redefined then we need to find all widgets that
|
||||
// are inheriting from it and redefine all of them so that they inherit from
|
||||
// the new version of this widget. We're essentially trying to replace one
|
||||
// level in the prototype chain.
|
||||
if ( existingConstructor ) {
|
||||
$.each( existingConstructor._childConstructors, function( i, child ) {
|
||||
var childPrototype = child.prototype;
|
||||
|
||||
// redefine the child widget using the same prototype that was
|
||||
// originally used, but inherit from the new version of the base
|
||||
$.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto );
|
||||
});
|
||||
// remove the list of existing child constructors from the old constructor
|
||||
// so the old child constructors can be garbage collected
|
||||
delete existingConstructor._childConstructors;
|
||||
} else {
|
||||
base._childConstructors.push( constructor );
|
||||
}
|
||||
|
||||
$.widget.bridge( name, constructor );
|
||||
};
|
||||
|
||||
$.widget.extend = function( target ) {
|
||||
var input = slice.call( arguments, 1 ),
|
||||
inputIndex = 0,
|
||||
inputLength = input.length,
|
||||
key,
|
||||
value;
|
||||
for ( ; inputIndex < inputLength; inputIndex++ ) {
|
||||
for ( key in input[ inputIndex ] ) {
|
||||
value = input[ inputIndex ][ key ];
|
||||
if (input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {
|
||||
target[ key ] = $.isPlainObject( value ) ? $.widget.extend( {}, target[ key ], value ) : value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return target;
|
||||
};
|
||||
|
||||
$.widget.bridge = function( name, object ) {
|
||||
var fullName = object.prototype.widgetFullName;
|
||||
$.fn[ name ] = function( options ) {
|
||||
var isMethodCall = typeof options === "string",
|
||||
args = Array.prototype.slice.call( arguments, 1 ),
|
||||
args = 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) ) :
|
||||
$.widget.extend.apply( null, [ 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 );
|
||||
var methodValue,
|
||||
instance = $.data( this, fullName );
|
||||
if ( !instance ) {
|
||||
return $.error( "cannot call methods on " + name + " prior to initialization; " +
|
||||
"attempted to call method '" + options + "'" );
|
||||
}
|
||||
if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) {
|
||||
return $.error( "no such method '" + options + "' for " + name + " widget instance" );
|
||||
}
|
||||
methodValue = instance[ options ].apply( instance, args );
|
||||
if ( methodValue !== instance && methodValue !== undefined ) {
|
||||
returnValue = methodValue;
|
||||
returnValue = methodValue && methodValue.jquery ?
|
||||
returnValue.pushStack( methodValue.get() ) :
|
||||
methodValue;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.each(function() {
|
||||
var instance = $.data( this, name );
|
||||
var instance = $.data( this, fullName );
|
||||
if ( instance ) {
|
||||
instance.option( options || {} )._init();
|
||||
} else {
|
||||
$.data( this, name, new object( options, this ) );
|
||||
new object( options, this );
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -135,85 +196,132 @@ $.widget.bridge = function( name, object ) {
|
|||
};
|
||||
};
|
||||
|
||||
$.Widget = function( options, element ) {
|
||||
// allow instantiation without initializing for simple inheritance
|
||||
if ( arguments.length ) {
|
||||
this._createWidget( options, element );
|
||||
}
|
||||
};
|
||||
$.Widget = function( options, element ) {};
|
||||
$.Widget._childConstructors = [];
|
||||
|
||||
$.Widget.prototype = {
|
||||
widgetName: "widget",
|
||||
widgetEventPrefix: "",
|
||||
defaultElement: "<div>",
|
||||
options: {
|
||||
disabled: false
|
||||
disabled: false,
|
||||
|
||||
// callbacks
|
||||
create: null
|
||||
},
|
||||
_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 );
|
||||
element = $( element || this.defaultElement || this )[ 0 ];
|
||||
this.element = $( element );
|
||||
this.options = $.extend( true, {},
|
||||
this.uuid = uuid++;
|
||||
this.eventNamespace = "." + this.widgetName + this.uuid;
|
||||
this.options = $.widget.extend( {},
|
||||
this.options,
|
||||
this._getCreateOptions(),
|
||||
options );
|
||||
|
||||
var self = this;
|
||||
this.element.bind( "remove." + this.widgetName, function() {
|
||||
self.destroy();
|
||||
});
|
||||
this.bindings = $();
|
||||
this.hoverable = $();
|
||||
this.focusable = $();
|
||||
|
||||
if ( element !== this ) {
|
||||
// 1.9 BC for #7810
|
||||
// TODO remove dual storage
|
||||
$.data( element, this.widgetName, this );
|
||||
$.data( element, this.widgetFullName, this );
|
||||
this._on({ remove: "destroy" });
|
||||
this.document = $( element.style ?
|
||||
// element within the document
|
||||
element.ownerDocument :
|
||||
// element is window or document
|
||||
element.document || element );
|
||||
this.window = $( this.document[0].defaultView || this.document[0].parentWindow );
|
||||
}
|
||||
|
||||
this._create();
|
||||
this._trigger( "create" );
|
||||
this._trigger( "create", null, this._getCreateEventData() );
|
||||
this._init();
|
||||
},
|
||||
_getCreateOptions: function() {
|
||||
return $.metadata && $.metadata.get( this.element[0] )[ this.widgetName ];
|
||||
},
|
||||
_create: function() {},
|
||||
_init: function() {},
|
||||
_getCreateOptions: $.noop,
|
||||
_getCreateEventData: $.noop,
|
||||
_create: $.noop,
|
||||
_init: $.noop,
|
||||
|
||||
destroy: function() {
|
||||
this._destroy();
|
||||
// we can probably remove the unbind calls in 2.0
|
||||
// all event bindings should go through this._on()
|
||||
this.element
|
||||
.unbind( "." + this.widgetName )
|
||||
.removeData( this.widgetName );
|
||||
.unbind( this.eventNamespace )
|
||||
// 1.9 BC for #7810
|
||||
// TODO remove dual storage
|
||||
.removeData( this.widgetName )
|
||||
.removeData( this.widgetFullName )
|
||||
// support: jquery <1.6.3
|
||||
// http://bugs.jquery.com/ticket/9413
|
||||
.removeData( $.camelCase( this.widgetFullName ) );
|
||||
this.widget()
|
||||
.unbind( "." + this.widgetName )
|
||||
.unbind( this.eventNamespace )
|
||||
.removeAttr( "aria-disabled" )
|
||||
.removeClass(
|
||||
this.widgetBaseClass + "-disabled " +
|
||||
this.widgetFullName + "-disabled " +
|
||||
"ui-state-disabled" );
|
||||
|
||||
// clean up events and states
|
||||
this.bindings.unbind( this.eventNamespace );
|
||||
this.hoverable.removeClass( "ui-state-hover" );
|
||||
this.focusable.removeClass( "ui-state-focus" );
|
||||
},
|
||||
_destroy: $.noop,
|
||||
|
||||
widget: function() {
|
||||
return this.element;
|
||||
},
|
||||
|
||||
option: function( key, value ) {
|
||||
var options = key;
|
||||
var options = key,
|
||||
parts,
|
||||
curOption,
|
||||
i;
|
||||
|
||||
if ( arguments.length === 0 ) {
|
||||
// don't return a reference to the internal hash
|
||||
return $.extend( {}, this.options );
|
||||
return $.widget.extend( {}, this.options );
|
||||
}
|
||||
|
||||
if (typeof key === "string" ) {
|
||||
if ( value === undefined ) {
|
||||
return this.options[ key ];
|
||||
}
|
||||
if ( typeof key === "string" ) {
|
||||
// handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
|
||||
options = {};
|
||||
parts = key.split( "." );
|
||||
key = parts.shift();
|
||||
if ( parts.length ) {
|
||||
curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );
|
||||
for ( i = 0; i < parts.length - 1; i++ ) {
|
||||
curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
|
||||
curOption = curOption[ parts[ i ] ];
|
||||
}
|
||||
key = parts.pop();
|
||||
if ( value === undefined ) {
|
||||
return curOption[ key ] === undefined ? null : curOption[ key ];
|
||||
}
|
||||
curOption[ key ] = value;
|
||||
} else {
|
||||
if ( value === undefined ) {
|
||||
return this.options[ key ] === undefined ? null : this.options[ key ];
|
||||
}
|
||||
options[ key ] = value;
|
||||
}
|
||||
}
|
||||
|
||||
this._setOptions( options );
|
||||
|
||||
return this;
|
||||
},
|
||||
_setOptions: function( options ) {
|
||||
var self = this;
|
||||
$.each( options, function( key, value ) {
|
||||
self._setOption( key, value );
|
||||
});
|
||||
var key;
|
||||
|
||||
for ( key in options ) {
|
||||
this._setOption( key, options[ key ] );
|
||||
}
|
||||
|
||||
return this;
|
||||
},
|
||||
|
|
@ -222,10 +330,10 @@ $.Widget.prototype = {
|
|||
|
||||
if ( key === "disabled" ) {
|
||||
this.widget()
|
||||
[ value ? "addClass" : "removeClass"](
|
||||
this.widgetBaseClass + "-disabled" + " " +
|
||||
"ui-state-disabled" )
|
||||
.toggleClass( this.widgetFullName + "-disabled ui-state-disabled", !!value )
|
||||
.attr( "aria-disabled", value );
|
||||
this.hoverable.removeClass( "ui-state-hover" );
|
||||
this.focusable.removeClass( "ui-state-focus" );
|
||||
}
|
||||
|
||||
return this;
|
||||
|
|
@ -238,31 +346,157 @@ $.Widget.prototype = {
|
|||
return this._setOption( "disabled", true );
|
||||
},
|
||||
|
||||
_trigger: function( type, event, data ) {
|
||||
var callback = this.options[ type ];
|
||||
_on: function( element, handlers ) {
|
||||
// no element argument, shuffle and use this.element
|
||||
if ( !handlers ) {
|
||||
handlers = element;
|
||||
element = this.element;
|
||||
} else {
|
||||
// accept selectors, DOM elements
|
||||
element = $( element );
|
||||
this.bindings = this.bindings.add( element );
|
||||
}
|
||||
|
||||
var instance = this;
|
||||
$.each( handlers, function( event, handler ) {
|
||||
function handlerProxy() {
|
||||
// allow widgets to customize the disabled handling
|
||||
// - disabled as an array instead of boolean
|
||||
// - disabled class as method for disabling individual parts
|
||||
if ( instance.options.disabled === true ||
|
||||
$( this ).hasClass( "ui-state-disabled" ) ) {
|
||||
return;
|
||||
}
|
||||
return ( typeof handler === "string" ? instance[ handler ] : handler )
|
||||
.apply( instance, arguments );
|
||||
}
|
||||
|
||||
// copy the guid so direct unbinding works
|
||||
if ( typeof handler !== "string" ) {
|
||||
handlerProxy.guid = handler.guid =
|
||||
handler.guid || handlerProxy.guid || $.guid++;
|
||||
}
|
||||
|
||||
var match = event.match( /^(\w+)\s*(.*)$/ ),
|
||||
eventName = match[1] + instance.eventNamespace,
|
||||
selector = match[2];
|
||||
if ( selector ) {
|
||||
instance.widget().delegate( selector, eventName, handlerProxy );
|
||||
} else {
|
||||
element.bind( eventName, handlerProxy );
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
_off: function( element, eventName ) {
|
||||
eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace;
|
||||
element.unbind( eventName ).undelegate( eventName );
|
||||
},
|
||||
|
||||
_delay: function( handler, delay ) {
|
||||
function handlerProxy() {
|
||||
return ( typeof handler === "string" ? instance[ handler ] : handler )
|
||||
.apply( instance, arguments );
|
||||
}
|
||||
var instance = this;
|
||||
return setTimeout( handlerProxy, delay || 0 );
|
||||
},
|
||||
|
||||
_hoverable: function( element ) {
|
||||
this.hoverable = this.hoverable.add( element );
|
||||
this._on( element, {
|
||||
mouseenter: function( event ) {
|
||||
$( event.currentTarget ).addClass( "ui-state-hover" );
|
||||
},
|
||||
mouseleave: function( event ) {
|
||||
$( event.currentTarget ).removeClass( "ui-state-hover" );
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
_focusable: function( element ) {
|
||||
this.focusable = this.focusable.add( element );
|
||||
this._on( element, {
|
||||
focusin: function( event ) {
|
||||
$( event.currentTarget ).addClass( "ui-state-focus" );
|
||||
},
|
||||
focusout: function( event ) {
|
||||
$( event.currentTarget ).removeClass( "ui-state-focus" );
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
_trigger: function( type, event, data ) {
|
||||
var prop, orig,
|
||||
callback = this.options[ type ];
|
||||
|
||||
data = data || {};
|
||||
event = $.Event( event );
|
||||
event.type = ( type === this.widgetEventPrefix ?
|
||||
type :
|
||||
this.widgetEventPrefix + type ).toLowerCase();
|
||||
data = data || {};
|
||||
// the original event may come from any element
|
||||
// so we need to reset the target on the new event
|
||||
event.target = this.element[ 0 ];
|
||||
|
||||
// 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 ];
|
||||
orig = event.originalEvent;
|
||||
if ( orig ) {
|
||||
for ( prop in orig ) {
|
||||
if ( !( prop in event ) ) {
|
||||
event[ prop ] = orig[ prop ];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.element.trigger( event, data );
|
||||
|
||||
return !( $.isFunction(callback) &&
|
||||
callback.call( this.element[0], event, data ) === false ||
|
||||
return !( $.isFunction( callback ) &&
|
||||
callback.apply( this.element[0], [ event ].concat( data ) ) === false ||
|
||||
event.isDefaultPrevented() );
|
||||
}
|
||||
};
|
||||
|
||||
$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
|
||||
$.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
|
||||
if ( typeof options === "string" ) {
|
||||
options = { effect: options };
|
||||
}
|
||||
var hasOptions,
|
||||
effectName = !options ?
|
||||
method :
|
||||
options === true || typeof options === "number" ?
|
||||
defaultEffect :
|
||||
options.effect || defaultEffect;
|
||||
options = options || {};
|
||||
if ( typeof options === "number" ) {
|
||||
options = { duration: options };
|
||||
}
|
||||
hasOptions = !$.isEmptyObject( options );
|
||||
options.complete = callback;
|
||||
if ( options.delay ) {
|
||||
element.delay( options.delay );
|
||||
}
|
||||
if ( hasOptions && $.effects && ( $.effects.effect[ effectName ] || $.uiBackCompat !== false && $.effects[ effectName ] ) ) {
|
||||
element[ method ]( options );
|
||||
} else if ( effectName !== method && element[ effectName ] ) {
|
||||
element[ effectName ]( options.duration, options.easing, callback );
|
||||
} else {
|
||||
element.queue(function( next ) {
|
||||
$( this )[ method ]();
|
||||
if ( callback ) {
|
||||
callback.call( element[ 0 ] );
|
||||
}
|
||||
next();
|
||||
});
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
// DEPRECATED
|
||||
if ( $.uiBackCompat !== false ) {
|
||||
$.Widget.prototype._getCreateOptions = function() {
|
||||
return $.metadata && $.metadata.get( this.element[0] )[ this.widgetName ];
|
||||
};
|
||||
}
|
||||
|
||||
})( jQuery );
|
||||
|
|
|
|||
|
|
@ -1,14 +0,0 @@
|
|||
/*
|
||||
* jQuery UI Effects Blind 1.8.16
|
||||
*
|
||||
* 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:
|
||||
* jquery.effects.core.js
|
||||
*/
|
||||
(function(b){b.effects.blind=function(c){return this.queue(function(){var a=b(this),g=["position","top","bottom","left","right"],f=b.effects.setMode(a,c.options.mode||"hide"),d=c.options.direction||"vertical";b.effects.save(a,g);a.show();var e=b.effects.createWrapper(a).css({overflow:"hidden"}),h=d=="vertical"?"height":"width";d=d=="vertical"?e.height():e.width();f=="show"&&e.css(h,0);var i={};i[h]=f=="show"?d:0;e.animate(i,c.duration,c.options.easing,function(){f=="hide"&&a.hide();b.effects.restore(a,
|
||||
g);b.effects.removeWrapper(a);c.callback&&c.callback.apply(a[0],arguments);a.dequeue()})})}})(jQuery);
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
/*
|
||||
* jQuery UI Effects Bounce 1.8.16
|
||||
*
|
||||
* 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:
|
||||
* jquery.effects.core.js
|
||||
*/
|
||||
(function(e){e.effects.bounce=function(b){return this.queue(function(){var a=e(this),l=["position","top","bottom","left","right"],h=e.effects.setMode(a,b.options.mode||"effect"),d=b.options.direction||"up",c=b.options.distance||20,m=b.options.times||5,i=b.duration||250;/show|hide/.test(h)&&l.push("opacity");e.effects.save(a,l);a.show();e.effects.createWrapper(a);var f=d=="up"||d=="down"?"top":"left";d=d=="up"||d=="left"?"pos":"neg";c=b.options.distance||(f=="top"?a.outerHeight({margin:true})/3:a.outerWidth({margin:true})/
|
||||
3);if(h=="show")a.css("opacity",0).css(f,d=="pos"?-c:c);if(h=="hide")c/=m*2;h!="hide"&&m--;if(h=="show"){var g={opacity:1};g[f]=(d=="pos"?"+=":"-=")+c;a.animate(g,i/2,b.options.easing);c/=2;m--}for(g=0;g<m;g++){var j={},k={};j[f]=(d=="pos"?"-=":"+=")+c;k[f]=(d=="pos"?"+=":"-=")+c;a.animate(j,i/2,b.options.easing).animate(k,i/2,b.options.easing);c=h=="hide"?c*2:c/2}if(h=="hide"){g={opacity:0};g[f]=(d=="pos"?"-=":"+=")+c;a.animate(g,i/2,b.options.easing,function(){a.hide();e.effects.restore(a,l);e.effects.removeWrapper(a);
|
||||
b.callback&&b.callback.apply(this,arguments)})}else{j={};k={};j[f]=(d=="pos"?"-=":"+=")+c;k[f]=(d=="pos"?"+=":"-=")+c;a.animate(j,i/2,b.options.easing).animate(k,i/2,b.options.easing,function(){e.effects.restore(a,l);e.effects.removeWrapper(a);b.callback&&b.callback.apply(this,arguments)})}a.queue("fx",function(){a.dequeue()});a.dequeue()})}})(jQuery);
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
/*
|
||||
* jQuery UI Effects Clip 1.8.16
|
||||
*
|
||||
* 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:
|
||||
* jquery.effects.core.js
|
||||
*/
|
||||
(function(b){b.effects.clip=function(e){return this.queue(function(){var a=b(this),i=["position","top","bottom","left","right","height","width"],f=b.effects.setMode(a,e.options.mode||"hide"),c=e.options.direction||"vertical";b.effects.save(a,i);a.show();var d=b.effects.createWrapper(a).css({overflow:"hidden"});d=a[0].tagName=="IMG"?d:a;var g={size:c=="vertical"?"height":"width",position:c=="vertical"?"top":"left"};c=c=="vertical"?d.height():d.width();if(f=="show"){d.css(g.size,0);d.css(g.position,
|
||||
c/2)}var h={};h[g.size]=f=="show"?c:0;h[g.position]=f=="show"?0:c/2;d.animate(h,{queue:false,duration:e.duration,easing:e.options.easing,complete:function(){f=="hide"&&a.hide();b.effects.restore(a,i);b.effects.removeWrapper(a);e.callback&&e.callback.apply(a[0],arguments);a.dequeue()}})})}})(jQuery);
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
/*
|
||||
* jQuery UI Effects 1.8.16
|
||||
*
|
||||
* 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(f,j){function m(c){var a;if(c&&c.constructor==Array&&c.length==3)return c;if(a=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c))return[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3],10)];if(a=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c))return[parseFloat(a[1])*2.55,parseFloat(a[2])*2.55,parseFloat(a[3])*2.55];if(a=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c))return[parseInt(a[1],
|
||||
16),parseInt(a[2],16),parseInt(a[3],16)];if(a=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c))return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(c))return n.transparent;return n[f.trim(c).toLowerCase()]}function s(c,a){var b;do{b=f.curCSS(c,a);if(b!=""&&b!="transparent"||f.nodeName(c,"body"))break;a="backgroundColor"}while(c=c.parentNode);return m(b)}function o(){var c=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,
|
||||
a={},b,d;if(c&&c.length&&c[0]&&c[c[0]])for(var e=c.length;e--;){b=c[e];if(typeof c[b]=="string"){d=b.replace(/\-(\w)/g,function(g,h){return h.toUpperCase()});a[d]=c[b]}}else for(b in c)if(typeof c[b]==="string")a[b]=c[b];return a}function p(c){var a,b;for(a in c){b=c[a];if(b==null||f.isFunction(b)||a in t||/scrollbar/.test(a)||!/color/i.test(a)&&isNaN(parseFloat(b)))delete c[a]}return c}function u(c,a){var b={_:0},d;for(d in a)if(c[d]!=a[d])b[d]=a[d];return b}function k(c,a,b,d){if(typeof c=="object"){d=
|
||||
a;b=null;a=c;c=a.effect}if(f.isFunction(a)){d=a;b=null;a={}}if(typeof a=="number"||f.fx.speeds[a]){d=b;b=a;a={}}if(f.isFunction(b)){d=b;b=null}a=a||{};b=b||a.duration;b=f.fx.off?0:typeof b=="number"?b:b in f.fx.speeds?f.fx.speeds[b]:f.fx.speeds._default;d=d||a.complete;return[c,a,b,d]}function l(c){if(!c||typeof c==="number"||f.fx.speeds[c])return true;if(typeof c==="string"&&!f.effects[c])return true;return false}f.effects={};f.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor",
|
||||
"borderTopColor","borderColor","color","outlineColor"],function(c,a){f.fx.step[a]=function(b){if(!b.colorInit){b.start=s(b.elem,a);b.end=m(b.end);b.colorInit=true}b.elem.style[a]="rgb("+Math.max(Math.min(parseInt(b.pos*(b.end[0]-b.start[0])+b.start[0],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[1]-b.start[1])+b.start[1],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[2]-b.start[2])+b.start[2],10),255),0)+")"}});var n={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,
|
||||
0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,
|
||||
211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},q=["add","remove","toggle"],t={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};f.effects.animateClass=function(c,a,b,
|
||||
d){if(f.isFunction(b)){d=b;b=null}return this.queue(function(){var e=f(this),g=e.attr("style")||" ",h=p(o.call(this)),r,v=e.attr("class");f.each(q,function(w,i){c[i]&&e[i+"Class"](c[i])});r=p(o.call(this));e.attr("class",v);e.animate(u(h,r),{queue:false,duration:a,easing:b,complete:function(){f.each(q,function(w,i){c[i]&&e[i+"Class"](c[i])});if(typeof e.attr("style")=="object"){e.attr("style").cssText="";e.attr("style").cssText=g}else e.attr("style",g);d&&d.apply(this,arguments);f.dequeue(this)}})})};
|
||||
f.fn.extend({_addClass:f.fn.addClass,addClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{add:c},a,b,d]):this._addClass(c)},_removeClass:f.fn.removeClass,removeClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{remove:c},a,b,d]):this._removeClass(c)},_toggleClass:f.fn.toggleClass,toggleClass:function(c,a,b,d,e){return typeof a=="boolean"||a===j?b?f.effects.animateClass.apply(this,[a?{add:c}:{remove:c},b,d,e]):this._toggleClass(c,a):f.effects.animateClass.apply(this,
|
||||
[{toggle:c},a,b,d])},switchClass:function(c,a,b,d,e){return f.effects.animateClass.apply(this,[{add:a,remove:c},b,d,e])}});f.extend(f.effects,{version:"1.8.16",save:function(c,a){for(var b=0;b<a.length;b++)a[b]!==null&&c.data("ec.storage."+a[b],c[0].style[a[b]])},restore:function(c,a){for(var b=0;b<a.length;b++)a[b]!==null&&c.css(a[b],c.data("ec.storage."+a[b]))},setMode:function(c,a){if(a=="toggle")a=c.is(":hidden")?"show":"hide";return a},getBaseline:function(c,a){var b;switch(c[0]){case "top":b=
|
||||
0;break;case "middle":b=0.5;break;case "bottom":b=1;break;default:b=c[0]/a.height}switch(c[1]){case "left":c=0;break;case "center":c=0.5;break;case "right":c=1;break;default:c=c[1]/a.width}return{x:c,y:b}},createWrapper:function(c){if(c.parent().is(".ui-effects-wrapper"))return c.parent();var a={width:c.outerWidth(true),height:c.outerHeight(true),"float":c.css("float")},b=f("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),
|
||||
d=document.activeElement;c.wrap(b);if(c[0]===d||f.contains(c[0],d))f(d).focus();b=c.parent();if(c.css("position")=="static"){b.css({position:"relative"});c.css({position:"relative"})}else{f.extend(a,{position:c.css("position"),zIndex:c.css("z-index")});f.each(["top","left","bottom","right"],function(e,g){a[g]=c.css(g);if(isNaN(parseInt(a[g],10)))a[g]="auto"});c.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}return b.css(a).show()},removeWrapper:function(c){var a,b=document.activeElement;
|
||||
if(c.parent().is(".ui-effects-wrapper")){a=c.parent().replaceWith(c);if(c[0]===b||f.contains(c[0],b))f(b).focus();return a}return c},setTransition:function(c,a,b,d){d=d||{};f.each(a,function(e,g){unit=c.cssUnit(g);if(unit[0]>0)d[g]=unit[0]*b+unit[1]});return d}});f.fn.extend({effect:function(c){var a=k.apply(this,arguments),b={options:a[1],duration:a[2],callback:a[3]};a=b.options.mode;var d=f.effects[c];if(f.fx.off||!d)return a?this[a](b.duration,b.callback):this.each(function(){b.callback&&b.callback.call(this)});
|
||||
return d.call(this,b)},_show:f.fn.show,show:function(c){if(l(c))return this._show.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="show";return this.effect.apply(this,a)}},_hide:f.fn.hide,hide:function(c){if(l(c))return this._hide.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="hide";return this.effect.apply(this,a)}},__toggle:f.fn.toggle,toggle:function(c){if(l(c)||typeof c==="boolean"||f.isFunction(c))return this.__toggle.apply(this,arguments);else{var a=k.apply(this,
|
||||
arguments);a[1].mode="toggle";return this.effect.apply(this,a)}},cssUnit:function(c){var a=this.css(c),b=[];f.each(["em","px","%","pt"],function(d,e){if(a.indexOf(e)>0)b=[parseFloat(a),e]});return b}});f.easing.jswing=f.easing.swing;f.extend(f.easing,{def:"easeOutQuad",swing:function(c,a,b,d,e){return f.easing[f.easing.def](c,a,b,d,e)},easeInQuad:function(c,a,b,d,e){return d*(a/=e)*a+b},easeOutQuad:function(c,a,b,d,e){return-d*(a/=e)*(a-2)+b},easeInOutQuad:function(c,a,b,d,e){if((a/=e/2)<1)return d/
|
||||
2*a*a+b;return-d/2*(--a*(a-2)-1)+b},easeInCubic:function(c,a,b,d,e){return d*(a/=e)*a*a+b},easeOutCubic:function(c,a,b,d,e){return d*((a=a/e-1)*a*a+1)+b},easeInOutCubic:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a+b;return d/2*((a-=2)*a*a+2)+b},easeInQuart:function(c,a,b,d,e){return d*(a/=e)*a*a*a+b},easeOutQuart:function(c,a,b,d,e){return-d*((a=a/e-1)*a*a*a-1)+b},easeInOutQuart:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a+b;return-d/2*((a-=2)*a*a*a-2)+b},easeInQuint:function(c,a,b,
|
||||
d,e){return d*(a/=e)*a*a*a*a+b},easeOutQuint:function(c,a,b,d,e){return d*((a=a/e-1)*a*a*a*a+1)+b},easeInOutQuint:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a*a+b;return d/2*((a-=2)*a*a*a*a+2)+b},easeInSine:function(c,a,b,d,e){return-d*Math.cos(a/e*(Math.PI/2))+d+b},easeOutSine:function(c,a,b,d,e){return d*Math.sin(a/e*(Math.PI/2))+b},easeInOutSine:function(c,a,b,d,e){return-d/2*(Math.cos(Math.PI*a/e)-1)+b},easeInExpo:function(c,a,b,d,e){return a==0?b:d*Math.pow(2,10*(a/e-1))+b},easeOutExpo:function(c,
|
||||
a,b,d,e){return a==e?b+d:d*(-Math.pow(2,-10*a/e)+1)+b},easeInOutExpo:function(c,a,b,d,e){if(a==0)return b;if(a==e)return b+d;if((a/=e/2)<1)return d/2*Math.pow(2,10*(a-1))+b;return d/2*(-Math.pow(2,-10*--a)+2)+b},easeInCirc:function(c,a,b,d,e){return-d*(Math.sqrt(1-(a/=e)*a)-1)+b},easeOutCirc:function(c,a,b,d,e){return d*Math.sqrt(1-(a=a/e-1)*a)+b},easeInOutCirc:function(c,a,b,d,e){if((a/=e/2)<1)return-d/2*(Math.sqrt(1-a*a)-1)+b;return d/2*(Math.sqrt(1-(a-=2)*a)+1)+b},easeInElastic:function(c,a,b,
|
||||
d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3);if(h<Math.abs(d)){h=d;c=g/4}else c=g/(2*Math.PI)*Math.asin(d/h);return-(h*Math.pow(2,10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g))+b},easeOutElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3);if(h<Math.abs(d)){h=d;c=g/4}else c=g/(2*Math.PI)*Math.asin(d/h);return h*Math.pow(2,-10*a)*Math.sin((a*e-c)*2*Math.PI/g)+d+b},easeInOutElastic:function(c,a,b,d,e){c=1.70158;var g=
|
||||
0,h=d;if(a==0)return b;if((a/=e/2)==2)return b+d;g||(g=e*0.3*1.5);if(h<Math.abs(d)){h=d;c=g/4}else c=g/(2*Math.PI)*Math.asin(d/h);if(a<1)return-0.5*h*Math.pow(2,10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g)+b;return h*Math.pow(2,-10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g)*0.5+d+b},easeInBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;return d*(a/=e)*a*((g+1)*a-g)+b},easeOutBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;return d*((a=a/e-1)*a*((g+1)*a+g)+1)+b},easeInOutBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;
|
||||
if((a/=e/2)<1)return d/2*a*a*(((g*=1.525)+1)*a-g)+b;return d/2*((a-=2)*a*(((g*=1.525)+1)*a+g)+2)+b},easeInBounce:function(c,a,b,d,e){return d-f.easing.easeOutBounce(c,e-a,0,d,e)+b},easeOutBounce:function(c,a,b,d,e){return(a/=e)<1/2.75?d*7.5625*a*a+b:a<2/2.75?d*(7.5625*(a-=1.5/2.75)*a+0.75)+b:a<2.5/2.75?d*(7.5625*(a-=2.25/2.75)*a+0.9375)+b:d*(7.5625*(a-=2.625/2.75)*a+0.984375)+b},easeInOutBounce:function(c,a,b,d,e){if(a<e/2)return f.easing.easeInBounce(c,a*2,0,d,e)*0.5+b;return f.easing.easeOutBounce(c,
|
||||
a*2-e,0,d,e)*0.5+d*0.5+b}})}(jQuery);
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
/*
|
||||
* jQuery UI Effects Drop 1.8.16
|
||||
*
|
||||
* 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:
|
||||
* jquery.effects.core.js
|
||||
*/
|
||||
(function(c){c.effects.drop=function(d){return this.queue(function(){var a=c(this),h=["position","top","bottom","left","right","opacity"],e=c.effects.setMode(a,d.options.mode||"hide"),b=d.options.direction||"left";c.effects.save(a,h);a.show();c.effects.createWrapper(a);var f=b=="up"||b=="down"?"top":"left";b=b=="up"||b=="left"?"pos":"neg";var g=d.options.distance||(f=="top"?a.outerHeight({margin:true})/2:a.outerWidth({margin:true})/2);if(e=="show")a.css("opacity",0).css(f,b=="pos"?-g:g);var i={opacity:e==
|
||||
"show"?1:0};i[f]=(e=="show"?b=="pos"?"+=":"-=":b=="pos"?"-=":"+=")+g;a.animate(i,{queue:false,duration:d.duration,easing:d.options.easing,complete:function(){e=="hide"&&a.hide();c.effects.restore(a,h);c.effects.removeWrapper(a);d.callback&&d.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery);
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
/*
|
||||
* jQuery UI Effects Explode 1.8.16
|
||||
*
|
||||
* 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:
|
||||
* jquery.effects.core.js
|
||||
*/
|
||||
(function(j){j.effects.explode=function(a){return this.queue(function(){var c=a.options.pieces?Math.round(Math.sqrt(a.options.pieces)):3,d=a.options.pieces?Math.round(Math.sqrt(a.options.pieces)):3;a.options.mode=a.options.mode=="toggle"?j(this).is(":visible")?"hide":"show":a.options.mode;var b=j(this).show().css("visibility","hidden"),g=b.offset();g.top-=parseInt(b.css("marginTop"),10)||0;g.left-=parseInt(b.css("marginLeft"),10)||0;for(var h=b.outerWidth(true),i=b.outerHeight(true),e=0;e<c;e++)for(var f=
|
||||
0;f<d;f++)b.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-f*(h/d),top:-e*(i/c)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:h/d,height:i/c,left:g.left+f*(h/d)+(a.options.mode=="show"?(f-Math.floor(d/2))*(h/d):0),top:g.top+e*(i/c)+(a.options.mode=="show"?(e-Math.floor(c/2))*(i/c):0),opacity:a.options.mode=="show"?0:1}).animate({left:g.left+f*(h/d)+(a.options.mode=="show"?0:(f-Math.floor(d/2))*(h/d)),top:g.top+
|
||||
e*(i/c)+(a.options.mode=="show"?0:(e-Math.floor(c/2))*(i/c)),opacity:a.options.mode=="show"?1:0},a.duration||500);setTimeout(function(){a.options.mode=="show"?b.css({visibility:"visible"}):b.css({visibility:"visible"}).hide();a.callback&&a.callback.apply(b[0]);b.dequeue();j("div.ui-effects-explode").remove()},a.duration||500)})}})(jQuery);
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
/*
|
||||
* jQuery UI Effects Fade 1.8.16
|
||||
*
|
||||
* 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(b){b.effects.fade=function(a){return this.queue(function(){var c=b(this),d=b.effects.setMode(c,a.options.mode||"hide");c.animate({opacity:d},{queue:false,duration:a.duration,easing:a.options.easing,complete:function(){a.callback&&a.callback.apply(this,arguments);c.dequeue()}})})}})(jQuery);
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue