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
6d9d661e
Unverified
Commit
6d9d661e
authored
Sep 16, 2017
by
Nicolas Widart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moving asgardcms related variables to the AsgardCMS namespace
parent
fcb29ed6
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34395 additions
and
34394 deletions
+34395
-34394
PageRoutes.js
Modules/Page/Assets/js/PageRoutes.js
+1
-1
master.blade.php
Themes/Adminlte/views/layouts/master.blade.php
+3
-4
app.js
public/js/app.js
+34388
-34388
app.js
resources/assets/js/app.js
+2
-0
bootstrap.js
resources/assets/js/bootstrap.js
+1
-1
No files found.
Modules/Page/Assets/js/PageRoutes.js
View file @
6d9d661e
...
@@ -2,7 +2,7 @@ import PageTable from './components/PageTable.vue'
...
@@ -2,7 +2,7 @@ import PageTable from './components/PageTable.vue'
import
PageTableServerSide
from
'
./components/PageTableServerSide.vue
'
import
PageTableServerSide
from
'
./components/PageTableServerSide.vue
'
import
PageForm
from
'
./components/PageForm.vue
'
import
PageForm
from
'
./components/PageForm.vue
'
const
locales
=
window
.
locales
;
const
locales
=
window
.
AsgardCMS
.
locales
;
export
default
[
export
default
[
{
{
...
...
Themes/Adminlte/views/layouts/master.blade.php
View file @
6d9d661e
...
@@ -75,11 +75,10 @@
...
@@ -75,11 +75,10 @@
@endforeach
@endforeach
<script>
<script>
window
.
AsgardCMS
=
{
window
.
AsgardCMS
=
{
translations
:
{
!!
json_encode
([
'
page
'
=>
array_dot
(
trans
(
'
page::pages
'
)),
'
core
'
=>
array_dot
(
trans
(
'
core::core
'
))])
!!
}
translations
:
{
!!
json_encode
([
'
page
'
=>
array_dot
(
trans
(
'
page::pages
'
)),
'
core
'
=>
array_dot
(
trans
(
'
core::core
'
))])
!!
},
locales
:
{
!!
json_encode
(
LaravelLocalization
::
getSupportedLocales
())
!!
},
currentLocale
:
'
{{ locale() }}
'
,
};
};
window
.
locales
=
{
!!
json_encode
(
LaravelLocalization
::
getSupportedLocales
())
!!
}
window
.
currentLocale
=
'
{{ locale() }}
'
;
</script>
</script>
<script
src=
"{{ mix('js/app.js') }}"
></script>
<script
src=
"{{ mix('js/app.js') }}"
></script>
...
...
public/js/app.js
View file @
6d9d661e
This diff is collapsed.
Click to expand it.
resources/assets/js/app.js
View file @
6d9d661e
...
@@ -18,6 +18,8 @@ Vue.component('DeleteButton', require('../../../Modules/Core/Assets/js/component
...
@@ -18,6 +18,8 @@ Vue.component('DeleteButton', require('../../../Modules/Core/Assets/js/component
Vue
.
component
(
'
TagsInput
'
,
require
(
'
../../../Modules/Tag/Assets/js/components/TagInput.vue
'
));
Vue
.
component
(
'
TagsInput
'
,
require
(
'
../../../Modules/Tag/Assets/js/components/TagInput.vue
'
));
import
PageRoutes
from
'
../../../Modules/Page/Assets/js/PageRoutes
'
;
import
PageRoutes
from
'
../../../Modules/Page/Assets/js/PageRoutes
'
;
const
currentLocale
=
window
.
AsgardCMS
.
currentLocale
;
const
router
=
new
VueRouter
({
const
router
=
new
VueRouter
({
mode
:
'
history
'
,
mode
:
'
history
'
,
base
:
`
${
currentLocale
}
/backend`
,
base
:
`
${
currentLocale
}
/backend`
,
...
...
resources/assets/js/bootstrap.js
View file @
6d9d661e
...
@@ -48,7 +48,7 @@ if (userApiToken) {
...
@@ -48,7 +48,7 @@ if (userApiToken) {
let
currentLocale
=
document
.
head
.
querySelector
(
'
meta[name="current-locale"]
'
);
let
currentLocale
=
document
.
head
.
querySelector
(
'
meta[name="current-locale"]
'
);
if
(
currentLocale
)
{
if
(
currentLocale
)
{
window
.
currentLocale
=
currentLocale
.
content
;
window
.
AsgardCMS
.
currentLocale
=
currentLocale
.
content
;
}
else
{
}
else
{
console
.
error
(
'
Current locale token not found in a meta tag.
'
);
console
.
error
(
'
Current locale token not found in a meta tag.
'
);
}
}
...
...
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