mirror of
https://github.com/processwire/processwire.git
synced 2025-08-11 09:14:58 +02:00
Fix issue processwire/processwire-issues#1128
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -822,6 +822,8 @@ class InputfieldImage extends InputfieldFile implements InputfieldItemList, Inpu
|
|||||||
*/
|
*/
|
||||||
protected function renderFileActionSelect(Pagefile $pagefile, $id) {
|
protected function renderFileActionSelect(Pagefile $pagefile, $id) {
|
||||||
|
|
||||||
|
if(!$this->useImageEditor) return '';
|
||||||
|
|
||||||
static $hooked = null;
|
static $hooked = null;
|
||||||
|
|
||||||
if($hooked === null) $hooked =
|
if($hooked === null) $hooked =
|
||||||
@@ -1309,6 +1311,11 @@ class InputfieldImage extends InputfieldFile implements InputfieldItemList, Inpu
|
|||||||
|
|
||||||
/** @var Sanitizer $sanitizer */
|
/** @var Sanitizer $sanitizer */
|
||||||
$sanitizer = $this->wire('sanitizer');
|
$sanitizer = $this->wire('sanitizer');
|
||||||
|
$page = $this->hasPage;
|
||||||
|
|
||||||
|
if($page && $page->id) {
|
||||||
|
if(!$this->wire()->user->hasPermission('page-edit-images', $page)) $this->useImageEditor = 0;
|
||||||
|
}
|
||||||
|
|
||||||
parent::___processInput($input);
|
parent::___processInput($input);
|
||||||
|
|
||||||
@@ -1388,6 +1395,8 @@ class InputfieldImage extends InputfieldFile implements InputfieldItemList, Inpu
|
|||||||
*/
|
*/
|
||||||
protected function processFileAction(Pageimage $pagefile, $action, $label) {
|
protected function processFileAction(Pageimage $pagefile, $action, $label) {
|
||||||
|
|
||||||
|
if(!$this->useImageEditor) return null;
|
||||||
|
|
||||||
$success = null;
|
$success = null;
|
||||||
$showSuccess = true;
|
$showSuccess = true;
|
||||||
$rebuildVariations = false;
|
$rebuildVariations = false;
|
||||||
|
@@ -70,6 +70,16 @@ $focusPointCircleSize: 40px;
|
|||||||
list-style: none;
|
list-style: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.gridImage .gridImage__overflow, // grid view(s)
|
||||||
|
.InputfieldImageEditAll .gridImage .gridImage__overflow img, // list view
|
||||||
|
.InputfieldImageEdit__image { // clicked image in editor in grid view
|
||||||
|
// the following creates a checkerboard pattern (for seeing transparency)
|
||||||
|
background-color: #fefefe;
|
||||||
|
background-image: linear-gradient(45deg, #cbcbcb 25%, transparent 25%, transparent 75%, #cbcbcb 75%, #cbcbcb), linear-gradient(45deg, #cbcbcb 25%, transparent 25%, transparent 75%, #cbcbcb 75%, #cbcbcb);
|
||||||
|
background-size: 16px 16px;
|
||||||
|
background-position: 0 0, 8px 8px;
|
||||||
|
}
|
||||||
|
|
||||||
// An individual image grid item
|
// An individual image grid item
|
||||||
.gridImage {
|
.gridImage {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
@@ -95,11 +105,6 @@ $focusPointCircleSize: 40px;
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: relative;
|
position: relative;
|
||||||
// the following creates a checkerboard pattern (for seeing transparency)
|
|
||||||
background-color: #fefefe;
|
|
||||||
background-image: linear-gradient(45deg, #cbcbcb 25%, transparent 25%, transparent 75%, #cbcbcb 75%, #cbcbcb), linear-gradient(45deg, #cbcbcb 25%, transparent 25%, transparent 75%, #cbcbcb 75%, #cbcbcb);
|
|
||||||
background-size: 16px 16px;
|
|
||||||
background-position: 0 0, 8px 8px;
|
|
||||||
|
|
||||||
& > img {
|
& > img {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
Reference in New Issue
Block a user