modified: SRC/app/Http/routes.php
modified: SRC/public/js/ListeOeuvre.js
This commit is contained in:
parent
8a0f8a5b3c
commit
407a955444
@ -40,7 +40,7 @@ Route::group(['middleware' => 'auth'], function ()
|
|||||||
Route::post('addListeOeuvre', 'ReferentController@addListeOeuvre');
|
Route::post('addListeOeuvre', 'ReferentController@addListeOeuvre');
|
||||||
Route::get('showListOeuvres/{id}', 'ReferentController@showListeOeuvres');
|
Route::get('showListOeuvres/{id}', 'ReferentController@showListeOeuvres');
|
||||||
Route::post('setListOeuvres', 'ReferentController@setListOeuvres');
|
Route::post('setListOeuvres', 'ReferentController@setListOeuvres');
|
||||||
Route::post('search/', 'ReferentController@search');
|
Route::post('search', 'ReferentController@search');
|
||||||
});
|
});
|
||||||
|
|
||||||
Route::group(['middleware' => 'admin'], function ()
|
Route::group(['middleware' => 'admin'], function ()
|
||||||
|
@ -61,9 +61,11 @@ $('#search_button, #previous, #next').click(function(event) {
|
|||||||
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
|
if(this.id == $('#next').attr('id') && $("#next").parent().hasClass('disabled') || this.id == $('#previous').attr('id') && $("#previous").parent().hasClass('disabled'))
|
||||||
|
return 0;
|
||||||
|
|
||||||
if (this.id == $('#next').attr('id')) {
|
if (this.id == $('#next').attr('id')) {
|
||||||
str = $("#next").attr('href');
|
str = $("#next").attr('href');
|
||||||
console.log(/([0-9]+)/.exec(str));
|
|
||||||
url = "/search?page="+/([0-9]+)/.exec(str)[0];
|
url = "/search?page="+/([0-9]+)/.exec(str)[0];
|
||||||
}else if (this.id == $('#previous').attr('id')) {
|
}else if (this.id == $('#previous').attr('id')) {
|
||||||
str = $("#previous").attr('href');
|
str = $("#previous").attr('href');
|
||||||
@ -86,7 +88,6 @@ $('#search_button, #previous, #next').click(function(event) {
|
|||||||
$.post(url,
|
$.post(url,
|
||||||
dataSend,
|
dataSend,
|
||||||
function( data ) {
|
function( data ) {
|
||||||
console.log(data);
|
|
||||||
if (data.length == 0 )
|
if (data.length == 0 )
|
||||||
$("#oeuvreRes").append("Aucune Oeuvre Trouvé..");
|
$("#oeuvreRes").append("Aucune Oeuvre Trouvé..");
|
||||||
data.data.forEach( function(el) {
|
data.data.forEach( function(el) {
|
||||||
|
Reference in New Issue
Block a user