]> BookStack Code Mirror - bookstack/commitdiff
Fixed book sort and added leave page warning to page editor. Fixes #22 and closes #21
authorDan Brown <redacted>
Thu, 22 Oct 2015 18:06:50 +0000 (19:06 +0100)
committerDan Brown <redacted>
Thu, 22 Oct 2015 18:06:50 +0000 (19:06 +0100)
resources/assets/js/pages/page-form.js
resources/views/books/sort.blade.php
resources/views/pages/form.blade.php

index e926a24fbd01fdb446ad520a9fd6e503526c2745..c022f9992b2c4867b55d107d88488ecc1c423ec4 100644 (file)
@@ -14,7 +14,7 @@ module.exports = {
     extended_valid_elements: 'pre[*]',
     automatic_uploads: false,
     valid_children: "-div[p|pre|h1|h2|h3|h4|h5|h6|blockquote]",
-    plugins: "image table textcolor paste link fullscreen imagetools code hr",
+    plugins: "image table textcolor paste link fullscreen imagetools code hr autosave",
     imagetools_toolbar: 'imageoptions',
     toolbar: "undo redo | styleselect | bold italic underline strikethrough superscript subscript | forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | table image-insert link hr | removeformat code fullscreen",
     content_style: "body {padding-left: 15px !important; padding-right: 15px !important; margin:0!important; margin-left:auto!important;margin-right:auto!important;}",
index e4e68d66278d1693e3fdbd1c0ee972c93eed6d6c..5fe278128bcfaf007e0d87d023c9b5feb46ffdcf 100644 (file)
             @if(count($books) > 1)
                 <div class="col-md-4">
                     <h3>Show Other Books</h3>
+                    <div id="additional-books">
                     @foreach($books as $otherBook)
                         @if($otherBook->id !== $book->id)
-                        <div id="additional-books">
+                        <div>
                             <a href="/books/{{ $otherBook->slug }}/sort-item" class="text-book"><i class="zmdi zmdi-book"></i>{{ $otherBook->name }}</a>
                         </div>
                         @endif
                     @endforeach
+                    </div>
                 </div>
             @endif
 
index ab5a0a453c1bd4e04eaf375365229345c9208c05..a793f9354d7e3e92290f01e9861919bb1cacad37 100644 (file)
@@ -15,7 +15,7 @@
                 <div class="col-md-8 faded">
                     <div class="action-buttons">
                         <a href="{{ back()->getTargetUrl() }}" class="text-button text-primary"><i class="zmdi zmdi-close"></i>Cancel</a>
-                        <button type="submit" class="text-button  text-pos"><i class="zmdi zmdi-floppy"></i>Save Page</button>
+                        <button type="submit" id="save-button" class="text-button  text-pos"><i class="zmdi zmdi-floppy"></i>Save Page</button>
                     </div>
                 </div>
             </div>
@@ -34,4 +34,4 @@
             <div class="text-neg text-small">{{ $errors->first('html') }}</div>
         @endif
     </div>
-</div>
+</div>
\ No newline at end of file