Merge branch 'master' into issue94_smartyupdate

# resolved conflicts:
#	fp-includes/smarty/internals/core.rm_auto.php
#	fp-includes/smarty/internals/core.rmdir.php
This commit is contained in:
azett 2022-06-25 12:16:04 +02:00
commit 84723f90a2
32 changed files with 666 additions and 619 deletions

View File

@ -8,7 +8,7 @@
## Plugins
- Gallery captions plugin added (see [#108](https://github.com/flatpressblog/flatpress/issues/108))
- PhotoSwipe plugin added (see [#109](https://github.com/flatpressblog/flatpress/issues/109))
- jQuery plugin: Updated jQuery (3.5.1 => 3.6) and jQueryUI (1.12.1 => 1.13)
- jQuery plugin: Updated jQuery (3.5.1 => 3.6) and jQueryUI (1.12.1 => 1.13.1)
## Themes
- Leggero theme: Fixed searchbox glitch in FlatMaas revisited style (see [#97](https://github.com/flatpressblog/flatpress/issues/97))

View File

@ -28,11 +28,12 @@ Since 2018, FlatPress is taken care of by [Arvid Zimmermann](https://github.com/
## Libraries
FlatPress utilizes the following free frameworks and libraries. Thanks to their authors!
- [jQuery](https://jquery.com/)
- [jQuery UI](https://jqueryui.com/)
- [Smarty Template Engine](https://www.smarty.net/) by Monte Ohrt and Uwe Tews
- [BBCode Parser](http://christian-seiler.de/projekte/php/bbcode/) by Christian Seiler
- [jQuery](https://jquery.com/)
- [jQuery UI](https://jqueryui.com/)
- [SlimBox2](https://www.digitalia.be/software/slimbox2/) by Christophe Beyls
- [PhotoSwipe](https://photoswipe.com/) by Dmytro Semenov
## Other contributions
- [Julian Rademacher](https://moortaube.de/) generously donated his Twitter account [@FlatPress](https://twitter.com/FlatPress). Also thanks for your useful pull requests!

View File

@ -1,293 +1,301 @@
<?php
/**
* Filesystem lib
* provides basic filesystem handling functions.
*
* @author NoWhereMan <nowhereman@phreaker.net>
*/
class fs_filelister {
var $_list = array();
var $_directory = null;
//constructor
function __construct($directory = null) {
if ($directory) $this->_directory = $directory;
$this->_listFiles($this->_directory);
}
function _checkFile($directory, $file) {
if (!is_dir("$directory/$file"))
array_push($this->_list, $file);
return 0;
}
function _exitingDir($directory, $file) {
}
function _listFiles($directory) {
// Try to open the directory
if (!file_exists($directory)) return array();
if($dir = opendir($directory)) {
// Add the files
while($file = readdir($dir)) {
if ($file != '.' && $file != '..') {
$action = $this->_checkFile($directory,$file);
// $action == 0: ok, go on
// $action == 1: recurse
// $action == 2: exit function
switch ($action) {
case (1): {
/**
* Filesystem lib
* provides basic filesystem handling functions.
*
* @author NoWhereMan <nowhereman@phreaker.net>
*/
class fs_filelister {
var $_list = array();
var $_directory = null;
// constructor
function __construct($directory = null) {
if ($directory)
$this->_directory = $directory;
$this->_listFiles($this->_directory);
}
function _checkFile($directory, $file) {
if (!is_dir("$directory/$file"))
array_push($this->_list, $file);
return 0;
}
function _exitingDir($directory, $file) {
}
function _listFiles($directory) {
// Try to open the directory
if (!file_exists($directory))
return array();
if ($dir = opendir($directory)) {
// Add the files
while ($file = readdir($dir)) {
if (!fs_is_directorycomponent($file)) {
$action = $this->_checkFile($directory, $file);
// $action == 0: ok, go on
// $action == 1: recurse
// $action == 2: exit function
switch ($action) {
case (1):
{
$this->_listFiles("$directory/$file");
$this->_exitingDir($directory, $file);
break;
}
case (2): {
case (2):
{
return false;
}
}
}
}
}
// Finish off the function
closedir($dir);
return true;
}
else return false;
}
function getList() {
//$this->_listFiles($this->_directory);
return $this->_list;
}
function count() {
if (!isset ($this->count))
$this->count = count($this->_list);
return $this->count;
}
}
class fs_pathlister extends fs_filelister {
function _checkFile($directory, $file) {
$f = "$directory/$file";
if (!is_dir($f))
array_push($this->_list, $f);
else
return 1;
}
}
// dir list
function fs_list_dirs($dir) {
$dh = opendir($dir);
while (false !== ($filename = readdir($dh))) {
if ( ($filename[0] != '.') ) {
// $id = lang_id($filename);
$files[] = $filename;
}
}
sort($files);
return $files;
}
/**
* function fs_mkdir
*
* <p>Function from : {@link http://www.php.net/function.mkdir.php}</p>
*
* <p>Recursively creates dirs.</p>
* <p>Returns true on success, else false</p>
*
* @param string $path Directory or directories to create
* @param int $mode octal mode value; same as UNIX chmod; defaults to 0777 (rwrwrw);
* @return bool
*
* @todo cleanup & check bool return value
*
*/
function fs_mkdir($dir, $mode=DIR_PERMISSIONS) {
if (is_dir($dir) || (@mkdir($dir,$mode))) {@chmod($dir, $mode); return TRUE;}
if (!fs_mkdir(dirname($dir),$mode)) return FALSE;
return (@mkdir($dir,$mode) && @chmod($dir, $mode));
}
/**
* function fs_delete
*
* Deletes a file and recursively deletes dirs, if they're empty
*
*/
function fs_delete($path) {
if (file_exists($path)) {
$fsuccess = unlink($path);
$dsuccess = true;
while ($dsuccess) {
$path = dirname($path);
$dsuccess = @rmdir($path);
}
// unlink can return both 0 and false -__-'
return ($fsuccess);
}
// in our particular implementation
// you can always delete a non existent file;
// anyway, we'll return a value != false
// so that we can anyway track it back
return 2;
}
/**
* function fs_recursive_chmod
*
* Perform a recursive reset of file permission in the given $path
* and its subdirectories to 0777
*
* @param $fpath dir path
* @return bool
*
*/
class fs_chmodder extends fs_filelister {
var $_chmod_dir;
var $_chmod_file;
function __construct($directory, $ch_file=FILE_PERMISSIONS, $ch_dir=DIR_PERMISSIONS) {
$this->_directory = $directory;
$this->_chmod_file = $ch_file;
$this->_chmod_dir = $ch_dir;
parent::__construct();
}
function _checkFile($directory, $file) {
$retval = 0;
$path = "$directory/$file";
if (is_dir($path))
$retval = 1;
if ( !@chmod($path, ($retval? $this->_chmod_dir : $this->_chmod_file ) ) )
array_push($this->_list, $path);
return $retval;
}
}
function fs_chmod_recursive($fpath=FP_CONTENT) {
$obj = new fs_chmodder($fpath);
return $obj->getList();
}
/**
* recursive deletion
* deletes all files and directories recursively in the given $path
* @param $fpath dir path
* @return bool
*/
/*class fs_deleter extends fs_filelister {
function fs_deleter($directory) {
$this->_directory = $directory;
parent::__construct();
}
function _checkFile($directory, $file) {
$path = "$directory/$file";
/*
* open dir handle prevents directory deletion of php5 (and probably win)
* thanks to cimangi <cimangi (at) yahoo (dot) it> for noticing and
* giving a possible solution:
*
* filenames are cached and then deleted
//
if ( is_dir($path) ) {
return 1;
} elseif ( file_exists($path) ) {
array_push($this->_list, $path);
return 0;
} else {
return 2;
}
}
}
*/
/*
* open dir handle prevents directory deletion of php5 (and probably win)
* thanks to cimangi <cimangi (at) yahoo (dot) it> for noticing and
* giving a possible solution;
*
* paths are now cached and then deleted
*/
function fs_delete_recursive($path) {
if (file_exists($path)) {
$obj = new fs_pathlister($path);
$list = ($obj->getList());
unset($obj);
$elem = null;
while($elem = array_pop($list)) {
$elem;
fs_delete($elem);
}
}
return true;
}
function fs_copy($source, $dest) {
if ($contents = io_load_file($source)) {
return io_write_file($dest, $contents);
}
return false;
} else
return false;
}
function getList() {
// $this->_listFiles($this->_directory);
return $this->_list;
}
function count() {
if (!isset($this->count))
$this->count = count($this->_list);
return $this->count;
}
}
class fs_pathlister extends fs_filelister {
function _checkFile($directory, $file) {
$f = "$directory/$file";
if (!is_dir($f))
array_push($this->_list, $f);
else
return 1;
}
}
// dir list
function fs_list_dirs($dir) {
$dh = opendir($dir);
while (false !== ($filename = readdir($dh))) {
if (($filename [0] != '.')) {
// $id = lang_id($filename);
$files [] = $filename;
}
}
sort($files);
return $files;
}
/**
* function fs_mkdir
*
* <p>Function from : {@link http://www.php.net/function.mkdir.php}</p>
*
* <p>Recursively creates dirs.</p>
* <p>Returns true on success, else false</p>
*
* @param string $path
* Directory or directories to create
* @param int $mode
* octal mode value; same as UNIX chmod; defaults to 0777 (rwrwrw);
* @return bool
*
* @todo cleanup & check bool return value
*
*/
function fs_mkdir($dir, $mode = DIR_PERMISSIONS) {
if (is_dir($dir) || (@mkdir($dir, $mode))) {
@chmod($dir, $mode);
return TRUE;
}
if (!fs_mkdir(dirname($dir), $mode))
return FALSE;
return (@mkdir($dir, $mode) && @chmod($dir, $mode));
}
/**
* function fs_delete
*
* Deletes a file and recursively deletes dirs, if they're empty
*/
function fs_delete($path) {
if (file_exists($path)) {
$fsuccess = unlink($path);
$dsuccess = true;
while ($dsuccess) {
$path = dirname($path);
$dsuccess = @rmdir($path);
}
// unlink can return both 0 and false -__-'
return ($fsuccess);
}
// in our particular implementation
// you can always delete a non existent file;
// anyway, we'll return a value != false
// so that we can anyway track it back
return 2;
}
/**
* function fs_recursive_chmod
*
* Perform a recursive reset of file permission in the given $path
* and its subdirectories to 0777
*
* @param $fpath dir
* path
* @return bool
*
*/
class fs_chmodder extends fs_filelister {
var $_chmod_dir;
var $_chmod_file;
function __construct($directory, $ch_file = FILE_PERMISSIONS, $ch_dir = DIR_PERMISSIONS) {
$this->_directory = $directory;
$this->_chmod_file = $ch_file;
$this->_chmod_dir = $ch_dir;
parent::__construct();
}
function _checkFile($directory, $file) {
$retval = 0;
$path = "$directory/$file";
if (is_dir($path))
$retval = 1;
if (!@chmod($path, ($retval ? $this->_chmod_dir : $this->_chmod_file)))
array_push($this->_list, $path);
return $retval;
}
}
function fs_chmod_recursive($fpath = FP_CONTENT) {
$obj = new fs_chmodder($fpath);
return $obj->getList();
}
/**
* recursive deletion
* deletes all files and directories recursively in the given $path
*
* @param $fpath dir
* path
* @return bool
*/
/*
* class fs_deleter extends fs_filelister {
*
* function fs_deleter($directory) {
* $this->_directory = $directory;
* parent::__construct();
* }
*
* function _checkFile($directory, $file) {
*
* $path = "$directory/$file";
*
* /*
* open dir handle prevents directory deletion of php5 (and probably win)
* thanks to cimangi <cimangi (at) yahoo (dot) it> for noticing and
* giving a possible solution:
*
* filenames are cached and then deleted
* //
*
* if ( is_dir($path) ) {
* return 1;
* } elseif ( file_exists($path) ) {
* array_push($this->_list, $path);
* return 0;
* } else {
* return 2;
* }
*
* }
*
* }
*
*/
/*
* open dir handle prevents directory deletion of php5 (and probably win)
* thanks to cimangi <cimangi (at) yahoo (dot) it> for noticing and
* giving a possible solution;
*
* paths are now cached and then deleted
*/
function fs_delete_recursive($path) {
if (file_exists($path)) {
$obj = new fs_pathlister($path);
$list = ($obj->getList());
unset($obj);
$elem = null;
while ($elem = array_pop($list)) {
$elem;
fs_delete($elem);
}
}
return true;
}
function fs_copy($source, $dest) {
if ($contents = io_load_file($source)) {
return io_write_file($dest, $contents);
}
return false;
}
/**
* Checks if the file with the given name is a directory component ('.' or '..').
*
* @param string $filename
* the file name
* @return boolean <code>true</code> if the file is a directory component; otherwise <code>false</code>
*/
function fs_is_directorycomponent($filename) {
return $filename === '.' || $filename === '..';
}
/**
* Checks if the file with the given name is a hidden file (i.e., starts with a '.').
*
* @param string $filename
* the file name
* @return boolean <code>true</code> if the file is a hidden file; otherwise <code>false</code>
*/
function fs_is_hidden_file($filename) {
return strlen($filename) > 0 && substr($filename, 0, 1) === '.';
}

View File

@ -9,7 +9,7 @@
*
* @var string
*/
const GALLERY_CAPTIONS_FILENAME = 'captions.conf';
const GALLERY_CAPTIONS_FILENAME = '.captions.conf';
/**
* The name of the captions file (legacy mode for galleries managed with PhotoSwipe plugin version < 1.1)
@ -35,11 +35,7 @@ function gallery_fetch_galleries() {
$dir = opendir(ABS_PATH . IMAGES_DIR);
while (false !== ($file = readdir($dir))) {
$fullpath = ABS_PATH . IMAGES_DIR . $file;
if (!in_array($file, array(
".",
"..",
".thumbs"
)) && is_dir($fullpath)) {
if (!fs_is_directorycomponent($file) && !fs_is_hidden_file($file) && is_dir($fullpath)) {
$galleries [] = $file;
}
}

View File

@ -120,7 +120,7 @@ function theme_list() {
$dh = opendir($dir);
$i = 0;
while (false !== ($filename = readdir($dh))) {
if (($filename != '.') && ($filename != '..')) {
if (!fs_is_directorycomponent($filename)) {
$files [$i++] = $filename;
}
}

View File

@ -4,7 +4,6 @@
<title>{$flatpress.title|tag:wp_title:'&laquo;'}</title>
<meta http-equiv="Content-Type" content="text/html; charset={$flatpress.charset}" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700' rel='stylesheet' type='text/css'/>
{action hook=wp_head}
</head>

View File

@ -361,6 +361,6 @@ h4 { font-size: 1.2em; }
}
* {
font-family: 'Open Sans', sans-serif;
font-family: sans-serif;
text-shadow: 1px 2px 3px rgba(0, 0, 0, 0.2);
}

View File

@ -14,7 +14,7 @@ function plugin_jquery_head() {
echo '
<!-- start of jsUtils -->
<script src="' . $pdir . 'res/jquery/3.6/jquery-3.6.0.min.js"></script>
<script src="' . $pdir . 'res/jqueryui/1.13.0/jquery-ui.min.js"></script>
<script src="' . $pdir . 'res/jqueryui/1.13.1/jquery-ui.min.js"></script>
<!-- end of jsUtils -->';
}

File diff suppressed because one or more lines are too long

View File

@ -363,3 +363,5 @@ sakshi87 <53863764+sakshi87@users.noreply.github.com>
Mikolaj Wolicki <wolicki.mikolaj@gmail.com>
Patrick McKay <patrick.mckay@vumc.org>
c-lambert <58025159+c-lambert@users.noreply.github.com>
Josep Sanz <josepsanzcamp@gmail.com>
Ben Mullins <benm@umich.edu>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

View File

@ -1,4 +1,4 @@
/*! jQuery UI - v1.13.0 - 2021-10-07
/*! jQuery UI - v1.13.1 - 2022-01-20
* http://jqueryui.com
* Includes: core.css, accordion.css, autocomplete.css, menu.css, button.css, controlgroup.css, checkboxradio.css, datepicker.css, dialog.css, draggable.css, resizable.css, progressbar.css, selectable.css, selectmenu.css, slider.css, sortable.css, spinner.css, tabs.css, tooltip.css, theme.css
* To view and modify this theme, visit http://jqueryui.com/themeroller/?bgShadowXPos=&bgOverlayXPos=&bgErrorXPos=&bgHighlightXPos=&bgContentXPos=&bgHeaderXPos=&bgActiveXPos=&bgHoverXPos=&bgDefaultXPos=&bgShadowYPos=&bgOverlayYPos=&bgErrorYPos=&bgHighlightYPos=&bgContentYPos=&bgHeaderYPos=&bgActiveYPos=&bgHoverYPos=&bgDefaultYPos=&bgShadowRepeat=&bgOverlayRepeat=&bgErrorRepeat=&bgHighlightRepeat=&bgContentRepeat=&bgHeaderRepeat=&bgActiveRepeat=&bgHoverRepeat=&bgDefaultRepeat=&iconsHover=url(%22images%2Fui-icons_555555_256x240.png%22)&iconsHighlight=url(%22images%2Fui-icons_777620_256x240.png%22)&iconsHeader=url(%22images%2Fui-icons_444444_256x240.png%22)&iconsError=url(%22images%2Fui-icons_cc0000_256x240.png%22)&iconsDefault=url(%22images%2Fui-icons_777777_256x240.png%22)&iconsContent=url(%22images%2Fui-icons_444444_256x240.png%22)&iconsActive=url(%22images%2Fui-icons_ffffff_256x240.png%22)&bgImgUrlShadow=&bgImgUrlOverlay=&bgImgUrlHover=&bgImgUrlHighlight=&bgImgUrlHeader=&bgImgUrlError=&bgImgUrlDefault=&bgImgUrlContent=&bgImgUrlActive=&opacityFilterShadow=Alpha(Opacity%3D30)&opacityFilterOverlay=Alpha(Opacity%3D30)&opacityShadowPerc=30&opacityOverlayPerc=30&iconColorHover=%23555555&iconColorHighlight=%23777620&iconColorHeader=%23444444&iconColorError=%23cc0000&iconColorDefault=%23777777&iconColorContent=%23444444&iconColorActive=%23ffffff&bgImgOpacityShadow=0&bgImgOpacityOverlay=0&bgImgOpacityError=95&bgImgOpacityHighlight=55&bgImgOpacityContent=75&bgImgOpacityHeader=75&bgImgOpacityActive=65&bgImgOpacityHover=75&bgImgOpacityDefault=75&bgTextureShadow=flat&bgTextureOverlay=flat&bgTextureError=flat&bgTextureHighlight=flat&bgTextureContent=flat&bgTextureHeader=flat&bgTextureActive=flat&bgTextureHover=flat&bgTextureDefault=flat&cornerRadius=3px&fwDefault=normal&ffDefault=Arial%2CHelvetica%2Csans-serif&fsDefault=1em&cornerRadiusShadow=8px&thicknessShadow=5px&offsetLeftShadow=0px&offsetTopShadow=0px&opacityShadow=.3&bgColorShadow=%23666666&opacityOverlay=.3&bgColorOverlay=%23aaaaaa&fcError=%235f3f3f&borderColorError=%23f1a899&bgColorError=%23fddfdf&fcHighlight=%23777620&borderColorHighlight=%23dad55e&bgColorHighlight=%23fffa90&fcContent=%23333333&borderColorContent=%23dddddd&bgColorContent=%23ffffff&fcHeader=%23333333&borderColorHeader=%23dddddd&bgColorHeader=%23e9e9e9&fcActive=%23ffffff&borderColorActive=%23003eff&bgColorActive=%23007fff&fcHover=%232b2b2b&borderColorHover=%23cccccc&bgColorHover=%23ededed&fcDefault=%23454545&borderColorDefault=%23c5c5c5&bgColorDefault=%23f6f6f6

View File

@ -1,4 +1,4 @@
/*! jQuery UI - v1.13.0 - 2021-10-07
/*! jQuery UI - v1.13.1 - 2022-01-20
* http://jqueryui.com
* Includes: widget.js, position.js, data.js, disable-selection.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js, focusable.js, form-reset-mixin.js, jquery-patch.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/draggable.js, widgets/droppable.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/resizable.js, widgets/selectable.js, widgets/selectmenu.js, widgets/slider.js, widgets/sortable.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js
* Copyright jQuery Foundation and other contributors; Licensed MIT */
@ -20,11 +20,11 @@
$.ui = $.ui || {};
var version = $.ui.version = "1.13.0";
var version = $.ui.version = "1.13.1";
/*!
* jQuery UI Widget 1.13.0
* jQuery UI Widget 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -88,7 +88,7 @@ $.widget = function( name, base, prototype ) {
constructor = $[ namespace ][ name ] = function( options, element ) {
// Allow instantiation without "new" keyword
if ( !this._createWidget ) {
if ( !this || !this._createWidget ) {
return new constructor( options, element );
}
@ -510,6 +510,8 @@ $.Widget.prototype = {
}, options );
function bindRemoveEvent() {
var nodesToBind = [];
options.element.each( function( _, element ) {
var isTracked = $.map( that.classesElementLookup, function( elements ) {
return elements;
@ -519,11 +521,13 @@ $.Widget.prototype = {
} );
if ( !isTracked ) {
that._on( $( element ), {
remove: "_untrackClassesElement"
} );
nodesToBind.push( element );
}
} );
that._on( $( nodesToBind ), {
remove: "_untrackClassesElement"
} );
}
function processClassString( classes, checkOption ) {
@ -762,7 +766,7 @@ var widget = $.widget;
/*!
* jQuery UI Position 1.13.0
* jQuery UI Position 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -1259,7 +1263,7 @@ var position = $.ui.position;
/*!
* jQuery UI :data 1.13.0
* jQuery UI :data 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -1288,7 +1292,7 @@ var data = $.extend( $.expr.pseudos, {
} );
/*!
* jQuery UI Disable Selection 1.13.0
* jQuery UI Disable Selection 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -2043,7 +2047,7 @@ colors = jQuery.Color.names = {
/*!
* jQuery UI Effects 1.13.0
* jQuery UI Effects 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -2427,7 +2431,7 @@ if ( $.uiBackCompat !== false ) {
}
$.extend( $.effects, {
version: "1.13.0",
version: "1.13.1",
define: function( name, mode, effect ) {
if ( !effect ) {
@ -2995,7 +2999,7 @@ var effect = $.effects;
/*!
* jQuery UI Effects Blind 1.13.0
* jQuery UI Effects Blind 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -3050,7 +3054,7 @@ var effectsEffectBlind = $.effects.define( "blind", "hide", function( options, d
/*!
* jQuery UI Effects Bounce 1.13.0
* jQuery UI Effects Bounce 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -3145,7 +3149,7 @@ var effectsEffectBounce = $.effects.define( "bounce", function( options, done )
/*!
* jQuery UI Effects Clip 1.13.0
* jQuery UI Effects Clip 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -3195,7 +3199,7 @@ var effectsEffectClip = $.effects.define( "clip", "hide", function( options, don
/*!
* jQuery UI Effects Drop 1.13.0
* jQuery UI Effects Drop 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -3249,7 +3253,7 @@ var effectsEffectDrop = $.effects.define( "drop", "hide", function( options, don
/*!
* jQuery UI Effects Explode 1.13.0
* jQuery UI Effects Explode 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -3345,7 +3349,7 @@ var effectsEffectExplode = $.effects.define( "explode", "hide", function( option
/*!
* jQuery UI Effects Fade 1.13.0
* jQuery UI Effects Fade 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -3377,7 +3381,7 @@ var effectsEffectFade = $.effects.define( "fade", "toggle", function( options, d
/*!
* jQuery UI Effects Fold 1.13.0
* jQuery UI Effects Fold 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -3451,7 +3455,7 @@ var effectsEffectFold = $.effects.define( "fold", "hide", function( options, don
/*!
* jQuery UI Effects Highlight 1.13.0
* jQuery UI Effects Highlight 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -3493,7 +3497,7 @@ var effectsEffectHighlight = $.effects.define( "highlight", "show", function( op
/*!
* jQuery UI Effects Size 1.13.0
* jQuery UI Effects Size 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -3671,7 +3675,7 @@ var effectsEffectSize = $.effects.define( "size", function( options, done ) {
/*!
* jQuery UI Effects Scale 1.13.0
* jQuery UI Effects Scale 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -3711,7 +3715,7 @@ var effectsEffectScale = $.effects.define( "scale", function( options, done ) {
/*!
* jQuery UI Effects Puff 1.13.0
* jQuery UI Effects Puff 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -3737,7 +3741,7 @@ var effectsEffectPuff = $.effects.define( "puff", "hide", function( options, don
/*!
* jQuery UI Effects Pulsate 1.13.0
* jQuery UI Effects Pulsate 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -3786,7 +3790,7 @@ var effectsEffectPulsate = $.effects.define( "pulsate", "show", function( option
/*!
* jQuery UI Effects Shake 1.13.0
* jQuery UI Effects Shake 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -3845,7 +3849,7 @@ var effectsEffectShake = $.effects.define( "shake", function( options, done ) {
/*!
* jQuery UI Effects Slide 1.13.0
* jQuery UI Effects Slide 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -3906,7 +3910,7 @@ var effectsEffectSlide = $.effects.define( "slide", "show", function( options, d
/*!
* jQuery UI Effects Transfer 1.13.0
* jQuery UI Effects Transfer 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -3931,7 +3935,7 @@ var effectsEffectTransfer = effect;
/*!
* jQuery UI Focusable 1.13.0
* jQuery UI Focusable 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -4013,7 +4017,7 @@ var form = $.fn._form = function() {
/*!
* jQuery UI Form Reset Mixin 1.13.0
* jQuery UI Form Reset Mixin 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -4075,7 +4079,7 @@ var formResetMixin = $.ui.formResetMixin = {
/*!
* jQuery UI Support for jQuery core 1.8.x and newer 1.13.0
* jQuery UI Support for jQuery core 1.8.x and newer 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -4150,7 +4154,7 @@ if ( !$.fn.even || !$.fn.odd ) {
;
/*!
* jQuery UI Keycode 1.13.0
* jQuery UI Keycode 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -4185,7 +4189,7 @@ var keycode = $.ui.keyCode = {
/*!
* jQuery UI Labels 1.13.0
* jQuery UI Labels 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -4240,7 +4244,7 @@ var labels = $.fn.labels = function() {
/*!
* jQuery UI Scroll Parent 1.13.0
* jQuery UI Scroll Parent 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -4274,7 +4278,7 @@ var scrollParent = $.fn.scrollParent = function( includeHidden ) {
/*!
* jQuery UI Tabbable 1.13.0
* jQuery UI Tabbable 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -4298,7 +4302,7 @@ var tabbable = $.extend( $.expr.pseudos, {
/*!
* jQuery UI Unique ID 1.13.0
* jQuery UI Unique ID 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -4336,7 +4340,7 @@ var uniqueId = $.fn.extend( {
/*!
* jQuery UI Accordion 1.13.0
* jQuery UI Accordion 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -4357,7 +4361,7 @@ var uniqueId = $.fn.extend( {
var widgetsAccordion = $.widget( "ui.accordion", {
version: "1.13.0",
version: "1.13.1",
options: {
active: 0,
animate: {},
@ -4968,7 +4972,7 @@ var safeActiveElement = $.ui.safeActiveElement = function( document ) {
/*!
* jQuery UI Menu 1.13.0
* jQuery UI Menu 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -4987,7 +4991,7 @@ var safeActiveElement = $.ui.safeActiveElement = function( document ) {
var widgetsMenu = $.widget( "ui.menu", {
version: "1.13.0",
version: "1.13.1",
defaultElement: "<ul>",
delay: 300,
options: {
@ -5659,7 +5663,7 @@ var widgetsMenu = $.widget( "ui.menu", {
/*!
* jQuery UI Autocomplete 1.13.0
* jQuery UI Autocomplete 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -5678,7 +5682,7 @@ var widgetsMenu = $.widget( "ui.menu", {
$.widget( "ui.autocomplete", {
version: "1.13.0",
version: "1.13.1",
defaultElement: "<input>",
options: {
appendTo: null,
@ -5704,6 +5708,7 @@ $.widget( "ui.autocomplete", {
requestIndex: 0,
pending: 0,
liveRegionTimer: null,
_create: function() {
@ -5905,8 +5910,10 @@ $.widget( "ui.autocomplete", {
// Announce the value in the liveRegion
label = ui.item.attr( "aria-label" ) || item.value;
if ( label && String.prototype.trim.call( label ).length ) {
this.liveRegion.children().hide();
$( "<div>" ).text( label ).appendTo( this.liveRegion );
clearTimeout( this.liveRegionTimer );
this.liveRegionTimer = this._delay( function() {
this.liveRegion.html( $( "<div>" ).text( label ) );
}, 100 );
}
},
menuselect: function( event, ui ) {
@ -6301,8 +6308,10 @@ $.widget( "ui.autocomplete", $.ui.autocomplete, {
} else {
message = this.options.messages.noResults;
}
this.liveRegion.children().hide();
$( "<div>" ).text( message ).appendTo( this.liveRegion );
clearTimeout( this.liveRegionTimer );
this.liveRegionTimer = this._delay( function() {
this.liveRegion.html( $( "<div>" ).text( message ) );
}, 100 );
}
} );
@ -6310,7 +6319,7 @@ var widgetsAutocomplete = $.ui.autocomplete;
/*!
* jQuery UI Controlgroup 1.13.0
* jQuery UI Controlgroup 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -6331,7 +6340,7 @@ var widgetsAutocomplete = $.ui.autocomplete;
var controlgroupCornerRegex = /ui-corner-([a-z]){2,6}/g;
var widgetsControlgroup = $.widget( "ui.controlgroup", {
version: "1.13.0",
version: "1.13.1",
defaultElement: "<div>",
options: {
direction: "horizontal",
@ -6595,7 +6604,7 @@ var widgetsControlgroup = $.widget( "ui.controlgroup", {
} );
/*!
* jQuery UI Checkboxradio 1.13.0
* jQuery UI Checkboxradio 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -6615,7 +6624,7 @@ var widgetsControlgroup = $.widget( "ui.controlgroup", {
$.widget( "ui.checkboxradio", [ $.ui.formResetMixin, {
version: "1.13.0",
version: "1.13.1",
options: {
disabled: null,
label: null,
@ -6861,7 +6870,7 @@ var widgetsCheckboxradio = $.ui.checkboxradio;
/*!
* jQuery UI Button 1.13.0
* jQuery UI Button 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -6880,7 +6889,7 @@ var widgetsCheckboxradio = $.ui.checkboxradio;
$.widget( "ui.button", {
version: "1.13.0",
version: "1.13.1",
defaultElement: "<button>",
options: {
classes: {
@ -7287,7 +7296,7 @@ var widgetsButton = $.ui.button;
/* eslint-disable max-len, camelcase */
/*!
* jQuery UI Datepicker 1.13.0
* jQuery UI Datepicker 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -7305,7 +7314,7 @@ var widgetsButton = $.ui.button;
//>>css.theme: ../../themes/base/theme.css
$.extend( $.ui, { datepicker: { version: "1.13.0" } } );
$.extend( $.ui, { datepicker: { version: "1.13.1" } } );
var datepicker_instActive;
@ -9502,7 +9511,7 @@ $.fn.datepicker = function( options ) {
$.datepicker = new Datepicker(); // singleton instance
$.datepicker.initialized = false;
$.datepicker.uuid = new Date().getTime();
$.datepicker.version = "1.13.0";
$.datepicker.version = "1.13.1";
var widgetsDatepicker = $.datepicker;
@ -9512,7 +9521,7 @@ var widgetsDatepicker = $.datepicker;
var ie = $.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() );
/*!
* jQuery UI Mouse 1.13.0
* jQuery UI Mouse 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -9532,7 +9541,7 @@ $( document ).on( "mouseup", function() {
} );
var widgetsMouse = $.widget( "ui.mouse", {
version: "1.13.0",
version: "1.13.1",
options: {
cancel: "input, textarea, button, select, option",
distance: 1,
@ -9774,7 +9783,7 @@ var safeBlur = $.ui.safeBlur = function( element ) {
/*!
* jQuery UI Draggable 1.13.0
* jQuery UI Draggable 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -9791,7 +9800,7 @@ var safeBlur = $.ui.safeBlur = function( element ) {
$.widget( "ui.draggable", $.ui.mouse, {
version: "1.13.0",
version: "1.13.1",
widgetEventPrefix: "drag",
options: {
addClasses: true,
@ -11009,7 +11018,7 @@ var widgetsDraggable = $.ui.draggable;
/*!
* jQuery UI Resizable 1.13.0
* jQuery UI Resizable 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -11028,7 +11037,7 @@ var widgetsDraggable = $.ui.draggable;
$.widget( "ui.resizable", $.ui.mouse, {
version: "1.13.0",
version: "1.13.1",
widgetEventPrefix: "resize",
options: {
alsoResize: false,
@ -12207,7 +12216,7 @@ var widgetsResizable = $.ui.resizable;
/*!
* jQuery UI Dialog 1.13.0
* jQuery UI Dialog 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -12226,7 +12235,7 @@ var widgetsResizable = $.ui.resizable;
$.widget( "ui.dialog", {
version: "1.13.0",
version: "1.13.1",
options: {
appendTo: "body",
autoOpen: true,
@ -13132,7 +13141,7 @@ var widgetsDialog = $.ui.dialog;
/*!
* jQuery UI Droppable 1.13.0
* jQuery UI Droppable 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -13148,7 +13157,7 @@ var widgetsDialog = $.ui.dialog;
$.widget( "ui.droppable", {
version: "1.13.0",
version: "1.13.1",
widgetEventPrefix: "drop",
options: {
accept: "*",
@ -13615,7 +13624,7 @@ var widgetsDroppable = $.ui.droppable;
/*!
* jQuery UI Progressbar 1.13.0
* jQuery UI Progressbar 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -13636,7 +13645,7 @@ var widgetsDroppable = $.ui.droppable;
var widgetsProgressbar = $.widget( "ui.progressbar", {
version: "1.13.0",
version: "1.13.1",
options: {
classes: {
"ui-progressbar": "ui-corner-all",
@ -13778,7 +13787,7 @@ var widgetsProgressbar = $.widget( "ui.progressbar", {
/*!
* jQuery UI Selectable 1.13.0
* jQuery UI Selectable 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -13795,7 +13804,7 @@ var widgetsProgressbar = $.widget( "ui.progressbar", {
var widgetsSelectable = $.widget( "ui.selectable", $.ui.mouse, {
version: "1.13.0",
version: "1.13.1",
options: {
appendTo: "body",
autoRefresh: true,
@ -14076,7 +14085,7 @@ var widgetsSelectable = $.widget( "ui.selectable", $.ui.mouse, {
/*!
* jQuery UI Selectmenu 1.13.0
* jQuery UI Selectmenu 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -14097,7 +14106,7 @@ var widgetsSelectable = $.widget( "ui.selectable", $.ui.mouse, {
var widgetsSelectmenu = $.widget( "ui.selectmenu", [ $.ui.formResetMixin, {
version: "1.13.0",
version: "1.13.1",
defaultElement: "<select>",
options: {
appendTo: null,
@ -14745,7 +14754,7 @@ var widgetsSelectmenu = $.widget( "ui.selectmenu", [ $.ui.formResetMixin, {
/*!
* jQuery UI Slider 1.13.0
* jQuery UI Slider 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -14764,7 +14773,7 @@ var widgetsSelectmenu = $.widget( "ui.selectmenu", [ $.ui.formResetMixin, {
var widgetsSlider = $.widget( "ui.slider", $.ui.mouse, {
version: "1.13.0",
version: "1.13.1",
widgetEventPrefix: "slide",
options: {
@ -15480,7 +15489,7 @@ var widgetsSlider = $.widget( "ui.slider", $.ui.mouse, {
/*!
* jQuery UI Sortable 1.13.0
* jQuery UI Sortable 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -15497,7 +15506,7 @@ var widgetsSlider = $.widget( "ui.slider", $.ui.mouse, {
var widgetsSortable = $.widget( "ui.sortable", $.ui.mouse, {
version: "1.13.0",
version: "1.13.1",
widgetEventPrefix: "sort",
ready: false,
options: {
@ -15880,79 +15889,76 @@ var widgetsSortable = $.widget( "ui.sortable", $.ui.mouse, {
this.helper[ 0 ].style.top = this.position.top + "px";
}
//Post events to containers
this._contactContainers( event );
//Do scrolling
if ( o.scroll ) {
if ( this._scroll( event ) !== false ) {
if ( this.innermostContainer !== null ) {
//Update item positions used in position checks
this._refreshItemPositions( true );
//Do scrolling
if ( o.scroll ) {
if ( this._scroll( event ) !== false ) {
//Update item positions used in position checks
this._refreshItemPositions( true );
if ( $.ui.ddmanager && !o.dropBehaviour ) {
$.ui.ddmanager.prepareOffsets( this, event );
}
}
}
this.dragDirection = {
vertical: this._getDragVerticalDirection(),
horizontal: this._getDragHorizontalDirection()
};
//Rearrange
for ( i = this.items.length - 1; i >= 0; i-- ) {
//Cache variables and intersection, continue if no intersection
item = this.items[ i ];
itemElement = item.item[ 0 ];
intersection = this._intersectsWithPointer( item );
if ( !intersection ) {
continue;
}
// Only put the placeholder inside the current Container, skip all
// items from 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 between the outer and inner container.
if ( item.instance !== this.currentContainer ) {
continue;
}
// Cannot intersect with itself
// no useless actions that have been done before
// no action if the item moved is the parent of the item checked
if ( itemElement !== this.currentItem[ 0 ] &&
this.placeholder[ intersection === 1 ?
"next" : "prev" ]()[ 0 ] !== itemElement &&
!$.contains( this.placeholder[ 0 ], itemElement ) &&
( this.options.type === "semi-dynamic" ?
!$.contains( this.element[ 0 ], itemElement ) :
true
)
) {
this.direction = intersection === 1 ? "down" : "up";
if ( this.options.tolerance === "pointer" ||
this._intersectsWithSides( item ) ) {
this._rearrange( event, item );
} else {
break;
}
this._trigger( "change", event, this._uiHash() );
break;
if ( $.ui.ddmanager && !o.dropBehaviour ) {
$.ui.ddmanager.prepareOffsets( this, event );
}
}
}
this.dragDirection = {
vertical: this._getDragVerticalDirection(),
horizontal: this._getDragHorizontalDirection()
};
//Rearrange
for ( i = this.items.length - 1; i >= 0; i-- ) {
//Cache variables and intersection, continue if no intersection
item = this.items[ i ];
itemElement = item.item[ 0 ];
intersection = this._intersectsWithPointer( item );
if ( !intersection ) {
continue;
}
// Only put the placeholder inside the current Container, skip all
// items from 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 between the outer and inner container.
if ( item.instance !== this.currentContainer ) {
continue;
}
// Cannot intersect with itself
// no useless actions that have been done before
// no action if the item moved is the parent of the item checked
if ( itemElement !== this.currentItem[ 0 ] &&
this.placeholder[ intersection === 1 ?
"next" : "prev" ]()[ 0 ] !== itemElement &&
!$.contains( this.placeholder[ 0 ], itemElement ) &&
( this.options.type === "semi-dynamic" ?
!$.contains( this.element[ 0 ], itemElement ) :
true
)
) {
this.direction = intersection === 1 ? "down" : "up";
if ( this.options.tolerance === "pointer" ||
this._intersectsWithSides( item ) ) {
this._rearrange( event, item );
} else {
break;
}
this._trigger( "change", event, this._uiHash() );
break;
}
}
//Post events to containers
this._contactContainers( event );
//Interconnect with droppables
if ( $.ui.ddmanager ) {
$.ui.ddmanager.drag( this, event );
@ -16347,10 +16353,14 @@ var widgetsSortable = $.widget( "ui.sortable", $.ui.mouse, {
this.options.axis === "x" || this._isFloating( this.items[ 0 ].item ) :
false;
if ( this.innermostContainer !== null ) {
this._refreshItemPositions( fast );
// This has to be redone because due to the item being moved out/into the offsetParent,
// the offsetParent's position will change
if ( this.offsetParent && this.helper ) {
this.offset.parent = this._getParentOffset();
}
this._refreshItemPositions( fast );
var i, p;
if ( this.options.custom && this.options.custom.refreshContainers ) {
@ -16497,8 +16507,6 @@ var widgetsSortable = $.widget( "ui.sortable", $.ui.mouse, {
}
this.innermostContainer = innermostContainer;
// If no intersecting containers found, return
if ( !innermostContainer ) {
return;
@ -17074,7 +17082,7 @@ var widgetsSortable = $.widget( "ui.sortable", $.ui.mouse, {
/*!
* jQuery UI Spinner 1.13.0
* jQuery UI Spinner 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -17104,7 +17112,7 @@ function spinnerModifier( fn ) {
}
$.widget( "ui.spinner", {
version: "1.13.0",
version: "1.13.1",
defaultElement: "<input>",
widgetEventPrefix: "spin",
options: {
@ -17635,7 +17643,7 @@ var widgetsSpinner = $.ui.spinner;
/*!
* jQuery UI Tabs 1.13.0
* jQuery UI Tabs 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -17654,7 +17662,7 @@ var widgetsSpinner = $.ui.spinner;
$.widget( "ui.tabs", {
version: "1.13.0",
version: "1.13.1",
delay: 300,
options: {
active: null,
@ -18539,7 +18547,7 @@ var widgetsTabs = $.ui.tabs;
/*!
* jQuery UI Tooltip 1.13.0
* jQuery UI Tooltip 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -18558,7 +18566,7 @@ var widgetsTabs = $.ui.tabs;
$.widget( "ui.tooltip", {
version: "1.13.0",
version: "1.13.1",
options: {
classes: {
"ui-tooltip": "ui-corner-all ui-widget-shadow"
@ -18871,7 +18879,10 @@ $.widget( "ui.tooltip", {
// tooltips will handle this in destroy.
if ( target[ 0 ] !== this.element[ 0 ] ) {
events.remove = function() {
this._removeTooltip( this._find( target ).tooltip );
var targetElement = this._find( target );
if ( targetElement ) {
this._removeTooltip( targetElement.tooltip );
}
};
}

View File

@ -1,4 +1,4 @@
/*! jQuery UI - v1.13.0 - 2021-10-07
/*! jQuery UI - v1.13.1 - 2022-01-20
* http://jqueryui.com
* Includes: core.css, accordion.css, autocomplete.css, menu.css, button.css, controlgroup.css, checkboxradio.css, datepicker.css, dialog.css, draggable.css, resizable.css, progressbar.css, selectable.css, selectmenu.css, slider.css, sortable.css, spinner.css, tabs.css, tooltip.css, theme.css
* To view and modify this theme, visit http://jqueryui.com/themeroller/?bgShadowXPos=&bgOverlayXPos=&bgErrorXPos=&bgHighlightXPos=&bgContentXPos=&bgHeaderXPos=&bgActiveXPos=&bgHoverXPos=&bgDefaultXPos=&bgShadowYPos=&bgOverlayYPos=&bgErrorYPos=&bgHighlightYPos=&bgContentYPos=&bgHeaderYPos=&bgActiveYPos=&bgHoverYPos=&bgDefaultYPos=&bgShadowRepeat=&bgOverlayRepeat=&bgErrorRepeat=&bgHighlightRepeat=&bgContentRepeat=&bgHeaderRepeat=&bgActiveRepeat=&bgHoverRepeat=&bgDefaultRepeat=&iconsHover=url(%22images%2Fui-icons_555555_256x240.png%22)&iconsHighlight=url(%22images%2Fui-icons_777620_256x240.png%22)&iconsHeader=url(%22images%2Fui-icons_444444_256x240.png%22)&iconsError=url(%22images%2Fui-icons_cc0000_256x240.png%22)&iconsDefault=url(%22images%2Fui-icons_777777_256x240.png%22)&iconsContent=url(%22images%2Fui-icons_444444_256x240.png%22)&iconsActive=url(%22images%2Fui-icons_ffffff_256x240.png%22)&bgImgUrlShadow=&bgImgUrlOverlay=&bgImgUrlHover=&bgImgUrlHighlight=&bgImgUrlHeader=&bgImgUrlError=&bgImgUrlDefault=&bgImgUrlContent=&bgImgUrlActive=&opacityFilterShadow=Alpha(Opacity%3D30)&opacityFilterOverlay=Alpha(Opacity%3D30)&opacityShadowPerc=30&opacityOverlayPerc=30&iconColorHover=%23555555&iconColorHighlight=%23777620&iconColorHeader=%23444444&iconColorError=%23cc0000&iconColorDefault=%23777777&iconColorContent=%23444444&iconColorActive=%23ffffff&bgImgOpacityShadow=0&bgImgOpacityOverlay=0&bgImgOpacityError=95&bgImgOpacityHighlight=55&bgImgOpacityContent=75&bgImgOpacityHeader=75&bgImgOpacityActive=65&bgImgOpacityHover=75&bgImgOpacityDefault=75&bgTextureShadow=flat&bgTextureOverlay=flat&bgTextureError=flat&bgTextureHighlight=flat&bgTextureContent=flat&bgTextureHeader=flat&bgTextureActive=flat&bgTextureHover=flat&bgTextureDefault=flat&cornerRadius=3px&fwDefault=normal&ffDefault=Arial%2CHelvetica%2Csans-serif&fsDefault=1em&cornerRadiusShadow=8px&thicknessShadow=5px&offsetLeftShadow=0px&offsetTopShadow=0px&opacityShadow=.3&bgColorShadow=%23666666&opacityOverlay=.3&bgColorOverlay=%23aaaaaa&fcError=%235f3f3f&borderColorError=%23f1a899&bgColorError=%23fddfdf&fcHighlight=%23777620&borderColorHighlight=%23dad55e&bgColorHighlight=%23fffa90&fcContent=%23333333&borderColorContent=%23dddddd&bgColorContent=%23ffffff&fcHeader=%23333333&borderColorHeader=%23dddddd&bgColorHeader=%23e9e9e9&fcActive=%23ffffff&borderColorActive=%23003eff&bgColorActive=%23007fff&fcHover=%232b2b2b&borderColorHover=%23cccccc&bgColorHover=%23ededed&fcDefault=%23454545&borderColorDefault=%23c5c5c5&bgColorDefault=%23f6f6f6

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
/*!
* jQuery UI CSS Framework 1.13.0
* jQuery UI CSS Framework 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors

View File

@ -1,4 +1,4 @@
/*! jQuery UI - v1.13.0 - 2021-10-07
/*! jQuery UI - v1.13.1 - 2022-01-20
* http://jqueryui.com
* Copyright jQuery Foundation and other contributors; Licensed MIT */

View File

@ -1,5 +1,5 @@
/*!
* jQuery UI CSS Framework 1.13.0
* jQuery UI CSS Framework 1.13.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors

View File

@ -1,4 +1,4 @@
/*! jQuery UI - v1.13.0 - 2021-10-07
/*! jQuery UI - v1.13.1 - 2022-01-20
* http://jqueryui.com
* Copyright jQuery Foundation and other contributors; Licensed MIT */

View File

@ -2,11 +2,11 @@
"name": "jquery-ui",
"title": "jQuery UI",
"description": "A curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library.",
"version": "1.13.0",
"version": "1.13.1",
"homepage": "http://jqueryui.com",
"author": {
"name": "jQuery Foundation and other contributors",
"url": "https://github.com/jquery/jquery-ui/blob/1.13.0/AUTHORS.txt"
"url": "https://github.com/jquery/jquery-ui/blob/1.13.1/AUTHORS.txt"
},
"main": "ui/widget.js",
"maintainers": [
@ -40,7 +40,9 @@
"type": "git",
"url": "git://github.com/jquery/jquery-ui.git"
},
"bugs": "https://bugs.jqueryui.com/",
"bugs": {
"url": "https://github.com/jquery/jquery-ui/issues"
},
"license": "MIT",
"scripts": {
"test": "grunt"
@ -51,14 +53,14 @@
"devDependencies": {
"commitplease": "3.2.0",
"eslint-config-jquery": "3.0.0",
"glob": "7.1.7",
"glob": "7.2.0",
"grunt": "1.4.1",
"grunt-bowercopy": "1.2.5",
"grunt-cli": "1.4.3",
"grunt-compare-size": "0.4.2",
"grunt-contrib-concat": "1.0.1",
"grunt-contrib-csslint": "2.0.0",
"grunt-contrib-qunit": "5.0.1",
"grunt-contrib-qunit": "5.1.1",
"grunt-contrib-requirejs": "1.0.0",
"grunt-contrib-uglify": "5.0.1",
"grunt-eslint": "23.0.0",

View File

@ -26,6 +26,12 @@ if (class_exists('AdminPanelAction')) {
function onsubmit($data = NULL) {
global $fp_config;
// No action possible if LastComments plugin isn't activated!
if (!function_exists('plugin_lastcomments_cache')) {
$this->smarty->assign('success', -2);
return;
}
if (isset($_POST ['lastcommentadmin_clear'])) {
fs_delete(LASTCOMMENTS_CACHE_FILE);
$this->smarty->assign('success', 1);

View File

@ -1,197 +1,225 @@
<?php
class admin_uploader_mediamanager extends AdminPanelAction {
class admin_uploader_mediamanager extends AdminPanelAction {
var $finfo;
var $conf;
var $langres = 'plugin:mediamanager';
function cmpfiles($a, $b){
$c = strcmp($a['type'],$b['type']);
if ($c==0){
return strcmp($a['name'],$b['name']);
function cmpfiles($a, $b) {
$c = strcmp($a ['type'], $b ['type']);
if ($c == 0) {
return strcmp($a ['name'], $b ['name']);
}
return $c;
}
function formatBytes($bytes, $precision = 2) {
$units = array('B', 'KB', 'MB', 'GB', 'TB');
$units = array(
'B',
'KB',
'MB',
'GB',
'TB'
);
$bytes = max($bytes, 0);
$pow = floor(($bytes ? log($bytes) : 0) / log(1024));
$pow = min($pow, count($units) - 1);
$bytes /= pow(1024, $pow);
return round($bytes, $precision) . ' ' . $units[$pow];
}
return round($bytes, $precision) . ' ' . $units [$pow];
}
function getFileInfo($filepath){
function getFileInfo($filepath) {
global $fp_config;
$info = array(
"name"=>basename($filepath),
"size"=>$this->formatBytes(filesize($filepath)),
"mtime"=>date_strformat($fp_config['locale']['dateformatshort'], filemtime($filepath))
"name" => basename($filepath),
"size" => $this->formatBytes(filesize($filepath)),
"mtime" => date_strformat($fp_config ['locale'] ['dateformatshort'], filemtime($filepath))
);
if (isset($this->conf['usecount'][basename($filepath)])){
$info['usecount']=$this->conf['usecount'][basename($filepath)];
if (isset($this->conf ['usecount'] [basename($filepath)])) {
$info ['usecount'] = $this->conf ['usecount'] [basename($filepath)];
} else {
$info['usecount'] = null;
$info ['usecount'] = null;
}
return $info;
}
function setup() {
$this->smarty->assign('admin_resource', "plugin:mediamanager/admin.plugin.mediamanager.files");
}
function deleteFolder($folder, $mmbaseurl){
if (!file_exists($folder)) return false;
}
function setup() {
$this->smarty->assign('admin_resource', "plugin:mediamanager/admin.plugin.mediamanager.files");
}
function deleteFolder($folder, $mmbaseurl) {
if (!file_exists($folder))
return false;
$dir = opendir($folder);
while (false !== ($file = readdir($dir))) {
if (!in_array($file, array(".",".."))) {
if (is_dir($folder."/".$file)){
$this->deleteFolder($folder."/".$file, $mmbaseurl);
if (!fs_is_directorycomponent($file)) {
if (is_dir($folder . "/" . $file)) {
$this->deleteFolder($folder . "/" . $file, $mmbaseurl);
} else {
if (!unlink($folder."/".$file)) return false;
if (!unlink($folder . "/" . $file))
return false;
}
}
}
return rmdir($folder);
}
function doItemActions($folder, $mmbaseurl){
/* delete file*/
if (isset($_GET['deletefile'])){
list($type, $name) = explode("-", $_GET['deletefile'],2);
switch($type){
case 'attachs': $type=ABS_PATH.ATTACHS_DIR; break;
case 'images': $type=ABS_PATH.IMAGES_DIR.$folder; break;
function doItemActions($folder, $mmbaseurl) {
/* delete file */
if (isset($_GET ['deletefile'])) {
list ($type, $name) = explode("-", $_GET ['deletefile'], 2);
switch ($type) {
case 'attachs':
$type = ABS_PATH . ATTACHS_DIR;
break;
case 'images':
$type = ABS_PATH . IMAGES_DIR . $folder;
break;
case 'gallery':
if ( !$this->deleteFolder(ABS_PATH.IMAGES_DIR.$name, $mmbaseurl))
@utils_redirect($mmbaseurl.'&status=-1');
@utils_redirect($mmbaseurl.'&status=1');
if (!$this->deleteFolder(ABS_PATH . IMAGES_DIR . $name, $mmbaseurl))
@utils_redirect($mmbaseurl . '&status=-1');
@utils_redirect($mmbaseurl . '&status=1');
return true;
break;
default: { @utils_redirect($mmbaseurl.'&status=-1'); return true; }
default:
{
@utils_redirect($mmbaseurl . '&status=-1');
return true;
}
}
if (!file_exists($type.$name)) { @utils_redirect($mmbaseurl.'&status=-1'); return true; }
if (!unlink($type.$name)) { @utils_redirect($mmbaseurl.'&status=-1'); return true; }
@utils_redirect($mmbaseurl.'&status=1');
if (!file_exists($type . $name)) {
@utils_redirect($mmbaseurl . '&status=-1');
return true;
}
if (!unlink($type . $name)) {
@utils_redirect($mmbaseurl . '&status=-1');
return true;
}
@utils_redirect($mmbaseurl . '&status=1');
return true;
}
if (isset($_GET['status'])){
$this->smarty->assign('success', $_GET['status']);
if (isset($_GET ['status'])) {
$this->smarty->assign('success', $_GET ['status']);
}
return false;
}
function main() {
$mmbaseurl="admin.php?p=uploader&action=mediamanager";
$folder = ""; $gallery="";
if (isset($_GET['gallery'])){
$mmbaseurl .= "&gallery=".$_GET['gallery'];
$gallery = str_replace("/","",$_GET['gallery']);
$folder = $gallery."/";
$mmbaseurl = "admin.php?p=uploader&action=mediamanager";
$folder = "";
$gallery = "";
if (isset($_GET ['gallery']) && !fs_is_directorycomponent($_GET ['gallery'])) {
$mmbaseurl .= "&gallery=" . $_GET ['gallery'];
$gallery = str_replace("/", "", $_GET ['gallery']);
$folder = $gallery . "/";
}
$weburl = plugin_geturl('mediamanager');
$this->conf = plugin_getoptions('mediamanager');
if ($this->doItemActions($folder, $mmbaseurl)) return;
if ($this->doItemActions($folder, $mmbaseurl))
return;
$files = array();
$galleries = array();
$files_needupdate=array();
$galleries_needupdate=array();
$files_needupdate = array();
$galleries_needupdate = array();
# galleries (alwais from IMAGES_DIR)
if (file_exists(ABS_PATH.IMAGES_DIR)){
$dir = opendir(ABS_PATH.IMAGES_DIR);
while (false !== ($file = readdir($dir))){
$fullpath=ABS_PATH.IMAGES_DIR.$file;
if (!in_array($file, array(".","..",".thumbs")) && is_dir($fullpath)) {
if (file_exists(ABS_PATH . IMAGES_DIR)) {
$dir = opendir(ABS_PATH . IMAGES_DIR);
while (false !== ($file = readdir($dir))) {
$fullpath = ABS_PATH . IMAGES_DIR . $file;
if (!fs_is_directorycomponent($file) && !fs_is_hidden_file($file) && is_dir($fullpath)) {
$info = $this->getFileInfo($fullpath);
$info['type'] = "gallery";
$galleries[$fullpath] = $info;
if (is_null($info['usecount'])) { $galleries_needupdate[]=$fullpath;}
$info ['type'] = "gallery";
$galleries [$fullpath] = $info;
if (is_null($info ['usecount'])) {
$galleries_needupdate [] = $fullpath;
}
}
}
}
# attachs (NO attachs in galleries)
if ($folder=="" && file_exists(ABS_PATH.ATTACHS_DIR)){
$dir = opendir(ABS_PATH.ATTACHS_DIR);
if ($folder == "" && file_exists(ABS_PATH . ATTACHS_DIR)) {
$dir = opendir(ABS_PATH . ATTACHS_DIR);
while (false !== ($file = readdir($dir))) {
if (!in_array($file, array(".",".."))) {
$fullpath = ABS_PATH.ATTACHS_DIR.$file;
$info=$this->getFileInfo($fullpath);
$info['type']="attachs";
$info['url']=BLOG_ROOT.ATTACHS_DIR.$file;
$files[$fullpath]=$info;
if (is_null($info['usecount'])) { $files_needupdate[]=$fullpath;}
if (!fs_is_directorycomponent($file) && !fs_is_hidden_file($file)) {
$fullpath = ABS_PATH . ATTACHS_DIR . $file;
$info = $this->getFileInfo($fullpath);
$info ['type'] = "attachs";
$info ['url'] = BLOG_ROOT . ATTACHS_DIR . $file;
$files [$fullpath] = $info;
if (is_null($info ['usecount'])) {
$files_needupdate [] = $fullpath;
}
}
}
}
# images
if (file_exists(ABS_PATH.IMAGES_DIR.$folder)){
$dir = opendir(ABS_PATH.IMAGES_DIR.$folder);
while (false !== ($file = readdir($dir))){
$fullpath=ABS_PATH.IMAGES_DIR.$folder.$file;
if (!in_array($file, array(".","..",".thumbs")) && !is_dir($fullpath)) {
$info=$this->getFileInfo($fullpath);
$info['type']="images";
$info['url']=BLOG_ROOT.IMAGES_DIR.$folder.$file;
$files[$fullpath]=$info;
if (file_exists(ABS_PATH . IMAGES_DIR . $folder)) {
$dir = opendir(ABS_PATH . IMAGES_DIR . $folder);
while (false !== ($file = readdir($dir))) {
$fullpath = ABS_PATH . IMAGES_DIR . $folder . $file;
if (!fs_is_directorycomponent($file) && !fs_is_hidden_file($file) && !is_dir($fullpath)) {
$info = $this->getFileInfo($fullpath);
$info ['type'] = "images";
$info ['url'] = BLOG_ROOT . IMAGES_DIR . $folder . $file;
$files [$fullpath] = $info;
# NO count for images in galleries
if ($folder=="" && is_null($info['usecount'])) { $files_needupdate[]=$fullpath; }
if ($folder == "" && is_null($info ['usecount'])) {
$files_needupdate [] = $fullpath;
}
}
}
}
mediamanager_updateUseCountArr($files,$files_needupdate);
mediamanager_updateUseCountArr($galleries,$galleries_needupdate);
usort($files, Array("admin_uploader_mediamanager","cmpfiles"));
$totalfilescount = (string) count($files);
#paginator
$pages = ceil((count($files)+count($galleries))/ ITEMSPERPAGE);
if ($pages==0) $pages=1;
if (isset($_GET['page'])){
$page = (int) $_GET['page'];
} else {
$page=1;
}
if ($page<1) $page=1;
if ($page>$pages) $page=$pages;
$pagelist = array();
for($k=1; $k<=$pages; $k++ ) $pagelist[]=$k;
$paginator = array( "total"=>$pages,
"current"=>$page,
"limit" => ITEMSPERPAGE,
"pages" => $pagelist
);
mediamanager_updateUseCountArr($files, $files_needupdate);
mediamanager_updateUseCountArr($galleries, $galleries_needupdate);
$startfrom = ($page-1)*ITEMSPERPAGE;
$galleriesout = count(array_slice($galleries,0, $startfrom));
$dropdowngalleries=$galleries;
usort($files, Array(
"admin_uploader_mediamanager",
"cmpfiles"
));
$totalfilescount = (string) count($files);
# paginator
$pages = ceil((count($files) + count($galleries)) / ITEMSPERPAGE);
if ($pages == 0)
$pages = 1;
if (isset($_GET ['page'])) {
$page = (int) $_GET ['page'];
} else {
$page = 1;
}
if ($page < 1)
$page = 1;
if ($page > $pages)
$page = $pages;
$pagelist = array();
for($k = 1; $k <= $pages; $k++)
$pagelist [] = $k;
$paginator = array(
"total" => $pages,
"current" => $page,
"limit" => ITEMSPERPAGE,
"pages" => $pagelist
);
$startfrom = ($page - 1) * ITEMSPERPAGE;
$galleriesout = count(array_slice($galleries, 0, $startfrom));
$dropdowngalleries = $galleries;
$galleries = array_slice($galleries, $startfrom, ITEMSPERPAGE);
$files = array_slice($files, $startfrom-$galleriesout, ITEMSPERPAGE- count($galleries));
$files = array_slice($files, $startfrom - $galleriesout, ITEMSPERPAGE - count($galleries));
$this->smarty->assign('paginator', $paginator);
$this->smarty->assign('files', $files);
@ -202,17 +230,17 @@ class admin_uploader_mediamanager extends AdminPanelAction {
$this->smarty->assign('currentgallery', $gallery);
$this->smarty->assign('totalfilescount', $totalfilescount);
}
function onsubmit($data = NULL) {
if (isset($_POST['mm-newgallery'])){
$newgallery=$_POST['mm-newgallery-name'];
if ($newgallery==""){
if (isset($_POST ['mm-newgallery'])) {
$newgallery = $_POST ['mm-newgallery-name'];
if ($newgallery == "") {
$this->smarty->assign('success', -3);
return 2;
}
$newgallery = str_replace("/","", $newgallery);
$newgallery = str_replace(".","", $newgallery);
if (mkdir(ABS_PATH.IMAGES_DIR.$newgallery) ) {
$newgallery = str_replace("/", "", $newgallery);
$newgallery = str_replace(".", "", $newgallery);
if (mkdir(ABS_PATH . IMAGES_DIR . $newgallery)) {
$this->smarty->assign('success', 3);
} else {
$this->smarty->assign('success', -2);
@ -220,28 +248,25 @@ class admin_uploader_mediamanager extends AdminPanelAction {
return 2;
}
$folder = "";
if (isset($_GET['gallery'])){
$mmbaseurl .= "&gallery=".$_GET['gallery'];
$folder = str_replace("/","",$_GET['gallery'])."/";
if (isset($_GET ['gallery'])) {
$mmbaseurl .= "&gallery=" . $_GET ['gallery'];
$folder = str_replace("/", "", $_GET ['gallery']) . "/";
}
list ($action, $arg) = explode("-", $_POST ['action'], 2);
if (!isset($_POST ['file']))
return 2;
foreach ($_POST ['file'] as $file => $v) {
list ($type, $name) = explode("-", $file, 2);
if ($action == 'atg' && $type == 'images') {
copy(ABS_PATH . IMAGES_DIR . $folder . $name, ABS_PATH . IMAGES_DIR . $arg . '/' . $name);
$this->smarty->assign('success', 2);
}
}
list($action,$arg) = explode("-",$_POST['action'],2);
if (!isset($_POST['file'])) return 2;
foreach($_POST['file'] as $file=>$v){
list($type,$name) = explode("-",$file,2);
if ($action=='atg' && $type=='images'){
copy( ABS_PATH.IMAGES_DIR.$folder.$name, ABS_PATH.IMAGES_DIR.$arg.'/'.$name);
$this->smarty->assign('success', 2);
}
}
return 2;
}
}
}
admin_addpanelaction('uploader', 'mediamanager', true);
?>
admin_addpanelaction('uploader', 'mediamanager', true);

View File

@ -8,8 +8,8 @@
* Description: Manage uploaded files and photo galleries. Part of the standard distribution.
*/
// config
define('ITEMSPERPAGE', 10);
// FIXME: Add a config option in the plugin panel to set this value
define('ITEMSPERPAGE', 50);
//
function mediamanager_updateUseCountArr(&$files, $fupd) {
@ -55,6 +55,4 @@ function mediamanager_invalidatecount($arg) {
return $arg;
}
add_filter('delete_post', 'mediamanager_invalidatecount', 1);
add_filter('content_save_pre', 'mediamanager_invalidatecount', 1);
?>
add_filter('content_save_pre', 'mediamanager_invalidatecount', 1);

View File

@ -222,7 +222,6 @@ class PhotoSwipeFunctions {
echo '
<script src="' . $pdir . 'res/photoswipe-4.1.1/photoswipe-ui-default.min.js"></script>
<script src="' . $pdir . 'res/photoswipe-4.1.1/photoswipe.min.js"></script>
<scripst src="' . $pdir . 'res/photoswipe.js.php">
<script>';
include_once (dirname(__FILE__) . '/res/photoswipe.js.php');
echo '