1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-09 08:17:12 +02:00

Bump version to 3.0.89 and some other adjustments

This commit is contained in:
Ryan Cramer
2018-01-26 11:43:22 -05:00
parent 2cebe89e57
commit 90efe9b14a
6 changed files with 28 additions and 27 deletions

View File

@@ -1063,20 +1063,6 @@ $config->pageAdd = array(
'noSuggestTemplates' => '',
);
/**
* Disable template suggestions when adding new pages?
*
* Applies when adding a new page where more than one template may be selected for the newly added page.
*
* - true: Always disable template suggestions (forcing user to make selection)
* - false: Never disable template suggestions (default)
* - array: Array of template names or IDs where suggestions should be disabled when children are added.
*
* @var bool|array
*
$config->noSuggestTemplate = false;
*/
/*** 9. MISC ************************************************************************************/

View File

@@ -232,13 +232,13 @@ class Pagefile extends WireData {
*/
public function filedata($key = '', $value = null) {
$filedata = $this->filedata;
$changed = false;
if($key === false || $key === null) {
// unset property named in $value
if(!empty($value)) {
if(!empty($value) && isset($filedata[$value])) {
unset($this->filedata[$value]);
if(isset($filedata[$value])) $this->trackChange('filedata', $filedata, $this->filedata);
$changed = true;
}
return $this;
} else if(empty($key)) {
// return all
return $filedata;
@@ -246,9 +246,8 @@ class Pagefile extends WireData {
// set all
if($key != $filedata) {
$this->filedata = $key;
$this->trackChange('filedata', $filedata, $this->filedata);
$changed = true;
}
return $this;
} else if($value === null) {
// return value for key
return isset($this->filedata[$key]) ? $this->filedata[$key] : null;
@@ -256,10 +255,14 @@ class Pagefile extends WireData {
// set value for key
if(!isset($filedata[$key]) || $filedata[$key] != $value) {
$this->filedata[$key] = $value;
$this->trackChange('filedata', $filedata, $this->filedata);
$changed = true;
}
return $this;
}
if($changed) {
$this->trackChange('filedata', $filedata, $this->filedata);
if($this->page && $this->field) $this->page->trackChange($this->field->name);
}
return $this;
}
/**

View File

@@ -45,7 +45,7 @@ class ProcessWire extends Wire {
* Reversion revision number
*
*/
const versionRevision = 88;
const versionRevision = 89;
/**
* Version suffix string (when applicable)

View File

@@ -2006,8 +2006,9 @@ function InputfieldImage($) {
}
updateProgress();
if(useClientResize) {
var ext = file.name.substring(file.name.lastIndexOf('.')+1).toLowerCase();
if(useClientResize && (ext == 'jpg' || ext == 'jpeg' || ext == 'png' || ext == 'gif')) {
var resizer = new PWImageResizer(resizeSettings);
$spinner.addClass('pw-resizing');
resizer.resize(file, function(imageData) {

File diff suppressed because one or more lines are too long

View File

@@ -830,7 +830,7 @@ class InputfieldImage extends InputfieldFile implements InputfieldItemList, Inpu
/**
* Get array of actions available for given Pagefile
*
* @param Pagefile $pagefile
* @param Pagefile|Pageimage $pagefile
* @return array Associative array of ('action_name' => 'Action Label')
*
*/
@@ -849,6 +849,7 @@ class InputfieldImage extends InputfieldFile implements InputfieldItemList, Inpu
'dup' => $this->_('Duplicate'),
'rmv' => $this->_('Remove variations'),
'rbv' => $this->_('Rebuild variations'),
'rmf' => $this->_('Remove focus'),
'vertical' => $this->_('vert'),
'horizontal' => $this->_('horiz'),
'both' => $this->_('both'),
@@ -886,6 +887,10 @@ class InputfieldImage extends InputfieldFile implements InputfieldItemList, Inpu
$actions['bw'] = $labels['bw'];
$actions['sep'] = $labels['sep'];
if($pagefile->hasFocus) {
$actions['rmf'] = $labels['rmf'];
}
}
return $actions;
@@ -1345,6 +1350,7 @@ class InputfieldImage extends InputfieldFile implements InputfieldItemList, Inpu
$success = null;
$showSuccess = true;
$rebuildVariations = false;
if($action == 'dup') {
// duplicate image file
@@ -1369,6 +1375,10 @@ class InputfieldImage extends InputfieldFile implements InputfieldItemList, Inpu
// rebuild variations
} else if($action == 'rmv') {
// remove variations
} else if($action == 'rmf') {
// remove focus
$pagefile->focus(false);
$success = true;
} else {
/** @var ImageSizer $sizer Image sizer actions */
$sizer = $this->wire(new ImageSizer($pagefile->filename()));
@@ -1396,9 +1406,10 @@ class InputfieldImage extends InputfieldFile implements InputfieldItemList, Inpu
$success = $sizer->rotate($deg);
}
if($success && $rebuildVariations) $pagefile->rebuildVariations();
}
if($success && $rebuildVariations) $pagefile->rebuildVariations();
if($success === null) {
// for hooks
$success = $this->processUnknownFileAction($pagefile, $action, $label);