Skip to content

Commit

Permalink
Fix issue Assignment disappear on 3.1.0-rc1
Browse files Browse the repository at this point in the history
  • Loading branch information
sonvnn committed Jul 12, 2024
1 parent 6d93898 commit 6747272
Show file tree
Hide file tree
Showing 9 changed files with 74 additions and 67 deletions.
2 changes: 1 addition & 1 deletion assets/vendor/articlelayout/dist/index.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/vendor/articlelayout/dist/index.html

Large diffs are not rendered by default.

112 changes: 56 additions & 56 deletions assets/vendor/articlelayout/dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/vendor/manager/index_.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions assets/vendor/manager/src/Article.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function saveElement(params) {
<div class="article-widget card card-body border">
<div class="d-flex justify-content-between">
<div class="widget-name">
<div><i class="text-body-tertiary me-2" :class="data.form_template[widget.type].info.icon"></i>{{ widget.params.find((param) => param.name === 'title').value }}</div>
<div><i class="text-body-tertiary me-2" :class="data.constant.form_template[widget.type].info.icon"></i>{{ widget.params.find((param) => param.name === 'title').value }}</div>
<div class="text-body-tertiary form-text">{{ widget.type }}</div>
</div>
<div class="widget-toolbar">
Expand All @@ -77,6 +77,6 @@ function saveElement(params) {
</div>
</div>
<Transition name="fade">
<Modal v-if="_showModal" :element="element" :form="data.form_template[element.type]" @update:saveElement="saveElement" @update:close-element="closeElement" />
<Modal v-if="_showModal" :element="element" :form="data.constant.form_template[element.type]" @update:saveElement="saveElement" @update:close-element="closeElement" />
</Transition>
</template>
7 changes: 7 additions & 0 deletions assets/vendor/manager/src/assets/article_data.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,11 @@
border-bottom: 3px solid var(--border-color);
}
}
.card {
--card-border-width: 1px;
--card-border-color: var(--border-color);
}
.astroid-subform .add-item {
border: 2px dashed var(--border-color);
}
}
6 changes: 3 additions & 3 deletions framework/fields/astroidlayoutdata.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ protected function getInput() {
}
define('ASTROID_TEMPLATE_NAME', $article_layout->template);
$widgets = array();
$form_template = Helper::getFormTemplate('article_data');
$constant = Helper\Constants::manager_configs('article_data');
$form_template = $constant['form_template'];
$layout = json_decode($sublayout['data'], true);
foreach ($layout['sections'] as $section) {
foreach ($section['rows'] as $row) {
Expand All @@ -95,8 +96,7 @@ protected function getInput() {
$json = [
'article_id' => $id,
'widgets' => $widgets,
'constant' => Helper\Constants::manager_configs(),
'form_template' => $form_template,
'constant' => $constant,
'template' => $article_layout->template
];
$html = '<script type="application/json" id="'.$this->id.'_json">'.json_encode($json).'</script>';
Expand Down
2 changes: 1 addition & 1 deletion framework/library/astroid/Element.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ public function renderJson($type = 'system'): array
$form_content = array();
$model_form = [];
foreach ($fieldsets as $key => $fieldset) {
if (isset($fieldset->articleData) && $fieldset->articleData === 'false') {
if ($this->mode === 'article_data' && isset($fieldset->articleData) && $fieldset->articleData === 'false') {
continue;
}
$fields = $form->getFieldset($key);
Expand Down
4 changes: 2 additions & 2 deletions framework/library/astroid/Helper/Constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class Constants
* Return configurations of Manager
* @return array
*/
public static function manager_configs() : array
public static function manager_configs($mode = '') : array
{
$template = Framework::getTemplate();
$pluginParams = Helper::getPluginParams();
Expand All @@ -60,7 +60,7 @@ public static function manager_configs() : array
'jtemplate_link' => Helper::getJoomlaUrl(),
'astroid_admin_token' => Session::getFormToken(),
'astroid_action' => Helper::getAstroidUrl('save', ['template' => $template->template . '-' . $template->id]),
'form_template' => Helper::getFormTemplate()
'form_template' => Helper::getFormTemplate($mode)
];
}

Expand Down

0 comments on commit 6747272

Please sign in to comment.