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
24d0c8d5
Unverified
Commit
24d0c8d5
authored
Sep 13, 2017
by
Nicolas Widart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moving vue app.js to the theme directly
parent
10cc1a48
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
95 additions
and
2 deletions
+95
-2
CkEditor.vue
Modules/Core/Assets/js/components/CkEditor.vue
+94
-0
core.php
Modules/Core/Config/core.php
+0
-2
master.blade.php
Themes/Adminlte/views/layouts/master.blade.php
+1
-0
No files found.
Modules/Core/Assets/js/components/CkEditor.vue
0 → 100644
View file @
24d0c8d5
<
template
>
<div
class=
"ckeditor"
>
<textarea
:name=
"name"
:id=
"id"
:value=
"value"
:types=
"types"
:config=
"config"
>
</textarea>
</div>
</
template
>
<
script
>
let
inc
=
0
export
default
{
name
:
'
vue-ckeditor
'
,
props
:
{
name
:
{
type
:
String
,
default
:
()
=>
`editor-
${
++
inc
}
`
},
value
:
{
type
:
String
},
id
:
{
type
:
String
,
default
:
()
=>
`editor-
${
inc
}
`
},
types
:
{
type
:
String
,
default
:
()
=>
`classic`
},
config
:
{
type
:
Object
,
default
:
()
=>
{}
}
},
data
()
{
return
{
destroyed
:
false
}
},
computed
:
{
instance
()
{
return
CKEDITOR
.
instances
[
this
.
id
]
}
},
watch
:
{
value
(
val
)
{
let
html
=
this
.
instance
.
getData
()
if
(
val
!==
html
)
{
this
.
instance
.
setData
(
val
,
null
,
true
)
}
}
},
mounted
()
{
if
(
typeof
CKEDITOR
===
'
undefined
'
)
{
console
.
log
(
'
CKEDITOR is missing (http://ckeditor.com/)
'
)
}
else
{
if
(
this
.
types
===
'
inline
'
)
{
CKEDITOR
.
inline
(
this
.
id
,
this
.
config
)
}
else
{
CKEDITOR
.
replace
(
this
.
id
,
this
.
config
)
}
this
.
instance
.
on
(
'
change
'
,
()
=>
{
let
html
=
this
.
instance
.
getData
()
if
(
html
!==
this
.
value
)
{
this
.
$emit
(
'
input
'
,
html
)
this
.
$emit
(
'
update:value
'
,
html
)
}
})
this
.
instance
.
on
(
'
blur
'
,
()
=>
{
this
.
$emit
(
'
blur
'
,
this
.
instance
)
})
this
.
instance
.
on
(
'
focus
'
,
()
=>
{
this
.
$emit
(
'
focus
'
,
this
.
instance
)
})
}
},
beforeDestroy
()
{
if
(
!
this
.
destroyed
)
{
this
.
instance
.
focusManager
.
blur
(
true
)
this
.
instance
.
removeAllListeners
()
this
.
instance
.
destroy
()
this
.
destroyed
=
true
}
}
}
</
script
>
<
style
>
.ckeditor
::after
{
content
:
""
;
display
:
table
;
clear
:
both
;
}
</
style
>
Modules/Core/Config/core.php
View file @
24d0c8d5
...
@@ -125,7 +125,6 @@ return [
...
@@ -125,7 +125,6 @@ return [
'moment.js'
=>
[
'theme'
=>
'vendor/admin-lte/plugins/daterangepicker/moment.min.js'
],
'moment.js'
=>
[
'theme'
=>
'vendor/admin-lte/plugins/daterangepicker/moment.min.js'
],
'clipboard.js'
=>
[
'theme'
=>
'vendor/clipboard/dist/clipboard.min.js'
],
'clipboard.js'
=>
[
'theme'
=>
'vendor/clipboard/dist/clipboard.min.js'
],
'simplemde.js'
=>
[
'theme'
=>
'vendor/simplemde/dist/simplemde.min.js'
],
'simplemde.js'
=>
[
'theme'
=>
'vendor/simplemde/dist/simplemde.min.js'
],
'vue-app.js'
=>
[
'cdn'
=>
mix
(
'js/app.js'
)],
],
],
/*
/*
...
@@ -162,7 +161,6 @@ return [
...
@@ -162,7 +161,6 @@ return [
'pace.js'
,
'pace.js'
,
'selectize.js'
,
'selectize.js'
,
'main.js'
,
'main.js'
,
'vue-app.js'
,
],
],
],
],
...
...
Themes/Adminlte/views/layouts/master.blade.php
View file @
24d0c8d5
...
@@ -72,6 +72,7 @@
...
@@ -72,6 +72,7 @@
@foreach($jsFiles as $js)
@foreach($jsFiles as $js)
<script
src=
"{{ URL::asset($js) }}"
type=
"text/javascript"
></script>
<script
src=
"{{ URL::asset($js) }}"
type=
"text/javascript"
></script>
@endforeach
@endforeach
<script
src=
"{{ mix('js/app.js') }}"
></script>
<?php
if
(
is_module_enabled
(
'Notification'
))
:
?>
<?php
if
(
is_module_enabled
(
'Notification'
))
:
?>
<script
src=
"https://js.pusher.com/3.0/pusher.min.js"
></script>
<script
src=
"https://js.pusher.com/3.0/pusher.min.js"
></script>
...
...
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