Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Platform
Commits
d32e526d
Unverified
Commit
d32e526d
authored
Sep 17, 2017
by
Nicolas Widart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set the active tab to the active language
parent
0c0f0f01
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
PageForm.vue
Modules/Page/Assets/js/components/PageForm.vue
+3
-2
app.js
public/js/app.js
+11
-2
No files found.
Modules/Page/Assets/js/components/PageForm.vue
View file @
d32e526d
...
...
@@ -22,9 +22,9 @@
<
div
class
=
"
col-md-10
"
>
<
div
class
=
"
box box-primary
"
>
<
div
class
=
"
box-body
"
>
<
el
-
tabs
type
=
"
card
"
>
<
el
-
tabs
type
=
"
card
"
v
-
model
=
"
activeTab
"
>
<
el
-
tab
-
pane
:
label
=
"
localeArray.name
"
v
-
for
=
"
(localeArray, locale) in locales
"
:
key
=
"
localeArray.name
"
>
:
key
=
"
localeArray.name
"
:
name
=
"
locale
"
>
<
span
slot
=
"
label
"
:
class
=
"
{'error' : form.errors.has(locale)
}
"
>
{{
localeArray
.
name
}}
<
/span
>
<
el
-
form
-
item
:
label
=
"
trans('page.title')
"
...
...
@@ -186,6 +186,7 @@
form
:
new
Form
(),
loading
:
false
,
tags
:
{
}
,
activeTab
:
window
.
AsgardCMS
.
currentLocale
||
'
en
'
,
}
}
,
methods
:
{
...
...
public/js/app.js
View file @
d32e526d
...
...
@@ -73167,7 +73167,8 @@ exports.default = {
},
form: new _formBackendValidation2.default(),
loading: false,
tags: {}
tags: {},
activeTab: window.AsgardCMS.currentLocale || 'en'
};
},
...
...
@@ -73856,12 +73857,20 @@ module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c
}, [_c('el-tabs', {
attrs: {
"type": "card"
},
model: {
value: (_vm.activeTab),
callback: function($$v) {
_vm.activeTab = $$v
},
expression: "activeTab"
}
}, _vm._l((_vm.locales), function(localeArray, locale) {
return _c('el-tab-pane', {
key: localeArray.name,
attrs: {
"label": localeArray.name
"label": localeArray.name,
"name": locale
}
}, [_c('span', {
class: {
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment