Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Зуев Егор
/
wiki.dev
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Authored by
Dan Brown
2015-12-31 17:19:29 +0000
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Commit
e519236d94911a5c16aed8be6aabb5d9875da6f3
e519236d
1 parent
5bf811a4
Removed external fonts from page forms and remove initial form flicker
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
resources/assets/js/pages/page-form.js
resources/assets/sass/_forms.scss
resources/assets/js/pages/page-form.js
View file @
e519236
module
.
exports
=
{
selector
:
'#html-editor'
,
content_css
:
[
'/css/styles.css'
,
'//fonts.googleapis.com/css?family=Roboto:400,400italic,500,500italic,700,700italic,300italic,100,300'
'/css/styles.css'
],
body_class
:
'page-content'
,
relative_urls
:
false
,
...
...
@@ -133,7 +132,7 @@ module.exports = {
formData
.
append
(
'file'
,
file
,
remoteFilename
);
formData
.
append
(
'_token'
,
document
.
querySelector
(
'meta[name="token"]'
).
getAttribute
(
'content'
));
xhr
.
open
(
'POST'
,
'/
upload/image
'
);
xhr
.
open
(
'POST'
,
'/
images/gallery/upload
'
);
xhr
.
onload
=
function
()
{
if
(
xhr
.
status
===
200
||
xhr
.
status
===
201
)
{
var
result
=
JSON
.
parse
(
xhr
.
responseText
);
...
...
@@ -141,6 +140,7 @@ module.exports = {
}
else
{
console
.
log
(
'An error occured uploading the image'
);
console
.
log
(
xhr
.
responseText
);
editor
.
dom
.
remove
(
id
);
}
};
xhr
.
send
(
formData
);
...
...
resources/assets/sass/_forms.scss
View file @
e519236
...
...
@@ -22,6 +22,10 @@
}
}
#html-editor
{
display
:
none
;
}
label
{
display
:
block
;
line-height
:
1
.4em
;
...
...
Please
register
or
sign in
to post a comment