Skip to content

Commit ae4cc23

Browse files
committed
Updates to release v1.8.0 fixes #217
1 parent 8bac554 commit ae4cc23

File tree

12 files changed

+68
-54
lines changed

12 files changed

+68
-54
lines changed

CHANGE.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
Change Log: `yii2-editable`
22
===========================
33

4+
## Version 1.8.0
5+
6+
**Date:** 29-Apr-2022
7+
8+
- (enh #217): PHP 8.1 enhancements for native functions.
9+
410
## Version 1.7.9
511

612
**Date:** 20-Nov-2021

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2015 - 2021, Kartik Visweswaran
1+
Copyright (c) 2015 - 2022, Kartik Visweswaran
22
Krajee.com
33
All rights reserved.
44

composer.json

Lines changed: 34 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,37 @@
11
{
2-
"name": "kartik-v/yii2-editable",
3-
"description": "An enhanced editable widget for Yii 2.0 that allows easy editing of displayed data with numerous configuration possibilities.",
4-
"keywords": ["bootstrap", "editable", "input", "widget", "popover-x", "popover", "jquery"],
5-
"homepage": "https://github.com/kartik-v/yii2-editable",
6-
"type": "yii2-extension",
7-
"license": "BSD-3-Clause",
8-
"authors": [
9-
{
10-
"name": "Kartik Visweswaran",
11-
"email": "[email protected]",
12-
"homepage": "http://www.krajee.com/"
13-
}
14-
],
15-
"require": {
16-
"kartik-v/yii2-widget-activeform": ">=1.6.0",
17-
"kartik-v/yii2-popover-x": "~1.3"
18-
},
19-
"autoload": {
20-
"psr-4": {
21-
"kartik\\editable\\": "src"
22-
}
23-
},
24-
"extra": {
25-
"branch-alias": {
26-
"dev-master": "1.7.x-dev"
27-
}
2+
"name": "kartik-v/yii2-editable",
3+
"description": "An enhanced editable widget for Yii 2.0 that allows easy editing of displayed data with numerous configuration possibilities.",
4+
"keywords": [
5+
"bootstrap",
6+
"editable",
7+
"input",
8+
"widget",
9+
"popover-x",
10+
"popover",
11+
"jquery"
12+
],
13+
"homepage": "https://github.com/kartik-v/yii2-editable",
14+
"type": "yii2-extension",
15+
"license": "BSD-3-Clause",
16+
"authors": [
17+
{
18+
"name": "Kartik Visweswaran",
19+
"email": "[email protected]",
20+
"homepage": "http://www.krajee.com/"
2821
}
22+
],
23+
"require": {
24+
"kartik-v/yii2-widget-activeform": ">=1.6.2",
25+
"kartik-v/yii2-popover-x": "~1.3"
26+
},
27+
"autoload": {
28+
"psr-4": {
29+
"kartik\\editable\\": "src"
30+
}
31+
},
32+
"extra": {
33+
"branch-alias": {
34+
"dev-master": "1.8.x-dev"
35+
}
36+
}
2937
}

src/Editable.php

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
/**
33
* @package yii2-editable
44
* @author Kartik Visweswaran <[email protected]>
5-
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2021
6-
* @version 1.7.9
5+
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2022
6+
* @version 1.8.0
77
*/
88

99
namespace kartik\editable;
@@ -12,6 +12,7 @@
1212
use Exception;
1313
use kartik\base\Config;
1414
use kartik\base\InputWidget;
15+
use kartik\base\Lib;
1516
use kartik\popover\PopoverX;
1617
use Yii;
1718
use yii\base\InvalidConfigException;
@@ -602,7 +603,7 @@ public function registerAssets()
602603
if (!empty($this->pjaxContainerId)) {
603604
EditablePjaxAsset::register($view);
604605
$toggleButton = $this->_popoverOptions['toggleButton']['id'];
605-
$initPjaxVar = 'kvEdPjax_' . str_replace('-', '_', $this->_popoverOptions['options']['id']);
606+
$initPjaxVar = 'kvEdPjax_' . Lib::str_replace('-', '_', $this->_popoverOptions['options']['id']);
606607
$view->registerJs("var {$initPjaxVar} = false;", View::POS_HEAD);
607608
if ($this->asPopover) {
608609
$js = "initEditablePjax('{$this->pjaxContainerId}', '{$toggleButton}', '{$initPjaxVar}');";
@@ -836,8 +837,8 @@ protected function initOptions()
836837
}
837838
if ($this->header == null) {
838839
$attribute = $this->attribute;
839-
if (strpos($attribute, ']') > 0) {
840-
$tags = explode(']', $attribute);
840+
if (Lib::strpos($attribute, ']') > 0) {
841+
$tags = Lib::explode(']', $attribute);
841842
$attribute = array_pop($tags);
842843
}
843844
$this->_popoverOptions['header'] = $this->preHeader .
@@ -896,7 +897,7 @@ protected function renderActionButtons()
896897
'{reset}' => Html::button($resetLabel, $resetOpts),
897898
'{submit}' => Html::button($submitLabel, $submitOpts),
898899
];
899-
return strtr($this->buttonsTemplate, $params);
900+
return Lib::strtr($this->buttonsTemplate, $params);
900901
}
901902

902903
/**
@@ -906,7 +907,7 @@ protected function renderActionButtons()
906907
*/
907908
protected function renderFooter()
908909
{
909-
return strtr($this->footer, ['{loading}' => self::LOAD_INDICATOR, '{buttons}' => $this->renderActionButtons()]);
910+
return Lib::strtr($this->footer, ['{loading}' => self::LOAD_INDICATOR, '{buttons}' => $this->renderActionButtons()]);
910911
}
911912

912913
/**
@@ -926,11 +927,11 @@ protected function parseTemplate($template)
926927
'{close}' => $this->inlineSettings['closeButton'],
927928
'{loading}' => self::LOAD_INDICATOR,
928929
];
929-
$out = strtr($this->inlineSettings[$template], $params);
930-
if (strpos($out, '{buttons}') === false) {
930+
$out = Lib::strtr($this->inlineSettings[$template], $params);
931+
if (Lib::strpos($out, '{buttons}') === false) {
931932
return $out;
932933
}
933-
return strtr($out, ['{buttons}' => $this->renderActionButtons()]);
934+
return Lib::strtr($out, ['{buttons}' => $this->renderActionButtons()]);
934935
}
935936

936937
/**

src/EditableAsset.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
/**
33
* @package yii2-editable
44
* @author Kartik Visweswaran <[email protected]>
5-
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2021
6-
* @version 1.7.9
5+
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2022
6+
* @version 1.8.0
77
*/
88

99
namespace kartik\editable;

src/EditablePjaxAsset.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@
22
/**
33
* @package yii2-editable
44
* @author Kartik Visweswaran <[email protected]>
5-
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2021
6-
* @version 1.7.9
5+
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2022
6+
* @version 1.8.0
77
*/
88

99
namespace kartik\editable;
1010

11-
use Yii;
1211
use kartik\base\AssetBundle;
1312

1413
/**

src/assets/css/editable.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/*!
22
* @package yii2-editable
33
* @author Kartik Visweswaran <[email protected]>
4-
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2021
5-
* @version 1.7.9
4+
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2022
5+
* @version 1.8.0
66
*
77
* Styling for the Editable widget
88
* Built for Yii Framework 2.0

src/assets/css/editable.min.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/assets/js/editable-pjax.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/*!
22
* @package yii2-editable
33
* @author Kartik Visweswaran <[email protected]>
4-
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2021
5-
* @version 1.7.9
4+
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2022
5+
* @version 1.8.0
66
*
77
* Editable Extension - PJAX processing script for popover-x
88
*

src/assets/js/editable-pjax.min.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/*!
22
* @package yii2-editable
33
* @author Kartik Visweswaran <[email protected]>
4-
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2021
5-
* @version 1.7.9
4+
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2022
5+
* @version 1.8.0
66
*
77
* Editable Extension - PJAX processing script for popover-x
88
*

0 commit comments

Comments
 (0)