Dan Brown

Removed external fonts from page forms and remove initial form flicker

1 module.exports = { 1 module.exports = {
2 selector: '#html-editor', 2 selector: '#html-editor',
3 content_css: [ 3 content_css: [
4 - '/css/styles.css', 4 + '/css/styles.css'
5 - '//fonts.googleapis.com/css?family=Roboto:400,400italic,500,500italic,700,700italic,300italic,100,300'
6 ], 5 ],
7 body_class: 'page-content', 6 body_class: 'page-content',
8 relative_urls: false, 7 relative_urls: false,
...@@ -133,7 +132,7 @@ module.exports = { ...@@ -133,7 +132,7 @@ module.exports = {
133 formData.append('file', file, remoteFilename); 132 formData.append('file', file, remoteFilename);
134 formData.append('_token', document.querySelector('meta[name="token"]').getAttribute('content')); 133 formData.append('_token', document.querySelector('meta[name="token"]').getAttribute('content'));
135 134
136 - xhr.open('POST', '/upload/image'); 135 + xhr.open('POST', '/images/gallery/upload');
137 xhr.onload = function () { 136 xhr.onload = function () {
138 if (xhr.status === 200 || xhr.status === 201) { 137 if (xhr.status === 200 || xhr.status === 201) {
139 var result = JSON.parse(xhr.responseText); 138 var result = JSON.parse(xhr.responseText);
...@@ -141,6 +140,7 @@ module.exports = { ...@@ -141,6 +140,7 @@ module.exports = {
141 } else { 140 } else {
142 console.log('An error occured uploading the image'); 141 console.log('An error occured uploading the image');
143 console.log(xhr.responseText); 142 console.log(xhr.responseText);
143 + editor.dom.remove(id);
144 } 144 }
145 }; 145 };
146 xhr.send(formData); 146 xhr.send(formData);
......
...@@ -22,6 +22,10 @@ ...@@ -22,6 +22,10 @@
22 } 22 }
23 } 23 }
24 24
25 +#html-editor {
26 + display: none;
27 +}
28 +
25 label { 29 label {
26 display: block; 30 display: block;
27 line-height: 1.4em; 31 line-height: 1.4em;
......