Dan Brown

Merge branch 'v0.9' into release

Showing 66 changed files with 108 additions and 74 deletions
...@@ -15,7 +15,14 @@ class SettingController extends Controller ...@@ -15,7 +15,14 @@ class SettingController extends Controller
15 { 15 {
16 $this->checkPermission('settings-manage'); 16 $this->checkPermission('settings-manage');
17 $this->setPageTitle('Settings'); 17 $this->setPageTitle('Settings');
18 - return view('settings/index'); 18 +
19 + // Get application version
20 + $version = false;
21 + if (function_exists('exec')) {
22 + $version = exec('git describe --always --tags ');
23 + }
24 +
25 + return view('settings/index', ['version' => $version]);
19 } 26 }
20 27
21 /** 28 /**
......
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
...@@ -15,7 +15,7 @@ module.exports = function (ngApp, events) { ...@@ -15,7 +15,7 @@ module.exports = function (ngApp, events) {
15 */ 15 */
16 ngApp.directive('toggleSwitch', function () { 16 ngApp.directive('toggleSwitch', function () {
17 return { 17 return {
18 - restrict: 'E', 18 + restrict: 'A',
19 template: toggleSwitchTemplate, 19 template: toggleSwitchTemplate,
20 scope: true, 20 scope: true,
21 link: function (scope, element, attrs) { 21 link: function (scope, element, attrs) {
...@@ -198,6 +198,30 @@ module.exports = function (ngApp, events) { ...@@ -198,6 +198,30 @@ module.exports = function (ngApp, events) {
198 } 198 }
199 199
200 scope.tinymce.extraSetups.push(tinyMceSetup); 200 scope.tinymce.extraSetups.push(tinyMceSetup);
201 +
202 + // Custom tinyMCE plugins
203 + tinymce.PluginManager.add('customhr', function(editor) {
204 + editor.addCommand('InsertHorizontalRule', function() {
205 + var hrElem = document.createElement('hr');
206 + var cNode = editor.selection.getNode();
207 + var parentNode = cNode.parentNode;
208 + parentNode.insertBefore(hrElem, cNode);
209 + });
210 +
211 + editor.addButton('hr', {
212 + icon: 'hr',
213 + tooltip: 'Horizontal line',
214 + cmd: 'InsertHorizontalRule'
215 + });
216 +
217 + editor.addMenuItem('hr', {
218 + icon: 'hr',
219 + text: 'Horizontal line',
220 + cmd: 'InsertHorizontalRule',
221 + context: 'insert'
222 + });
223 + });
224 +
201 tinymce.init(scope.tinymce); 225 tinymce.init(scope.tinymce);
202 } 226 }
203 } 227 }
......
...@@ -11,7 +11,7 @@ var mceOptions = module.exports = { ...@@ -11,7 +11,7 @@ var mceOptions = module.exports = {
11 extended_valid_elements: 'pre[*]', 11 extended_valid_elements: 'pre[*]',
12 automatic_uploads: false, 12 automatic_uploads: false,
13 valid_children: "-div[p|pre|h1|h2|h3|h4|h5|h6|blockquote]", 13 valid_children: "-div[p|pre|h1|h2|h3|h4|h5|h6|blockquote]",
14 - plugins: "image table textcolor paste link fullscreen imagetools code hr autosave lists", 14 + plugins: "image table textcolor paste link fullscreen imagetools code customhr autosave lists",
15 imagetools_toolbar: 'imageoptions', 15 imagetools_toolbar: 'imageoptions',
16 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", 16 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",
17 content_style: "body {padding-left: 15px !important; padding-right: 15px !important; margin:0!important; margin-left:auto!important;margin-right:auto!important;}", 17 content_style: "body {padding-left: 15px !important; padding-right: 15px !important; margin:0!important; margin-left:auto!important;margin-right:auto!important;}",
......
1 -/* Generated by Font Squirrel (http://www.fontsquirrel.com) on December 30, 2015 */ 1 +// Generated using https://google-webfonts-helper.herokuapp.com
2 +
3 +/* roboto-100 - cyrillic_latin */
2 @font-face { 4 @font-face {
3 font-family: 'Roboto'; 5 font-family: 'Roboto';
4 - src: url('/fonts/roboto-bold-webfont.eot');
5 - src: url('/fonts/roboto-bold-webfont.eot?#iefix') format('embedded-opentype'),
6 - url('/fonts/roboto-bold-webfont.woff2') format('woff2'),
7 - url('/fonts/roboto-bold-webfont.woff') format('woff'),
8 - url('/fonts/roboto-bold-webfont.ttf') format('truetype'),
9 - url('/fonts/roboto-bold-webfont.svg#robotobold') format('svg');
10 - font-weight: bold;
11 font-style: normal; 6 font-style: normal;
7 + font-weight: 100;
8 + src: local('Roboto Thin'), local('Roboto-Thin'),
9 + url('/fonts/roboto-v15-cyrillic_latin-100.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
10 + url('/fonts/roboto-v15-cyrillic_latin-100.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
12 } 11 }
13 - 12 +/* roboto-100italic - cyrillic_latin */
14 @font-face { 13 @font-face {
15 font-family: 'Roboto'; 14 font-family: 'Roboto';
16 - src: url('/fonts/roboto-bolditalic-webfont.eot');
17 - src: url('/fonts/roboto-bolditalic-webfont.eot?#iefix') format('embedded-opentype'),
18 - url('/fonts/roboto-bolditalic-webfont.woff2') format('woff2'),
19 - url('/fonts/roboto-bolditalic-webfont.woff') format('woff'),
20 - url('/fonts/roboto-bolditalic-webfont.ttf') format('truetype'),
21 - url('/fonts/roboto-bolditalic-webfont.svg#robotobold_italic') format('svg');
22 - font-weight: bold;
23 font-style: italic; 15 font-style: italic;
16 + font-weight: 100;
17 + src: local('Roboto Thin Italic'), local('Roboto-ThinItalic'),
18 + url('/fonts/roboto-v15-cyrillic_latin-100italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
19 + url('/fonts/roboto-v15-cyrillic_latin-100italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
24 } 20 }
25 - 21 +/* roboto-300 - cyrillic_latin */
26 @font-face { 22 @font-face {
27 font-family: 'Roboto'; 23 font-family: 'Roboto';
28 - src: url('/fonts/roboto-italic-webfont.eot'); 24 + font-style: normal;
29 - src: url('/fonts/roboto-italic-webfont.eot?#iefix') format('embedded-opentype'), 25 + font-weight: 300;
30 - url('/fonts/roboto-italic-webfont.woff2') format('woff2'), 26 + src: local('Roboto Light'), local('Roboto-Light'),
31 - url('/fonts/roboto-italic-webfont.woff') format('woff'), 27 + url('/fonts/roboto-v15-cyrillic_latin-300.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
32 - url('/fonts/roboto-italic-webfont.ttf') format('truetype'), 28 + url('/fonts/roboto-v15-cyrillic_latin-300.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
33 - url('/fonts/roboto-italic-webfont.svg#robotoitalic') format('svg');
34 - font-weight: normal;
35 - font-style: italic;
36 } 29 }
37 - 30 +/* roboto-300italic - cyrillic_latin */
38 @font-face { 31 @font-face {
39 font-family: 'Roboto'; 32 font-family: 'Roboto';
40 - src: url('/fonts/roboto-light-webfont.eot'); 33 + font-style: italic;
41 - src: url('/fonts/roboto-light-webfont.eot?#iefix') format('embedded-opentype'),
42 - url('/fonts/roboto-light-webfont.woff2') format('woff2'),
43 - url('/fonts/roboto-light-webfont.woff') format('woff'),
44 - url('/fonts/roboto-light-webfont.ttf') format('truetype'),
45 - url('/fonts/roboto-light-webfont.svg#robotolight') format('svg');
46 font-weight: 300; 34 font-weight: 300;
35 + src: local('Roboto Light Italic'), local('Roboto-LightItalic'),
36 + url('/fonts/roboto-v15-cyrillic_latin-300italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
37 + url('/fonts/roboto-v15-cyrillic_latin-300italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
38 +}
39 +/* roboto-regular - cyrillic_latin */
40 +@font-face {
41 + font-family: 'Roboto';
47 font-style: normal; 42 font-style: normal;
43 + font-weight: 400;
44 + src: local('Roboto'), local('Roboto-Regular'),
45 + url('/fonts/roboto-v15-cyrillic_latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
46 + url('/fonts/roboto-v15-cyrillic_latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
48 } 47 }
49 - 48 +/* roboto-italic - cyrillic_latin */
50 @font-face { 49 @font-face {
51 font-family: 'Roboto'; 50 font-family: 'Roboto';
52 - src: url('/fonts/roboto-lightitalic-webfont.eot');
53 - src: url('/fonts/roboto-lightitalic-webfont.eot?#iefix') format('embedded-opentype'),
54 - url('/fonts/roboto-lightitalic-webfont.woff2') format('woff2'),
55 - url('/fonts/roboto-lightitalic-webfont.woff') format('woff'),
56 - url('/fonts/roboto-lightitalic-webfont.ttf') format('truetype'),
57 - url('/fonts/roboto-lightitalic-webfont.svg#robotolight_italic') format('svg');
58 - font-weight: 300;
59 font-style: italic; 51 font-style: italic;
52 + font-weight: 400;
53 + src: local('Roboto Italic'), local('Roboto-Italic'),
54 + url('/fonts/roboto-v15-cyrillic_latin-italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
55 + url('/fonts/roboto-v15-cyrillic_latin-italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
60 } 56 }
61 - 57 +/* roboto-500 - cyrillic_latin */
62 @font-face { 58 @font-face {
63 font-family: 'Roboto'; 59 font-family: 'Roboto';
64 - src: url('/fonts/roboto-medium-webfont.eot');
65 - src: url('/fonts/roboto-medium-webfont.eot?#iefix') format('embedded-opentype'),
66 - url('/fonts/roboto-medium-webfont.woff2') format('woff2'),
67 - url('/fonts/roboto-medium-webfont.woff') format('woff'),
68 - url('/fonts/roboto-medium-webfont.ttf') format('truetype'),
69 - url('/fonts/roboto-medium-webfont.svg#robotomedium') format('svg');
70 - font-weight: 500;
71 font-style: normal; 60 font-style: normal;
61 + font-weight: 500;
62 + src: local('Roboto Medium'), local('Roboto-Medium'),
63 + url('/fonts/roboto-v15-cyrillic_latin-500.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
64 + url('/fonts/roboto-v15-cyrillic_latin-500.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
72 } 65 }
73 - 66 +/* roboto-500italic - cyrillic_latin */
74 @font-face { 67 @font-face {
75 font-family: 'Roboto'; 68 font-family: 'Roboto';
76 - src: url('/fonts/roboto-mediumitalic-webfont.eot');
77 - src: url('/fonts/roboto-mediumitalic-webfont.eot?#iefix') format('embedded-opentype'),
78 - url('/fonts/roboto-mediumitalic-webfont.woff2') format('woff2'),
79 - url('/fonts/roboto-mediumitalic-webfont.woff') format('woff'),
80 - url('/fonts/roboto-mediumitalic-webfont.ttf') format('truetype'),
81 - url('/fonts/roboto-mediumitalic-webfont.svg#robotomedium_italic') format('svg');
82 - font-weight: 500;
83 font-style: italic; 69 font-style: italic;
70 + font-weight: 500;
71 + src: local('Roboto Medium Italic'), local('Roboto-MediumItalic'),
72 + url('/fonts/roboto-v15-cyrillic_latin-500italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
73 + url('/fonts/roboto-v15-cyrillic_latin-500italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
84 } 74 }
85 - 75 +/* roboto-700 - cyrillic_latin */
86 @font-face { 76 @font-face {
87 font-family: 'Roboto'; 77 font-family: 'Roboto';
88 - src: url('/fonts/roboto-regular-webfont.eot');
89 - src: url('/fonts/roboto-regular-webfont.eot?#iefix') format('embedded-opentype'),
90 - url('/fonts/roboto-regular-webfont.woff2') format('woff2'),
91 - url('/fonts/roboto-regular-webfont.woff') format('woff'),
92 - url('/fonts/roboto-regular-webfont.ttf') format('truetype'),
93 - url('/fonts/roboto-regular-webfont.svg#robotoregular') format('svg');
94 - font-weight: normal;
95 font-style: normal; 78 font-style: normal;
79 + font-weight: 700;
80 + src: local('Roboto Bold'), local('Roboto-Bold'),
81 + url('/fonts/roboto-v15-cyrillic_latin-700.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
82 + url('/fonts/roboto-v15-cyrillic_latin-700.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
83 +}
84 +/* roboto-700italic - cyrillic_latin */
85 +@font-face {
86 + font-family: 'Roboto';
87 + font-style: italic;
88 + font-weight: 700;
89 + src: local('Roboto Bold Italic'), local('Roboto-BoldItalic'),
90 + url('/fonts/roboto-v15-cyrillic_latin-700italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
91 + url('/fonts/roboto-v15-cyrillic_latin-700italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
96 } 92 }
97 93
98 /* roboto-mono-regular - latin */ 94 /* roboto-mono-regular - latin */
99 -// https://google-webfonts-helper.herokuapp.com
100 @font-face { 95 @font-face {
101 font-family: 'Roboto Mono'; 96 font-family: 'Roboto Mono';
102 font-style: normal; 97 font-style: normal;
......
...@@ -249,3 +249,8 @@ div[editor-type="markdown"] .title-input.page-title input[type="text"] { ...@@ -249,3 +249,8 @@ div[editor-type="markdown"] .title-input.page-title input[type="text"] {
249 .image-picker img { 249 .image-picker img {
250 background-color: #BBB; 250 background-color: #BBB;
251 } 251 }
252 +
253 +div[toggle-switch] {
254 + height: 18px;
255 + width: 150px;
256 +}
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -4,11 +4,11 @@ ...@@ -4,11 +4,11 @@
4 4
5 @include('settings/navbar', ['selected' => 'settings']) 5 @include('settings/navbar', ['selected' => 'settings'])
6 6
7 -<div class="container small"> 7 +<div class="container small settings-container">
8 8
9 <h1>Settings</h1> 9 <h1>Settings</h1>
10 10
11 - <form action="/settings" method="POST"> 11 + <form action="/settings" method="POST" ng-cloak>
12 {!! csrf_field() !!} 12 {!! csrf_field() !!}
13 13
14 <h3>App Settings</h3> 14 <h3>App Settings</h3>
...@@ -21,12 +21,12 @@ ...@@ -21,12 +21,12 @@
21 </div> 21 </div>
22 <div class="form-group"> 22 <div class="form-group">
23 <label>Allow public viewing?</label> 23 <label>Allow public viewing?</label>
24 - <toggle-switch name="setting-app-public" value="{{ setting('app-public') }}"></toggle-switch> 24 + <div toggle-switch name="setting-app-public" value="{{ setting('app-public') }}"></div>
25 </div> 25 </div>
26 <div class="form-group"> 26 <div class="form-group">
27 <label>Enable higher security image uploads?</label> 27 <label>Enable higher security image uploads?</label>
28 <p class="small">For performance reasons, all images are public by default, This option adds a random, hard-to-guess characters in front of image names. Ensure directory indexes are not enabled to prevent easy access.</p> 28 <p class="small">For performance reasons, all images are public by default, This option adds a random, hard-to-guess characters in front of image names. Ensure directory indexes are not enabled to prevent easy access.</p>
29 - <toggle-switch name="setting-app-secure-images" value="{{ setting('app-secure-images') }}"></toggle-switch> 29 + <div toggle-switch name="setting-app-secure-images" value="{{ setting('app-secure-images') }}"></div>
30 </div> 30 </div>
31 <div class="form-group"> 31 <div class="form-group">
32 <label for="setting-app-editor">Page editor</label> 32 <label for="setting-app-editor">Page editor</label>
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
61 <div class="col-md-6"> 61 <div class="col-md-6">
62 <div class="form-group"> 62 <div class="form-group">
63 <label for="setting-registration-enabled">Allow registration?</label> 63 <label for="setting-registration-enabled">Allow registration?</label>
64 - <toggle-switch name="setting-registration-enabled" value="{{ setting('registration-enabled') }}"></toggle-switch> 64 + <div toggle-switch name="setting-registration-enabled" value="{{ setting('registration-enabled') }}"></div>
65 </div> 65 </div>
66 <div class="form-group"> 66 <div class="form-group">
67 <label for="setting-registration-role">Default user role after registration</label> 67 <label for="setting-registration-role">Default user role after registration</label>
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
78 <div class="form-group"> 78 <div class="form-group">
79 <label for="setting-registration-confirmation">Require email confirmation?</label> 79 <label for="setting-registration-confirmation">Require email confirmation?</label>
80 <p class="small">If domain restriction is used then email confirmation will be required and the below value will be ignored.</p> 80 <p class="small">If domain restriction is used then email confirmation will be required and the below value will be ignored.</p>
81 - <toggle-switch name="setting-registration-confirmation" value="{{ setting('registration-confirmation') }}"></toggle-switch> 81 + <div toggle-switch name="setting-registration-confirmation" value="{{ setting('registration-confirmation') }}"></div>
82 </div> 82 </div>
83 </div> 83 </div>
84 <div class="col-md-6"> 84 <div class="col-md-6">
...@@ -94,6 +94,9 @@ ...@@ -94,6 +94,9 @@
94 <hr class="margin-top"> 94 <hr class="margin-top">
95 95
96 <div class="form-group"> 96 <div class="form-group">
97 + <span class="float right muted">
98 + BookStack @if(strpos($version, 'v') !== 0) version @endif {{ $version }}
99 + </span>
97 <button type="submit" class="button pos">Save Settings</button> 100 <button type="submit" class="button pos">Save Settings</button>
98 </div> 101 </div>
99 </form> 102 </form>
......