Merge branch 'develop'

This commit is contained in:
snipe 2017-10-25 20:16:16 -07:00
commit f7c92f61e1
14 changed files with 172 additions and 109 deletions

View file

@ -143,5 +143,24 @@ class ProfileController extends Controller
} }
/**
* Returns a page with the API token generation interface.
*
* We created a controller method for this because closures aren't allowed
* in the routes file if you want to be able to cache the routes.
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @return View
*/
public function getMenuState(Request $request) {
if ($request->input('state')=='open') {
$request->session()->put('menu_state', 'open');
} else {
$request->session()->put('menu_state', 'closed');
}
}
} }

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
public/js/dist/all.js vendored

Binary file not shown.

View file

@ -1,10 +1,14 @@
{ {
"/js/build/vue.js": "/js/build/vue.js?id=e9504cad01a748f9b0fa", "/js/build/vue.js": "/js/build/vue.js?id=e6804371942215bd1d7d",
"/css/AdminLTE.css": "/css/AdminLTE.css?id=889dc040f2ddfca6efde", "/css/AdminLTE.css": "/css/AdminLTE.css?id=b8be19a285eaf44eec37",
"/css/app.css": "/css/app.css?id=3a1e8c168fa8714043a6", "/css/app.css": "/css/app.css?id=407edb63cc6b6dc62405",
"/css/overrides.css": "/css/overrides.css?id=3911514a8a64a4247483", "/css/overrides.css": "/css/overrides.css?id=9ae1a3c861441320c5a1",
"/css/dist/all.css": "/css/dist/all.css?id=f2d4896e67e878a47434", "/js/build/vue.js.map": "/js/build/vue.js.map?id=3b3d417664a61dcce3e9",
"/js/dist/all.js": "/js/dist/all.js?id=15363bc14ab0694d1275", "/css/AdminLTE.css.map": "/css/AdminLTE.css.map?id=99f5a5a03c4155cf69f6",
"/css/build/all.css": "/css/build/all.css?id=f2d4896e67e878a47434", "/css/app.css.map": "/css/app.css.map?id=bdbe05e6ecd70ccfac72",
"/js/build/all.js": "/js/build/all.js?id=15363bc14ab0694d1275" "/css/overrides.css.map": "/css/overrides.css.map?id=898c91d4a425b01b589b",
"/css/dist/all.css": "/css/dist/all.css?id=7c3842d2639193ac7e88",
"/js/dist/all.js": "/js/dist/all.js?id=f14abfc2506d42ffb0f5",
"/css/build/all.css": "/css/build/all.css?id=7c3842d2639193ac7e88",
"/js/build/all.js": "/js/build/all.js?id=f14abfc2506d42ffb0f5"
} }

View file

@ -180,6 +180,17 @@ $(document).ready(function () {
} }
$('.datepicker').datepicker(); $('.datepicker').datepicker();
$(document).ready(function() {
$("#toggle_nav").toggle(function() {
});
});
}); });

View file

@ -27,6 +27,8 @@
</ul> </ul>
<div class="tab-content"> <div class="tab-content">
<div class="tab-pane fade in active" id="assets"> <div class="tab-pane fade in active" id="assets">
<div class="row">
<div class="col-md-12">
@if ($assets->count() > 0) @if ($assets->count() > 0)
@ -86,16 +88,21 @@
</div> </div>
@else @else
<div class="col-md-12">
<div class="alert alert-info alert-block"> <div class="alert alert-info alert-block">
<i class="fa fa-info-circle"></i> <i class="fa fa-info-circle"></i>
{{ trans('general.no_results') }} {{ trans('general.no_results') }}
</div> </div>
</div>
@endif @endif
</div>
</div>
</div> </div>
<div class="tab-pane fade" id="models"> <div class="tab-pane fade" id="models">
<div class="row">
<div class="col-md-12">
@if ($models->count() > 0) @if ($models->count() > 0)
<h4>Requestable Models</h4> <h4>Requestable Models</h4>
@ -134,14 +141,14 @@
</table> </table>
@else @else
<div class="col-md-12">
<div class="alert alert-info alert-block"> <div class="alert alert-info alert-block">
<i class="fa fa-info-circle"></i> <i class="fa fa-info-circle"></i>
{{ trans('general.no_results') }} {{ trans('general.no_results') }}
</div> </div>
</div>
@endif @endif
</div> </div>
</div>
</div>
</div> <!-- .tab-content--> </div> <!-- .tab-content-->
</div> <!-- .nav-tabs-custom --> </div> <!-- .nav-tabs-custom -->

