]> BookStack Code Mirror - bookstack/commitdiff
Removed external fonts from page forms and remove initial form flicker
authorDan Brown <redacted>
Thu, 31 Dec 2015 17:19:29 +0000 (17:19 +0000)
committerDan Brown <redacted>
Thu, 31 Dec 2015 17:19:29 +0000 (17:19 +0000)
resources/assets/js/pages/page-form.js
resources/assets/sass/_forms.scss

index b5773ec7d527500e88f70c42a6b6bbc9601003c0..756a9211baefe1354c893d1ae6e7584d49c7749f 100644 (file)
@@ -1,8 +1,7 @@
 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);
index 98df40bf3d9cbe8c19c3aef151449bb8b5cdfc08..76c9674f5c612fa2798abd86a40161f956f9d2da 100644 (file)
   }
 }
 
+#html-editor {
+  display: none;
+}
+
 label {
   display: block;
   line-height: 1.4em;