Skip to content

Commit

Permalink
Merge pull request #52 from germanbisurgi/feature/improve-widgets-ui
Browse files Browse the repository at this point in the history
Feature/improve widgets UI
  • Loading branch information
schmunk42 authored Aug 1, 2022
2 parents cf1e8e0 + 9113cf3 commit b730fdd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/views/crud/widget/_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
'schema' => $schema,
'clientOptions' => [
'theme' => 'bootstrap3',
'iconlib' => 'fontawesome4',
'disable_collapse' => true,
'disable_properties' => false,
"no_additional_properties" => false,
Expand Down
5 changes: 5 additions & 0 deletions src/widgets/Cell.php
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@ function(xhr) {
'params' => ['status' => $newStatus],
'options' => [
'class' => 'btn btn-widget-control btn-' . (($widget->status && $published) ? 'success' : 'warning'),
'aria-label' => \Yii::t('widgets', 'Toggle visibility status'),
'data' => [
'button' => 'loading',
'loading-text' => FA::icon(FA::_SPINNER,['class' => 'fa-spin']),
Expand All @@ -420,6 +421,7 @@ function(xhr) {
['/' . $this->moduleName . '/crud/widget-translation/delete', 'id' => $widget->getTranslation()->id],
[
'class' => 'btn btn-widget-control btn-danger',
'aria-label' => \Yii::t('widgets', 'Delete translation'),
'data' => [
'method' => 'delete',
'confirm' => \Yii::t('widgets', 'Are you sure to delete this translation?'),
Expand All @@ -438,6 +440,7 @@ function(xhr) {
['/' . $this->moduleName . '/crud/widget/delete', 'id' => $widget->id],
[
'class' => 'btn btn-widget-control btn-danger',
'aria-label' => \Yii::t('widgets', 'Delete Widget'),
'data' => [
'method' => 'delete',
'confirm' => \Yii::t('widgets', 'Are you sure to delete this translation?'),
Expand All @@ -457,6 +460,7 @@ function(xhr) {
['/' . $this->moduleName . '/crud/widget/update', 'id' => $widget->id],
[
'class' => 'btn btn-widget-control btn-primary',
'aria-label' => \Yii::t('widgets', 'Update Widget'),
'target' => \Yii::$app->params['backend.iframe.name'] ?? '_self'
]
);
Expand All @@ -477,6 +481,7 @@ function(xhr) {
['/' . $this->moduleName . '/crud/widget/view', 'id' => $widget->id],
[
'class' => 'btn btn-widget-control btn-' . $color,
'aria-label' => \Yii::t('widgets', 'View Widget'),
'target' => \Yii::$app->params['backend.iframe.name'] ?? '_self'
]
);
Expand Down

0 comments on commit b730fdd

Please sign in to comment.