update scripts + add home dash as default tag

This commit is contained in:
Chris 2019-06-18 11:51:07 +01:00
parent ac8fe7012b
commit 7966f07fdb
8 changed files with 18 additions and 13 deletions

View file

@ -140,7 +140,7 @@ class ItemController extends Controller
// //
$data['tags'] = Item::ofType('tag')->orderBy('title', 'asc')->pluck('title', 'id'); $data['tags'] = Item::ofType('tag')->orderBy('title', 'asc')->pluck('title', 'id');
$data['tags']->prepend(__('app.dashboard'), 0); $data['tags']->prepend(__('app.dashboard'), 0);
$data['current_tags'] = []; $data['current_tags'] = collect([0 => __('app.dashboard')]);
return view('items.create', $data); return view('items.create', $data);
} }

5
public/css/app.css vendored

File diff suppressed because one or more lines are too long

2
public/js/app.js vendored

File diff suppressed because one or more lines are too long

View file

@ -1,4 +1,4 @@
{ {
"/css/app.css": "/css/app.css?id=62b46d36567ec0e3418f", "/css/app.css": "/css/app.css?id=e4ac968c3a08d246c3b0",
"/js/app.js": "/js/app.js?id=d8215a9716aec5f9e409" "/js/app.js": "/js/app.js?id=f5edf362209887248205"
} }

View file

@ -1,5 +1,7 @@
$.when( $.ready ).then(function() { $.when( $.ready ).then(function() {
var base = (document.querySelector('base') || {}).href;
if($('.message-container').length) { if($('.message-container').length) {
setTimeout( setTimeout(
function() function()
@ -58,7 +60,7 @@ $.when( $.ready ).then(function() {
var timer = 5000; var timer = 5000;
var fun = function worker() { var fun = function worker() {
$.ajax({ $.ajax({
url: '/get_stats/'+id, url: base+'/get_stats/'+id,
dataType: 'json', dataType: 'json',
success: function(data) { success: function(data) {
container.html(data.html); container.html(data.html);
@ -118,7 +120,7 @@ $.when( $.ready ).then(function() {
attribute: 'data-id' attribute: 'data-id'
}); });
$.post( $.post(
'/order', base+'/order',
{ order:idsInOrder } { order:idsInOrder }
); );
} }
@ -173,7 +175,7 @@ $.when( $.ready ).then(function() {
data[config] = $(this).val(); data[config] = $(this).val();
}); });
$.post('/test_config', { data: data }, function(data) { $.post(base+'/test_config', { data: data }, function(data) {
alert(data); alert(data);
}); });
@ -183,7 +185,7 @@ $.when( $.ready ).then(function() {
var current = $(this); var current = $(this);
var id = current.data('id'); var id = current.data('id');
var tag = current.data('tag'); var tag = current.data('tag');
$.get('/items/pintoggle/'+id+'/true/'+tag, function(data) { $.get(base+'/items/pintoggle/'+id+'/true/'+tag, function(data) {
var inner = $(data).filter('#sortable').html(); var inner = $(data).filter('#sortable').html();
$('#sortable').html(inner); $('#sortable').html(inner);
current.toggleClass('active'); current.toggleClass('active');

View file

@ -56,7 +56,7 @@
<img src="{{ asset('storage/'.$icon) }}" /> <img src="{{ asset('storage/'.$icon) }}" />
{!! Form::hidden('icon', $icon, ['class' => 'form-control']) !!} {!! Form::hidden('icon', $icon, ['class' => 'form-control']) !!}
@else @else
<img src="/img/heimdall-icon-small.png" /> <img src="{{ asset('/img/heimdall-icon-small.png') }}" />
@endif @endif
</div> </div>
<div class="upload-btn-wrapper"> <div class="upload-btn-wrapper">

View file

@ -2,6 +2,8 @@
<script> <script>
$( function() { $( function() {
var base = (document.querySelector('base') || {}).href;
var elem = $('.color-picker')[0]; var elem = $('.color-picker')[0];
var hueb = new Huebee( elem, { var hueb = new Huebee( elem, {
// options // options
@ -59,7 +61,7 @@
$('#tile-preview .app-icon').attr('src', data.iconview); $('#tile-preview .app-icon').attr('src', data.iconview);
$('#tile-preview .title').html(data.name); $('#tile-preview .title').html(data.name);
if(data.config != null) { if(data.config != null) {
$.get('/view/'+data.config, function(getdata) { $.get(base+'/view/'+data.config, function(getdata) {
$('#sapconfig').html(getdata).show(); $('#sapconfig').html(getdata).show();
}); });
} else { } else {

2
webpack.mix.js vendored
View file

@ -11,7 +11,7 @@ let mix = require('laravel-mix');
| |
*/ */
mix.scripts([ mix.babel([
//'resources/assets/js/jquery-ui.min.js', //'resources/assets/js/jquery-ui.min.js',
'resources/assets/js/huebee.js', 'resources/assets/js/huebee.js',
'resources/assets/js/app.js' 'resources/assets/js/app.js'