Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wiki-js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
wiki-js
Commits
67bd4acd
Commit
67bd4acd
authored
Apr 02, 2017
by
NGPixel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix editors insert + Error pages styling
parent
fec3eff3
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
32 additions
and
25 deletions
+32
-25
bundle.min.js
assets/js/bundle.min.js
+0
-0
index.js
client/index.js
+3
-0
app.js
client/js/app.js
+1
-1
editor-image.js
client/js/components/editor-image.js
+1
-0
editor.js
client/js/components/editor.js
+10
-6
create.js
client/js/pages/create.js
+8
-6
error-forbidden.pug
views/error-forbidden.pug
+3
-4
error-notexist.pug
views/error-notexist.pug
+3
-4
error.pug
views/error.pug
+3
-4
No files found.
assets/js/bundle.min.js
View file @
67bd4acd
This source diff could not be displayed because it is too large. You can
view the blob
instead.
client/index.js
View file @
67bd4acd
...
...
@@ -3,6 +3,9 @@
let
logic
=
document
.
documentElement
.
dataset
.
logic
switch
(
logic
)
{
case
'error'
:
require
(
'./scss/error.scss'
)
break
case
'login'
:
require
(
'./scss/login.scss'
)
require
(
'./js/login.js'
)
...
...
client/js/app.js
View file @
67bd4acd
...
...
@@ -54,7 +54,7 @@ $(() => {
// ====================================
require
(
'./pages/view.js'
)(
alerts
)
// require('./pages/create.js'
)
require
(
'./pages/create.js'
)(
alerts
,
socket
)
require
(
'./pages/edit.js'
)(
alerts
,
socket
)
require
(
'./pages/source.js'
)(
alerts
)
require
(
'./pages/admin.js'
)(
alerts
)
...
...
client/js/components/editor-image.js
View file @
67bd4acd
...
...
@@ -51,6 +51,7 @@ module.exports = (alerts, mde, mdeModalOpenState, socket) => {
vueImage
.
currentImage
=
imageId
},
insertImage
:
(
ev
)
=>
{
console
.
log
(
mde
)
if
(
mde
.
codemirror
.
doc
.
somethingSelected
())
{
mde
.
codemirror
.
execCommand
(
'singleSelection'
)
}
...
...
client/js/components/editor.js
View file @
67bd4acd
...
...
@@ -16,14 +16,13 @@ module.exports = (alerts, pageEntryPath, socket) => {
return
_
.
toUpper
(
filesize
(
v
))
})
let
mde
let
mdeModalOpenState
=
false
let
vueImage
=
require
(
'./editor-image.js'
)(
alerts
,
mde
,
mdeModalOpenState
,
socket
)
let
vueFile
=
require
(
'./editor-file.js'
)(
alerts
,
mde
,
mdeModalOpenState
,
socket
)
let
vueVideo
=
require
(
'./editor-video.js'
)(
mde
,
mdeModalOpenState
)
let
vueCodeBlock
=
require
(
'./editor-codeblock.js'
)(
mde
,
mdeModalOpenState
)
let
vueImage
let
vueFile
let
vueVideo
let
vueCodeBlock
mde
=
new
SimpleMDE
({
let
mde
=
new
SimpleMDE
({
autofocus
:
true
,
autoDownloadFontAwesome
:
false
,
element
:
$
(
'#mk-editor'
).
get
(
0
),
...
...
@@ -185,6 +184,11 @@ module.exports = (alerts, pageEntryPath, socket) => {
}
})
vueImage
=
require
(
'./editor-image.js'
)(
alerts
,
mde
,
mdeModalOpenState
,
socket
)
vueFile
=
require
(
'./editor-file.js'
)(
alerts
,
mde
,
mdeModalOpenState
,
socket
)
vueVideo
=
require
(
'./editor-video.js'
)(
mde
,
mdeModalOpenState
)
vueCodeBlock
=
require
(
'./editor-codeblock.js'
)(
mde
,
mdeModalOpenState
)
// -> Save
let
saveCurrentDocument
=
(
ev
)
=>
{
...
...
client/js/pages/create.js
View file @
67bd4acd
/* global $ */
'use strict'
if
(
$
(
'#page-type-create'
).
length
)
{
let
pageEntryPath
=
$
(
'#page-type-create'
).
data
(
'entrypath'
)
// eslint-disable-line no-unused-vars
import
$
from
'jquery'
module
.
exports
=
(
alerts
,
socket
)
=>
{
if
(
$
(
'#page-type-create'
).
length
)
{
let
pageEntryPath
=
$
(
'#page-type-create'
).
data
(
'entrypath'
)
// -> Discard
...
...
@@ -9,7 +12,6 @@ if ($('#page-type-create').length) {
$
(
'#modal-create-discard'
).
toggleClass
(
'is-active'
)
})
/* eslint-disable spaced-comment */
//=include ../components/editor.js
/* eslint-enable spaced-comment */
require
(
'../components/editor.js'
)(
alerts
,
pageEntryPath
,
socket
)
}
}
views/error-forbidden.pug
View file @
67bd4acd
doctype html
html
html
(data-logic='error')
head
meta(http-equiv='X-UA-Compatible', content='IE=edge')
meta(charset='UTF-8')
...
...
@@ -17,9 +17,8 @@ html
link(rel='icon', type='image/png', sizes=favsize + 'x' + favsize, href='/favicons/favicon-' + favsize + 'x' + favsize + '.png')
link(rel='manifest', href='/manifest.json')
// CSS
link(type='text/css', rel='stylesheet', href='/css/libs.css')
link(type='text/css', rel='stylesheet', href='/css/error.css')
// JS / CSS
script(type='text/javascript', src='/js/bundle.min.js')
body(class='is-forbidden')
.container
...
...
views/error-notexist.pug
View file @
67bd4acd
doctype html
html
html
(data-logic='error')
head
meta(http-equiv='X-UA-Compatible', content='IE=edge')
meta(charset='UTF-8')
...
...
@@ -17,9 +17,8 @@ html
link(rel='icon', type='image/png', sizes=favsize + 'x' + favsize, href='/favicons/favicon-' + favsize + 'x' + favsize + '.png')
link(rel='manifest', href='/manifest.json')
// CSS
link(type='text/css', rel='stylesheet', href='/css/libs.css')
link(type='text/css', rel='stylesheet', href='/css/error.css')
// JS / CSS
script(type='text/javascript', src='/js/bundle.min.js')
body(class='is-notexist')
.container
...
...
views/error.pug
View file @
67bd4acd
doctype html
html
html
(data-logic='error')
head
meta(http-equiv='X-UA-Compatible', content='IE=edge')
meta(charset='UTF-8')
...
...
@@ -17,9 +17,8 @@ html
link(rel='icon', type='image/png', sizes=favsize + 'x' + favsize, href='/favicons/favicon-' + favsize + 'x' + favsize + '.png')
link(rel='manifest', href='/manifest.json')
// CSS
link(type='text/css', rel='stylesheet', href='/css/libs.css')
link(type='text/css', rel='stylesheet', href='/css/error.css')
// JS / CSS
script(type='text/javascript', src='/js/bundle.min.js')
body(class='is-error')
.container
...
...
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