Merge branch 'master' of binarity.cz:/opt/git/internal/cms/minicms

This commit is contained in:
Peter Hrdlica
2017-10-15 15:54:57 +02:00
8 changed files with 44 additions and 20 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ trait Nullable {
* @return null|string
*/
public function nullableDate($date) {
return empty($date) ? null : Carbon::parse($date)->toDateTimeString();
return empty($date) ? null : Carbon::createFromFormat(config('app.date_format'), $date)->toDateTimeString();
}
/**
+3
View File
@@ -26,13 +26,16 @@ elixir (function (mix) {
'tinycolor/dist/tinycolor-min.js',
'chart.js/dist/Chart.bundle.min.js',
'jquery.are-you-sure/jquery.are-you-sure.js',
'../node_modules/bootstrap-datepicker/dist/js/bootstrap-datepicker.js',
'../resources/assets/admin/js/*.js',
], 'public/js/vendor.js', 'bower_components')
.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')
.sass (['bootstrap/bootstrap.scss'], 'public/css/admin/bootstrap.css')
.styles ([
'../../../public/css/admin/bootstrap.css',
'../../../public/css/bootstrap-datepicker.css',
'../../../bower_components/animate.css/animate.css',
], 'public/css/admin/style.css')
.remove ('public/css/admin/theme.scss');
+9 -2
View File
@@ -152,6 +152,14 @@
"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": {
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/bower/-/bower-1.8.0.tgz",
@@ -1761,8 +1769,7 @@
"jquery": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.2.1.tgz",
"integrity": "sha1-XE2d5lKvbNCncBVKYxu6ErAVx4c=",
"dev": true
"integrity": "sha1-XE2d5lKvbNCncBVKYxu6ErAVx4c="
},
"json-stable-stringify": {
"version": "1.0.1",
+1
View File
@@ -12,6 +12,7 @@
"lodash": "^4.16.2"
},
"dependencies": {
"bootstrap-datepicker": "^1.7.1",
"laravel-elixir-remove": "^0.2.1"
}
}
+1 -2
View File
@@ -329,7 +329,7 @@ img {
.card.file-preview .card-block {
padding: 0;
height: 6em;
height: 9em;
overflow: hidden;
}
@@ -437,5 +437,4 @@ img {
white-space: nowrap;
background: none;
border: 0;
}
+4
View File
@@ -20,6 +20,10 @@ $ (document).ready (function () {
$ ('form').areYouSure ();
});
$ ('.date').datepicker ({
format: 'dd. mm. yyyy'
});
$ ('.checkbox').change (function () {
var e = $ (this);
var checked = e.is (':checked');
@@ -1,5 +1,5 @@
@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', [
'body' => '<a href="'.route('upload.detail', ['id' => $file->id]).'">'.\App\CMS\Helpers\FileManager::getPreview($file).'</a>',
'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">
CKEDITOR.on ('instanceCreated', function (e) {
@@ -19,21 +22,28 @@
basicEntities: false,
entities_greek: false,
entities_latin: false,
height: 550,
height: {{$height or 550}},
removePlugins: 'about,scayt', //elementspath
extraPlugins: 'justify',
enterMode: CKEDITOR.ENTER_P,
toolbarGroups: [
{name: 'undo', groups: ['undo']},
{name: 'styles'},
{name: 'basicstyles', groups: ['basicstyles', 'cleanup']},
{name: 'paragraph', groups: ['list', 'indent', 'align', 'blocks']},
{name: 'links'},
{name: 'editing', groups: ['find', 'selection']},
{name: 'insert'},
{name: 'forms'},
{name: 'document', groups: ['mode', 'document', 'doctools']},
{name: 'tools'}
]
@if (!isset($simpleEditor))
toolbarGroups: [
{name: 'undo', groups: ['undo']},
{name: 'styles'},
{name: 'basicstyles', groups: ['basicstyles', 'cleanup']},
{name: 'paragraph', groups: ['list', 'indent', 'align', 'blocks']},
{name: 'links'},
{name: 'editing', groups: ['find', 'selection']},
{name: 'insert'},
{name: 'forms'},
{name: 'document', groups: ['mode', 'document', 'doctools']},
{name: 'tools'}
]
@else
toolbarGroups: [
{name: 'undo', groups: ['undo']},
{name: 'basicstyles', groups: ['basicstyles', 'cleanup']},
]
@endif
});
</script>