From cc165ba4cb9747a95f1e68d3ad7d3c219b73a3e1 Mon Sep 17 00:00:00 2001 From: Kartik Visweswaran Date: Tue, 11 Jan 2022 11:23:48 +0530 Subject: [PATCH] Updates to release v1.8.6 fix #187 fix #182 fix #180 fix #178 --- CHANGE.md | 7 +- LICENSE.md | 2 +- README.md | 4 +- src/DetailView.php | 150 ++++++++++++++------------ src/DetailViewAsset.php | 2 +- src/assets/css/kv-detail-view.css | 8 +- src/assets/css/kv-detail-view.min.css | 6 +- src/assets/js/kv-detail-view.js | 4 +- src/assets/js/kv-detail-view.min.js | 4 +- 9 files changed, 101 insertions(+), 86 deletions(-) diff --git a/CHANGE.md b/CHANGE.md index a09a93f..d4a9308 100755 --- a/CHANGE.md +++ b/CHANGE.md @@ -3,11 +3,16 @@ Change Log: `yii2-detail-view` ## Version 1.8.6 -**Date:** _under development_ +**Date:** 11-Jan-2022 +- Enhance & standardize php docs for new website https://docs.krajee.com. +- (bug #187): Fix BootstrapTrait usage. - (enh #186): Correct alignments of BS3 controls in edit mode. - (enh #185): New property `arrayValueToString` to control array values being printed via `print_r`. - (enh #184): Add Slovak Translations and enhance model validation. +- (enh #182): Document `showErrorSummary` in docs. +- (enh #180): Accept array messages in flashes. +- (enh #178): Correct table condensed styles for child columns. ## Version 1.8.5 diff --git a/LICENSE.md b/LICENSE.md index d745e18..04b0288 100755 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (c) 2014 - 2021, Kartik Visweswaran +Copyright (c) 2014 - 2022, Kartik Visweswaran Krajee.com All rights reserved. diff --git a/README.md b/README.md index d135781..89b9a9a 100755 --- a/README.md +++ b/README.md @@ -33,8 +33,8 @@ Refer the [CHANGE LOG](https://github.com/kartik-v/yii2-detail-view/blob/master/ > NOTE: Bootstrap 5.x support is added since v1.8.4. The extension includes a BC Breaking change with v1.7.0. With this release, the `template` property of the yii core DetailView is not anymore supported. One can use `rowOptions`, `labelColOptions`, `valueColOptions` at the widget level or widget `attributes` level to configure advanced layout functionality. -### Demo -You can see detailed [documentation](http://demos.krajee.com/detail-view) and [demonstration](http://demos.krajee.com/detail-view-demo) on usage of the extension. +### Docs & Demo +You can see detailed [documentation](http://demos.krajee.com/detail-view), [demonstration](http://demos.krajee.com/detail-view-demo) and API [code documentation](https://docs.krajee.com/kartik-detail-detailview) on usage of the extension. ## Installation diff --git a/src/DetailView.php b/src/DetailView.php index 754aad9..df21b1f 100644 --- a/src/DetailView.php +++ b/src/DetailView.php @@ -3,7 +3,7 @@ /** * @package yii2-detail-view * @author Kartik Visweswaran - * @copyright Copyright © Kartik Visweswaran, Krajee.com, 2014 - 2021 + * @copyright Copyright © Kartik Visweswaran, Krajee.com, 2014 - 2022 * @version 1.8.6 */ @@ -12,6 +12,7 @@ use Closure; use Exception; use kartik\base\BootstrapInterface; +use kartik\base\BootstrapTrait; use kartik\base\Config; use kartik\base\TranslationTrait; use kartik\base\WidgetTrait; @@ -63,6 +64,7 @@ class DetailView extends YiiDetailView implements BootstrapInterface { use WidgetTrait; + use BootstrapTrait; use TranslationTrait; /** @@ -400,7 +402,7 @@ class DetailView extends YiiDetailView implements BootstrapInterface public $hideAlerts = false; /** - * @var bool whether to show form error summery as an error alert. Defaults to `false`. + * @var bool whether to show form error summary as part of the error alert. Defaults to `false`. */ public $showErrorSummary = false; @@ -519,53 +521,53 @@ class DetailView extends YiiDetailView implements BootstrapInterface * * An attribute can also be specified in terms of an array with the following elements. * - * - attribute: string|Closure, the attribute name. This is required if either "label" or "value" is not specified. - * - label: string|Closure, the label associated with the attribute. If this is not specified, it will be generated + * - `attribute`: _string|Closure_, the attribute name. This is required if either "label" or "value" is not specified. + * - `label`: _string|Closure_, the label associated with the attribute. If this is not specified, it will be generated * from the attribute name. - * - value: mixed|Closure, the value to be displayed. If this is not specified, it will be retrieved from [[model]] + * - `value`: _mixed|Closure_, the value to be displayed. If this is not specified, it will be retrieved from [[model]] * using the attribute name by calling [[ArrayHelper::getValue()]]. Note that this value will be formatted into * a displayable text according to the "format" option. - * - format: mixed|Closure, the type of the value that determines how the value would be formatted into a + * - `format`: _mixed|Closure_, the type of the value that determines how the value would be formatted into a * displayable text. Please refer to [[Formatter]] for supported types. - * - visible: boolean|Closure, whether the attribute is visible. If set to `false`, the attribute will NOT be + * - `visible`: _boolean|Closure_, whether the attribute is visible. If set to `false`, the attribute will NOT be * displayed. * * Additional special settings are: - * - viewModel: Model|Closure, the model to be used for this attribute in VIEW mode. This will override the `model` + * - `viewModel`: _Model|Closure_, the model to be used for this attribute in VIEW mode. This will override the `model` * setting at the widget level. If not set, the widget `model` setting will be used. - * - editModel: Model|Closure, the model to be used for this attribute in EDIT mode. This will override the `model` + * - `editModel`: _Model|Closure_, the model to be used for this attribute in EDIT mode. This will override the `model` * setting at the widget level. If not set, the widget `model` setting will be used. - * - rowOptions: array|Closure, HTML attributes for the row (if not set, this will be defaulted to the `rowOptions` + * - `rowOptions`: _array|Closure_, HTML attributes for the row (if not set, this will be defaulted to the `rowOptions` * set at the widget level) - * - labelColOptions: array|Closure, HTML attributes for the label column (if not set, this will be defaulted to + * - `labelColOptions`: _array|Closure_, HTML attributes for the label column (if not set, this will be defaulted to * the `labelColOptions` set at the widget level) - * - valueColOptions: array|Closure, HTML attributes for the value column (if not set, this will be defaulted to + * - `valueColOptions`: _array|Closure_, HTML attributes for the value column (if not set, this will be defaulted to * `valueColOptions` set at the widget level) - * - group: boolean|Closure, whether to group the selection by merging the label and value into a single column. - * - groupOptions: array|Closure, HTML attributes for the grouped/merged column when `group` is set to `true`. - * - type: string|Closure, the input type for rendering the attribute in edit mode. Must be one of the + * - `group`: _boolean|Closure_, whether to group the selection by merging the label and value into a single column. + * - `groupOptions`: _array|Closure_, HTML attributes for the grouped/merged column when `group` is set to `true`. + * - `type`: _string|Closure_, the input type for rendering the attribute in edit mode. Must be one of the * [[DetailView::::INPUT_]] constants. - * - displayOnly: boolean|Closure, if the input is to be set to as `display only` in edit mode. - * - widgetOptions: array|Closure, the widget options if you set `type` to [[DetailView::::INPUT_WIDGET]]. The + * - `displayOnly`: _boolean|Closure_, if the input is to be set to as `display only` in edit mode. + * - widgetOptions: array|Closure_, the widget options if you set `type` to [[DetailView::::INPUT_WIDGET]]. The * following special options are recognized: - * - `class`: string the fully namespaced widget class. - * - items: array|Closure, the list of data items for dropDownList, listBox, checkboxList & radioList - * - 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 + * - `class`: _string the fully namespaced widget class. + * - `items`: _array|Closure_, the list of data items for dropDownList, listBox, checkboxList & radioList + * - `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 - * - 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 + * - `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 * default to the `attribute` setting. - * - updateMarkup: string|Closure, the raw markup to render in edit mode. If not set, this normally will be + * - `updateMarkup`: _string|Closure_, the raw markup to render in edit mode. If not set, this normally will be * automatically generated based on `attribute` or `updateAttr` setting. If this is set it will override the * default markup. * * Note that all of the attribute properties above can also be setup as a Closure callback with the signature * `function($form, $widget)`, where: - * - `$form`: ActiveForm, is the current active form object in the detail view. - * - `$widget`: DetailView, is the current detail view widget instance. + * - `$form`: _ActiveForm_, is the current active form object in the detail view. + * - `$widget`: _DetailView_, is the current detail view widget instance. */ public $attributes; @@ -716,7 +718,8 @@ class DetailView extends YiiDetailView implements BootstrapInterface * @var array the HTML attributes for the view button. This will toggle the view from edit mode to view mode. The * following special options are recognized: * - `label`: the save button label. This will not be HTML encoded. - * Defaults to ''. + * - Defaults to `` for Bootstrap 4.x & Bootstrap 5.x. + * - Defaults to `` for Bootstrap 3.x. */ public $viewOptions = []; @@ -724,27 +727,29 @@ class DetailView extends YiiDetailView implements BootstrapInterface * @var array the HTML attributes for the update button. This button will toggle the edit mode on. The following * special options are recognized: * - `label`: the update button label. This will not be HTML encoded. - * Defaults to ''. + * - Defaults to `` for Bootstrap 4.x & Bootstrap 5.x. + * - Defaults to `` for Bootstrap 3.x. */ public $updateOptions = []; /** * @var array the HTML attributes for the reset button. This button will reset the form in edit mode. The following * special options are recognized: - * - `label`: the reset button label. This will not be HTML encoded. - * Defaults to ''. + * - `label`: _string_, the reset button label. This will not be HTML encoded. + * - Defaults to `` for Bootstrap 4.x & Bootstrap 5.x. + * - Defaults to `` for Bootstrap 3.x. */ public $resetOptions = []; /** * @var array the HTML attributes for the edit button. The following special options are recognized: - * - `label`: the delete button label. This will not be HTML encoded. Defaults to - * `''`. + * - `label`: the delete button label. This will not be HTML encoded. + * - Defaults to `` for Bootstrap 4.x & Bootstrap 5.x. + * - Defaults to `` for Bootstrap 3.x. * - `url`: the delete button url. If not set will default to `#`. * - `params`: _array_, the parameters to be passed via ajax which you must set as key value pairs. This will be * automatically json encoded, so you can set JsExpression or callback - * - `ajaxSettings`: _array_, the ajax settings if you choose to override the delete ajax settings. - * @see http://api.jquery.com/jquery.ajax/ + * - `ajaxSettings`: _array_, the [ajax settings](https://api.jquery.com/jquery.ajax/) if you choose to override the delete ajax settings. * - `confirm': _string_, the confirmation message before triggering delete. Defaults to: * `Yii::t('kvdetail', 'Are you sure you want to delete this item?')`. * - `showErrorStack`: _boolean_, whether to show the complete error stack. @@ -754,8 +759,9 @@ class DetailView extends YiiDetailView implements BootstrapInterface /** * @var array the HTML attributes for the save button. This will default to a form submit button. * The following special options are recognized: - * - `label`: the save button label. This will not be HTML encoded. Defaults to ''. + * - `label`: _string_, the save button label. This will not be HTML encoded. Defaults to: + * - `` for Bootstrap 4.x & 5.x. + * - `` for Bootstrap 3.x. */ public $saveOptions = []; @@ -764,24 +770,23 @@ class DetailView extends YiiDetailView implements BootstrapInterface */ public $container = []; - /** * @var array the HTML attributes for the table container */ public $tableContainer = []; /** - * @var ActiveForm the form instance + * @var array HTML attributes for the child table (applicable when using with multiple child columns). */ - protected $_form; + public $childTableOptions = []; /** - * @var array HTML attributes for child tables + * @var ActiveForm the form instance */ - protected $_childTableOptions = []; + protected $_form; /** - * @var array HTML attributes for table row + * @var array HTML attributes for each table row. Defaults to [[rowOptions]] if not set. */ protected $_rowOptions = []; @@ -815,9 +820,7 @@ protected function initWidget() $this->pluginName = 'kvDetailView'; $this->initBsVersion(); $notBs3 = !$this->isBs(3); - if ($notBs3) { - Html::addCssClass($this->container, 'kv-container-bs4'); - } + Html::addCssClass($this->container, 'kv-container-bs' . ($notBs3 ? 4 : 3)); if ($this->enableEditMode) { /** * @var string|ActiveForm $formClass @@ -835,27 +838,31 @@ protected function initWidget() } if ($this->bootstrap) { Html::addCssClass($this->options, 'table'); + if ($this->condensed) { + $this->addCssClass($this->options, self::BS_TABLE_CONDENSED); + } + if ($notBs3) { + $this->childTableOptions = $this->options; + unset($this->childTableOptions['id']); + } if ($this->hover) { Html::addCssClass($this->options, 'table-hover'); } if ($this->bordered) { Html::addCssClass($this->options, 'table-bordered'); } - if ($this->condensed) { - $this->addCssClass($this->options, self::BS_TABLE_CONDENSED); - } - $this->_childTableOptions = $this->options; if ($this->striped) { Html::addCssClass($this->options, 'table-striped'); } } - Html::addCssClass($this->_childTableOptions, 'kv-child-table'); Html::addCssClass($this->options, 'detail-view'); + Html::addCssClass($this->childTableOptions, 'kv-child-table'); Html::addCssStyle($this->labelColOptions, "text-align:{$this->hAlign};vertical-align:{$this->vAlign};"); } /** - * Prepares and runs the detail view widget + * Prepares and runs the detail view widget. + * * @throws ReflectionException * @throws Exception */ @@ -901,7 +908,8 @@ protected function runWidget() } /** - * Initializes and renders alert container block + * Initializes and renders alert container block. + * * @throws Exception */ protected function renderAlertBlock() @@ -920,7 +928,7 @@ protected function renderAlertBlock() Html::addCssStyle($this->alertContainerOptions, 'display:none;'); } $out = Html::beginTag('div', $this->alertContainerOptions); - $alertWidgetClass = !$this->isBs(3) ? 'yii\bootstrap4\Alert' : 'yii\bootstrap\Alert'; + $alertWidgetClass = $this->getBSClass('Alert'); foreach ($flashes as $type => $message) { if (!isset($this->alertMessageSettings[$type])) { continue; @@ -928,7 +936,7 @@ protected function renderAlertBlock() $opts = $this->alertWidgetOptions; $options = ArrayHelper::getValue($opts, 'options', []); Html::addCssClass($options, $this->alertMessageSettings[$type]); - $opts['body'] = $message; + $opts['body'] = is_array($message) ? implode('
', $message) : $message; $opts['options'] = $options; /** @noinspection PhpUndefinedMethodInspection */ $out .= "\n" . $alertWidgetClass::widget($opts); @@ -939,7 +947,7 @@ protected function renderAlertBlock() } /** - * Check if model has editing errors + * Check if model has editing errors. * * @return boolean */ @@ -963,8 +971,7 @@ protected function hasEditErrors() } /** - * Validates the display of correct attributes and buttons - * at initialization based on mode + * Validates the display of correct attributes and buttons at initialization based on mode. * * @return void */ @@ -986,7 +993,7 @@ protected function validateDisplay() } /** - * Renders the main detail view widget + * Renders the main detail view widget. * * @return string the detail view content * @throws InvalidConfigException @@ -1020,7 +1027,8 @@ protected function renderAttributeRow($attribute) $this->_rowOptions = ArrayHelper::getValue($attribute, 'rowOptions', $this->rowOptions); if (isset($attribute['columns'])) { Html::addCssClass($this->_rowOptions, 'kv-child-table-row'); - $content = ''; + $table = Html::beginTag('table', $this->childTableOptions); + $content = ''; foreach ($attribute['columns'] as $child) { $content .= $this->renderAttributeItem($child); } @@ -1082,7 +1090,7 @@ protected function renderAttributeItem($attribute) } /** - * Checks if a bootstrap grid column class has been added to the container + * Checks if a bootstrap grid column class has been added to the container. * * @param array $container * @@ -1109,7 +1117,7 @@ protected static function hasGridCol($container = []) } /** - * Renders each form attribute + * Renders each form attribute. * * @param array $config the attribute config * @@ -1183,7 +1191,7 @@ protected function renderFormAttribute($config) } /** - * Sets a default css class within `options` if not set + * Sets a default css class within `options` if not set. * * @param array $options the HTML options * @param string|array $css the CSS class to test and append @@ -1197,6 +1205,7 @@ protected static function initCss(&$options, $css) /** * Sets the grid panel layout based on the [[template]] and [[panel]] settings. + * * @param string $items * @return string * @throws InvalidConfigException|Exception @@ -1266,7 +1275,7 @@ protected function renderPanel($items) } /** - * Renders the buttons for a specific mode + * Renders the buttons for a specific mode. * * @param integer $mode * @@ -1289,7 +1298,7 @@ protected function renderButtons($mode = 1) } /** - * Renders a button + * Renders a button. * * @param string $type the button type * @@ -1318,7 +1327,7 @@ protected function renderButton($type) } /** - * Gets the default button + * Gets the default button. * * @param string $type the button type * @param string $iconBs3 the bootstrap 3 icon suffix name @@ -1357,7 +1366,8 @@ protected function getDefaultButton($type, $iconBs3, $iconNotBs3, $title) } /** - * Register assets + * Register client assets for the [[DetailView]] widget. + * * @throws Exception */ protected function registerAssets() @@ -1431,7 +1441,7 @@ protected function normalizeAttributes() } /** - * Parses and returns the attribute + * Parses and returns the attribute. * * @param string|array $attribute the attribute item configuration * @@ -1527,4 +1537,4 @@ protected function parseAttributeProp($setting) */ return $setting instanceof Closure ? $setting($this->_form, $this) : $setting; } -} +} \ No newline at end of file diff --git a/src/DetailViewAsset.php b/src/DetailViewAsset.php index 5d89fe2..80a0108 100644 --- a/src/DetailViewAsset.php +++ b/src/DetailViewAsset.php @@ -3,7 +3,7 @@ /** * @package yii2-detail-view * @author Kartik Visweswaran - * @copyright Copyright © Kartik Visweswaran, Krajee.com, 2014 - 2021 + * @copyright Copyright © Kartik Visweswaran, Krajee.com, 2014 - 2022 * @version 1.8.6 */ diff --git a/src/assets/css/kv-detail-view.css b/src/assets/css/kv-detail-view.css index b1b1d3e..450a78a 100644 --- a/src/assets/css/kv-detail-view.css +++ b/src/assets/css/kv-detail-view.css @@ -1,13 +1,13 @@ /*! * @package yii2-detail-view * @author Kartik Visweswaran - * @copyright Copyright © Kartik Visweswaran, Krajee.com, 2014 - 2021 + * @copyright Copyright © Kartik Visweswaran, Krajee.com, 2014 - 2022 * @version 1.8.6 * * Styles for yii2-detail-view extension * * Author: Kartik Visweswaran - * Copyright: 2014 - 2021, Kartik Visweswaran, Krajee.com + * Copyright: 2014 - 2022, Kartik Visweswaran, Krajee.com * For more JQuery plugins visit http://plugins.krajee.com * For more Yii related demos visit http://demos.krajee.com */ @@ -105,11 +105,11 @@ } -.table .kv-child-table > tbody > tr > td, .table .kv-child-table > tbody > tr > th { +.kv-container-bs3 .table .kv-child-table > tbody > tr > td, .kv-container-bs3 .table .kv-child-table > tbody > tr > th { padding: 8px; } -.table-condensed .kv-child-table > tbody > tr > td, .table-condensed .kv-child-table > tbody > tr > th { +.kv-container-bs3 .table-condensed .kv-child-table > tbody > tr > td, .kv-container-bs3 .table-condensed .kv-child-table > tbody > tr > th { padding: 5px; } diff --git a/src/assets/css/kv-detail-view.min.css b/src/assets/css/kv-detail-view.min.css index b81c66d..ef303aa 100644 --- a/src/assets/css/kv-detail-view.min.css +++ b/src/assets/css/kv-detail-view.min.css @@ -1,13 +1,13 @@ /*! * @package yii2-detail-view * @author Kartik Visweswaran - * @copyright Copyright © Kartik Visweswaran, Krajee.com, 2014 - 2021 + * @copyright Copyright © Kartik Visweswaran, Krajee.com, 2014 - 2022 * @version 1.8.6 * * Styles for yii2-detail-view extension * * Author: Kartik Visweswaran - * Copyright: 2014 - 2021, Kartik Visweswaran, Krajee.com + * Copyright: 2014 - 2022, Kartik Visweswaran, Krajee.com * 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}.kv-container-bs4 .table-bordered .kv-child-table-cell td,.kv-container-bs4 .table-bordered .kv-child-table-cell th{border-top:none;border-bottom:none}.kv-container-bs4 .card>.kv-detail-view>.table-bordered>tbody>tr>td:first-child,.panel>.kv-detail-view>.table-bordered>tbody>tr>td:first-child{border-left:0}.kv-container-bs4 .card>.kv-detail-view>.table-bordered>tbody>tr>td:last-child,.panel>.kv-detail-view>.table-bordered>tbody>tr>td:last-child{border-right:0}.kv-flat-b .card>.kv-detail-view:last-child,.kv-flat-b .panel>.kv-detail-view:last-child{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.kv-form-attribute .form-group,.kv-form-attribute .help-block{margin-bottom:0}.kv-edit-mode .kv-edit-hidden,.kv-form-attribute>div:not(.has-error) .help-block,.kv-view-mode .kv-view-hidden{display:none}.kv-edit-mode .kv-view-hidden,.kv-view-mode .kv-edit-hidden{display:table-row}.kv-edit-hidden.kv-view-hidden{display:none}.kv-detail-loading{opacity:.3;background:url(../img/loading.gif) top 15px right 15px no-repeat #fff}.kv-detail-loading *{background:0 0!important}.kv-detail-loading td{border-color:#efefef!important}.kv-edit-mode .kv-detail-view{overflow-y:hidden}.kv-edit-mode table{overflow:hidden}.kv-child-table{width:100%}.kv-child-table-row,.kv-child-table-row>td{vertical-align:middle;padding:0!important;margin:0!important}.kv-child-table-cell{margin:0;padding:0;width:100%;overflow:hidden}.kv-child-table-row th{border-left:1px #ddd solid;border-right:1px #ddd solid}.kv-child-table td,.kv-child-table th{margin:0;background:0 0}.table .kv-child-table>tbody>tr>td,.table .kv-child-table>tbody>tr>th{padding:8px}.table-condensed .kv-child-table>tbody>tr>td,.table-condensed .kv-child-table>tbody>tr>th{padding:5px}.kv-action-btn{color:inherit;margin:0 2px;padding:0 5px;background:0 0;border:none;font-size:16px;cursor:pointer}.kv-action-btn.disabled,.kv-action-btn[disabled]{cursor:not-allowed}.kv-action-btn:focus,.kv-action-btn:hover{color:inherit;outline:0;opacity:.7}.card.border-default .kv-action-btn,.card.border-default .kv-action-btn:focus,.card.border-default .kv-action-btn:hover{color:#333} \ No newline at end of file + */.kv-container-bs4 .table{margin:0}.kv-container-bs4 .table-bordered .kv-child-table-cell td,.kv-container-bs4 .table-bordered .kv-child-table-cell th{border-top:none;border-bottom:none}.kv-container-bs4 .card>.kv-detail-view>.table-bordered>tbody>tr>td:first-child,.panel>.kv-detail-view>.table-bordered>tbody>tr>td:first-child{border-left:0}.kv-container-bs4 .card>.kv-detail-view>.table-bordered>tbody>tr>td:last-child,.panel>.kv-detail-view>.table-bordered>tbody>tr>td:last-child{border-right:0}.kv-flat-b .card>.kv-detail-view:last-child,.kv-flat-b .panel>.kv-detail-view:last-child{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.kv-form-attribute .form-group,.kv-form-attribute .help-block{margin-bottom:0}.kv-edit-mode .kv-edit-hidden,.kv-form-attribute>div:not(.has-error) .help-block,.kv-view-mode .kv-view-hidden{display:none}.kv-edit-mode .kv-view-hidden,.kv-view-mode .kv-edit-hidden{display:table-row}.kv-edit-hidden.kv-view-hidden{display:none}.kv-detail-loading{opacity:.3;background:url(../img/loading.gif) top 15px right 15px no-repeat #fff}.kv-detail-loading *{background:0 0!important}.kv-detail-loading td{border-color:#efefef!important}.kv-edit-mode .kv-detail-view{overflow-y:hidden}.kv-edit-mode table{overflow:hidden}.kv-child-table{width:100%}.kv-child-table-row,.kv-child-table-row>td{vertical-align:middle;padding:0!important;margin:0!important}.kv-child-table-cell{margin:0;padding:0;width:100%;overflow:hidden}.kv-child-table-row th{border-left:1px #ddd solid;border-right:1px #ddd solid}.kv-child-table td,.kv-child-table th{margin:0;background:0 0}.kv-container-bs3 .table .kv-child-table>tbody>tr>td,.kv-container-bs3 .table .kv-child-table>tbody>tr>th{padding:8px}.kv-container-bs3 .table-condensed .kv-child-table>tbody>tr>td,.kv-container-bs3 .table-condensed .kv-child-table>tbody>tr>th{padding:5px}.kv-action-btn{color:inherit;margin:0 2px;padding:0 5px;background:0 0;border:none;font-size:16px;cursor:pointer}.kv-action-btn.disabled,.kv-action-btn[disabled]{cursor:not-allowed}.kv-action-btn:focus,.kv-action-btn:hover{color:inherit;outline:0;opacity:.7}.card.border-default .kv-action-btn,.card.border-default .kv-action-btn:focus,.card.border-default .kv-action-btn:hover{color:#333} \ No newline at end of file diff --git a/src/assets/js/kv-detail-view.js b/src/assets/js/kv-detail-view.js index 722c11a..bc3814e 100644 --- a/src/assets/js/kv-detail-view.js +++ b/src/assets/js/kv-detail-view.js @@ -1,13 +1,13 @@ /*! * @package yii2-detail-view * @author Kartik Visweswaran - * @copyright Copyright © Kartik Visweswaran, Krajee.com, 2014 - 2021 + * @copyright Copyright © Kartik Visweswaran, Krajee.com, 2014 - 2022 * @version 1.8.6 * * Client extension for the yii2-detail-view extension * * Author: Kartik Visweswaran - * Copyright: 2014 - 2021, Kartik Visweswaran, Krajee.com + * Copyright: 2014 - 2022, Kartik Visweswaran, Krajee.com * For more JQuery plugins visit http://plugins.krajee.com * For more Yii related demos visit http://demos.krajee.com */ diff --git a/src/assets/js/kv-detail-view.min.js b/src/assets/js/kv-detail-view.min.js index b0b0ec9..72cb7a1 100644 --- a/src/assets/js/kv-detail-view.min.js +++ b/src/assets/js/kv-detail-view.min.js @@ -1,13 +1,13 @@ /*! * @package yii2-detail-view * @author Kartik Visweswaran - * @copyright Copyright © Kartik Visweswaran, Krajee.com, 2014 - 2021 + * @copyright Copyright © Kartik Visweswaran, Krajee.com, 2014 - 2022 * @version 1.8.6 * * Client extension for the yii2-detail-view extension * * Author: Kartik Visweswaran - * Copyright: 2014 - 2021, Kartik Visweswaran, Krajee.com + * Copyright: 2014 - 2022, Kartik Visweswaran, Krajee.com * For more JQuery plugins visit http://plugins.krajee.com * For more Yii related demos visit http://demos.krajee.com */
' . $table . '