mirror of
https://github.com/processwire/processwire.git
synced 2025-08-09 16:26:59 +02:00
Fix issue processwire/processwire-issues#1875
This commit is contained in:
@@ -220,7 +220,9 @@ class InputfieldImage extends InputfieldFile implements InputfieldItemList, Inpu
|
|||||||
$config->scripts->add($thisURL . "PWImageResizer.$jsExt?v={$config->version}-$moduleInfo[version]");
|
$config->scripts->add($thisURL . "PWImageResizer.$jsExt?v={$config->version}-$moduleInfo[version]");
|
||||||
$maxSize = str_replace(',', '.', $this->maxSize);
|
$maxSize = str_replace(',', '.', $this->maxSize);
|
||||||
$quality = str_replace(',', '.', (float) ($this->clientQuality / 100));
|
$quality = str_replace(',', '.', (float) ($this->clientQuality / 100));
|
||||||
$this->wrapAttr('data-resize', "$this->maxWidth;$this->maxHeight;$maxSize;$quality");
|
$maxWidth = $this->maxWidth ? (int) $this->maxWidth : 99999;
|
||||||
|
$maxHeight = $this->maxHeight ? (int) $this->maxHeight : 99999;
|
||||||
|
$this->wrapAttr('data-resize', "$maxWidth;$maxHeight;$maxSize;$quality");
|
||||||
}
|
}
|
||||||
|
|
||||||
$value = $this->val();
|
$value = $this->val();
|
||||||
@@ -1000,7 +1002,7 @@ class InputfieldImage extends InputfieldFile implements InputfieldItemList, Inpu
|
|||||||
* });
|
* });
|
||||||
* ~~~~~
|
* ~~~~~
|
||||||
*
|
*
|
||||||
* @param Pagefile|Pageimage $pagefile
|
* @param Pageimage $pagefile
|
||||||
* @return array Associative array of ('action_name' => 'Action Label')
|
* @return array Associative array of ('action_name' => 'Action Label')
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@@ -1166,7 +1168,7 @@ class InputfieldImage extends InputfieldFile implements InputfieldItemList, Inpu
|
|||||||
/**
|
/**
|
||||||
* Get variations for the given Pagefile
|
* Get variations for the given Pagefile
|
||||||
*
|
*
|
||||||
* @param Pagefile|Pageimage $pagefile
|
* @param Pageimage $pagefile
|
||||||
* @return array
|
* @return array
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@@ -1177,7 +1179,7 @@ class InputfieldImage extends InputfieldFile implements InputfieldItemList, Inpu
|
|||||||
/**
|
/**
|
||||||
* Get the image editor URL
|
* Get the image editor URL
|
||||||
*
|
*
|
||||||
* @param Pagefile|Pageimage $pagefile
|
* @param Pageimage $pagefile
|
||||||
* @param int $pageID
|
* @param int $pageID
|
||||||
* @return string
|
* @return string
|
||||||
*
|
*
|
||||||
@@ -1196,7 +1198,7 @@ class InputfieldImage extends InputfieldFile implements InputfieldItemList, Inpu
|
|||||||
/**
|
/**
|
||||||
* Render the description field input
|
* Render the description field input
|
||||||
*
|
*
|
||||||
* @param Pagefile|Pageimage $pagefile
|
* @param Pageimage $pagefile
|
||||||
* @param string $id
|
* @param string $id
|
||||||
* @param int $n
|
* @param int $n
|
||||||
* @return string
|
* @return string
|
||||||
@@ -1355,7 +1357,7 @@ class InputfieldImage extends InputfieldFile implements InputfieldItemList, Inpu
|
|||||||
* Process input for a given Pageimage
|
* Process input for a given Pageimage
|
||||||
*
|
*
|
||||||
* @param WireInputData $input
|
* @param WireInputData $input
|
||||||
* @param Pagefile|Pageimage $pagefile
|
* @param Pageimage $pagefile
|
||||||
* @param int $n
|
* @param int $n
|
||||||
* @return bool
|
* @return bool
|
||||||
*
|
*
|
||||||
|
@@ -84,7 +84,7 @@ class InputfieldImageConfiguration extends Wire {
|
|||||||
$field->attr('name', 'resizeServer');
|
$field->attr('name', 'resizeServer');
|
||||||
$field->label = $this->_('How to resize to max dimensions');
|
$field->label = $this->_('How to resize to max dimensions');
|
||||||
$field->description = $this->_('Using client-side resize enables you to reduce the file size and dimensions before uploading.');
|
$field->description = $this->_('Using client-side resize enables you to reduce the file size and dimensions before uploading.');
|
||||||
$field->notes = $this->_('When using client-side resize, please specify both max width *and* max height in the fields above, or max megapixels in the field below.');
|
$field->notes = $this->_('When using client-side resize, please specify max width and/or max height in the fields above, or max megapixels in the field below.');
|
||||||
$field->icon = 'object-group';
|
$field->icon = 'object-group';
|
||||||
$field->addOption(0, $this->_('Use client-side resize when possible'));
|
$field->addOption(0, $this->_('Use client-side resize when possible'));
|
||||||
$field->addOption(1, $this->_('Use only server-side resize'));
|
$field->addOption(1, $this->_('Use only server-side resize'));
|
||||||
|
Reference in New Issue
Block a user