View file

@ -6,7 +6,6 @@
<title> <title>
@section('title') @section('title')
@show @show
:: {{ $snipeSettings->site_name }} :: {{ $snipeSettings->site_name }}
</title> </title>
<!-- Tell the browser to be responsive to screen width --> <!-- Tell the browser to be responsive to screen width -->
@ -29,6 +28,7 @@
<script nonce="{{ csrf_token() }}"> <script nonce="{{ csrf_token() }}">
window.Laravel = { csrfToken: '{{ csrf_token() }}' }; window.Laravel = { csrfToken: '{{ csrf_token() }}' };
</script> </script>
<style nonce="{{ csrf_token() }}"> <style nonce="{{ csrf_token() }}">
@ -89,7 +89,7 @@
@endif @endif
<![endif]--> <![endif]-->
</head> </head>
<body class="hold-transition skin-blue sidebar-mini sidebar-collapse"> <body class="sidebar-mini skin-blue {{ (session('menu_state')!='open') ? 'sidebar-mini sidebar-collapse' : '' }}">
<div class="wrapper"> <div class="wrapper">
<header class="main-header"> <header class="main-header">
@ -732,11 +732,31 @@
<script nonce="{{ csrf_token() }}"> <script nonce="{{ csrf_token() }}">
$(function () { $(function () {
$('[data-toggle="tooltip"]').tooltip(); $('[data-toggle="tooltip"]').tooltip();
})
$('body').bind('expanded.pushMenu', function() {
$.ajax({
type: 'GET',
url: "{{ route('account.menuprefs', ['state'=>'open']) }}",
_token: "{{ csrf_token() }}"
});
});
$('body').bind('collapsed.pushMenu', function() {
$.ajax({
type: 'GET',
url: "{{ route('account.menuprefs', ['state'=>'close']) }}",
_token: "{{ csrf_token() }}"
});
});
});
$(document).on('click', '[data-toggle="lightbox"]', function(event) { $(document).on('click', '[data-toggle="lightbox"]', function(event) {
event.preventDefault(); event.preventDefault();
$(this).ekkoLightbox(); $(this).ekkoLightbox();
}); });
</script> </script>
@if ((Session::get('topsearch')=='true') || (Request::is('/'))) @if ((Session::get('topsearch')=='true') || (Request::is('/')))

View file

@ -233,6 +233,8 @@ Route::group([ 'prefix' => 'account', 'middleware' => ['auth']], function () {
Route::get('profile', [ 'as' => 'profile', 'uses' => 'ProfileController@getIndex' ]); Route::get('profile', [ 'as' => 'profile', 'uses' => 'ProfileController@getIndex' ]);
Route::post('profile', 'ProfileController@postIndex'); Route::post('profile', 'ProfileController@postIndex');
Route::get('menu', [ 'as' => 'account.menuprefs', 'uses' => 'ProfileController@getMenuState' ]);
Route::get('password', [ 'as' => 'account.password.index', 'uses' => 'ProfileController@password' ]); Route::get('password', [ 'as' => 'account.password.index', 'uses' => 'ProfileController@password' ]);
Route::post('password', [ 'uses' => 'ProfileController@passwordSave' ]); Route::post('password', [ 'uses' => 'ProfileController@passwordSave' ]);