Commit 4168bb33 authored by delanoe's avatar delanoe

Merge remote-tracking branch 'origin/romain-testing' into testing-merge

parents 48a58dad cf1dd3a9
...@@ -37,11 +37,10 @@ def is_stop_word(ngram, stop_words=None): ...@@ -37,11 +37,10 @@ def is_stop_word(ngram, stop_words=None):
, "(.*)(différent)(.*)" , "(.*)(différent)(.*)"
, "(.*)(travers)(.*)" , "(.*)(travers)(.*)"
# academic stamps # academic stamps
, ".*\belsevier\b.*" , ".*elsevier.*"
, ".*\bwiley\b.*" , ".*wiley.*"
, ".*\bspringer\b.*" , ".*springer.*"
, ".*university press\b.*" , ".*university press.*"
, ".*\bstudy\b.*"
# academic terms when alone ~~> usually not informative # academic terms when alone ~~> usually not informative
, "hypothes[ie]s$" , "hypothes[ie]s$"
, "analys[ie]s$" , "analys[ie]s$"
......
...@@ -204,27 +204,24 @@ function getRessources(){ ...@@ -204,27 +204,24 @@ function getRessources(){
//// PUT AND PATCH TO API //// PUT AND PATCH TO API
function deleteOne(url, thatButton){ function deleteOne(url, thatButton){
console.warn("thatButton",thatButton)
// we just show wait image before ajax
var $thatButton = $(thatButton) if (typeof thatButton != 'undefined' && thatButton.id) {
var alreadyWaiting = $thatButton.has($('.wait-img-active')).length // we just show wait image before ajax
var $thatButton = $(thatButton)
if (! alreadyWaiting) { var alreadyWaiting = $thatButton.has($('.wait-img-active')).length
var previousButtonContent = $thatButton.html()
var availableWidth = $thatButton.width()
var $myWaitImg = $('#wait-img').clone() if (! alreadyWaiting ) {
$myWaitImg.attr("id", null) var previousButtonContent = $thatButton.html()
.attr("class","wait-img-active pull-right") var availableWidth = $thatButton.width()
.width(availableWidth) var $myWaitImg = $('#wait-img').clone()
.css("display", "block") ; $myWaitImg.attr("id", null)
$thatButton.append($myWaitImg) .attr("class","wait-img-active pull-right")
} .width(availableWidth)
else { .css("display", "block") ;
// uncomment if user should stop clicking ;) $thatButton.append($myWaitImg)
// $thatButton.addClass("btn-danger") }
// uncomment to prevent a 2nd ajax
return false
} }
// now the real ajax // now the real ajax
......
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