Skip to content

Commit

Permalink
Merge pull request #54 from dmstr/dev/devgroup-alternative
Browse files Browse the repository at this point in the history
Use "kdn" instead of "devgroup"
  • Loading branch information
schmunk42 authored Jan 11, 2023
2 parents 7c3a417 + 9b1cec8 commit 44a5939
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 44 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"yiisoft/yii2-twig": "^2.0.4",
"2amigos/yii2-ckeditor-widget": "^2.0.2",
"2amigos/yii2-translateable-behavior": "^1.1.0",
"devgroup/yii2-jsoneditor": "^1.1.0",
"kdn/yii2-json-editor": "^2.5.1",
"rmrevin/yii2-fontawesome": "~2.9",
"dmstr/yii2-web": "^0.3.1 || ^0.4.0 || ^1.0.0",
"dmstr/yii2-active-record-permissions": "^1.0.0",
Expand Down
29 changes: 14 additions & 15 deletions src/views/crud/widget-translation/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
use yii\helpers\Html;
use yii\helpers\Url;
use yii\widgets\Pjax;
use kdn\yii2\JsonEditor;


$this->title = $searchModel->getAliasModel(true);
$this->params['breadcrumbs'][] = $this->title;
Expand Down Expand Up @@ -145,23 +147,20 @@
[
'attribute' => 'default_properties_json',
'format' => 'raw',
'value' => function ($model) { return \devgroup\jsoneditor\Jsoneditor::widget([
'name' => '_display',
'value' => $model->default_properties_json,
'options' => [
'style' => [
'width' => '600px',
'headerOptions' => ['style' => 'min-width: 600px'],
'value' => function ($model) {
return Jsoneditor::widget([
'name' => '_display',
'value' => $model->default_properties_json,
'clientOptions' => [
'mode' => 'view',
'modes' => [
'view',
'code'
]
],
'editorOptions' => [
'mode' => 'view',

'modes' => [
'view',
'code'
]
]
]);},
]);
},
],
'access_domain',
'access_read',
Expand Down
5 changes: 3 additions & 2 deletions src/views/crud/widget-translation/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @var \hrzg\widget\models\crud\WidgetContentTranslation $model
*/

use devgroup\jsoneditor\Jsoneditor;
use kdn\yii2\JsonEditor;
use Highlight\Highlighter;
use hrzg\widget\Module;
use insolita\wgadminlte\Box;
Expand Down Expand Up @@ -87,10 +87,11 @@
[
'attribute' => 'default_properties_json',
'format' => 'raw',
'headerOptions' => ['style' => 'min-width: 600px'],
'value' => Jsoneditor::widget([
'name' => '_display',
'value' => $model->default_properties_json,
'editorOptions' => [
'clientOptions' => [
'mode' => 'view',
'modes' => [
'view',
Expand Down
28 changes: 13 additions & 15 deletions src/views/crud/widget/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use yii\helpers\Html;
use yii\helpers\Url;
use yii\widgets\Pjax;
use kdn\yii2\JsonEditor;

$this->title = $searchModel->getAliasModel(true);
$this->params['breadcrumbs'][] = $this->title;
Expand Down Expand Up @@ -172,23 +173,20 @@
[
'attribute' => 'default_properties_json',
'format' => 'raw',
'value' => function ($model) { return \devgroup\jsoneditor\Jsoneditor::widget([
'name' => '_display',
'value' => $model->default_properties_json,
'options' => [
'style' => [
'width' => '600px',
'headerOptions' => ['style' => 'min-width: 600px'],
'value' => function ($model) {
return Jsoneditor::widget([
'name' => '_display',
'value' => $model->default_properties_json,
'clientOptions' => [
'mode' => 'view',
'modes' => [
'view',
'code'
]
],
'editorOptions' => [
'mode' => 'view',

'modes' => [
'view',
'code'
]
]
]);},
]);
}
],
'access_domain',
/*'access_owner',*/
Expand Down
18 changes: 7 additions & 11 deletions src/views/crud/widget/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @var \hrzg\widget\models\crud\WidgetContent $model
*/

use devgroup\jsoneditor\Jsoneditor;
use kdn\yii2\JsonEditor;
use dmstr\bootstrap\Tabs;
use Highlight\Highlighter;
use hrzg\widget\Module;
Expand Down Expand Up @@ -111,17 +111,18 @@
[
'attribute' => 'default_properties_json',
'format' => 'raw',
'headerOptions' => ['style' => 'min-width: 600px'],
'value' => Jsoneditor::widget([
'name' => '_display',
'value' => $model->default_properties_json,
'editorOptions' => [
'clientOptions' => [
'mode' => 'view',
'modes' => [
'view',
'code'
]
]
]),
])
],
'domain_id',
'name_id',
Expand Down Expand Up @@ -169,18 +170,13 @@
[
'attribute' => 'default_properties_json',
'format' => 'raw',
'headerOptions' => ['style' => 'min-width: 600px'],
'value' => function ($model) {
return \devgroup\jsoneditor\Jsoneditor::widget([
return Jsoneditor::widget([
'name' => '_display',
'value' => $model->default_properties_json,
'options' => [
'style' => [
'width' => '600px',
]
],
'editorOptions' => [
'clientOptions' => [
'mode' => 'view',

'modes' => [
'view',
'code'
Expand Down

0 comments on commit 44a5939

Please sign in to comment.