From d7520f224c2ac416975c554670eb6311a4fbb02c Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Thu, 22 Oct 2015 19:06:50 +0100 Subject: [PATCH] Fixed book sort and added leave page warning to page editor. Fixes #22 and closes #21 --- resources/assets/js/pages/page-form.js | 2 +- resources/views/books/sort.blade.php | 4 +++- resources/views/pages/form.blade.php | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/resources/assets/js/pages/page-form.js b/resources/assets/js/pages/page-form.js index e926a24fb..c022f9992 100644 --- a/resources/assets/js/pages/page-form.js +++ b/resources/assets/js/pages/page-form.js @@ -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;}", diff --git a/resources/views/books/sort.blade.php b/resources/views/books/sort.blade.php index e4e68d662..5fe278128 100644 --- a/resources/views/books/sort.blade.php +++ b/resources/views/books/sort.blade.php @@ -14,13 +14,15 @@ @if(count($books) > 1)

Show Other Books

+
@foreach($books as $otherBook) @if($otherBook->id !== $book->id) -
+
{{ $otherBook->name }}
@endif @endforeach +
@endif diff --git a/resources/views/pages/form.blade.php b/resources/views/pages/form.blade.php index ab5a0a453..a793f9354 100644 --- a/resources/views/pages/form.blade.php +++ b/resources/views/pages/form.blade.php @@ -15,7 +15,7 @@
Cancel - +
@@ -34,4 +34,4 @@
{{ $errors->first('html') }}
@endif - + \ No newline at end of file