From 443949ea924539366dcf6cb97e49edbe548cf8c4 Mon Sep 17 00:00:00 2001 From: Kartik Visweswaran Date: Sun, 23 Sep 2018 09:39:21 +0530 Subject: [PATCH] Updates to release v1.7.8 fixes #166 --- CHANGE.md | 6 ++++++ src/DetailView.php | 9 +++++---- src/DetailViewAsset.php | 2 +- src/assets/css/kv-detail-view.css | 1 - 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/CHANGE.md b/CHANGE.md index bb1f8bb..87c3e91 100755 --- a/CHANGE.md +++ b/CHANGE.md @@ -1,6 +1,12 @@ Change Log: `yii2-detail-view` ============================== +## Version 1.7.8 + +**Date:** 23-Sep-2018 + +- (enh #166): Refactor code to implement `kartik\base\BootstrapInterface`. + ## Version 1.7.7 **Date:** 11-Sep-2018 diff --git a/src/DetailView.php b/src/DetailView.php index d46d1a2..ffec7be 100644 --- a/src/DetailView.php +++ b/src/DetailView.php @@ -4,12 +4,13 @@ * @package yii2-detail-view * @author Kartik Visweswaran * @copyright Copyright © Kartik Visweswaran, Krajee.com, 2014 - 2018 - * @version 1.7.7 + * @version 1.7.8 */ namespace kartik\detail; use Closure; +use kartik\base\BootstrapInterface; use kartik\base\Config; use kartik\base\TranslationTrait; use kartik\base\WidgetTrait; @@ -57,7 +58,7 @@ * @author Kartik Visweswaran * @since 1.0 */ -class DetailView extends YiiDetailView +class DetailView extends YiiDetailView implements BootstrapInterface { use WidgetTrait; use TranslationTrait; @@ -530,7 +531,7 @@ class DetailView extends YiiDetailView * - inputType: string|Closure, the HTML 5 input type if `type` is set to [[DetailView::::INPUT_HTML 5]]. * - inputContainer: array|Closure, HTML attributes for the input container * - inputWidth: string|Closure, the width of the container holding the input, should be appended along with the - * width unit (`px` or `%`) - this property is deprecated since v1.7.7 + * width unit (`px` or `%`) - this property is deprecated since v1.7.8 * - fieldConfig: array|Closure, optional, the Active field configuration. * - options: array|Closure, optional, the HTML attributes for the input. * - updateAttr: string|Closure, optional, the name of the attribute to be updated, when in edit mode. This will @@ -1135,7 +1136,7 @@ protected function renderFormAttribute($config) $inputWidth = ArrayHelper::getValue($config, 'inputWidth', ''); $container = ArrayHelper::getValue($config, 'inputContainer', []); if ($inputWidth != '') { - Html::addCssStyle($container, "width: {$inputWidth}"); // deprecated since v1.7.7 + Html::addCssStyle($container, "width: {$inputWidth}"); // deprecated since v1.7.8 } $template = ArrayHelper::getValue($fieldConfig, 'template', "{input}\n{error}\n{hint}"); $row = Html::tag('div', $template, $container); diff --git a/src/DetailViewAsset.php b/src/DetailViewAsset.php index 22dc465..ef4b289 100644 --- a/src/DetailViewAsset.php +++ b/src/DetailViewAsset.php @@ -4,7 +4,7 @@ * @package yii2-detail-view * @author Kartik Visweswaran * @copyright Copyright © Kartik Visweswaran, Krajee.com, 2014 - 2018 - * @version 1.7.7 + * @version 1.7.8 */ namespace kartik\detail; diff --git a/src/assets/css/kv-detail-view.css b/src/assets/css/kv-detail-view.css index be8fe0d..822c957 100644 --- a/src/assets/css/kv-detail-view.css +++ b/src/assets/css/kv-detail-view.css @@ -11,7 +11,6 @@ * For more JQuery plugins visit http://plugins.krajee.com * For more Yii related demos visit http://demos.krajee.com */ - .kv-container-bs4 .table { margin: 0; }