Commit fab4fa06 authored by Karl Hasselbring's avatar Karl Hasselbring

WIP routing for quicktip requests

parent c9c603c9
This diff is collapsed.
......@@ -23,7 +23,6 @@ elixir(function (mix) {
| settings.js
*/
mix.scripts(['lib/jquery.js', 'lib/jquery-ui.min.js', 'lib/bootstrap.js', 'lib/lightslider.js', 'lib/masonry.js', 'lib/imagesloaded.js', 'lib/openpgp.min.js', 'lib/iframeResizer.min.js', 'lib/md5.js'], 'public/js/lib.js')
mix.scripts(['lib/jquery.js', 'lib/iframeResizer.contentWindow.min.js'], 'public/js/quicktips.js')
mix.scripts(['scriptStartPage.js', 'results.js'], 'public/js/scriptStartPage.js');
mix.scripts(['scriptResultPage.js', 'results.js'], 'public/js/scriptResultPage.js');
//mix.scripts(['scriptSubpages.js'], 'public/js/scriptSubpages.js');
......@@ -31,6 +30,6 @@ elixir(function (mix) {
// utility
mix.scripts(['utility.js'], 'public/js/utility.js');
mix.less('utility.less', 'public/css/utility.css');
mix.version(['css/themes/default.css', 'js/lib.js', 'js/quicktips.js', 'js/utility.js', 'css/utility.css', 'js/widgets.js', 'js/editLanguage.js', 'js/kontakt.js', 'js/scriptResultPage.js', 'js/scriptStartPage.js', 'js/settings.js', 'css/beitritt.css']);
mix.version(['css/themes/default.css', 'js/lib.js', 'js/utility.js', 'css/utility.css', 'js/widgets.js', 'js/editLanguage.js', 'js/kontakt.js', 'js/scriptResultPage.js', 'js/scriptStartPage.js', 'js/settings.js', 'css/beitritt.css']);
})
......@@ -9,6 +9,8 @@ $(document).ready(function () {
if (document.location.href.indexOf('focus=container') !== -1) {
$($('#foki > li#savedFokiTabSelector').get(0)).find('>a').tab('show');
}
loadQuicktips();
});
function activateJSOnlyContent () {
......@@ -533,3 +535,27 @@ function resultSaver (index) {
$('div.tab-pane.active .result[data-count=' + index + ']').transfer({to: to, duration: 1000});
new Results().updateResultPageInterface();
}
function loadQuicktips () {
/*
{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/qt") }}
?q={{ $metager->getQ() }}
&sprueche={{ $metager->getSprueche() }}
&lang={{ Request::input('lang', 'all') }}
&unfilteredLink={{ base64_encode($metager->getUnfilteredLink()) }}
*/
var mainDiv = $('#quicktips');
mainDiv.attr('status', 'loading');
mainDiv.append('<h1>Hello World</h1>');
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
mainDiv.append(this.responseXML);
console.log(this);
}
};
xhttp.open("GET", "/quicktips.xml?search=test" /*TODO change*/, true);
xhttp.send();
}
{{-- Verwendung: @include('layouts.utility') --}}
<script src="{{ elixir('js/utility.js') }}"></script>
<script defer src="{{ elixir('js/utility.js') }}"></script>
<link type="text/css" rel="stylesheet" href="{{ elixir('css/utility.css') }}" />
......@@ -56,8 +56,6 @@
</nav>
</div>
@if( $metager->showQuicktips() )
<div class="hidden-xs col-md-4" id="quicktips">
<iframe class="col-mod-4 hidden-xs hidden-sm" src="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/qt") }}?q={{ $metager->getQ() }}&sprueche={{ $metager->getSprueche() }}&lang={{ Request::input('lang', 'all') }}&unfilteredLink={{ base64_encode($metager->getUnfilteredLink()) }}"></iframe>
</div>
<div class="col-md-4 hidden-xs hidden-sm" id="quicktips"></div>
@endif
@endsection
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/">
<title>MetaGer quicktip search: @yield{'search'}</title>
<link href="https://www.metager.de/quicktips.xml?search=test"/>
<updated>@yield{'time'}</updated>
<opensearch:totalResults>{{ $quicktips->amount }}</opensearch:totalResults>
@foreach ($quicktips as $quicktip)
<entry>
$quicktip
</entry>
@endforeach
</feed>
......@@ -16,3 +16,9 @@ use Illuminate\Http\Request;
Route::get('/user', function (Request $request) {
return $request->user();
})->middleware('auth:api');
Route::get('/quicktips', function (Request $request) {
return view('quicktips')
->with('search', 'TODO')
->with('time', 'TODO');
})->middleware('auth:api');
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment