Skip to content

Commit

Permalink
Merge branch 'release/1.10.8'
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Mar 19, 2021
2 parents 3627923 + a327e72 commit 6546f12
Show file tree
Hide file tree
Showing 10 changed files with 5,573 additions and 103,030 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# v1.10.8
## 03/19/2021

1. [](#improved)
* Include alt text and title for images added to the editor [#2098](https://github.com/getgrav/grav-plugin-admin/issues/2098)
1. [](#bugfix)
* Fixed issue replacing `wildcard` field names in flex collections [#2092](https://github.com/getgrav/grav-plugin-admin/pull/2092)
* Fixed legacy Pages having old `modular` reference instead of `module` [#2093](https://github.com/getgrav/grav-plugin-admin/issues/2093)
* Fixed issue where Add New modal would close if selecting an item outside of the modal window. It is now necessary go through the Cancel button and clicking the overlay won't trigger the closing of the modal [#2089](https://github.com/getgrav/grav-plugin-admin/issues/2089), [#2065](https://github.com/getgrav/grav-plugin-admin/issues/2065)

# v1.10.7
## 03/17/2021

Expand Down
2 changes: 1 addition & 1 deletion blueprints.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Admin Panel
slug: admin
type: plugin
version: 1.10.7
version: 1.10.8
description: Adds an advanced administration panel to manage your site
icon: empire
author:
Expand Down
12 changes: 6 additions & 6 deletions classes/plugin/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,18 +144,18 @@ public function taskSave()

switch ($this->view) {
case 'pages':
return $this->taskSavePage();
return $this->savePage();
case 'user':
return $this->taskSaveUser();
return $this->saveUser();
default:
return $this->taskSaveDefault();
return $this->saveDefault();
}
}

/**
* @return bool
*/
protected function taskSaveDefault()
protected function saveDefault()
{
// Handle standard data types.
$type = $this->getDataType();
Expand Down Expand Up @@ -451,7 +451,7 @@ protected function taskForgot()
*
* @return bool
*/
protected function taskSaveUser()
protected function saveUser()
{
/** @var UserCollectionInterface $users */
$users = $this->grav['accounts'];
Expand Down Expand Up @@ -1358,7 +1358,7 @@ public function taskSaveNewFolder()
/**
* @return bool
*/
protected function taskSavePage()
protected function savePage()
{
$reorder = true;

Expand Down
2 changes: 1 addition & 1 deletion themes/grav/app/forms/fields/collections.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export default class CollectionsField {

item.attr('data-collection-key', hasCustomKey ? observedValue : index);

['name', 'data-grav-field-name', 'for', 'id', 'data-grav-file-settings', 'data-grav-array-name'].forEach((prop) => {
['name', 'data-grav-field-name', 'for', 'id', 'data-grav-file-settings', 'data-file-post-add', 'data-file-post-remove', 'data-grav-array-name'].forEach((prop) => {
item.find('[' + prop + '], [_' + prop + ']').each(function() {
let element = $(this);
let indexes = [];
Expand Down
4 changes: 3 additions & 1 deletion themes/grav/app/forms/fields/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,9 @@ export function UriToMarkdown(uri) {
uri = uri.replace(/\(/g, '%28');
uri = uri.replace(/\)/g, '%29');

return uri.match(/\.(jpe?g|png|gif|svg|mp4|webm|ogv|mov)$/i) ? `![](${uri})` : `[${decodeURI(uri)}](${uri})`;
const title = uri.split('.').slice(0, -1).join('.');

return uri.match(/\.(jpe?g|png|gif|svg|mp4|webm|ogv|mov)$/i) ? `![${title}](${uri} "${title}")` : `[${decodeURI(uri)}](${uri})`;
}

let instances = [];
Expand Down
Loading

0 comments on commit 6546f12

Please sign in to comment.