modified: SRC/app/Http/routes.php

modified:   SRC/public/js/ListeOeuvre.js
This commit is contained in:
Malibu 2015-02-23 19:40:01 +01:00
parent 8a0f8a5b3c
commit 407a955444
2 changed files with 4 additions and 3 deletions

View File

@ -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 ()

View File

@ -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) {