Merge branch 'master' of binarity.cz:/opt/git/internal/cms/minicms
This commit is contained in:
@@ -17,7 +17,7 @@ trait Nullable {
|
|||||||
* @return null|string
|
* @return null|string
|
||||||
*/
|
*/
|
||||||
public function nullableDate($date) {
|
public function nullableDate($date) {
|
||||||
return empty($date) ? null : Carbon::parse($date)->toDateTimeString();
|
return empty($date) ? null : Carbon::createFromFormat(config('app.date_format'), $date)->toDateTimeString();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -26,13 +26,16 @@ elixir (function (mix) {
|
|||||||
'tinycolor/dist/tinycolor-min.js',
|
'tinycolor/dist/tinycolor-min.js',
|
||||||
'chart.js/dist/Chart.bundle.min.js',
|
'chart.js/dist/Chart.bundle.min.js',
|
||||||
'jquery.are-you-sure/jquery.are-you-sure.js',
|
'jquery.are-you-sure/jquery.are-you-sure.js',
|
||||||
|
'../node_modules/bootstrap-datepicker/dist/js/bootstrap-datepicker.js',
|
||||||
'../resources/assets/admin/js/*.js',
|
'../resources/assets/admin/js/*.js',
|
||||||
], 'public/js/vendor.js', 'bower_components')
|
], 'public/js/vendor.js', 'bower_components')
|
||||||
.copy ('bower_components/font-awesome/css/font-awesome.min.css', 'public/css')
|
.copy ('bower_components/font-awesome/css/font-awesome.min.css', 'public/css')
|
||||||
|
.copy ('node_modules/bootstrap-datepicker/dist/css/bootstrap-datepicker.css', 'public/css')
|
||||||
.copy ('bower_components/font-awesome/fonts', 'public/fonts')
|
.copy ('bower_components/font-awesome/fonts', 'public/fonts')
|
||||||
.sass (['bootstrap/bootstrap.scss'], 'public/css/admin/bootstrap.css')
|
.sass (['bootstrap/bootstrap.scss'], 'public/css/admin/bootstrap.css')
|
||||||
.styles ([
|
.styles ([
|
||||||
'../../../public/css/admin/bootstrap.css',
|
'../../../public/css/admin/bootstrap.css',
|
||||||
|
'../../../public/css/bootstrap-datepicker.css',
|
||||||
'../../../bower_components/animate.css/animate.css',
|
'../../../bower_components/animate.css/animate.css',
|
||||||
], 'public/css/admin/style.css')
|
], 'public/css/admin/style.css')
|
||||||
.remove ('public/css/admin/theme.scss');
|
.remove ('public/css/admin/theme.scss');
|
||||||
|
|||||||
Generated
+9
-2
@@ -152,6 +152,14 @@
|
|||||||
"inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz"
|
"inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"bootstrap-datepicker": {
|
||||||
|
"version": "1.7.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/bootstrap-datepicker/-/bootstrap-datepicker-1.7.1.tgz",
|
||||||
|
"integrity": "sha1-Tuf680iI2+x4NPv52+fEJ34B3a8=",
|
||||||
|
"requires": {
|
||||||
|
"jquery": "3.2.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"bower": {
|
"bower": {
|
||||||
"version": "1.8.0",
|
"version": "1.8.0",
|
||||||
"resolved": "https://registry.npmjs.org/bower/-/bower-1.8.0.tgz",
|
"resolved": "https://registry.npmjs.org/bower/-/bower-1.8.0.tgz",
|
||||||
@@ -1761,8 +1769,7 @@
|
|||||||
"jquery": {
|
"jquery": {
|
||||||
"version": "3.2.1",
|
"version": "3.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.2.1.tgz",
|
||||||
"integrity": "sha1-XE2d5lKvbNCncBVKYxu6ErAVx4c=",
|
"integrity": "sha1-XE2d5lKvbNCncBVKYxu6ErAVx4c="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"json-stable-stringify": {
|
"json-stable-stringify": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
"lodash": "^4.16.2"
|
"lodash": "^4.16.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"bootstrap-datepicker": "^1.7.1",
|
||||||
"laravel-elixir-remove": "^0.2.1"
|
"laravel-elixir-remove": "^0.2.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-2
@@ -329,7 +329,7 @@ img {
|
|||||||
|
|
||||||
.card.file-preview .card-block {
|
.card.file-preview .card-block {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
height: 6em;
|
height: 9em;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -437,5 +437,4 @@ img {
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
background: none;
|
background: none;
|
||||||
border: 0;
|
border: 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -20,6 +20,10 @@ $ (document).ready (function () {
|
|||||||
$ ('form').areYouSure ();
|
$ ('form').areYouSure ();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$ ('.date').datepicker ({
|
||||||
|
format: 'dd. mm. yyyy'
|
||||||
|
});
|
||||||
|
|
||||||
$ ('.checkbox').change (function () {
|
$ ('.checkbox').change (function () {
|
||||||
var e = $ (this);
|
var e = $ (this);
|
||||||
var checked = e.is (':checked');
|
var checked = e.is (':checked');
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
@forelse($files as $file)
|
@forelse($files as $file)
|
||||||
<div class="col-sm-4 col-md-3 text-center">
|
<div class="{{$responsiveClass or 'col-sm-4 col-md-3'}} text-center">
|
||||||
@include('admin.snippets.card', [
|
@include('admin.snippets.card', [
|
||||||
'body' => '<a href="'.route('upload.detail', ['id' => $file->id]).'">'.\App\CMS\Helpers\FileManager::getPreview($file).'</a>',
|
'body' => '<a href="'.route('upload.detail', ['id' => $file->id]).'">'.\App\CMS\Helpers\FileManager::getPreview($file).'</a>',
|
||||||
'footerClass' => 'text-right',
|
'footerClass' => 'text-right',
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
<script src="{{asset('/resources/assets/js/vendor/ckeditor/ckeditor.js')}}"></script>
|
@if (!defined('CK_EDITOR_INITIALIZED'))
|
||||||
|
<script src="{{asset('/resources/assets/js/vendor/ckeditor/ckeditor.js')}}"></script>
|
||||||
|
@php define('CK_EDITOR_INITIALIZED', true) @endphp
|
||||||
|
@endif
|
||||||
|
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
CKEDITOR.on ('instanceCreated', function (e) {
|
CKEDITOR.on ('instanceCreated', function (e) {
|
||||||
@@ -19,21 +22,28 @@
|
|||||||
basicEntities: false,
|
basicEntities: false,
|
||||||
entities_greek: false,
|
entities_greek: false,
|
||||||
entities_latin: false,
|
entities_latin: false,
|
||||||
height: 550,
|
height: {{$height or 550}},
|
||||||
removePlugins: 'about,scayt', //elementspath
|
removePlugins: 'about,scayt', //elementspath
|
||||||
extraPlugins: 'justify',
|
extraPlugins: 'justify',
|
||||||
enterMode: CKEDITOR.ENTER_P,
|
enterMode: CKEDITOR.ENTER_P,
|
||||||
toolbarGroups: [
|
@if (!isset($simpleEditor))
|
||||||
{name: 'undo', groups: ['undo']},
|
toolbarGroups: [
|
||||||
{name: 'styles'},
|
{name: 'undo', groups: ['undo']},
|
||||||
{name: 'basicstyles', groups: ['basicstyles', 'cleanup']},
|
{name: 'styles'},
|
||||||
{name: 'paragraph', groups: ['list', 'indent', 'align', 'blocks']},
|
{name: 'basicstyles', groups: ['basicstyles', 'cleanup']},
|
||||||
{name: 'links'},
|
{name: 'paragraph', groups: ['list', 'indent', 'align', 'blocks']},
|
||||||
{name: 'editing', groups: ['find', 'selection']},
|
{name: 'links'},
|
||||||
{name: 'insert'},
|
{name: 'editing', groups: ['find', 'selection']},
|
||||||
{name: 'forms'},
|
{name: 'insert'},
|
||||||
{name: 'document', groups: ['mode', 'document', 'doctools']},
|
{name: 'forms'},
|
||||||
{name: 'tools'}
|
{name: 'document', groups: ['mode', 'document', 'doctools']},
|
||||||
]
|
{name: 'tools'}
|
||||||
|
]
|
||||||
|
@else
|
||||||
|
toolbarGroups: [
|
||||||
|
{name: 'undo', groups: ['undo']},
|
||||||
|
{name: 'basicstyles', groups: ['basicstyles', 'cleanup']},
|
||||||
|
]
|
||||||
|
@endif
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
Reference in New Issue
Block a user