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::get('showListOeuvres/{id}', 'ReferentController@showListeOeuvres');
|
||||
Route::post('setListOeuvres', 'ReferentController@setListOeuvres');
|
||||
Route::post('search/', 'ReferentController@search');
|
||||
Route::post('search', 'ReferentController@search');
|
||||
});
|
||||
|
||||
Route::group(['middleware' => 'admin'], function ()
|
||||
|
@ -61,9 +61,11 @@ $('#search_button, #previous, #next').click(function(event) {
|
||||
|
||||
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')) {
|
||||
str = $("#next").attr('href');
|
||||
console.log(/([0-9]+)/.exec(str));
|
||||
url = "/search?page="+/([0-9]+)/.exec(str)[0];
|
||||
}else if (this.id == $('#previous').attr('id')) {
|
||||
str = $("#previous").attr('href');
|
||||
@ -86,7 +88,6 @@ $('#search_button, #previous, #next').click(function(event) {
|
||||
$.post(url,
|
||||
dataSend,
|
||||
function( data ) {
|
||||
console.log(data);
|
||||
if (data.length == 0 )
|
||||
$("#oeuvreRes").append("Aucune Oeuvre Trouvé..");
|
||||
data.data.forEach( function(el) {
|
||||
|
Reference in New Issue
Block a user